Skip to content

Commit

Permalink
Fix Memory Mirroring Address Calculation
Browse files Browse the repository at this point in the history
  - Use CPU_SPR_HRMOR instead of the deprecated
    ATTR_HB_HRMOR_NODAL_BASE attribute when
    calculating mirrored memory address

Change-Id: I04d98f92ce71ecbaeb0ca368092253b3d1811003
CQ: SW435289
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/61572
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Dean Sanner <dsanner@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/61702
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
  • Loading branch information
wghoffa committed Jun 30, 2018
1 parent 62011de commit 622bd28
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions src/usr/isteps/istep14/call_proc_exit_cache_contained.C
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@
#include <p9_misc_scom_addresses.H>
#include <p9_exit_cache_contained.H>


#include <sys/mm.h>
#include <arch/pirformat.H>
#include <isteps/hwpf_reasoncodes.H>
#include <devicefw/userif.H>
#include <config.h>
#include <util/misc.H>
#include <hwas/common/hwas.H>
#include <sys/misc.h>
#include <vmmconst.h>

#ifdef CONFIG_SECUREBOOT
#include <secureboot/service.H>
Expand Down Expand Up @@ -211,22 +212,13 @@ void* call_proc_exit_cache_contained (void *io_pArgs)
ATTR_MIRROR_BASE_ADDRESS_type l_mirrorBaseAddr = 0;
if(!is_sapphire_load())
{
uint64_t hrmor_base =
l_sys->getAttr<TARGETING::ATTR_HB_HRMOR_NODAL_BASE>();

//First get the Base Memory Mirroring Address
l_mirrorBaseAddr =
l_sys->getAttr<TARGETING::ATTR_MIRROR_BASE_ADDRESS>();

// For single-node systems, the non-master processors can be
// in a different logical (powerbus) group.
// Need to migrate task to master.
task_affinity_pin();
task_affinity_migrate_to_master();
uint64_t this_node = PIR_t(task_getcpuid()).groupId;
task_affinity_unpin();

l_mirrorBaseAddr += (this_node * hrmor_base);

//Add on the current HRMOR value being used
l_mirrorBaseAddr += (cpu_spr_value(CPU_SPR_HRMOR)
- VMM_HRMOR_OFFSET);
}

// Verify there is memory at the mirrored location
Expand Down

0 comments on commit 622bd28

Please sign in to comment.