diff options
author | nagurram-in <nagendra.g@in.ibm.com> | 2016-10-03 07:26:30 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-11-14 21:29:58 -0500 |
commit | 2da4b3794cb7ee133d1c4db6640aad99748ebf4b (patch) | |
tree | 0ce57c885d1ae2c2c33743681fbcc98012d6958b /src/usr/hdat/hdatbldda.H | |
parent | 3d95d418377ac2ede6d9ab217637cd53158736e9 (diff) | |
download | talos-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/usr/hdat/hdatbldda.H')
-rwxr-xr-x | src/usr/hdat/hdatbldda.H | 151 |
1 files changed, 151 insertions, 0 deletions
diff --git a/src/usr/hdat/hdatbldda.H b/src/usr/hdat/hdatbldda.H new file mode 100755 index 000000000..84dc6a649 --- /dev/null +++ b/src/usr/hdat/hdatbldda.H @@ -0,0 +1,151 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/hdat/hdatbldda.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 HDATBLDDA_H +#define HDATBLDDA_H + + +/** + * @file hdatbldda.H + * + * @brief This file contains the interfaces for building hypervisor data + * areas. + */ + +/*----------------------------------------------------------------------------*/ +/* Includes */ +/*----------------------------------------------------------------------------*/ +#include <stdint.h> // standard types +#include <hdat/hdat.H> // HDAT header type definitions +#include "hdatvpd.H" +#include <errl/errlentry.H> // ErrlEntry class definition +#include <hdat/hdat_reasoncodes.H> + +namespace HDAT +{ + +/** @brief Constant for the eye catcher for VPD structures + */ +const char HDAT_FRU_VPD_STRUCT_NAME[] = "FRUVPD"; +const char HDAT_SYS_VPD_STRUCT_NAME[] = "SYSVPD"; + + +/** @enum hdatSpiraDataAreas + * This enumeration defines the various data areas that must be built + T_MISC_VPD_FILE_NAME + * processor. + * This list must be kept in the same order as the 5-tuple entries in + * the SPIRA. + * + * If the order is changed, entries are added, or entries are deleted, + * update the HDAT_STR_NAME array in hdatPrtSpira(). + */ +enum hdatSpiraDataAreas +{ + HDAT_SPIRA_DA_FIRST = 0, + HDAT_SP_SUBSYS = 0, // service processor subsystem + HDAT_IPL_PARAMS = 1, // IPL parameters + HDAT_ENCLOSURE_VPD = 2, // enclosure vital product data + HDAT_SLCA = 3, // slot location code array + HDAT_BACKPLANE_VPD = 4, // backplane vital product data + HDAT_SYS_VPD = 5, // system vital product data + HDAT_CHIP_TOD = 6, // chip time-of-day + HDAT_PROC_INIT = 7, // phyp-supplied processor init data + HDAT_CLOCK_VPD = 8, // clock vital product data + HDAT_ANCHOR_VPD = 9, // anchor card vital product data + HDAT_OP_PNL_VPD = 10, // operator panel vital product data + HDAT_L3_VPD = 11, // level 3 cache vital product data + HDAT_MISC_CEC_VPD = 12, // miscellaneous FRU vital product data + HDAT_PACA = 13, // processor address communication area + HDAT_MDT = 14, // memory description tree + HDAT_IO_HUB = 15, // I/O hub FRU array + HDAT_CPU_CTRL = 16, // CPU controls + HDAT_MS_DUMP_SRC_TBL = 17, // mainstore dump source table (can change at run time) + HDAT_MS_DUMP_DST_TBL = 18, // mainstore dump destination table (can change at run time) + HDAT_MS_DUMP_RSLT_TBL = 19, // mainstore dump results table + HDAT_SPIRA_DA_GA1LAST = 20, // End of list for 1st eclipz release + HDAT_HEAP = 20, // Phyp allocated storage location for most of the data + HDAT_SPIRA_OLDPACA_LAST = 21, // This was last entry for old PACA format. //bs01a + + HDAT_PCIA = 21, // PCIA (Core information area) starting out on P7+ //bs01a + HDAT_PCRD = 22, // PCRD (Chip related data area) starting out on P7+ //bs01a + HDAT_HOSTSR = 23, // HOSTSR (Host service data) starting out on P8 //rij01A + HDAT_SPIRA_DA_LAST = 24 //bs01c +}; + +/** + * @brief The routines in this file drive the building of the various hypervisor + * data areas + * + * @pre + * + * @post + * + * @param[in] i_dataArea - An identifier for the specific data area + * @param[in] i_msAddr - The main store address where this data area + * will be written to. + * @param[out] o_count - number of instance of each area + * @param[out] o_size - actual size wrote to memory + * + * @return A null error log handle if successful, else the return code pointed + * to by errlHndl_t contains one of: + * + */ + +/* Build the specific VPD data areas */ +errlHndl_t hdatBldSpecificVpd(hdatSpiraDataAreas i_dataArea, + const hdatMsAddr_t &i_msAddr, + uint32_t &o_count, + uint32_t &o_size); + +/** + * @brief This function build vpd structure and write the data to MS memory. + * + * @pre + * + * @post + * + * @param[in] i_msAddr - The main store address where this data area + * @param[in] i_dataArea - An identifier for the specific data area + * will be written to. + * @param[in] i_fetchVpd - VPD record and keyword details + * @param[in] i_size - number of entries in VPD table + * @param[in] i_vpdtype - type of fru + * @param[out] o_count - number of instance of each area + * @param[out] o_size - actual size wrote to memory + * + * @return A null error log handle if successful, else the return code pointed + * to by errlHndl_t contains one of: + * + */ +errlHndl_t hdatProcessFru(const hdatMsAddr_t &i_msAddr, + const hdatSpiraDataAreas i_dataArea, + struct vpdData i_fetchVpd[], + const uint8_t i_size, + vpdType i_vpdtype, + uint32_t &o_count, + uint32_t &o_size); +}; +#endif //HDATBLDDA_H |