summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp/occ
diff options
context:
space:
mode:
authorBill Schwartz <whs@us.ibm.com>2015-07-14 09:58:35 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-08-06 16:14:19 -0500
commit77fb3e2cb457a1fdd2ea08abf495b54278070af0 (patch)
tree36548e642894040444a06bc42882d996122cd549 /src/usr/hwpf/hwp/occ
parent5a39b44b4148f1a8740074dc0937b56ed162e24d (diff)
downloadtalos-hostboot-77fb3e2cb457a1fdd2ea08abf495b54278070af0.tar.gz
talos-hostboot-77fb3e2cb457a1fdd2ea08abf495b54278070af0.zip
Support multiple instances for reserved memory
Update HBRT interface to add an instance to get_resvered_mem and update devtree entries with instance. Change-Id: Ie0c5a76ce5ff347354bc91898e1c4dc032430e13 RTC: 131056 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/19281 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: MATTHEW A. PLOETZ <maploetz@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp/occ')
-rw-r--r--src/usr/hwpf/hwp/occ/occ.C11
-rw-r--r--src/usr/hwpf/hwp/occ/occ_common.C4
-rw-r--r--src/usr/hwpf/hwp/occ/runtime/rt_occ.C14
3 files changed, 15 insertions, 14 deletions
diff --git a/src/usr/hwpf/hwp/occ/occ.C b/src/usr/hwpf/hwp/occ/occ.C
index b5168896a..fa1a54752 100644
--- a/src/usr/hwpf/hwp/occ/occ.C
+++ b/src/usr/hwpf/hwp/occ/occ.C
@@ -102,10 +102,10 @@ namespace HBOCC
//==============================
//Setup Addresses
//==============================
- uint8_t procPos = i_target->getAttr<ATTR_POSITION>();
- uint64_t procOffset = (procPos * VMM_HOMER_INSTANCE_SIZE);
#ifndef __HOSTBOOT_RUNTIME
+ uint8_t procPos = i_target->getAttr<ATTR_POSITION>();
+ uint64_t procOffset = (procPos * VMM_HOMER_INSTANCE_SIZE);
uint64_t occImgPaddr =
i_homerPhysAddrBase + procOffset + HOMER_OFFSET_TO_OCC_IMG;
@@ -125,15 +125,16 @@ namespace HBOCC
uint64_t occImgPaddr = homerPaddr + HOMER_OFFSET_TO_OCC_IMG;
uint64_t occImgVaddr = homerVaddr + HOMER_OFFSET_TO_OCC_IMG;
- uint64_t commonPhysAddr = // After homer region
- (homerPaddr - procOffset) + VMM_HOMER_REGION_SIZE;
+ TARGETING::Target* sys = NULL;
+ TARGETING::targetService().getTopLevelTarget(sys);
+ uint64_t commonPhysAddr =
+ sys->getAttr<ATTR_OCC_COMMON_AREA_PHYS_ADDR>();
uint64_t homerHostVirtAddr =
homerVaddr + HOMER_OFFSET_TO_OCC_HOST_DATA;
#endif
-
//==============================
// Load OCC
//==============================
diff --git a/src/usr/hwpf/hwp/occ/occ_common.C b/src/usr/hwpf/hwp/occ/occ_common.C
index 13f1c06e5..983d84ea3 100644
--- a/src/usr/hwpf/hwp/occ/occ_common.C
+++ b/src/usr/hwpf/hwp/occ/occ_common.C
@@ -270,6 +270,10 @@ namespace HBOCC
// BAR3 is the OCC Common Area
// Bar size is in MB, obtained value of 8MB from Tim Hallett
+ TARGETING::Target* sys = NULL;
+ TARGETING::targetService().getTopLevelTarget(sys);
+ sys->setAttr<ATTR_OCC_COMMON_AREA_PHYS_ADDR>(i_commonPhysAddr);
+
TRACUCOMP( g_fapiImpTd,
INFO_MRK"loadOCC: OCC Common Addr: 0x%.8X,size=0x%.8X",
i_commonPhysAddr,VMM_OCC_COMMON_SIZE_IN_MB);
diff --git a/src/usr/hwpf/hwp/occ/runtime/rt_occ.C b/src/usr/hwpf/hwp/occ/runtime/rt_occ.C
index 1bc02a83f..6d3407677 100644
--- a/src/usr/hwpf/hwp/occ/runtime/rt_occ.C
+++ b/src/usr/hwpf/hwp/occ/runtime/rt_occ.C
@@ -431,11 +431,6 @@ namespace RT_OCC
// If we already loaded OCC during the IPL we need to fix up
// the virtual address because we're now not using virtual
// memory
- // Note: We called our memory "ibm,slw-occ-image" but OPAL
- // created their own range that subsumed ours
- //@todo-RTC:124392-solve this naming issue...
- uint64_t l_base_homer =
- g_hostInterfaces->get_reserved_mem("ibm,homer-image");
TargetHandleList procChips;
getAllChips(procChips, TYPE_PROC, true);
@@ -443,10 +438,11 @@ namespace RT_OCC
itr != procChips.end();
++itr)
{
- uint64_t l_offset = (*itr)->getAttr<ATTR_POSITION>()
- * VMM_HOMER_INSTANCE_SIZE;
- (*itr)->setAttr<ATTR_HOMER_VIRT_ADDR>
- (l_base_homer+l_offset);
+ uint64_t l_instance = (*itr)->getAttr<ATTR_POSITION>();
+ uint64_t l_homerAddr =
+ g_hostInterfaces->get_reserved_mem("ibm,homer-image",
+ l_instance);
+ (*itr)->setAttr<ATTR_HOMER_VIRT_ADDR>(l_homerAddr);
}
}
};
OpenPOWER on IntegriCloud