summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDean Sanner <dsanner@us.ibm.com>2019-06-17 07:14:35 -0500
committerWilliam G Hoffa <wghoffa@us.ibm.com>2019-07-25 13:59:23 -0500
commitcd1e5c91e4a15ca933c699553ece9b841825ac03 (patch)
treea0cbcda16f0a35c33aeb1faedcd31aa52df4f307
parent0d622822edb081334fcd7cf258c46d667175eeea (diff)
downloadblackbird-hostboot-cd1e5c91e4a15ca933c699553ece9b841825ac03.tar.gz
blackbird-hostboot-cd1e5c91e4a15ca933c699553ece9b841825ac03.zip
Compile Hostboot with -Os
Hostboot currently spends a significant percentage of time loading data from PNOR across a relatively slow LPC bus. This commit enables compilation of Hostboot with -Os, optimized for space to reduce the amount of data required to be transferred across the LPC bus Rough measurements show a ~30% size reduction of the hostboot image and a ~10% reduction (improvement) in boot time Change-Id: Ib140e6f07b112ae95a901f49b75416ef91c94a9d Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79059 Reviewed-by: Nicholas E Bofferding <bofferdn@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@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> Reviewed-by: Zachary Clark <zach@ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: William G Hoffa <wghoffa@us.ibm.com>
-rw-r--r--src/build/linker/linker.C16
-rw-r--r--src/build/mkrules/cflags.env.mk2
-rw-r--r--src/makefile3
-rw-r--r--src/usr/errl/runtime/test/test_runtimeDeconfig.H14
-rw-r--r--src/usr/fapi2/test/fapi2GetChildrenTest.H2
-rw-r--r--src/usr/isteps/istep16/call_mss_scrub.C2
-rw-r--r--src/usr/isteps/tod/runtime/rt_todintf.C4
7 files changed, 30 insertions, 13 deletions
diff --git a/src/build/linker/linker.C b/src/build/linker/linker.C
index e5e53ad8a..ba498d8a9 100644
--- a/src/build/linker/linker.C
+++ b/src/build/linker/linker.C
@@ -123,6 +123,7 @@ struct Object
string name; //!< full path name of file
bfd* image; //!< bfd image of object
Section text; //!< text section of binary
+ Section sfpr; //!< sfpr section of binary
Section rodata; //!< rodata section of binary
Section data; //!< data section of binary
map<string, Symbol> symbols; //!< symbol map
@@ -594,6 +595,11 @@ bool Object::read_object(const char* i_file)
{
s = &this->text;
}
+ else if (string(".sfpr") ==
+ bfd_get_section_name(image, image_section))
+ {
+ s = &this->sfpr;
+ }
else if (string(".rodata") ==
bfd_get_section_name(image, image_section))
{
@@ -648,6 +654,16 @@ bool Object::write_object()
cout << strerror(error) << endl;
}
+ // Output sfpr section.
+ fseek(iv_output, offset + sfpr.vma_offset, SEEK_SET);
+ if ((0 != sfpr.size) &&
+ (sfpr.size != fwrite(sfpr.data, 1, sfpr.size, iv_output)))
+ {
+ int error = errno;
+ cout << "Error writing to output for sfpr." << endl;
+ cout << strerror(error) << endl;
+ }
+
// Output RODATA section.
fseek(iv_output, offset + rodata.vma_offset, SEEK_SET);
if ((0 != rodata.size) &&
diff --git a/src/build/mkrules/cflags.env.mk b/src/build/mkrules/cflags.env.mk
index 04ff6fedd..e1d36c190 100644
--- a/src/build/mkrules/cflags.env.mk
+++ b/src/build/mkrules/cflags.env.mk
@@ -28,7 +28,7 @@
# Description:
# Configuration of the compiler, linker, etc. flags.
-OPT_LEVEL ?= -O3
+OPT_LEVEL ?= -Os
ifdef MODULE
COMMONFLAGS += -fPIC -Bsymbolic -Bsymbolic-functions
diff --git a/src/makefile b/src/makefile
index fb09a08bc..eb26b0322 100644
--- a/src/makefile
+++ b/src/makefile
@@ -236,7 +236,8 @@ TESTCASE_MODULES += testscan
TESTCASE_MODULES += testsecureboot
TESTCASE_MODULES += testfsiscom
TESTCASE_MODULES += testlpc
-TESTCASE_MODULES += $(if $(CONFIG_HTMGT),testhtmgt)
+#TODO: RTC 213102 to properly add & execute HTMGT test
+#TESTCASE_MODULES += $(if $(CONFIG_HTMGT),testhtmgt)
TESTCASE_MODULES += testinitservice
TESTCASE_MODULES += testfsi
TESTCASE_MODULES += testibscom
diff --git a/src/usr/errl/runtime/test/test_runtimeDeconfig.H b/src/usr/errl/runtime/test/test_runtimeDeconfig.H
index 2f5d37259..0cf1a0a52 100644
--- a/src/usr/errl/runtime/test/test_runtimeDeconfig.H
+++ b/src/usr/errl/runtime/test/test_runtimeDeconfig.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2018 */
+/* Contributors Listed Below - COPYRIGHT 2018,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -51,8 +51,8 @@ class deconfigureTargetAtRuntimeTest : public CxxTest::TestSuite
// pass in a null target pointer
TARGETING::Target * l_target = nullptr;
- errlHndl_t l_errl =
- HWAS::theDeconfigGard().deconfigureTargetAtRuntime(
+ errlHndl_t l_errl = nullptr;
+ l_errl = HWAS::theDeconfigGard().deconfigureTargetAtRuntime(
l_target,
HWAS::DeconfigGard::FULLY_AT_RUNTIME,
l_errl);
@@ -118,8 +118,8 @@ class deconfigureTargetAtRuntimeTest : public CxxTest::TestSuite
l_target = l_cores.at(0);
- errlHndl_t l_errl =
- HWAS::theDeconfigGard().deconfigureTargetAtRuntime(
+ errlHndl_t l_errl = nullptr;
+ l_errl = HWAS::theDeconfigGard().deconfigureTargetAtRuntime(
l_target,
HWAS::DeconfigGard::SPEC_DECONFIG,
l_errl);
@@ -179,8 +179,8 @@ class deconfigureTargetAtRuntimeTest : public CxxTest::TestSuite
TARGETING::Target * l_target = l_proc.at(0);
- errlHndl_t l_errl =
- HWAS::theDeconfigGard().deconfigureTargetAtRuntime(
+ errlHndl_t l_errl = nullptr;
+ l_errl = HWAS::theDeconfigGard().deconfigureTargetAtRuntime(
l_target,
HWAS::DeconfigGard::FULLY_AT_RUNTIME,
l_errl);
diff --git a/src/usr/fapi2/test/fapi2GetChildrenTest.H b/src/usr/fapi2/test/fapi2GetChildrenTest.H
index 9eb595dcd..c0a1e5eab 100644
--- a/src/usr/fapi2/test/fapi2GetChildrenTest.H
+++ b/src/usr/fapi2/test/fapi2GetChildrenTest.H
@@ -706,7 +706,7 @@ void test_fapi2GetChildren()
TARGET_STATE_PRESENT).size(); } },
};
- pervasiveChildTestRec* ptr;
+ pervasiveChildTestRec* ptr = nullptr;
int numPervTests = 0;
TARGETING::ATTR_MODEL_type l_model = l_proc->getAttr<TARGETING::ATTR_MODEL>();
if (l_model == TARGETING::MODEL_NIMBUS)
diff --git a/src/usr/isteps/istep16/call_mss_scrub.C b/src/usr/isteps/istep16/call_mss_scrub.C
index 9e593b675..24e8edd18 100644
--- a/src/usr/isteps/istep16/call_mss_scrub.C
+++ b/src/usr/isteps/istep16/call_mss_scrub.C
@@ -72,7 +72,7 @@ void* call_mss_scrub (void *io_pArgs)
// Determine which target type runs the maintenance commands.
TARGETING::MODEL masterProcModel = masterProc->getAttr<ATTR_MODEL>();
- TARGETING::TYPE maintTrgtType;
+ TARGETING::TYPE maintTrgtType = TYPE_MBA;
switch ( masterProcModel )
{
case MODEL_CUMULUS: maintTrgtType = TYPE_MBA; break;
diff --git a/src/usr/isteps/tod/runtime/rt_todintf.C b/src/usr/isteps/tod/runtime/rt_todintf.C
index 180049d18..e5c537cd3 100644
--- a/src/usr/isteps/tod/runtime/rt_todintf.C
+++ b/src/usr/isteps/tod/runtime/rt_todintf.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014,2017 */
+/* Contributors Listed Below - COPYRIGHT 2014,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -31,7 +31,7 @@
#include <runtime/interface.h> // g_hostInterfaces
#include <util/runtime/rt_fwreq_helper.H> // firmware_request_helper
#include <tod_init_reasoncodes.H> // TOD_RT_TOPOLOGY_RESET_BACKUP, etc
-#include <errlmanager_common.C> // errlCommit
+#include <errl/errlentry.H>
using namespace ERRORLOG;
OpenPOWER on IntegriCloud