summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2012-09-19 14:23:54 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-10-09 17:06:49 -0500
commitfb1836fd7b1b8839815595db08ae740ec7b86347 (patch)
tree54ff93536489c27b80af1f503520bd9894cdcfd3 /src/usr
parent84e4274fe412a577f67805cc701f4fb66a3feb2f (diff)
downloadtalos-hostboot-fb1836fd7b1b8839815595db08ae740ec7b86347.tar.gz
talos-hostboot-fb1836fd7b1b8839815595db08ae740ec7b86347.zip
Support code coverage in extended modules.
- Reduce optimization (to -Os) to fit when doing coverage profile. - Remove errl storage area from base image. - Add GCC function attributes to sys library functions. RTC: 36933 Change-Id: Ic83011a2444ef5b735db0446a14a0af34187eebf Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1908 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Melissa J. Connell <missyc@us.ibm.com> Reviewed-by: Paul Nguyen <nguyenp@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/errl/errlmanager.C16
-rw-r--r--src/usr/initservice/extinitsvc/extinitsvctasks.H66
-rw-r--r--src/usr/makefile2
-rw-r--r--src/usr/pnor/pnordd.H19
4 files changed, 63 insertions, 40 deletions
diff --git a/src/usr/errl/errlmanager.C b/src/usr/errl/errlmanager.C
index bc4e84c0b..132ec49c1 100644
--- a/src/usr/errl/errlmanager.C
+++ b/src/usr/errl/errlmanager.C
@@ -48,7 +48,7 @@ extern trace_desc_t* g_trac_errl;
// Scaffolding
// Store error logs in this memory buffer in L3 RAM.
-char g_ErrlStorage[ ERRL_STORAGE_SIZE ];
+char* g_ErrlStorage = new char[ ERRL_STORAGE_SIZE ];
/**
@@ -90,23 +90,19 @@ ErrlManager::ErrlManager()
// This buffer has a header (storage_header_t) followed by
// storage.
iv_pStorage = reinterpret_cast<storage_header_t*>(g_ErrlStorage);
-
- // g_ErrlStorage is in BSS segment, therefore already zeroed.
- // memset( iv_pStorage, 0, sizeof(storage_header_t));
+ memset( iv_pStorage, 0, sizeof(storage_header_t));
// Storage size is placed here for benefit of downstream parsers.
- iv_pStorage->cbStorage = sizeof( g_ErrlStorage );
+ iv_pStorage->cbStorage = ERRL_STORAGE_SIZE;
// Offsets are zero-based at &g_ErrlStorage[0],
// so the first usable offset is just past the header.
iv_pStorage->offsetMarker = sizeof(storage_header_t);
iv_pStorage->offsetStart = sizeof(storage_header_t);
- // g_ErrlStorage is in BSS segment, therefore already zeroed.
- // Thus, the prime marker in storage is already zero.
- // marker_t* l_pMarker = OFFSET2MARKER( iv_pStorage->offsetStart );
- // l_pMarker->offsetNext = 0;
- // l_pMarker->length = 0;
+ marker_t* l_pMarker = OFFSET2MARKER( iv_pStorage->offsetStart );
+ l_pMarker->offsetNext = 0;
+ l_pMarker->length = 0;
}
diff --git a/src/usr/initservice/extinitsvc/extinitsvctasks.H b/src/usr/initservice/extinitsvc/extinitsvctasks.H
index 37a2cd07c..202ddda81 100644
--- a/src/usr/initservice/extinitsvc/extinitsvctasks.H
+++ b/src/usr/initservice/extinitsvc/extinitsvctasks.H
@@ -1,26 +1,25 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/usr/initservice/extinitsvc/extinitsvctasks.H $
- *
- * IBM CONFIDENTIAL
- *
- * COPYRIGHT International Business Machines Corp. 2011-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
- */
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/initservice/extinitsvc/extinitsvctasks.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,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 otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
#ifndef __EXT_INIT_SVC_TASKS_H
#define __EXT_INIT_SVC_TASKS_H
@@ -116,6 +115,19 @@ const TaskInfo g_exttaskinfolist[] = {
},
/**
+ * @brief SCAN Device Driver
+ */
+ {
+ "libscan.so" , // taskname
+ NULL, // no pointer to fn
+ {
+ INIT_TASK, // task type
+ EXT_IMAGE, // Extended Module
+ }
+ },
+
+
+ /**
* @brief I2C Device Driver
*/
{
@@ -229,6 +241,14 @@ const TaskInfo g_exttaskinfolist[] = {
EXT_IMAGE, // Extended Module
}
},
+ {
+ "libthread_activate.so" , // taskname
+ NULL, // no pointer to fn
+ {
+ UNINIT_TASK, // task type
+ EXT_IMAGE, // Extended Module
+ }
+ },
// TODO: Should these be automatically loaded / unloaded by istepdispatcher?
/**
diff --git a/src/usr/makefile b/src/usr/makefile
index a4e413cbd..e4ae0117d 100644
--- a/src/usr/makefile
+++ b/src/usr/makefile
@@ -22,6 +22,8 @@
# IBM_PROLOG_END_TAG
ROOTPATH = ../..
+# Do not instrument the module_init.o
+HOSTBOOT_PROFILE_NO_INSTRUMENT = 1
OBJS = module_init.o
SUBDIRS = example.d trace.d cxxtest.d testcore.d errl.d devicefw.d \
diff --git a/src/usr/pnor/pnordd.H b/src/usr/pnor/pnordd.H
index c2f1589a1..1f04157ce 100644
--- a/src/usr/pnor/pnordd.H
+++ b/src/usr/pnor/pnordd.H
@@ -48,7 +48,7 @@ class PnorDD
* @brief Performs a PNOR Read Operation
*
* @parm o_buffer Buffer to read data into
- * @parm io_buflen Input: Number of bytes to read,
+ * @parm io_buflen Input: Number of bytes to read,
* Output: Number of bytes actually read
* @parm i_address Offset into flash to read
*
@@ -62,7 +62,7 @@ class PnorDD
* @brief Performs a PNOR Write Operation
*
* @parm i_buffer Buffer to write data from
- * @parm io_buflen Input: Number of bytes to write,
+ * @parm io_buflen Input: Number of bytes to write,
* Output: Number of bytes actually written
* @parm i_address Offset into flash to write
*
@@ -72,6 +72,7 @@ class PnorDD
size_t& io_buflen,
uint64_t i_address);
+ // Enumeration values must match those in debug framework.
enum PnorMode_t {
MODEL_UNKNOWN, /**< Invalid */
MODEL_MEMCPY, /**< No LPC logic, just do memcpy into cache area */
@@ -93,7 +94,7 @@ class PnorDD
*/
~PnorDD();
- protected:
+ protected:
/**
@@ -106,7 +107,7 @@ class PnorDD
LPC_REG_BAR2 = 0x08, /**< BAR2 : LPC Memory space */
LPC_REG_BAR3 = 0x0C, /**< BAR3 : LPC Firmware space */
};
-
+
/**
* @brief SPI Config Info
* OP Codes and other MISC info for configuring SFC
@@ -437,7 +438,7 @@ class PnorDD
* @parm i_address Offset into flash
* @parm i_byteSize Number of bytes in range
*
- * @return Number of full or partial erase blocks
+ * @return Number of full or partial erase blocks
*/
uint32_t getNumAffectedBlocks(uint32_t i_address,
size_t i_byteSize)
@@ -502,7 +503,7 @@ class PnorDD
uint64_t address : 32; /**< 32:63 = LPC Address */
};
- ControlReg_t() : data64(LPC_CTL_REG_DEFAULT) {};
+ ControlReg_t() : data64(LPC_CTL_REG_DEFAULT) {};
};
/**
@@ -526,6 +527,10 @@ class PnorDD
};
private: // Variables
+
+ // NOTE: The layout of the variables in this class must be maintained
+ // along with the offsets in the debug framework.
+
/**
* @brief Mutex to prevent concurrent PNOR accesses
* This needs to be static so we can mutex across multiple instances of PnorDD
@@ -540,7 +545,7 @@ class PnorDD
*/
uint8_t* iv_erases;
- /**
+ /**
* @brief Determine how much of the PNOR logic to use,
* this is required due to different model functionality
* in the current VPO and Simics models
OpenPOWER on IntegriCloud