diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2014-09-15 10:38:46 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-09-22 13:27:31 -0500 |
commit | 372fd2a64a4a45e98bd50f9041d3874e0fee2341 (patch) | |
tree | 75dcc1521d3c44508bb67e1d1198cdbe62f1ea76 /src | |
parent | fe787082ffbf72795dc3c58d09e0a7ed45600da2 (diff) | |
download | talos-hostboot-372fd2a64a4a45e98bd50f9041d3874e0fee2341.tar.gz talos-hostboot-372fd2a64a4a45e98bd50f9041d3874e0fee2341.zip |
Add attributes to track HOMER address
Change-Id: Ia82ddcc83a52778a6b4c91d005c78c67973aad41
RTC: 108816
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13380
Tested-by: Jenkins Server
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/hwpf/hwp/occ/occ.C | 21 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/occ/runtime/rt_occ.C | 21 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/attribute_types_hb.xml | 35 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/target_types_hb.xml | 7 |
4 files changed, 76 insertions, 8 deletions
diff --git a/src/usr/hwpf/hwp/occ/occ.C b/src/usr/hwpf/hwp/occ/occ.C index 1f3bc509f..ea9d97076 100644 --- a/src/usr/hwpf/hwp/occ/occ.C +++ b/src/usr/hwpf/hwp/occ/occ.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -183,15 +185,22 @@ namespace HBOCC do{ //Figure out OCC image offset for Target //OCC image offset = HOMER_SIZE*ProcPosition + - // OCC offset within HOMR (happens to be zero) + // OCC offset within HOMER (happens to be zero) uint8_t tmpPos = i_target->getAttr<ATTR_POSITION>(); tmpOffset = tmpPos*VMM_HOMER_INSTANCE_SIZE + HOMER_OFFSET_TO_OCC_IMG; targHomer = i_homerPhysAddrBase + tmpOffset; - occVirt = - reinterpret_cast<void *> - (reinterpret_cast<uint64_t>(i_homerVirtAddrBase) - + tmpOffset) ; + uint64_t occVirt64 = + reinterpret_cast<uint64_t>(i_homerVirtAddrBase) + + tmpOffset; + occVirt = reinterpret_cast<void *>(occVirt64); + + // Remember where we put things + if( i_target ) + { + i_target->setAttr<ATTR_HOMER_PHYS_ADDR>(targHomer); + i_target->setAttr<ATTR_HOMER_VIRT_ADDR>(occVirt64); + } //Figure out OCC Host Data offset for Target //OCC host data offset = HOMER_SIZE*ProcPosition + diff --git a/src/usr/hwpf/hwp/occ/runtime/rt_occ.C b/src/usr/hwpf/hwp/occ/runtime/rt_occ.C index e8025e9ed..d76d403d4 100644 --- a/src/usr/hwpf/hwp/occ/runtime/rt_occ.C +++ b/src/usr/hwpf/hwp/occ/runtime/rt_occ.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -122,6 +124,10 @@ namespace RT_OCC break; } + // Remember where we put things + proc_target->setAttr<ATTR_HOMER_PHYS_ADDR>(i_homer_addr_phys); + proc_target->setAttr<ATTR_HOMER_VIRT_ADDR>(i_homer_addr_va); + // Convert to fapi Target fapi::Target fapiTarg( fapi::TARGET_TYPE_PROC_CHIP, (const_cast<TARGETING::Target*>(proc_target) @@ -609,6 +615,19 @@ namespace RT_OCC rt_intf->loadOCC = &executeLoadOCC; rt_intf->startOCCs = &executeStartOCCs; rt_intf->stopOCCs = &executeStopOCCs; + + // If we already loaded OCC during the IPL we need to fix up + // the virtual address because we're now not using virtual + // memory + TargetHandleList procChips; + getAllChips(procChips, TYPE_PROC, true); + for (TargetHandleList::iterator itr = procChips.begin(); + itr != procChips.end(); + ++itr) + { + uint64_t addr = (*itr)->getAttr<ATTR_HOMER_PHYS_ADDR>(); + (*itr)->setAttr<ATTR_HOMER_VIRT_ADDR>(addr); + } } }; diff --git a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml index afd8c130e..8618392c6 100644 --- a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml @@ -210,6 +210,7 @@ <writeable/> <hbOnly/> </attribute> + <attribute> <id>IBSCOM_MUTEX</id> <description>Mutex for Inband SCOM Operations</description> @@ -222,6 +223,7 @@ <writeable/> <hbOnly/> </attribute> + <attribute> <id>IBSCOM_ENABLE_OVERRIDE</id> <description>Used to force IBSCOM enabled for lab testing</description> @@ -233,6 +235,7 @@ <readable/> <hbOnly/> </attribute> + <attribute> <id>HB_EXISTING_IMAGE</id> <description>Indicates which logical nodes have a hostboot image.</description> @@ -248,6 +251,7 @@ <writeable/> <hbOnly/> </attribute> + <attribute> <id>HB_PM_SPWUP_OHA_FLAG</id> <description>Flag storage to break the recursive calling loop for when accessing the OHA address space from the Special Wakeup procedure.</description> @@ -263,6 +267,7 @@ </hwpfToHbAttrMap> <hbOnly/> </attribute> + <attribute> <id>GPIO_INFO</id> <description>Information needed to address GPIO device</description> @@ -325,4 +330,34 @@ <hbOnly/> </attribute> +<attribute> + <id>HOMER_PHYS_ADDR</id> + <description> + Physical address where HOMER image is placed in mainstore. + </description> + <simpleType> + <uint64_t></uint64_t> + </simpleType> + <persistency>volatile-zeroed</persistency> + <readable/> + <writeable/> + <hbOnly/> +</attribute> + +<attribute> + <id>HOMER_VIRT_ADDR</id> + <description> + Virtual address where HOMER memory is mapped into. If value is zero, + memory must be mapped into virtual space. + </description> + <simpleType> + <uint64_t></uint64_t> + </simpleType> + <persistency>volatile-zeroed</persistency> + <readable/> + <writeable/> + <hbOnly/> +</attribute> + + </attributes> diff --git a/src/usr/targeting/common/xmltohb/target_types_hb.xml b/src/usr/targeting/common/xmltohb/target_types_hb.xml index 14c1e450f..148b072f9 100644 --- a/src/usr/targeting/common/xmltohb/target_types_hb.xml +++ b/src/usr/targeting/common/xmltohb/target_types_hb.xml @@ -52,13 +52,18 @@ <id>SCOM_IND_MUTEX</id> </attribute> <attribute><id>SCAN_MUTEX</id></attribute> - <!-- new attribute for isteps 15 & 16 --> <attribute> <id>SLW_IMAGE_ADDR</id> </attribute> <attribute> <id>SLW_IMAGE_SIZE</id> </attribute> + <attribute> + <id>HOMER_PHYS_ADDR</id> + </attribute> + <attribute> + <id>HOMER_VIRT_ADDR</id> + </attribute> </targetTypeExtension> <targetTypeExtension> |