summaryrefslogtreecommitdiffstats
path: root/src/usr/testcore
diff options
context:
space:
mode:
authorStephen Cprek <smcprek@us.ibm.com>2017-03-20 13:07:42 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-03-23 10:05:07 -0400
commitd87aceae2d5e5cb66201af5f897b06fa1471d90e (patch)
tree8ca50bf550c1b460d9dc686aed5839901ba5d3e8 /src/usr/testcore
parent98de8e60e8395033bf1deed9ede0929ecb796841 (diff)
downloadtalos-hostboot-d87aceae2d5e5cb66201af5f897b06fa1471d90e.tar.gz
talos-hostboot-d87aceae2d5e5cb66201af5f897b06fa1471d90e.zip
Add PNOR SectionIdToString to replace direct access to cv_EYECATCHER
This catches if the const array size does not match the number of pnor sections and out of range index errors Also it adds genErrlParsing for bootloader files Change-Id: I0a90816a7620022dec16bc7358a68ffbdade0083 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38159 Reviewed-by: Martin Gloff <mgloff@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> Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/testcore')
-rw-r--r--src/usr/testcore/rtloader/loader.H4
-rw-r--r--src/usr/testcore/rtloader/makefile6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/usr/testcore/rtloader/loader.H b/src/usr/testcore/rtloader/loader.H
index 417009992..f131d9a7e 100644
--- a/src/usr/testcore/rtloader/loader.H
+++ b/src/usr/testcore/rtloader/loader.H
@@ -42,10 +42,10 @@
#include <devicefw/userif.H>
#include <pnor/ecc.H>
#include <ipmi/ipmiif.H>
+#include <pnor_utils.H>
trace_desc_t* g_trac_hbrt = NULL;
TRAC_INIT(&g_trac_hbrt, "HBRT_TEST", 2*KILOBYTE);
-extern const char* cv_EYECATCHER[];
class RuntimeLoaderTest : public CxxTest::TestSuite
{
@@ -347,7 +347,7 @@ class RuntimeLoaderTest : public CxxTest::TestSuite
for (size_t i=PNOR::FIRST_SECTION; i<=PNOR::NUM_SECTIONS;
++i)
{
- if (0 == strcmp(cv_EYECATCHER[i], i_partitionName))
+ if (0 == strcmp(PNOR::SectionIdToString(i), i_partitionName))
{
l_id = (PNOR::SectionId)i;
break;
diff --git a/src/usr/testcore/rtloader/makefile b/src/usr/testcore/rtloader/makefile
index c75e71933..d253d3f06 100644
--- a/src/usr/testcore/rtloader/makefile
+++ b/src/usr/testcore/rtloader/makefile
@@ -5,7 +5,9 @@
#
# OpenPOWER HostBoot Project
#
-# COPYRIGHT International Business Machines Corp. 2011,2014
+# Contributors Listed Below - COPYRIGHT 2011,2017
+# [+] 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.
@@ -22,6 +24,8 @@
# IBM_PROLOG_END_TAG
ROOTPATH = ../../../..
+EXTRAINCDIR += ${ROOTPATH}/src/usr/pnor/
+
MODULE = testrtloader
TESTS = *.H
OpenPOWER on IntegriCloud