summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authornagurram-in <nagendra.g@in.ibm.com>2016-10-03 07:26:30 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-11-14 21:29:58 -0500
commit2da4b3794cb7ee133d1c4db6640aad99748ebf4b (patch)
tree0ce57c885d1ae2c2c33743681fbcc98012d6958b /src/include
parent3d95d418377ac2ede6d9ab217637cd53158736e9 (diff)
downloadtalos-hostboot-2da4b3794cb7ee133d1c4db6640aad99748ebf4b.tar.gz
talos-hostboot-2da4b3794cb7ee133d1c4db6640aad99748ebf4b.zip
HDAT changes for Witherspoon
Change-Id: I942362604938fe4f7511e21da9246236a939c176 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/30905 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/hbotcompid.H10
-rwxr-xr-xsrc/include/usr/hdat/hdat.H207
-rwxr-xr-xsrc/include/usr/hdat/hdat_reasoncodes.H151
-rw-r--r--src/include/usr/hdat/hdatnaca.H216
-rw-r--r--src/include/usr/isteps/istep20list.H13
5 files changed, 597 insertions, 0 deletions
diff --git a/src/include/usr/hbotcompid.H b/src/include/usr/hbotcompid.H
index 308007906..278e0af05 100644
--- a/src/include/usr/hbotcompid.H
+++ b/src/include/usr/hbotcompid.H
@@ -405,6 +405,16 @@ const char SIO_COMP_NAME[] = "sio";
const compId_t FAPI2_COMP_ID = 0x3300;
const char FAPI2_COMP_NAME[] = "fapi2";
+/** @name HDAT
+ * HDAT component
+ * @Note HDAT_COMP_ID=0x9000 matches with what
+ * defined in fips_comp_id.H
+ */
+//@{
+const compId_t HDAT_COMP_ID = 0x9000;
+const char HDAT_COMP_NAME[] = "hdat";
+
+
/** @name PRDF
* PRDF component
diff --git a/src/include/usr/hdat/hdat.H b/src/include/usr/hdat/hdat.H
new file mode 100755
index 000000000..6e052d7db
--- /dev/null
+++ b/src/include/usr/hdat/hdat.H
@@ -0,0 +1,207 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/hdat/hdat.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* [+] 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. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+
+/**
+ * @file hdat.H
+ *
+ * @brief This file contains constants and typedefs needed by both the hdat
+ * component as well as other components. They are placed here to avoid
+ * header file circular dependencies.
+ *
+ * MAINTENANCE NOTE: Do not put any functions or methods in this file.
+ * Various components include the header file to get typedefs but do
+ * not want to get bound to the HDAT shared library.
+ */
+
+#ifndef HDAT_H
+#define HDAT_H
+
+/*----------------------------------------------------------------------------*/
+/* Includes */
+/*----------------------------------------------------------------------------*/
+#include <stdint.h>
+
+namespace HDAT
+{
+/*----------------------------------------------------------------------------*/
+/* Type definitions */
+/*----------------------------------------------------------------------------*/
+
+/** @brief Type definition for a 64 bit host memory address. */
+struct hdatMsAddr_t
+{
+ uint32_t hi;
+ uint32_t lo;
+}__attribute__ ((packed));
+
+/** @brief Type definition for the common hypervisor Data Interface Format
+ * (HDIF) header. */
+struct hdatHDIF_t
+{
+ uint16_t hdatStructId; // 0x0000 Structure format ID
+ char hdatStructName[6]; // 0x0002 Structure eye catcher
+ uint16_t hdatInstance; // 0x0008 Instance number
+ uint16_t hdatVersion; // 0x000A Structure version
+ uint32_t hdatSize; // 0x000C Total structure size in bytes
+ uint32_t hdatHdrSize; // 0x0010 Header size in bytes
+ uint32_t hdatDataPtrOffset; // 0x0014 Offset to hdatHDIFDataHdr_t
+ uint16_t hdatDataPtrCnt; // 0x0018 Count of hdatHDIFDataHdr_t structures
+ uint16_t hdatChildStrCnt; // 0x001A Count of hdatDIFChildPtr_t structures
+ uint32_t hdatChildStrOffset;// 0x001C Offset to child structures array
+}__attribute__ ((packed));
+
+
+/** @brief Type definition for the "pointer" header to the internal data.*/
+struct hdatHDIFDataHdr_t
+{
+ uint32_t hdatOffset; // 0x0000 Offset from top of structure
+ uint32_t hdatSize; // 0x0004 Data structure size in bytes
+}__attribute__ ((packed));
+
+
+/** @brief Type definition for the data array header.
+ * Used when internal data is an array.*/
+struct hdatHDIFDataArray_t
+{
+ uint32_t hdatOffset; // 0x0000 Offset to array from this structure
+ uint32_t hdatArrayCnt; // 0x0004 Number of array entries
+ uint32_t hdatAllocSize; // 0x0008 Size of allocated space for array entry
+ uint32_t hdatActSize; // 0x000C Actual size of an array entry
+ // (<= hdatAllocSize)
+} __attribute__ ((packed));
+
+
+/** @brief Type definition for the 5-tuples that the SPIRA uses to address other
+ * data structures.
+ */
+struct hdat5Tuple_t
+{
+ hdatMsAddr_t hdatAbsAddr; // 0x0000 Absolute address to a structure
+ uint16_t hdatAllocCnt; // 0x0008 Allocated count
+ uint16_t hdatActualCnt; // 0x000A Actual count
+ uint32_t hdatAllocSize; // 0x000C Allocated size in bytes
+ uint32_t hdatActualSize; // 0x0010 Actual size in bytes
+ uint32_t hdatTceOffset; // 0x0014 Offset to add to TCE for use at
+ //runtime
+ uint8_t hdatReserved1[8]; // 0x0018 Reserved for future use
+} __attribute__ ((packed));
+
+
+/** @brief Type definition for the "pointer" header to a child data structure**/
+struct hdatHDIFChildHdr_t
+{
+ uint32_t hdatOffset; // 0x0000 Offset from top of structure
+ uint32_t hdatSize; // 0x0004 Child data structure size in bytes
+ uint32_t hdatCnt; // 0x0008 Count of child data structures
+} __attribute__ ((packed));
+
+
+/** @brief FRU Identification */
+struct hdatFruId_t
+{
+ uint16_t hdatSlcaIdx; // 0x0000 SLCA index of this FRU
+ uint16_t hdatResourceId; // 0x0002 VPD resource id of this FRU
+} __attribute__ ((packed));
+
+/*----------------------------------------------------------------------------*/
+/* Constants */
+/*----------------------------------------------------------------------------*/
+const int32_t HDAT_SUCCESS = 0;
+const int32_t HDAT_FAILURE = -1;
+
+/** @brief No children for a data structure*/
+const uint32_t HDAT_NO_CHILD = 0;
+
+/** @brief Structure id for an HDIF structure*/
+const uint16_t HDAT_HDIF_STRUCT_ID = 0xD1F0;
+
+/** @brief FFDC Version to classify data in error log */
+const uint8_t HDAT_VERSION1 = 1;
+
+/** @brief FFDC Sub Version to classify data in error log */
+const uint8_t HDAT_PCIA_FFDC_SUBSEC = 1;
+const uint8_t HDAT_NACA_FFDC_SUBSEC1 = 2;
+const uint8_t HDAT_NACA_FFDC_SUBSEC2 = 3;
+
+const uint32_t HDAT_REAL_ADDRESS_MASK = 0x80000000;
+const uint64_t HDAT_REAL_ADDRESS_MASK64 = 0x8000000000000000ull;
+
+// (this goes up to 8 threads on P8)
+#define HDAT_MAX_THREADS_SUPPORTED 8
+#define HDAT_MAX_EIGHT_THREADS_SUPPORTED 8
+#define HDAT_MAX_FOUR_THREADS_SUPPORTED 4
+
+/* @enum hdatProcStatus
+ * Status of a processor FRU.
+ */
+enum hdatProcStatus
+{
+ HDAT_PROC_USABLE = 0x00000000, // Usable, no failures
+ HDAT_PROC_FAILURES = 0x40000000, // Usable, failures encountered
+ HDAT_PROC_NOT_INSTALLED = 0x80000000, // Not installed
+ HDAT_PROC_NOT_USABLE = 0xC0000000, // Unusable
+ HDAT_PROC_STAT_BITS = 0xC0000000, // constant to and off all bits
+ // but 2 status bits
+ HDAT_RESERVE_FOR_CCM = 0x10000000 // reserved for future use
+};
+
+/* @enum hdatThreadIndicator
+ * Indicator of primary or secondary thread
+ */
+enum hdatThreadIndicator
+{
+ HDAT_PRIM_THREAD = 0x00000000, // Primary thread
+ HDAT_SEC_THREAD = 0x20000000, // Secondary thread
+ HDAT_THREAD_IND_BIT = 0x20000000 // For mask operations
+};
+
+/* @enum hdatThreadCnt
+ * Number of threads per processor
+ */
+enum hdatThreadCnt
+{
+ HDAT_ONE_THREAD = 0x00000000, // One thread per processor
+ HDAT_TWO_THREAD = 0x00010000, // Two threads per processor
+ HDAT_FOUR_THREAD = 0x00030000, // Four threads per processor
+ HDAT_EIGHT_THREAD = 0x00070000 // Eight threads per processor
+};
+
+struct hdatSpira_t
+{
+ hdatHDIF_t hdatHDIF;
+ hdatHDIFDataHdr_t hdatDataHdr;
+ uint8_t hdatReserved1[8];
+ hdatHDIFDataArray_t hdatArrayInfo;
+ hdat5Tuple_t hdatDataArea[24];
+}__attribute__ ((packed));
+
+/* vpd constants
+ * Defining vpd constants
+ */
+#define FRU_SV 0x1C
+
+} //namespace HDAT
+#endif // HDAT_H
diff --git a/src/include/usr/hdat/hdat_reasoncodes.H b/src/include/usr/hdat/hdat_reasoncodes.H
new file mode 100755
index 000000000..4a733343d
--- /dev/null
+++ b/src/include/usr/hdat/hdat_reasoncodes.H
@@ -0,0 +1,151 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/hdat/hdat_reasoncodes.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* [+] 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. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+
+/**
+ * @file hdat_service_codes.H
+ *
+ * @brief This file contains the definition of constants used to create SRCs
+ * and error logs.
+ */
+
+#ifndef HDATSERVICECODES_H
+#define HDATSERVICECODES_H
+
+/*----------------------------------------------------------------------------*/
+/* Includes */
+/*----------------------------------------------------------------------------*/
+#include <hbotcompid.H>
+
+namespace HDAT
+{
+
+#define HDAT_TRACE_NAME "HDAT"
+
+/*----------------------------------------------------------------------------*/
+/* Constants */
+/*----------------------------------------------------------------------------*/
+const uint8_t SUBSEC_ADDITIONAL_SRC = 0x01;
+
+/** @enum hdatModId
+ * "Module ids" for hypervisor data area SRCs
+ * Actually, these are ids assigned to each function/method within
+ * a module (.C file). The ids must be unique across all component
+ * modules
+ */
+enum HDATModuleId
+{
+ MOD_UTIL_IS_FUNCTIONAL = 0x01,
+ MOD_PCIA_LOAD = 0x02,
+ MOD_PCIA_SET_CORE_INF = 0x03,
+ MOD_UTIL_CARD_ID = 0x04,
+ MOD_UTIL_GET_PARENT = 0x05,
+ MOD_PCIA_DESTRUCTOR = 0x06,
+ MOD_UTIL_GET_ECID_CHIPID = 0x07,
+ MOD_HDAT_INTERFACE = 0x08,
+ MOD_SLCA_DESTRUCTOR = 0x09,
+ MOD_IPLPARMS_DESTRUCTOR = 0x0A,
+ MOD_UTIL_GET_RID = 0x0B,
+ MOD_IOHUB_GET_RID = 0x0C,
+ MOD_IOHUB_FETCH_DAUGHTER = 0x0D,
+ MOD_IOHUB_BUILD_DAUGHTER = 0x0E,
+ MOD_IOHUB_LOAD_DATA = 0x0F,
+ MOD_IOHUB_ADD_CHIP = 0x10,
+ MOD_UTIL_VPD = 0x11,
+ MOD_UTIL_CVPD_READ_FUNC = 0x12,
+ MOD_UTIL_SPD_READ_FUNC = 0x13,
+ MOD_ADD_IMT_ADDR_RANGE = 0x14,
+ MOD_ADD_UE_ADDR_RANGE = 0x15,
+ MOD_ADD_RES_HB_ADDR_RANGE = 0x16,
+ MOD_ADD_MS_AREA_FRU = 0x17,
+ MOD_ADD_RAM_FRU = 0x18,
+ MOD_ADD_ADDR_RANGE = 0x19,
+ MOD_ADD_RAM = 0x1a,
+ MOD_MSVPD_DESTRUCTOR = 0x1b,
+ MOD_GET_PATH_INFO = 0x1c,
+ MOD_HDAT_SP_SUBSYS_CTOR = 0x1d,
+ MOD_HDAT_SP_SUBSYS_DTOR = 0x1e,
+ MOD_PCRD_LOAD = 0x1f,
+ MOD_PCRD_SET_PROC_INF = 0x20,
+ MOD_PCRD_DESTRUCTOR = 0x21,
+ MOD_UTIL_PVPD_READ_FUNC = 0x22,
+ MOD_PROCESS_FRU = 0x23,
+ MOD_BUILD_SPECIFIED_VPD = 0x24,
+ MOD_HDAT_SERVICEDATA_CTOR = 0x25,
+ MOD_HDAT_NODEDATA_DTOR = 0x26,
+ MOD_SPIRAS_CREATE_DATA_AREA = 0x27,
+ MOD_SPIRAS_DESTRUCTOR = 0x28,
+ MOD_HDAT_SPIRAH_DTOR = 0x29,
+ MOD_HDAT_GET_SPIRAH = 0x2a,
+ MOD_NACA_GET_MEM = 0x2b,
+ MOD_HBRT_LOAD_DATA = 0x2c,
+ MOD_UTIL_FULL_MVPD_READ_FUNC = 0x2d,
+};
+
+
+/** @enum HDATReasonCode
+ * Reason codes for hypervisor data area SRCs. Reason codes can be
+ * used in more than one location. The combination of module id
+ * and reason code points to a unique piece of code.
+ * Therefore, if the same error can occur in multiple places within the
+ * same function/method, each error would need its own unique extended
+ * ref code.
+ *
+ * The range is 0x9001 through 0x90FF
+ */
+enum HDATReasonCode
+{
+ RC_INVALID_OBJECT = HDAT_COMP_ID | 0x01,
+ RC_TOP_LVL_TGT_NOT_FOUND = HDAT_COMP_ID | 0x02,
+ RC_INVALID_TGT_ATTR = HDAT_COMP_ID | 0x03,
+ RC_TARGET_UNSUPPORTED = HDAT_COMP_ID | 0x04,
+ RC_DEV_MAP_FAIL = HDAT_COMP_ID | 0x05,
+ RC_EMPTY_TARGET_LIST = HDAT_COMP_ID | 0x06,
+ RC_SLCA_INDEX_RETRIEVE_FAIL = HDAT_COMP_ID | 0x07,
+ RC_SLCA_RID_RETRIEVE_FAIL = HDAT_COMP_ID | 0x08,
+ RC_ORDINAL_ID_RETRIEVE_FAIL = HDAT_COMP_ID | 0x09,
+ RC_TGT_ATTR_NOTFOUND = HDAT_COMP_ID | 0x0A,
+ RC_MEM_ALLOC_FAIL = HDAT_COMP_ID | 0x0B,
+ RC_EXCEED_IOCHIP_NUM = HDAT_COMP_ID | 0x0C,
+ RC_DEV_READ_FAIL = HDAT_COMP_ID | 0x0D,
+ RC_CVPD_READ_FAIL = HDAT_COMP_ID | 0x0E,
+ RC_CVPD_FAIL = HDAT_COMP_ID | 0x0F,
+ RC_SPD_READ_FAIL = HDAT_COMP_ID | 0x10,
+ RC_ERC_MAX_EXCEEDED = HDAT_COMP_ID | 0x11,
+ RC_ERC_NO_PARENT = HDAT_COMP_ID | 0x12,
+ RC_INPUT_TARGET_NULL = HDAT_COMP_ID | 0x13,
+ RC_MASTER_PROC_TARGET_NULL = HDAT_COMP_ID | 0x14,
+ RC_PVPD_READ_FAIL = HDAT_COMP_ID | 0x15,
+ RC_PVPD_FAIL = HDAT_COMP_ID | 0x16,
+ RC_PROCESS_FRU_FAIL = HDAT_COMP_ID | 0x17,
+ RC_DEV_UNMAP_FAIL = HDAT_COMP_ID | 0x18,
+ RC_DATA_AREA_FAIL = HDAT_COMP_ID | 0x19,
+ RC_NULL_PTR_PASSED = HDAT_COMP_ID | 0x1a,
+ RC_INVALID_NACA = HDAT_COMP_ID | 0x1b,
+ RC_DEV_READ_VPD_FAIL = HDAT_COMP_ID | 0x1c,
+};
+
+} //namespace HDAT
+#endif // HDATSERVICECODES_H
diff --git a/src/include/usr/hdat/hdatnaca.H b/src/include/usr/hdat/hdatnaca.H
new file mode 100644
index 000000000..20e600be8
--- /dev/null
+++ b/src/include/usr/hdat/hdatnaca.H
@@ -0,0 +1,216 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/hdat/hdatnaca.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2016 */
+/* [+] 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. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+#ifndef HDATNACA_H
+#define HDATNACA_H
+
+/*----------------------------------------------------------------------------*/
+/* Includes */
+/*----------------------------------------------------------------------------*/
+
+#include <hdat/hdat.H>
+#include <errl/errlentry.H>
+#include <hdat/hdat_reasoncodes.H>
+//#include <../../../usr/hdat/hdatutil.H>
+
+namespace HDAT
+{
+
+/*----------------------------------------------------------------------------*/
+/* Constants */
+/*----------------------------------------------------------------------------*/
+const uint32_t HDAT_NACA_OFFSET = 0x00004000; // offset in primary LID and
+ // mainstore where NACA starts.
+
+/*----------------------------------------------------------------------------*/
+/* Type definitions */
+/*----------------------------------------------------------------------------*/
+
+/** @brief Type definition defines for Node Address Communication Area (NACA).
+ *
+ * The NACA is a data structure used primarily by the host operating system.
+ * The NACA is prebuilt as part of the primary host LID. FipS uses several
+ * fields in the NACA to determine where the LID table and the Service
+ * Processor Interace Root Array (SPIRA) reside. Fields which are not used by
+ * FipS are just defined as reserved so that we don't have to chase
+ * uninteresting changes the host OS may make to things FipS does not care
+ * about.
+ *
+ */
+struct hdatNaca_t
+{
+ hdatMsAddr_t nacaOpalMasterThreadEntry; // 0x0000 Reserved for PHYP, Will
+ // be kludge in for OPAL by HDAT.
+
+ hdatMsAddr_t nacaOpalSecThreadEntry; // 0x0008 Reserved for PHYP, Will
+ // be kludge in for OPAL by HDAT.
+
+ hdatMsAddr_t nacaOpalPrimLidLoadAddr; // 0x0010 Reserved for PHYP, Will
+ // be kludge in for OPAL by HDAT.
+
+ hdatMsAddr_t nacaHypRelData; // 0x0018 Hypervisor release data
+ // structure pointer.
+
+ hdatMsAddr_t nacaOpalCopyCodeAddr; // 0x0020 Reserved for PHYP, Will
+ // be kludge in for OPAL by HDAT.
+
+ uint8_t nacaReserved2[8]; // 0x0028 reserved space.
+
+ hdatMsAddr_t nacaSpira; // 0x0030 Service Processor
+ // Interface Root Array pointer
+ // -- also used for OPAL.
+ // The SPIRA may be in the primary
+ // host LID or secondary host LID.
+ // Since we do not know, it must be
+ // DMA'd back from main memory ater
+ // all LIDS are loaded.
+
+ hdatMsAddr_t nacaLidTbl; // 0x0038 LID table pointer.The LID
+ // table is always contained within
+ // the primary host LID.
+
+ uint8_t nacaReserved3[96]; // 0x0040 reserved space.
+
+ uint32_t nacaSpiraSize; // 0x00A0 Actual SPIRA size bytes.
+
+ uint8_t nacaReserved4[28]; // 0x00A4 reserved space.
+
+ hdatMsAddr_t nacaHypLoadMap; // 0x00C0 Hypervisor resident
+ // module load map pointer.
+
+ uint8_t nacaReserved5[228]; // 0x00C8 reserved space.
+
+ uint8_t nacaFlags[4]; // 0x01AC Flags to control FSP
+ // function. This is defined this
+ // way rather than a uint32_t bit
+ // field so that we avoid
+ // little/big endian issues when
+ // testing with an x86 simulator.
+
+ uint8_t nacaReserved6[5]; // 0x01B0 reserved space.
+
+ uint8_t nacaSftAttn; // 0x01B5 Software attentions
+ // enabled; used by CPU controls.
+ // See constant NACA_ATTN_DISABLED
+ // above for testing this field.
+
+ uint8_t nacaReserved7[1]; // 0x01B6 Reserved area.
+
+ uint8_t nacaPhypPciaSupport; // 0x01B7 PHYP supports PCIA
+ // format if non-zero
+} __attribute__ ((packed));
+
+/**
+ * @brief This function maps the Node Address Communication Area (NACA)
+ * structure from the main memory where LID file are alaready loaded from the
+ * pnor PAYLOAD partition.
+ *
+ * Usage note: The NACA structure is built as part of the host LIDs.
+ * These are big endian structures. If this structure is used on a little
+ * endian machine, the user is responsible for performing big endian to
+ * little endian conversions.
+ *
+ * @pre The current implementation depends upon the fact that the pnor PAYLOAD
+ * is built with the LID file and pnor PAYLOAD partition is loaded into Host
+ * memory
+ *
+ * @post The naca data is read from the host memory to o_naca object.
+ *
+ * @param o_naca - output parameter - The address of the NACA is returned.
+ *
+ * @return A null error log handle if successful, else errlHndl_t returned.
+ *
+ */
+errlHndl_t hdatGetNacaFromMem(hdatNaca_t &o_naca);
+
+/* @brief interface function to be called fromistep
+ */
+void * call_hdat_steps( void *io_pArgs );
+
+
+/*The following structures and functions are used for purely DISPLAY purpose
+ */
+
+const uint32_t HDAT_SVC_RTNS = 3;
+const uint32_t HDAT_SVC_RTN_LAST = 4;
+
+/** @brief Type definition for the Service Routines data area
+ */
+struct hdatSvcRoutines_t
+{
+ hdatMsAddr_t hdatCompAddr; //mainstore address compare address
+ uint16_t hdatCompOp; //mainstore address compare operation
+ uint16_t hdatCompLen; //mainstore address compare length
+ uint32_t hdatCompData; //mainstore address compare data
+ hdatMsAddr_t hdatCompSR; //mainstore address compare service routine
+ hdatMsAddr_t hdatDspAltSr; //mainstore display/alter service routine
+ uint8_t hdatRsvd1[8]; //reserved for future use
+ hdatMsAddr_t hdatMsDumpSR; //mainstore dump service routine
+ hdatMsAddr_t hdatRealValSR;//real address validation service routine
+ hdatMsAddr_t hdatEffAddr; //effective address
+ hdatMsAddr_t hdatCpuSpinSR;//CPU spin service routine
+ hdatMsAddr_t hdatSpGlueSR; //service processor glue service routine
+ uint8_t hdatRsvd2[16];//reserved for future use
+ uint8_t hdatTimeBaseFlags[8]; // time base flags
+ uint8_t hdatRsvd3[8]; // reserved for future use
+ hdatMsAddr_t hdatTdeAddrParm; // TDE address parameter
+ hdatMsAddr_t hdatShrProcSR; // SDR1 shared processor service routine
+ uint8_t hdatRsvd4[20]; // reserved for future use
+ uint16_t hdatAddrType; // address type for compare
+ uint8_t hdatRsvd5[10]; // reserved for future use
+ hdatMsAddr_t hdatCacheFlshSR; // cache flush service routine
+ uint8_t hdatRsvd6[88]; // reserved for future use
+} __attribute__ ((packed));
+
+/** @brief The CPU Controls data area is composed of an array of structures
+ * The structure contains the mainstore address of a service routine's
+ * information as well as an 8 byte length of the information at that address
+ */
+struct hdatSRAddrLen_t
+{
+ hdatMsAddr_t hdatSsrPtr; // address of service routine info
+ uint32_t hdatSsrLenHi; // high order 4 bytes of routine info length
+ uint32_t hdatSsrLenLo; // low order 4 bytes of routine info length
+}__attribute__ ((packed));
+
+/** type definition for the cpu control area
+ */
+struct hdatCpuCtrlArea_t
+{
+ hdatHDIF_t hdatHDIF;
+ hdatHDIFDataHdr_t hdatDataHdr;
+ uint8_t hdatRsvd1[8];
+ hdatSRAddrLen_t hdatSR[HDAT_SVC_RTN_LAST];
+}__attribute__ ((packed));
+
+/*
+ * to display the cpu control area and service routine area in trace
+ */
+void hdatGetCpuCtrlFromMem(hdatMsAddr_t i_msAddr, uint32_t i_size);
+
+
+
+
+} //namespace HDAT
+#endif // HDATNACA_H
diff --git a/src/include/usr/isteps/istep20list.H b/src/include/usr/isteps/istep20list.H
index 144ae0ff2..4de197e13 100644
--- a/src/include/usr/isteps/istep20list.H
+++ b/src/include/usr/isteps/istep20list.H
@@ -42,6 +42,12 @@
#include <initservice/initsvcreasoncodes.H>
#include <config.h>
+
+#if CONFIG_ENABLE_HDAT_IN_HOSTBOOT
+#include <hdat/hdatnaca.H>
+#endif
+
+
namespace ISTEP_20
{
@@ -71,6 +77,13 @@ namespace INITSERVICE
ISTEP_20::call_host_load_payload,
{ START_FN, EXT_IMAGE, MPIPL_OP | NORMAL_IPL_OP, false }
},
+#if CONFIG_ENABLE_HDAT_IN_HOSTBOOT
+ {
+ ISTEPNAME(20,02,"host_load_hdat"),
+ HDAT::call_hdat_steps,
+ { START_FN, EXT_IMAGE, MPIPL_OP | NORMAL_IPL_OP, false }
+ },
+#endif
};
OpenPOWER on IntegriCloud