summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMissy Connell <missyc@us.ibm.com>2013-02-20 16:30:51 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-04-09 14:33:13 -0500
commit63b344dd0fcbd2318a8fd46978970a08f3eb9ca9 (patch)
treeac68337341709cee0a5ccc54936c0557b2238170 /src/include
parent84d81bdda49213dcde23c604a2d6ab7ace90f1d6 (diff)
downloadtalos-hostboot-63b344dd0fcbd2318a8fd46978970a08f3eb9ca9.tar.gz
talos-hostboot-63b344dd0fcbd2318a8fd46978970a08f3eb9ca9.zip
Call Dump Collect from call_host_mpipl_service
Change-Id: I4c449177618f00d64b90b81403144649d0df756f RTC:46996 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3339 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/dump/dumpif.H168
-rw-r--r--src/include/usr/dump/dumpreasoncodes.H1
-rw-r--r--src/include/usr/isteps/istep14list.H1
-rw-r--r--src/include/usr/mbox/mbox_queues.H49
-rw-r--r--src/include/usr/vmmconst.h33
5 files changed, 194 insertions, 58 deletions
diff --git a/src/include/usr/dump/dumpif.H b/src/include/usr/dump/dumpif.H
new file mode 100644
index 000000000..21d50f677
--- /dev/null
+++ b/src/include/usr/dump/dumpif.H
@@ -0,0 +1,168 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/dump/dumpif.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
+/* */
+/* 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 __DUMPIF_H
+#define __DUMPIF_H
+
+/** @file dumpif.H
+ * @brief Provides the external interfaces for dump.
+ * - copy dump data from src to destination
+ * - Send Mbox Msg for dump status
+ */
+
+namespace DUMP
+{
+
+
+ /**
+ * @brief DUMP Message Types
+ */
+
+ enum DUMP_MSG_TYPE
+ {
+ DUMP_MSG_START_MSG_TYPE = 0x000000B1,
+ DUMP_MSG_END_MSG_TYPE = 0x000000B2,
+ DUMP_MSG_ERROR_MSG_TYPE = 0x000000B3,
+
+ };
+
+ // The following are #defines needed for Dump Testing.. These are the
+ // default memory locations for MDST, MDDT, MDRT when running withoutPHYPab
+ // The data range is defined in vmmconst.h so this test space is saved.
+
+ /* Chunk of physical memory used for Dump Source Table */
+ #define DUMP_TEST_SRC_MEM_ADDR DUMP_TEST_MEMORY_ADDR
+ #define DUMP_TEST_SRC_MEM_SIZE MEGABYTE
+
+ /* Chunk of physical memory used for Dump Destination Table */
+ #define DUMP_TEST_DST_MEM_ADDR (DUMP_TEST_SRC_MEM_ADDR + \
+ DUMP_TEST_SRC_MEM_SIZE)
+
+
+ #define DUMP_TEST_DST_MEM_SIZE MEGABYTE
+
+ /* Chunk of physical memory used for Dump Results Table */
+ #define DUMP_TEST_RESULTS_MEM_ADDR (DUMP_TEST_DST_MEM_ADDR + \
+ DUMP_TEST_DST_MEM_SIZE)
+
+
+ #define DUMP_TEST_RESULTS_MEM_SIZE MEGABYTE
+
+ // Data location where the src, destination tables point to. (The actual
+ // data)
+ #define DUMP_TEST_SRC_DATA_AREA (DUMP_TEST_RESULTS_MEM_ADDR + \
+ DUMP_TEST_RESULTS_MEM_SIZE)
+
+
+ #define DUMP_TEST_DST_DATA_AREA (DUMP_TEST_SRC_DATA_AREA + \
+ DUMP_TEST_DATA_SIZE)
+
+ #define DUMP_TEST_DATA_SIZE MEGABYTE
+
+ // default enums to point out the start and end of the DUMP Tables in memory
+ #define DUMP_TEST_TABLE_START DUMP_TEST_SRC_MEM_ADDR
+ #define DUMP_TEST_TABLE_SIZE (DUMP_TEST_SRC_MEM_SIZE + \
+ DUMP_TEST_DST_MEM_SIZE + DUMP_TEST_RESULTS_MEM_SIZE)
+
+
+ #define DUMP_TEST_TABLE_END (DUMP_TEST_TABLE_START + DUMP_TEST_TABLE_SIZE)
+
+ // In addition to the dump table locations we have scratch data area that is
+ // used to put the SRC data that the MDST will point to.
+
+ // This is the size of all the Data used for Dump testing
+ #define DUMP_TEST_ALL_SIZE (DUMP_TEST_TABLE_SIZE + (2*MEGABYTE))
+
+ // This is the ending address of test Data area
+ #define DUMP_TEST_ALL_END (DUMP_TEST_TABLE_START + DUMP_TEST_ALL_SIZE)
+
+
+ //These structures are defined in the HDAT spec
+ //The MDST and MDDT have this format.
+ struct dumpEntry
+ {
+ uint64_t dataAddr;
+ uint64_t dataSize;
+ };
+
+ //The MDRT has this format.
+ struct resultsEntry
+ {
+ uint64_t srcAddr;
+ uint64_t destAddr;
+ uint64_t dataSize;
+ };
+
+
+ /**
+ * @brief This function is a wrapper function that calls
+ * getHostDataPtrs to get the MDDT, MDST, MDRT pointers
+ * and then passes those values to the copySrcToDest
+ * routine that performs the copy
+ *
+ * @param[in] void
+ *
+ * @return errlHndl_t
+ */
+ errlHndl_t doDumpCollect(void);
+
+ /**
+ * @brief This function copies the data and sizes retrieved from the
+ * MDST(source table) to the addresses indicated by the MDDT(destination
+ * table). Each write is then logged in the MDRT (results table) with
+ * source addr, destination addr and size
+ *
+ * @param[in] srcTableEntry Ptr to the first MDST entry
+ * @param[in] srcTableSize Size of the entire MDST
+ *
+ * @param[in] destTableAddr Ptr to the first MDDT entry
+ * @param[in] destTableSize Size of the entire MDDT
+ *
+ * @param[in] resultsTableAddr Ptr to the first MDRT entry
+ * @param[in] resultsTableSize Size of the entire MDRT
+ *
+ * @return errlHndl_t
+ */
+ errlHndl_t copySrcToDest(dumpEntry *srcTableEntry, uint64_t srcTableSize,
+ dumpEntry *destTableEntry, uint64_t destTableSize,
+ resultsEntry *resultsTableEntry,
+ uint64_t resultsTableSize);
+
+ /**
+ * @brief This function handles sending the mailbox message to the Fsp to
+ * notify of Dump Status. Start, error or complete. If Error or
+ * complete types are requested, the dump results table is passed
+ * to the FSP.
+ *
+ * @param[in] i_type - The type of DUMP msg being written.
+ *
+ * @return errlHndl_t - NULL if successful, otherwise a pointer to the error
+ * log.
+ */
+ errlHndl_t sendMboxMsg (DUMP_MSG_TYPE i_type);
+
+
+
+} // end of namespace
+
+
+#endif
diff --git a/src/include/usr/dump/dumpreasoncodes.H b/src/include/usr/dump/dumpreasoncodes.H
index 9f1da4353..1bd2aaf11 100644
--- a/src/include/usr/dump/dumpreasoncodes.H
+++ b/src/include/usr/dump/dumpreasoncodes.H
@@ -31,6 +31,7 @@ namespace DUMP
{
DUMP_COLLECT_INVALID = 0x00,
DUMP_COLLECT = 0x01,
+ DUMP_SEND_MBOX_MSG = 0x02,
};
enum dumpReasonCode
diff --git a/src/include/usr/isteps/istep14list.H b/src/include/usr/isteps/istep14list.H
index 5aa93574c..04ba0d3cd 100644
--- a/src/include/usr/isteps/istep14list.H
+++ b/src/include/usr/isteps/istep14list.H
@@ -182,6 +182,7 @@ namespace INITSERVICE
const DepModInfo g_istep14Dependancies = {
{
DEP_LIB(libdram_initialization.so),
+ DEP_LIB(libdump.so),
{ 0 },
}
};
diff --git a/src/include/usr/mbox/mbox_queues.H b/src/include/usr/mbox/mbox_queues.H
index e60546558..094811d53 100644
--- a/src/include/usr/mbox/mbox_queues.H
+++ b/src/include/usr/mbox/mbox_queues.H
@@ -1,26 +1,25 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/include/usr/mbox/mbox_queues.H $
- *
- * 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
- */
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/mbox/mbox_queues.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
+/* */
+/* 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 __MBOX_QUEUES_H
#define __MBOX_QUEUES_H
@@ -59,9 +58,9 @@ namespace MBOX
FSP_PROGRESS_CODES_MSGQ = 0x80000003,
FSP_ERROR_MSGQ = 0x80000004,
FSP_VDDR_MSGQ = 0x80000005,
- IPL_SERVICE_QUEUE = 0x80000008, // Defined by Fsp team
+ IPL_SERVICE_QUEUE = 0x80000008,
FSP_ATTR_SYNC_MSGQ = 0x80000009,
- // 0x8000000A, // Reserved for VID
+ FSP_DUMP_MSGQ_ID = 0x8000000A,
FSP_HWPF_ATTR_MSGQ = 0x8000000B, // HWPF Attribute override/sync
FSP_VPD_MSGQ = 0x8000000C,
diff --git a/src/include/usr/vmmconst.h b/src/include/usr/vmmconst.h
index d3b29415e..1c5ae6d01 100644
--- a/src/include/usr/vmmconst.h
+++ b/src/include/usr/vmmconst.h
@@ -130,41 +130,8 @@ enum BlockPriority
#define HSVC_TEST_MEMORY_SIZE (2*MEGABYTE)
/* Chunk of physical memory used for Dump Source Table */
-//#define DUMP_TEST_SRC_MEM_ADDR (VMM_MEMORY_SIZE + 64*MEGABYTE)
#define DUMP_TEST_MEMORY_ADDR (HSVC_TEST_MEMORY_ADDR + HSVC_TEST_MEMORY_SIZE)
#define DUMP_TEST_MEMORY_SIZE (4*MEGABYTE)
-// The rest of these #defines will be moved to dumpif.H.
-
-#define DUMP_TEST_SRC_MEM_ADDR (HSVC_TEST_MEMORY_ADDR + HSVC_TEST_MEMORY_SIZE)
-#define DUMP_TEST_SRC_MEM_SIZE (MEGABYTE)
-
-/* Chunk of physical memory used for Dump Destination Table */
-#define DUMP_TEST_DST_MEM_ADDR (DUMP_TEST_SRC_MEM_ADDR + DUMP_TEST_SRC_MEM_SIZE)
-#define DUMP_TEST_DST_MEM_SIZE (MEGABYTE)
-
-/* Chunk of physical memory used for Dump Results Table */
-#define DUMP_TEST_RESULTS_MEM_ADDR (DUMP_TEST_DST_MEM_ADDR + DUMP_TEST_DST_MEM_SIZE)
-#define DUMP_TEST_RESULTS_MEM_SIZE (MEGABYTE)
-
-// Data location where the src, destination tables point to.
-#define DUMP_TEST_SRC_DATA_AREA DUMP_TEST_RESULTS_MEM_ADDR + DUMP_TEST_RESULTS_MEM_SIZE
-#define DUMP_TEST_DST_DATA_AREA DUMP_TEST_SRC_DATA_AREA + DUMP_TEST_DATA_SIZE
-#define DUMP_TEST_DATA_SIZE MEGABYTE
-
-// default enums to point out the start and end of the DUMP Tables in memory
-#define DUMP_TEST_TABLE_START DUMP_TEST_SRC_MEM_ADDR
-#define DUMP_TEST_TABLE_SIZE DUMP_TEST_SRC_MEM_SIZE + DUMP_TEST_DST_MEM_SIZE + DUMP_TEST_RESULTS_MEM_SIZE
-#define DUMP_TEST_TABLE_END DUMP_TEST_TABLE_START + DUMP_TEST_TABLE_SIZE
-
-// In addition to the dump table locations we have scratch data area that is used
-// to put the SRC data that the MDST will point to.
-
-// This is the size of all the Data used for Dump testing
-#define DUMP_TEST_ALL_SIZE = DUMP_TEST_TABLE_SIZE + (2*MEGABYTE)
-// This is the ending address of test Data area
-#define DUMP_TEST_ALL_END = DUMP_TEST_TABLE_START + DUMP_TEST_ALL_SIZE
-
-
#endif /* _VMMCONST_H */
OpenPOWER on IntegriCloud