summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Muhle <armuhle@us.ibm.com>2012-06-29 15:03:24 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-07-09 12:25:40 -0500
commit552815060119a4612ed82c67d31fb38ecee2ccaf (patch)
treee7958cb78de15c5c0cf54ccb21f3b752e75123a7 /src
parenta87cb9ce7a0322f9fd6c6e015894f12a2975e10f (diff)
downloadblackbird-hostboot-552815060119a4612ed82c67d31fb38ecee2ccaf.tar.gz
blackbird-hostboot-552815060119a4612ed82c67d31fb38ecee2ccaf.zip
Unique PNOR Layout for VPO images
-Unique PNOR layout for VPO to fit within fake-pnor -Larger image for simics configs which includes the base img. Change-Id: I884a99da51845c2f17fcb48be4afa7d272d0ffd5 RTC: 44290 Depends-on: I7294999d3619692aaab424dca1ae608a0a84fa81 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1281 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/build/buildpnor/makefile36
-rw-r--r--src/build/buildpnor/pnorLayout.xml40
-rw-r--r--src/build/buildpnor/pnorLayoutVpo.xml76
-rw-r--r--src/include/usr/pnor/pnorif.H4
-rw-r--r--src/usr/pnor/pnorrp.C13
-rw-r--r--src/usr/pnor/test/pnorrptest.H26
6 files changed, 162 insertions, 33 deletions
diff --git a/src/build/buildpnor/makefile b/src/build/buildpnor/makefile
index 04c4bf33c..2696a417a 100644
--- a/src/build/buildpnor/makefile
+++ b/src/build/buildpnor/makefile
@@ -31,7 +31,8 @@ ROOTPATH = ../../..
.DEFAULT_GOAL := buildpnor
-PNOR_TARGETS = simics_MURANO simics_VENICE vbu TULETA
+PNOR_TARGETS = simics_MURANO simics_VENICE TULETA
+PNOR_VBU_TARGETS = vbu
define PNOR_template
$${IMGDIR}/$(1).pnor: $${IMGDIR}/hbicore_extended.bin $${IMGDIR}/$(1)_targeting.bin
@@ -40,7 +41,8 @@ $${IMGDIR}/$(1).pnor: $${IMGDIR}/hbicore_extended.bin $${IMGDIR}/$(1)_targeting.
--pnorOutBin $${IMGDIR}/$(1).pnor \
--binFile_part $${IMGDIR}/$(1)_pnor.toc \
--binFile_HBI $${IMGDIR}/hbicore_extended.bin \
- --binFile_HBD $${IMGDIR}/$(1)_targeting.bin
+ --binFile_HBD $${IMGDIR}/$(1)_targeting.bin \
+ --binFile_HBB $${IMGDIR}/hbicore.bin
endef
define PNOR_test_template
$${IMGDIR}/$(1)_test.pnor: $${IMGDIR}/hbicore_extended.bin $${IMGDIR}/$(1)_targeting.bin
@@ -49,17 +51,45 @@ $${IMGDIR}/$(1)_test.pnor: $${IMGDIR}/hbicore_extended.bin $${IMGDIR}/$(1)_targe
--pnorOutBin $${IMGDIR}/$(1)_test.pnor \
--binFile_part $${IMGDIR}/$(1)_pnor.toc \
--binFile_HBI $${IMGDIR}/hbicore_test_extended.bin \
+ --binFile_HBD $${IMGDIR}/$(1)_targeting.bin \
+ --binFile_HBB $${IMGDIR}/hbicore_test.bin
+endef
+
+define PNOR_vbu_template
+$${IMGDIR}/$(1).pnor: $${IMGDIR}/hbicore_extended.bin $${IMGDIR}/$(1)_targeting.bin
+ ./buildpnor.pl --pnorLayout ./pnorLayoutVpo.xml \
+ --genToc \
+ --pnorOutBin $${IMGDIR}/$(1).pnor \
+ --binFile_part $${IMGDIR}/$(1)_pnor.toc \
+ --binFile_HBI $${IMGDIR}/hbicore_extended.bin \
+ --binFile_HBD $${IMGDIR}/$(1)_targeting.bin
+endef
+define PNOR_vbu_test_template
+$${IMGDIR}/$(1)_test.pnor: $${IMGDIR}/hbicore_extended.bin $${IMGDIR}/$(1)_targeting.bin
+ ./buildpnor.pl --pnorLayout ./pnorLayoutVpo.xml \
+ --genToc \
+ --pnorOutBin $${IMGDIR}/$(1)_test.pnor \
+ --binFile_part $${IMGDIR}/$(1)_pnor.toc \
+ --binFile_HBI $${IMGDIR}/hbicore_test_extended.bin \
--binFile_HBD $${IMGDIR}/$(1)_targeting.bin
endef
PNOR_IMAGES = $(addsuffix .pnor, $(addprefix $(IMGDIR)/, ${PNOR_TARGETS})) \
$(addsuffix _test.pnor, $(addprefix $(IMGDIR)/, ${PNOR_TARGETS}))
-EXTRA_CLEAN = ${PNOR_IMAGES} ${PNOR_IMAGES:.pnor=_pnor.toc}
+PNOR_VBU_IMAGES = $(addsuffix .pnor, $(addprefix $(IMGDIR)/, ${PNOR_VBU_TARGETS})) \
+ $(addsuffix .pnor, $(addprefix $(IMGDIR)/, ${PNOR_VBU_TARGETS})) \
+
+EXTRA_CLEAN = ${PNOR_IMAGES} ${PNOR_IMAGES:.pnor=_pnor.toc} ${PNOR_VBU_IMAGES} ${PNOR_VBU_IMAGES:.pnor=_pnor.toc}
include ${ROOTPATH}/config.mk
buildpnor: ${PNOR_IMAGES}
+#Standard Images
$(foreach pnor,$(PNOR_TARGETS),$(eval $(call PNOR_template,$(pnor))))
$(foreach pnor,$(PNOR_TARGETS),$(eval $(call PNOR_test_template,$(pnor))))
+
+#VBU Specific images
+$(foreach pnor,$(PNOR_VBU_TARGETS),$(eval $(call PNOR_vbu_template,$(pnor))))
+$(foreach pnor,$(PNOR_VBU_TARGETS),$(eval $(call PNOR_vbu_test_template,$(pnor))))
diff --git a/src/build/buildpnor/pnorLayout.xml b/src/build/buildpnor/pnorLayout.xml
index d6adc9289..6fba782b4 100644
--- a/src/build/buildpnor/pnorLayout.xml
+++ b/src/build/buildpnor/pnorLayout.xml
@@ -22,12 +22,12 @@
IBM_PROLOG_END_TAG -->
<pnor>
<metadata>
- <imageSize>0x400000</imageSize>
+ <imageSize>0x800000</imageSize>
<blockSize>0x1000</blockSize>
<partTableSize>0x1</partTableSize>
</metadata>
<section>
- <description>Table of Contents (2K)</description>
+ <description>Table of Contents (4K)</description>
<eyeCatch>part</eyeCatch>
<physicalOffset>0</physicalOffset>
<physicalRegionSize>0x1000</physicalRegionSize>
@@ -36,25 +36,16 @@
<sideless>no</sideless>
</section>
<section>
- <description>Hostboot Extended image (2MB)</description>
+ <description>Hostboot Extended image (2.5MB)</description>
<eyeCatch>HBI</eyeCatch>
<physicalOffset>0x1000</physicalOffset>
- <physicalRegionSize>0x200000</physicalRegionSize>
+ <physicalRegionSize>0x280000</physicalRegionSize>
<ecc>no</ecc>
<source>File</source>
<sideless>no</sideless>
</section>
<section>
- <description>Attribute Data (512K)</description>
- <eyeCatch>HBD</eyeCatch>
- <physicalOffset>0x201000</physicalOffset>
- <physicalRegionSize>0x80000</physicalRegionSize>
- <ecc>no</ecc>
- <source>File</source>
- <sideless>no</sideless>
- </section>
- <section>
- <description>Module VPD</description>
+ <description>Module VPD (512K)</description>
<eyeCatch>MVPD</eyeCatch>
<physicalOffset>0x281000</physicalOffset>
<physicalRegionSize>0x80000</physicalRegionSize>
@@ -64,7 +55,7 @@
<sideless>yes</sideless>
</section>
<section>
- <description>DIMM JEDEC</description>
+ <description>DIMM JEDEC (256K)</description>
<eyeCatch>DJVPD</eyeCatch>
<physicalOffset>0x301000</physicalOffset>
<physicalRegionSize>0x40000</physicalRegionSize>
@@ -73,4 +64,23 @@
<source>Blank</source>
<sideless>yes</sideless>
</section>
+ <section>
+ <description>Hostboot Data (512K)</description>
+ <eyeCatch>HBD</eyeCatch>
+ <physicalOffset>0x341000</physicalOffset>
+ <physicalRegionSize>0x80000</physicalRegionSize>
+ <ecc>no</ecc>
+ <source>File</source>
+ <sideless>no</sideless>
+ </section>
+ <section>
+ <description>Hostboot Base (512K)</description>
+ <eyeCatch>HBB</eyeCatch>
+ <physicalOffset>0x3C1000</physicalOffset>
+ <physicalRegionSize>0x80000</physicalRegionSize>
+ <actualRegionSize>0x80000</actualRegionSize>
+ <ecc>no</ecc>
+ <source>File</source>
+ <sideless>no</sideless>
+ </section>
</pnor>
diff --git a/src/build/buildpnor/pnorLayoutVpo.xml b/src/build/buildpnor/pnorLayoutVpo.xml
new file mode 100644
index 000000000..d6adc9289
--- /dev/null
+++ b/src/build/buildpnor/pnorLayoutVpo.xml
@@ -0,0 +1,76 @@
+<!-- IBM_PROLOG_BEGIN_TAG
+ This is an automatically generated prolog.
+
+ $Source: src/build/buildpnor/pnorLayout.xml $
+
+ IBM CONFIDENTIAL
+
+ COPYRIGHT International Business Machines Corp. 2012
+
+ p1
+
+ Object Code Only (OCO) source materials
+ Licensed Internal Code Source Materials
+ IBM HostBoot Licensed Internal Code
+
+ The source code for this program is not published or other-
+ wise divested of its trade secrets, irrespective of what has
+ been deposited with the U.S. Copyright Office.
+
+ Origin: 30
+
+ IBM_PROLOG_END_TAG -->
+<pnor>
+ <metadata>
+ <imageSize>0x400000</imageSize>
+ <blockSize>0x1000</blockSize>
+ <partTableSize>0x1</partTableSize>
+ </metadata>
+ <section>
+ <description>Table of Contents (2K)</description>
+ <eyeCatch>part</eyeCatch>
+ <physicalOffset>0</physicalOffset>
+ <physicalRegionSize>0x1000</physicalRegionSize>
+ <ecc>no</ecc>
+ <source>Generate</source>
+ <sideless>no</sideless>
+ </section>
+ <section>
+ <description>Hostboot Extended image (2MB)</description>
+ <eyeCatch>HBI</eyeCatch>
+ <physicalOffset>0x1000</physicalOffset>
+ <physicalRegionSize>0x200000</physicalRegionSize>
+ <ecc>no</ecc>
+ <source>File</source>
+ <sideless>no</sideless>
+ </section>
+ <section>
+ <description>Attribute Data (512K)</description>
+ <eyeCatch>HBD</eyeCatch>
+ <physicalOffset>0x201000</physicalOffset>
+ <physicalRegionSize>0x80000</physicalRegionSize>
+ <ecc>no</ecc>
+ <source>File</source>
+ <sideless>no</sideless>
+ </section>
+ <section>
+ <description>Module VPD</description>
+ <eyeCatch>MVPD</eyeCatch>
+ <physicalOffset>0x281000</physicalOffset>
+ <physicalRegionSize>0x80000</physicalRegionSize>
+ <actualRegionSize>0x80000</actualRegionSize>
+ <ecc>no</ecc>
+ <source>Blank</source>
+ <sideless>yes</sideless>
+ </section>
+ <section>
+ <description>DIMM JEDEC</description>
+ <eyeCatch>DJVPD</eyeCatch>
+ <physicalOffset>0x301000</physicalOffset>
+ <physicalRegionSize>0x40000</physicalRegionSize>
+ <actualRegionSize>0x40000</actualRegionSize>
+ <ecc>no</ecc>
+ <source>Blank</source>
+ <sideless>yes</sideless>
+ </section>
+</pnor>
diff --git a/src/include/usr/pnor/pnorif.H b/src/include/usr/pnor/pnorif.H
index c3440c1a5..0c47210fb 100644
--- a/src/include/usr/pnor/pnorif.H
+++ b/src/include/usr/pnor/pnorif.H
@@ -41,18 +41,18 @@ enum SectionId
HB_DATA, /**< Hostboot Data */
DIMM_JEDEC_VPD, /**< DIMM JEDEC VPD */
MODULE_VPD, /**< Module VPD */
+ HB_BASE_CODE, /**< Hostboot Base Image */
NUM_SECTIONS, /**< Number of defined sections */
//Not currently used
// GLOBAL_DATA, /**< Global Data */
// SBE_IPL, /**< Self-Boot Engine IPL image */
-// HB_BASE_CODE, /**< Hostboot Base Image */
// PAYLOAD, /**< HAL/OPAL */
// HB_RUNTIME, /**< Hostboot Runtime Image */
// HB_ERRLOGS, /**< Hostboot Error log Repository */
FIRST_SECTION = TOC, /**< First section (for looping) */
- LAST_SECTION = MODULE_VPD, /**< Last section (for looping) */
+ LAST_SECTION = HB_BASE_CODE, /**< Last section (for looping) */
INVALID_SECTION = NUM_SECTIONS, /**< Used for error cases, initialization */
};
diff --git a/src/usr/pnor/pnorrp.C b/src/usr/pnor/pnorrp.C
index e24c54f44..4d3c74648 100644
--- a/src/usr/pnor/pnorrp.C
+++ b/src/usr/pnor/pnorrp.C
@@ -53,11 +53,11 @@ const char* cv_EYECATCHER[] = { //@todo - convert there to uint64_t
"HBD", /**< PNOR::HB_DATA : Hostboot Data */
"DJVPD", /**< PNOR::DIMM_JEDEC_VPD: Dimm JEDEC VPD */
"MVPD", /**< PNOR::MODULE_VPD : Module VPD */
+ "HBB", /**< PNOR::HB_BASE_CODE : Hostboot Base Image */
//Not currently used
// "GLOBAL", /**< PNOR::GLOBAL_DATA : Global Data */
// "SBE", /**< PNOR::SBE_IPL : Self-Boot Enginer IPL image */
-// "HBB", /**< PNOR::HB_BASE_CODE : Hostboot Base Image */
// "XXX", /**< PNOR::HB_ERRLOGS : Hostboot Error log Repository */
// "HBR", /**< PNOR::HB_RUNTIME : Hostboot Runtime Image */
// "PART", /**< PNOR::KVM_PART_INFO : KVM Partition Information */
@@ -483,11 +483,12 @@ errlHndl_t PnorRP::readTOC()
}
//keep these traces here until PNOR is rock-solid
- TRACFCOMP(g_trac_pnor, "TOC: size=0x%.8X flash=0x%.8X virt=0x%.16X", iv_TOC[PNOR::SIDE_A][PNOR::TOC].size, iv_TOC[PNOR::SIDE_A][PNOR::TOC].flashAddr, iv_TOC[PNOR::SIDE_A][PNOR::TOC].virtAddr );
- TRACFCOMP(g_trac_pnor, "EXT: size=0x%.8X flash=0x%.8X virt=0x%.16X", iv_TOC[PNOR::SIDE_A][PNOR::HB_EXT_CODE].size, iv_TOC[PNOR::SIDE_A][PNOR::HB_EXT_CODE].flashAddr, iv_TOC[PNOR::SIDE_A][PNOR::HB_EXT_CODE].virtAddr );
- TRACFCOMP(g_trac_pnor, "DATA: size=0x%.8X flash=0x%.8X virt=0x%.16X", iv_TOC[PNOR::SIDE_A][PNOR::HB_DATA].size, iv_TOC[PNOR::SIDE_A][PNOR::HB_DATA].flashAddr, iv_TOC[PNOR::SIDE_A][PNOR::HB_DATA].virtAddr );
- TRACFCOMP(g_trac_pnor, "MVPD: size=0x%.8X flash=0x%.8X virt=0x%.16X", iv_TOC[PNOR::SIDE_A][PNOR::MODULE_VPD].size, iv_TOC[PNOR::SIDE_A][PNOR::MODULE_VPD].flashAddr, iv_TOC[PNOR::SIDE_A][PNOR::MODULE_VPD].virtAddr );
- TRACFCOMP(g_trac_pnor, "DJVPD: size=0x%.8X flash=0x%.8X virt=0x%.16X", iv_TOC[PNOR::SIDE_A][PNOR::DIMM_JEDEC_VPD].size, iv_TOC[PNOR::SIDE_A][PNOR::DIMM_JEDEC_VPD].flashAddr, iv_TOC[PNOR::SIDE_A][PNOR::DIMM_JEDEC_VPD].virtAddr );
+ for(PNOR::SectionId tmpId = PNOR::FIRST_SECTION;
+ tmpId < PNOR::NUM_SECTIONS;
+ tmpId = (PNOR::SectionId) (tmpId + 1) )
+ {
+ TRACFCOMP(g_trac_pnor, "%s: size=0x%.8X flash=0x%.8X virt=0x%.16X", cv_EYECATCHER[tmpId], iv_TOC[PNOR::SIDE_A][tmpId].size, iv_TOC[PNOR::SIDE_A][tmpId].flashAddr, iv_TOC[PNOR::SIDE_A][tmpId].virtAddr );
+ }
}while(0);
diff --git a/src/usr/pnor/test/pnorrptest.H b/src/usr/pnor/test/pnorrptest.H
index f1791f8ba..00f7bc2eb 100644
--- a/src/usr/pnor/test/pnorrptest.H
+++ b/src/usr/pnor/test/pnorrptest.H
@@ -58,15 +58,25 @@ class PnorRpTest : public CxxTest::TestSuite
PNOR::SectionInfo_t info;
errlHndl_t errhdl = NULL;
- for( PNOR::SectionId id = PNOR::FIRST_SECTION;
- id < PNOR::NUM_SECTIONS;
- id = (PNOR::SectionId) (id + 1) )
+ //Only check required sections. Some are currently optional due to
+ //Storage limitations in VPO.
+ const PNOR::SectionId testSections[] = {
+ PNOR::TOC, /**< Table of Contents */
+ PNOR::HB_EXT_CODE, /**< Hostboot Extended Image */
+ PNOR::HB_DATA, /**< Hostboot Data */
+ PNOR::DIMM_JEDEC_VPD, /**< DIMM JEDEC VPD */
+ PNOR::MODULE_VPD, /**< Module VPD */
+ };
+ uint64_t numSections = 5;
+
+ for( uint64_t idx = 0; idx < numSections; idx++)
{
total++;
- errhdl = PNOR::getSectionInfo( id, PNOR::CURRENT_SIDE, info );
+ errhdl = PNOR::getSectionInfo( testSections[idx], PNOR::CURRENT_SIDE, info );
if( errhdl )
{
- TRACFCOMP(g_trac_pnor, "PnorRpTest::test_sectionInfo> ERROR : getSectionInfo returned error for %d : RC=%X", id, errhdl->reasonCode() );
+ TRACFCOMP(g_trac_pnor, "PnorRpTest::test_sectionInfo> ERROR : getSectionInfo returned error for %d : RC=%X",
+ testSections[idx], errhdl->reasonCode() );
TS_FAIL( "PnorRpTest::test_getSectionInfo> ERROR : Unexpected error log" );
fails++;
errlCommit(errhdl,PNOR_COMP_ID);
@@ -76,7 +86,8 @@ class PnorRpTest : public CxxTest::TestSuite
total++;
if( info.size == 0 )
{
- TRACFCOMP(g_trac_pnor, "PnorRpTest::test_sectionInfo> ERROR : zero size for section %d : id=%d, actual=%d", id, info.id, info.size );
+ TRACFCOMP(g_trac_pnor, "PnorRpTest::test_sectionInfo> ERROR : zero size for section %d : id=%d, actual=%d",
+ testSections[idx], info.id, info.size );
TS_FAIL( "PnorRpTest::test_getSectionInfo> ERROR : Zero Size" );
fails++;
}
@@ -85,7 +96,8 @@ class PnorRpTest : public CxxTest::TestSuite
total++;
if( info.vaddr < PnorRP::BASE_VADDR )
{
- TRACFCOMP(g_trac_pnor, "PnorRpTest::test_sectionInfo> ERROR : Virtual Addr section %d Not in appropriate range: id=%d, actual=%d", id, info.id, info.vaddr );
+ TRACFCOMP(g_trac_pnor, "PnorRpTest::test_sectionInfo> ERROR : Virtual Addr section %d Not in appropriate range: id=%d, actual=%d",
+ testSections[idx], info.id, info.vaddr );
TS_FAIL( "PnorRpTest::test_getSectionInfo> ERROR : Invalid vaddr" );
fails++;
}
OpenPOWER on IntegriCloud