Skip to content

Commit

Permalink
PE test 16: fix parsing of mem-side cache level (#453)
Browse files Browse the repository at this point in the history
- seventh byte of MPAM descriptor 1 captures level for
  mem side cache.

Signed-off-by: Amrathesh <amrathesh@arm.com>
  • Loading branch information
amrathesh committed Apr 24, 2024
1 parent 110a79c commit ac74d5a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test_pool/pe/operating_system/test_c016.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#define SLC_TYPE_UNKNOWN 0
#define SLC_TYPE_PPTT_CACHE 1
#define SLC_TYPE_MEMSIDE_CACHE 2
#define MEM_CACHE_LVL_MASK 0xFF
#define MEM_CACHE_LVL_SHIFT 56

static void payload(void)
{
Expand Down Expand Up @@ -155,7 +157,8 @@ static void payload(void)
/* check if mem-side cache matches with PE proximity domain
and cache level == 1 for mem-side LLC (based on assumption that
mem-cache nearer to memory is LLC) */
if ((desc2 == pe_prox_domain) && (desc1 == MEM_CACHE_LEVEL_1)) {
if ((desc2 == pe_prox_domain) &&
((desc1 >> MEM_CACHE_LVL_SHIFT) & MEM_CACHE_LVL_MASK) == MEM_CACHE_LEVEL_1) {
mem_llc_msc_found = 1;
/* Select resource instance if RIS feature implemented */
if (ris_supported)
Expand Down

0 comments on commit ac74d5a

Please sign in to comment.