From 3536e96bd3a1d490cec900617fab6703fb7798ea Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Fri, 7 Sep 2012 15:39:08 -0500 Subject: Populate Attributes for HostServices Inside the start payload istep a set of FAPI attributes will be read and copied into a specified location of mainstore so that HostServices runtime code can access them. There are 4 files that will be shared with HostServices code: - attribute_structs.H : common structures used to define data - hsvc_sysdata.C : list of required system attributes - hsvc_procdata.C : list of required proc attributes - hsvc_exdata.C : list of required ex attributes RTC: 41242 Change-Id: I3af3b2bf99b4dbedb6efeb2cb35e49ba066a9c19 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1893 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell Reviewed-by: A. Patrick Williams III --- src/usr/runtime/common/hsvc_attribute_structs.H | 77 +++++++++++++++++++ src/usr/runtime/common/hsvc_exdata.C | 27 +++++++ src/usr/runtime/common/hsvc_procdata.C | 98 +++++++++++++++++++++++++ src/usr/runtime/common/hsvc_sysdata.C | 38 ++++++++++ 4 files changed, 240 insertions(+) create mode 100644 src/usr/runtime/common/hsvc_attribute_structs.H create mode 100644 src/usr/runtime/common/hsvc_exdata.C create mode 100644 src/usr/runtime/common/hsvc_procdata.C create mode 100644 src/usr/runtime/common/hsvc_sysdata.C (limited to 'src/usr/runtime/common') diff --git a/src/usr/runtime/common/hsvc_attribute_structs.H b/src/usr/runtime/common/hsvc_attribute_structs.H new file mode 100644 index 000000000..19f12ddcd --- /dev/null +++ b/src/usr/runtime/common/hsvc_attribute_structs.H @@ -0,0 +1,77 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/runtime/attribute_structs.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 otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ +/** + * @file attribute_structs.H + * + * @brief Shared structures with the HostServices code + */ + +struct hsvc_proc_header_t { + uint64_t procid; //=NNNCCC + uint64_t offset; //offset to attribute header relative to start of node_data + uint64_t numAttr; //number of populated attributes + static const uint64_t NO_PROC = 0xFFFFFFFFFFFFFFFF; +}; + +struct hsvc_ex_header_t { + uint64_t parent_procid; //=NNNCCC + uint64_t chiplet; //physical ex number (0..15) + uint64_t offset; //offset to attribute header relative to start of node_data + uint64_t numAttr; //number of populated attributes + static const uint64_t NO_PROC = 0xFFFFFFFFFFFFFFFF; + static const uint64_t NO_CHIPLET = 0xFFFFFFFFFFFFFFFF; +}; + +struct hsvc_attr_header_t { + uint64_t id; // attribute id + uint64_t sizeBytes; // size of attribute data + uint64_t offset; // offset to attribute data relative to start of node_data/sys_data + static const uint64_t NO_ATTRIBUTE = 0x0; +}; + +// This is the data that will be in the 'System Attribute Data' +// section of HDAT +struct hsvc_system_data_t +{ + uint64_t nodePresent; //bitstring of populated nodes, bit0=node0, etc + uint64_t numAttr; //number of populated attributes + uint64_t offset; //offset to attribute headers relative to start of system_data + //blob of data... +}; + +// This is the data that will be in the 'Node Attribute Data' +// section of HDAT, there will be 1 of these per physical +// drawer/book/octant/blade +struct hsvc_node_data_t +{ + uint64_t procOffset; //offset to proc headers relative to start of node_data + uint64_t exOffset; //offset to ex headers relative to start of node_data + uint64_t numTargets; //number of proc+ex targets present in this node + //blob of data... +}; + +// Custom Attribute IDs +// Note: Standard fapi::AttributeId are only 32-bits so we can use the top +// 32-bits of the 64-bit value for our own numbers +static const uint64_t HSVC_HUID = 0xFF000001FFFFFFFF; +static const uint64_t HSVC_PHYS_PATH = 0xFF000002FFFFFFFF; diff --git a/src/usr/runtime/common/hsvc_exdata.C b/src/usr/runtime/common/hsvc_exdata.C new file mode 100644 index 000000000..ce9b042c1 --- /dev/null +++ b/src/usr/runtime/common/hsvc_exdata.C @@ -0,0 +1,27 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/runtime/hsvc_exdata.C $ */ +/* */ +/* 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 otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ +//@todo - This file will be autogenerated by the HostServices build RTC:48350 +// This file was generated on MM/DD/YYYY by username from build xxxxx + +HSVC_LOAD_ATTR( ATTR_CHIP_UNIT_POS ); +HSVC_LOAD_ATTR( ATTR_FUNCTIONAL ); diff --git a/src/usr/runtime/common/hsvc_procdata.C b/src/usr/runtime/common/hsvc_procdata.C new file mode 100644 index 000000000..21f24af68 --- /dev/null +++ b/src/usr/runtime/common/hsvc_procdata.C @@ -0,0 +1,98 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/runtime/hsvc_procdata.C $ */ +/* */ +/* 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 otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ +//@todo - This file will be autogenerated by the HostServices build RTC:48350 +// This file was generated on MM/DD/YYYY by username from build xxxxx + +HSVC_LOAD_ATTR( ATTR_CHIP_ID ); +HSVC_LOAD_ATTR( ATTR_FUNCTIONAL ); +HSVC_LOAD_ATTR_P( ATTR_EC ); +HSVC_LOAD_ATTR( ATTR_PM_AISS_TIMEOUT ); +HSVC_LOAD_ATTR( ATTR_PM_APSS_CHIP_SELECT ); +HSVC_LOAD_ATTR( ATTR_PM_EXTERNAL_VRM_STEPDELAY_RANGE ); +HSVC_LOAD_ATTR( ATTR_PM_EXTERNAL_VRM_STEPDELAY_VALUE ); +HSVC_LOAD_ATTR( ATTR_PM_IVRMS_ENABLED ); +HSVC_LOAD_ATTR( ATTR_PM_OCC_HEARTBEAT_TIME ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERDOWN_CORE_DELAY0 ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERDOWN_CORE_DELAY0_VALUE ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERDOWN_CORE_DELAY1 ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERDOWN_CORE_DELAY1_VALUE ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERDOWN_CORE_SEQUENCE_DELAY_SELECT ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERDOWN_ECO_DELAY0 ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERDOWN_ECO_DELAY0_VALUE ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERDOWN_ECO_DELAY1 ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERDOWN_ECO_DELAY1_VALUE ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERDOWN_ECO_SEQUENCE_DELAY_SELECT ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERUP_CORE_DELAY0 ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERUP_CORE_DELAY0_VALUE ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERUP_CORE_DELAY1 ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERUP_CORE_DELAY1_VALUE ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERUP_CORE_SEQUENCE_DELAY_SELECT ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERUP_ECO_DELAY0 ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERUP_ECO_DELAY0_VALUE ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERUP_ECO_DELAY1 ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERUP_ECO_DELAY1_VALUE ); +HSVC_LOAD_ATTR( ATTR_PM_PFET_POWERUP_ECO_SEQUENCE_DELAY_SELECT ); +HSVC_LOAD_ATTR( ATTR_PM_PMC_HANGPULSE_DIVIDER ); +HSVC_LOAD_ATTR( ATTR_PM_POWER_PROXY_TRACE_TIMER ); +HSVC_LOAD_ATTR( ATTR_PM_PPT_TIMER_MATCH_VALUE ); +HSVC_LOAD_ATTR( ATTR_PM_PPT_TIMER_TICK ); +HSVC_LOAD_ATTR( ATTR_PM_PSTATE_STEPSIZE ); +HSVC_LOAD_ATTR( ATTR_PM_PSTATE_UNDERVOLTING_MAXIMUM ); +HSVC_LOAD_ATTR( ATTR_PM_PSTATE_UNDERVOLTING_MINIMUM ); +HSVC_LOAD_ATTR( ATTR_PM_PVSAFE_PSTATE ); +HSVC_LOAD_ATTR( ATTR_PM_SAFE_PSTATE ); +HSVC_LOAD_ATTR( ATTR_PM_SLEEP_ENTRY ); +HSVC_LOAD_ATTR( ATTR_PM_SLEEP_EXIT ); +HSVC_LOAD_ATTR( ATTR_PM_SLEEP_TYPE ); +HSVC_LOAD_ATTR( ATTR_PM_SPIPSS_CLOCK_DIVIDER ); +HSVC_LOAD_ATTR( ATTR_PM_SPIPSS_CLOCK_PHASE ); +HSVC_LOAD_ATTR( ATTR_PM_SPIPSS_CLOCK_POLARITY ); +HSVC_LOAD_ATTR( ATTR_PM_SPIPSS_FRAME_SIZE ); +HSVC_LOAD_ATTR( ATTR_PM_SPIPSS_FREQUENCY ); +HSVC_LOAD_ATTR( ATTR_PM_SPIPSS_IN_COUNT ); +HSVC_LOAD_ATTR( ATTR_PM_SPIPSS_IN_DELAY ); +HSVC_LOAD_ATTR( ATTR_PM_SPIPSS_INTER_FRAME_DELAY ); +//HSVC_LOAD_ATTR( ATTR_PM_SPIPSS_INTER_FRAME_DELAY_WRITE_SETTNG ); +//HSVC_LOAD_ATTR( ATTR_PM_SPIPSS_INTERFRAME_DELAY_WRITE_STATUS_VALUE ); +HSVC_LOAD_ATTR( ATTR_PM_SPIPSS_OUT_COUNT ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_CLOCK_DIVIDER ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_CLOCK_PHASE ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_CLOCK_POLARITY ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_CRC_CHECK_ENABLE ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_CRC_GEN_ENABLE ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_CRC_POLYNOMIAL_ENABLES ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_FRAME_SIZE ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_IN_DELAY_FRAME1 ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_IN_DELAY_FRAME2 ); +//HSVC_LOAD_ATTR( ATTR_PM_SPIVID_INTER_FRAME_DELAY ); +//HSVC_LOAD_ATTR( ATTR_PM_SPIVID_INTER_FRAME_DELAY_WRITE_STATUS ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_INTERFRAME_DELAY_WRITE_STATUS ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_INTERFRAME_DELAY_WRITE_STATUS_VALUE ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_INTER_RETRY_DELAY ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_INTER_RETRY_DELAY_VALUE ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_MAJORITY_VOTE_ENABLE ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_MAX_RETRIES ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_PORT_ENABLE ); +//"HSVC_LOAD_ATTR( ATTR_PM_WINKLE_ENTRY" ); +//"HSVC_LOAD_ATTR( ATTR_PM_WINKLE_EXIT" ); +HSVC_LOAD_ATTR( ATTR_PM_WINKLE_TYPE ); diff --git a/src/usr/runtime/common/hsvc_sysdata.C b/src/usr/runtime/common/hsvc_sysdata.C new file mode 100644 index 000000000..590c5fb3c --- /dev/null +++ b/src/usr/runtime/common/hsvc_sysdata.C @@ -0,0 +1,38 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/runtime/hsvc_sysdata.C $ */ +/* */ +/* 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 otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ +//@todo - This file will be autogenerated by the HostServices build RTC:48350 +// This file was generated on MM/DD/YYYY by username from build xxxxx + +HSVC_LOAD_ATTR( ATTR_FREQ_PB ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_FREQUENCY ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_CLOCK_POLARITY ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_CLOCK_PHASE ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_PORT_ENABLE ); +//HSVC_LOAD_ATTR( ATTR_PM_SPIVID_INTER_FRAME_DELAY_WRITE_STATUS ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_INTER_RETRY_DELAY ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_CRC_GEN_ENABLE ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_CRC_CHECK_ENABLE ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_MAX_RETRIES ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_CRC_POLYNOMIAL_ENABLES ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_IN_DELAY_FRAME1 ); +HSVC_LOAD_ATTR( ATTR_PM_SPIVID_IN_DELAY_FRAME2 ); -- cgit v1.2.3