summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarty Gloff <mgloff@us.ibm.com>2017-05-10 08:28:26 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-05-23 13:50:47 -0400
commitda1946689af4b765c9ad5c6a7f64cc4f34df252a (patch)
treeedb9d2974ba7188cf4317a8a4914cec989a7ab9f /src
parent0010d98b52108a55a722768c864341b6300b8852 (diff)
downloadblackbird-hostboot-da1946689af4b765c9ad5c6a7f64cc4f34df252a.tar.gz
blackbird-hostboot-da1946689af4b765c9ad5c6a7f64cc4f34df252a.zip
Save space in Bootloader image with minimized section ID array
The PNOR section ID array takes a large amount of space to store the character strings and pointers to them. Space can be reclaimed by just storing the HBB ID. One trace is also turned off for Bootloader since it is then hit for all the other PNOR sections. Change-Id: I59585c2b976aa0351e75f477532415c669447541 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40330 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/pnor/pnor_const.H4
-rw-r--r--src/usr/pnor/pnor_utils.C16
2 files changed, 15 insertions, 5 deletions
diff --git a/src/include/usr/pnor/pnor_const.H b/src/include/usr/pnor/pnor_const.H
index ef9478567..ae02a2fd2 100644
--- a/src/include/usr/pnor/pnor_const.H
+++ b/src/include/usr/pnor/pnor_const.H
@@ -39,9 +39,12 @@ enum SectionId
{
TOC, /**< Table of Contents */
// Value of HB_EXT_CODE must be 1 for debug framework.
+#ifndef BOOTLOADER
HB_EXT_CODE, /**< Hostboot Extended Image */
GLOBAL_DATA, /**< Global Data */
+#endif
HB_BASE_CODE, /**< Hostboot Base Image */
+#ifndef BOOTLOADER
CENTAUR_SBE, /**< Centaur Self-Boot Engine image */
SBE_IPL, /**< Self-Boot Engine IPL image */
HCODE, /**< HCODE Reference image */
@@ -68,6 +71,7 @@ enum SectionId
RINGOVD, /**< Ring override data */
WOFDATA, /**< VFRT data tables for WOF */
SBKT, /**< SecureBoot Key Transition */
+#endif
NUM_SECTIONS, /**< Number of defined sections */
FIRST_SECTION = TOC, /**< First section (for looping) */
diff --git a/src/usr/pnor/pnor_utils.C b/src/usr/pnor/pnor_utils.C
index e76da3f6c..51627de40 100644
--- a/src/usr/pnor/pnor_utils.C
+++ b/src/usr/pnor/pnor_utils.C
@@ -40,12 +40,14 @@
extern trace_desc_t* g_trac_pnor;
#define PNOR_UTIL_TRACE(arg0, args...) TRACFCOMP(g_trac_pnor, args)
#define PNOR_UTIL_TRACE_W_BRK(arg0, args...) TRACFCOMP(g_trac_pnor, args)
+#define PNOR_UTIL_TRACE_BL_SKIP(arg0, args...) TRACFCOMP(g_trac_pnor, args)
#else
#include <bootloader/bootloader_trace.H>
#include <bootloader/bootloader.H>
#include <bootloader/hbblreasoncodes.H>
#define PNOR_UTIL_TRACE(arg0, args...) BOOTLOADER_TRACE(arg0)
#define PNOR_UTIL_TRACE_W_BRK(arg0, args...) BOOTLOADER_TRACE_W_BRK(arg0)
+#define PNOR_UTIL_TRACE_BL_SKIP(arg0, args...)
#endif
@@ -272,11 +274,11 @@ PNOR::parseEntries (ffs_hdr* i_ffs_hdr,
if(secId == PNOR::INVALID_SECTION)
{
- PNOR_UTIL_TRACE(BTLDR_TRC_UTILS_PARSE_INVALID_SECTION,
- "PNOR::parseEntries: "
- "Unsupported section found while parsing entry ",
- "%d in TOC \n Entry name is \"%s\"", i,
- cur_entry->name);
+ PNOR_UTIL_TRACE_BL_SKIP(BTLDR_TRC_UTILS_PARSE_INVALID_SECTION,
+ "PNOR::parseEntries: "
+ "Unsupported section found while parsing ",
+ "entry %d in TOC \n Entry name is \"%s\"",
+ i, cur_entry->name);
//continue to skip invalid section
continue;
}
@@ -409,9 +411,12 @@ const char * PNOR::SectionIdToString( uint32_t i_secIdIndex )
static const char* SectionIdToStringArr[] =
{
"part", /**< PNOR::TOC : Table of Contents */
+#ifndef BOOTLOADER
"HBI", /**< PNOR::HB_EXT_CODE : Hostboot Extended Image */
"GLOBAL", /**< PNOR::GLOBAL_DATA : Global Data */
+#endif
"HBB", /**< PNOR::HB_BASE_CODE : Hostboot Base Image */
+#ifndef BOOTLOADER
"SBEC", /**< PNOR::CENTAUR_SBE : Centaur Self-Boot Engine image */
"SBE", /**< PNOR::SBE_IPL : Self-Boot Enginer IPL image */
"HCODE", /**< PNOR::HCODE : HCODE Reference image */
@@ -438,6 +443,7 @@ const char * PNOR::SectionIdToString( uint32_t i_secIdIndex )
"RINGOVD", /**< PNOR::RINGOVD : Ring overrides */
"WOFDATA", /**< PNOR::WOFDATA : VFRT data tables for WOF */
"SBKT", /**< PNOR::SBKT : SecureBoot Key Transition */
+#endif
};
// Get actual number of entries of array.
OpenPOWER on IntegriCloud