From f0036f0c657e090d38b58b8cd95b4ddde1d55b33 Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Mon, 7 Jan 2013 12:31:20 -0600 Subject: Refactor VPD code to eliminate redundancies After noticing some redundant code and some odd include gymnastics I pulled all of the VPD related code (spd,mvpd) into a single vpd directory/module/component. This should make the addition of the centaur fru vpd simpler as well. Note: this is part of Story 39177 but not all of it, merging this early to not hold up the work for Story 44009. Change-Id: I7637a94d22e188050403ed5600b2d7f304c3d006 RTC: 39177 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2863 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III --- src/include/usr/hbotcompid.H | 26 +- .../usr/hwpf/plat/fapiPlatAttributeService.H | 4 +- src/include/usr/mvpd/mvpdenums.H | 134 --------- src/include/usr/mvpd/mvpdreasoncodes.H | 79 ------ src/include/usr/spd/spdenums.H | 304 --------------------- src/include/usr/spd/spdif.H | 122 --------- src/include/usr/spd/spdreasoncodes.H | 94 ------- src/include/usr/vpd/mvpdenums.H | 134 +++++++++ src/include/usr/vpd/spdenums.H | 258 +++++++++++++++++ src/include/usr/vpd/vpdreasoncodes.H | 110 ++++++++ 10 files changed, 515 insertions(+), 750 deletions(-) delete mode 100644 src/include/usr/mvpd/mvpdenums.H delete mode 100644 src/include/usr/mvpd/mvpdreasoncodes.H delete mode 100644 src/include/usr/spd/spdenums.H delete mode 100644 src/include/usr/spd/spdif.H delete mode 100644 src/include/usr/spd/spdreasoncodes.H create mode 100644 src/include/usr/vpd/mvpdenums.H create mode 100644 src/include/usr/vpd/spdenums.H create mode 100644 src/include/usr/vpd/vpdreasoncodes.H (limited to 'src/include') diff --git a/src/include/usr/hbotcompid.H b/src/include/usr/hbotcompid.H index 723e10c6c..ea2d20224 100644 --- a/src/include/usr/hbotcompid.H +++ b/src/include/usr/hbotcompid.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -170,13 +170,7 @@ const compId_t INTR_COMP_ID = 0x0F00; const char INTR_COMP_NAME[] = "intr"; //@} -/** @name SPD - * DIMM SPD device driver component - */ -//@{ -const compId_t SPD_COMP_ID = 0x1000; -const char SPD_COMP_NAME[] = "spd"; -//@} +// 0x1000 - open to reclaim /** @name HBMBOX * MBOX component @@ -186,13 +180,7 @@ const compId_t HBMBOX_COMP_ID = 0x1100; const char HBMBOX_COMP_NAME[] = "mbox"; //@} -/** @name MVPD - * MVPD device driver component - */ -//@{ -const compId_t MVPD_COMP_ID = 0x1200; -const char MVPD_COMP_NAME[] = "mvpd"; -//@} +// 0x1200 - open to reclaim /** @name PRDF * PRDF component @@ -273,6 +261,14 @@ const compId_t IBSCOM_COMP_ID = 0x1C00; const char IBSCOM_COMP_NAME[] = "ibscom"; //@} +/** @name VPD + * Common VPD device driver component + */ +//@{ +const compId_t VPD_COMP_ID = 0x1D00; +const char VPD_COMP_NAME[] = "vpd"; +//@} + /** @name HSVC * Host Services component * For the code running under PHYP diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H index c4cea0ecd..188eb04fc 100755 --- a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H +++ b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/include/usr/mvpd/mvpdenums.H b/src/include/usr/mvpd/mvpdenums.H deleted file mode 100644 index 00fbfafe5..000000000 --- a/src/include/usr/mvpd/mvpdenums.H +++ /dev/null @@ -1,134 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/mvpd/mvpdenums.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 MVpdenums.H - * - * @brief Enums for the MVPD fields to be requested. - * - */ -#ifndef __MVPDENUMS_H -#define __MVPDENUMS_H - -namespace MVPD -{ - -/** -* @brief Enumeration for the MVPD Records that contain -* the keyword enumerations below. -*/ -enum mvpdRecord -{ - MVPD_FIRST_RECORD = 0x00, - CRP0 = MVPD_FIRST_RECORD, - CP00 = 0x01, - VINI = 0x02, - LRP0 = 0x03, - LRP1 = 0x04, - LRP2 = 0x05, - LRP3 = 0x06, - LRP4 = 0x07, - LRP5 = 0x08, - LRP6 = 0x09, - LRP7 = 0x0a, - LRP8 = 0x0b, - LRP9 = 0x0c, - LRPA = 0x0d, - LRPB = 0x0e, - LRPC = 0x0f, - LRPD = 0x10, - LRPE = 0x11, - LWP0 = 0x12, - LWP1 = 0x13, - LWP2 = 0x14, - LWP3 = 0x15, - LWP4 = 0x16, - LWP5 = 0x17, - LWP6 = 0x18, - LWP7 = 0x19, - LWP8 = 0x1a, - LWP9 = 0x1b, - LWPA = 0x1c, - LWPB = 0x1d, - LWPC = 0x1e, - LWPD = 0x1f, - LWPE = 0x20, - VWML = 0x21, - - // Last Record - MVPD_LAST_RECORD, - MVPD_TEST_RECORD, // Test purposes ONLY! - MVPD_INVALID_RECORD = 0xFFFF, -}; - -/** -* @brief Enumerations for MVPD keywords that can be -* accessed in the MVPD. -*/ -enum mvpdKeyword -{ - MVPD_FIRST_KEYWORD = 0x00, - VD = MVPD_FIRST_KEYWORD, - ED = 0x01, - TE = 0x02, - DD = 0x03, - pdP = 0x04, - ST = 0x05, - DN = 0x06, - PG = 0x07, - PK = 0x08, - pdR = 0x09, - pdV = 0x0a, - pdH = 0x0b, - SB = 0x0c, - DR = 0x0d, - VZ = 0x0e, - CC = 0x0f, - CE = 0x10, - FN = 0x11, - PN = 0x12, - SN = 0x13, - PR = 0x14, - HE = 0x15, - CT = 0x16, - HW = 0x17, - pdM = 0x18, - IN = 0x19, - pd2 = 0x1a, - pd3 = 0x1b, - OC = 0x1c, - FO = 0x1d, - pdI = 0x1e, - pdG = 0x1f, - MK = 0x20, - PB = 0x21, - CH = 0x22, - - // Last Keyword - MVPD_LAST_KEYWORD, - MVPD_TEST_KEYWORD, // Test purposes ONLY! - INVALID_MVPD_KEYWORD = 0xFFFF, -}; - -}; // end MVPD - -#endif diff --git a/src/include/usr/mvpd/mvpdreasoncodes.H b/src/include/usr/mvpd/mvpdreasoncodes.H deleted file mode 100644 index 8e9317b1a..000000000 --- a/src/include/usr/mvpd/mvpdreasoncodes.H +++ /dev/null @@ -1,79 +0,0 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/mvpd/mvpdreasoncodes.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 -/** - * @file mvpdreasoncodes.H - * - * @brief Reason codes and module ids for the MVPD device driver - * - */ -#ifndef __MVPDREASONCODES_H -#define __MVPDREASONCODES_H -// ----------------------------------------------- -// Includes -// ----------------------------------------------- -#include - -namespace MVPD -{ - -/** -* @enum mvpdModuleid -* -* @brief Module Ids used in created errorlogs. Indicates which -* functions an error log was created in. -* -*/ -enum mvpdModuleId -{ - MVPD_INVALID_MODULE = 0x00, - MVPD_READ_BINARY_FILE = 0x01, - MVPD_READ = 0x02, - MVPD_WRITE = 0x03, - MVPD_TRANSLATE_RECORD = 0x04, - MVPD_TRANSLATE_KEYWORD = 0x05, - MVPD_FIND_RECORD_OFFSET = 0x06, - MVPD_RETRIEVE_KEYWORD = 0x07, - MVPD_FETCH_DATA = 0x08, - MVPD_CHECK_BUFFER_SIZE = 0x09, -}; - -/** - * @enum mvpdReasonCode - * - * @brief Reasoncodes used to describe what errors are being indicated. - * - */ -enum mvpdReasonCode -{ - MVPD_INVALID_REASONCODE = MVPD_COMP_ID | 0x00, // Invalid Reasoncode - MVPD_INSUFFICIENT_FILE_SIZE = MVPD_COMP_ID | 0x01, - MVPD_OPERATION_NOT_SUPPORTED = MVPD_COMP_ID | 0x02, - MVPD_RECORD_NOT_FOUND = MVPD_COMP_ID | 0x03, - MVPD_KEYWORD_NOT_FOUND = MVPD_COMP_ID | 0x04, - MVPD_RECORD_MISMATCH = MVPD_COMP_ID | 0x05, - MVPD_INSUFFICIENT_BUFFER_SIZE = MVPD_COMP_ID | 0x06, -}; - -}; // end MVPD - -#endif diff --git a/src/include/usr/spd/spdenums.H b/src/include/usr/spd/spdenums.H deleted file mode 100644 index 09178c96f..000000000 --- a/src/include/usr/spd/spdenums.H +++ /dev/null @@ -1,304 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/usr/spd/spdenums.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 - */ -/** - * @file spdenums.H - * - * @brief Enums for the SPD fields to be requested. - * - */ -#ifndef __SPDENUMS_H -#define __SPDENUMS_H - -#include - -namespace SPD -{ - -/** -* @brief Enumerations for the start of each of the different sections of -* keywords available to read. -*/ -enum -{ - SPD_FIRST_NORM_KEYWORD = 0x0, - SPD_FIRST_MOD_SPEC = 0x8000, -}; - -/** -* @brief Enumerations for fields that can be accessed in the SPD -*/ -enum -{ - // ============================================================== - // Normal SPD Kewords - CRC_EXCLUDE = SPD_FIRST_NORM_KEYWORD | 0x00, - SPD_BYTES_TOTAL = SPD_FIRST_NORM_KEYWORD | 0x01, - SPD_BYTES_USED = SPD_FIRST_NORM_KEYWORD | 0x02, - SPD_MAJOR_REVISION = SPD_FIRST_NORM_KEYWORD | 0x03, - SPD_MINOR_REVISION = SPD_FIRST_NORM_KEYWORD | 0x04, - BASIC_MEMORY_TYPE = SPD_FIRST_NORM_KEYWORD | 0x05, - MODULE_TYPE = SPD_FIRST_NORM_KEYWORD | 0x06, - BANK_ADDRESS_BITS = SPD_FIRST_NORM_KEYWORD | 0x07, - DENSITY = SPD_FIRST_NORM_KEYWORD | 0x08, - ROW_ADDRESS = SPD_FIRST_NORM_KEYWORD | 0x09, - COL_ADDRESS = SPD_FIRST_NORM_KEYWORD | 0x0a, - MODULE_NOMINAL_VOLTAGE = SPD_FIRST_NORM_KEYWORD | 0x0b, - MODULE_RANKS = SPD_FIRST_NORM_KEYWORD | 0x0c, - MODULE_DRAM_WIDTH = SPD_FIRST_NORM_KEYWORD | 0x0d, - ECC_BITS = SPD_FIRST_NORM_KEYWORD | 0x0e, - MODULE_MEMORY_BUS_WIDTH = SPD_FIRST_NORM_KEYWORD | 0x0f, - FTB_DIVIDEND = SPD_FIRST_NORM_KEYWORD | 0x10, - FTB_DIVISOR = SPD_FIRST_NORM_KEYWORD | 0x11, - MTB_DIVIDEND = SPD_FIRST_NORM_KEYWORD | 0x12, - MTB_DIVISOR = SPD_FIRST_NORM_KEYWORD | 0x13, - TCK_MIN = SPD_FIRST_NORM_KEYWORD | 0x14, - CAS_LATENCIES_SUPPORTED = SPD_FIRST_NORM_KEYWORD | 0x15, - MIN_CAS_LATENCY = SPD_FIRST_NORM_KEYWORD | 0x16, - TWR_MIN = SPD_FIRST_NORM_KEYWORD | 0x17, - TRCD_MIN = SPD_FIRST_NORM_KEYWORD | 0x18, - TRRD_MIN = SPD_FIRST_NORM_KEYWORD | 0x19, - TRP_MIN = SPD_FIRST_NORM_KEYWORD | 0x1a, - TRC_MIN = SPD_FIRST_NORM_KEYWORD | 0x1b, - TRAS_MIN = SPD_FIRST_NORM_KEYWORD | 0x1c, - TRFC_MIN = SPD_FIRST_NORM_KEYWORD | 0x1d, - TWTR_MIN = SPD_FIRST_NORM_KEYWORD | 0x1e, - TRTP_MIN = SPD_FIRST_NORM_KEYWORD | 0x1f, - TFAW_MIN = SPD_FIRST_NORM_KEYWORD | 0x20, - DLL_OFF = SPD_FIRST_NORM_KEYWORD | 0x21, - RZQ_7 = SPD_FIRST_NORM_KEYWORD | 0x22, - RZQ_6 = SPD_FIRST_NORM_KEYWORD | 0x23, - PASR = SPD_FIRST_NORM_KEYWORD | 0x24, - ODTS = SPD_FIRST_NORM_KEYWORD | 0x25, - ASR = SPD_FIRST_NORM_KEYWORD | 0x26, - ETR_1X = SPD_FIRST_NORM_KEYWORD | 0x27, - ETR = SPD_FIRST_NORM_KEYWORD | 0x28, - THERMAL_SENSOR_PRESENT = SPD_FIRST_NORM_KEYWORD | 0x29, - THERMAL_SENSOR_ACCURACY = SPD_FIRST_NORM_KEYWORD | 0x2a, - SDRAM_DEVICE_TYPE_NONSTD = SPD_FIRST_NORM_KEYWORD | 0x2b, - SDRAM_DEVICE_TYPE = SPD_FIRST_NORM_KEYWORD | 0x2c, - MODULE_TYPE_SPECIFIC_SECTION = SPD_FIRST_NORM_KEYWORD | 0x2d, - MODULE_MANUFACTURER_ID = SPD_FIRST_NORM_KEYWORD | 0x2e, - MODULE_MANUFACTURING_LOCATION = SPD_FIRST_NORM_KEYWORD | 0x2f, - MODULE_MANUFACTURING_DATE = SPD_FIRST_NORM_KEYWORD | 0x30, - MODULE_SERIAL_NUMBER = SPD_FIRST_NORM_KEYWORD | 0x31, - MODULE_CRC = SPD_FIRST_NORM_KEYWORD | 0x32, - MODULE_PART_NUMBER = SPD_FIRST_NORM_KEYWORD | 0x33, - MODULE_REVISION_CODE = SPD_FIRST_NORM_KEYWORD | 0x34, - DRAM_MANUFACTURER_ID = SPD_FIRST_NORM_KEYWORD | 0x35, - MANUFACTURER_SPECIFIC_DATA = SPD_FIRST_NORM_KEYWORD | 0x36, - TCKMIN_FINE_OFFSET = SPD_FIRST_NORM_KEYWORD | 0x37, - TAAMIN_FINE_OFFSET = SPD_FIRST_NORM_KEYWORD | 0x38, - TRCDMIN_FINE_OFFSET = SPD_FIRST_NORM_KEYWORD | 0x39, - TRPMIN_FINE_OFFSET = SPD_FIRST_NORM_KEYWORD | 0x3a, - TRCMIN_FINE_OFFSET = SPD_FIRST_NORM_KEYWORD | 0x3b, - MODULE_THERMAL_SENSOR = SPD_FIRST_NORM_KEYWORD | 0x3c, - SDRAM_OPTIONAL_FEATURES = SPD_FIRST_NORM_KEYWORD | 0x3d, - SDRAM_THERMAL_REFRESH_OPTIONS = SPD_FIRST_NORM_KEYWORD | 0x3e, - DIMM_BAD_DQ_DATA = SPD_FIRST_NORM_KEYWORD | 0x3f, - SDRAM_DIE_COUNT = SPD_FIRST_NORM_KEYWORD | 0x40, - SDRAM_DEVICE_TYPE_SIGNAL_LOADING = SPD_FIRST_NORM_KEYWORD | 0x41, - SPD_LAST_NORM_KEYWORD, - - // ============================================================== - // Module Specific Keywords - MODSPEC_COM_NOM_HEIGHT_MAX = SPD_FIRST_MOD_SPEC | 0x00, - MODSPEC_COM_MAX_THICK_BACK = SPD_FIRST_MOD_SPEC | 0x01, - MODSPEC_COM_MAX_THICK_FRONT = SPD_FIRST_MOD_SPEC | 0x02, - MODSPEC_COM_RAW_CARD_EXT = SPD_FIRST_MOD_SPEC | 0x03, - MODSPEC_COM_RAW_CARD_REV = SPD_FIRST_MOD_SPEC | 0x04, - MODSPEC_COM_RAW_CARD = SPD_FIRST_MOD_SPEC | 0x05, - MODSPEC_COM_ADDR_MAPPING = SPD_FIRST_MOD_SPEC | 0x06, - RMM_ROWS_RDIMM = SPD_FIRST_MOD_SPEC | 0x07, - RMM_REGS_RDIMM = SPD_FIRST_MOD_SPEC | 0x08, - RMM_HEAT_SP = SPD_FIRST_MOD_SPEC | 0x09, - RMM_HEAT_SP_CHARS = SPD_FIRST_MOD_SPEC | 0x0a, - RMM_MFR_ID_CODE = SPD_FIRST_MOD_SPEC | 0x0b, - RMM_REG_REV_NUM = SPD_FIRST_MOD_SPEC | 0x0c, - RMM_REG_TYPE = SPD_FIRST_MOD_SPEC | 0x0d, - RMM_RC1 = SPD_FIRST_MOD_SPEC | 0x0e, - RMM_RC0 = SPD_FIRST_MOD_SPEC | 0x0f, - RMM_RC3 = SPD_FIRST_MOD_SPEC | 0x10, - RMM_RC2 = SPD_FIRST_MOD_SPEC | 0x11, - RMM_RC5 = SPD_FIRST_MOD_SPEC | 0x12, - RMM_RC4 = SPD_FIRST_MOD_SPEC | 0x13, - RMM_RC7 = SPD_FIRST_MOD_SPEC | 0x14, - RMM_RC6 = SPD_FIRST_MOD_SPEC | 0x15, - RMM_RC9 = SPD_FIRST_MOD_SPEC | 0x16, - RMM_RC8 = SPD_FIRST_MOD_SPEC | 0x17, - RMM_RC11 = SPD_FIRST_MOD_SPEC | 0x18, - RMM_RC10 = SPD_FIRST_MOD_SPEC | 0x19, - RMM_RC13 = SPD_FIRST_MOD_SPEC | 0x1a, - RMM_RC12 = SPD_FIRST_MOD_SPEC | 0x1b, - RMM_RC15 = SPD_FIRST_MOD_SPEC | 0x1c, - RMM_RC14 = SPD_FIRST_MOD_SPEC | 0x1d, - LRMM_HEAT_SP = SPD_FIRST_MOD_SPEC | 0x1e, - LRMM_RANK_NUMBERING = SPD_FIRST_MOD_SPEC | 0x1f, - LRMM_MEMBUF_ORIEN = SPD_FIRST_MOD_SPEC | 0x20, - LRMM_NUM_ROWS = SPD_FIRST_MOD_SPEC | 0x21, - LRMM_MIRRORING = SPD_FIRST_MOD_SPEC | 0x22, - LRMM_REVISION_NUM = SPD_FIRST_MOD_SPEC | 0x23, - LRMM_MFR_ID_CODE = SPD_FIRST_MOD_SPEC | 0x24, - LRMM_F0RC3 = SPD_FIRST_MOD_SPEC | 0x25, - LRMM_F0RC2 = SPD_FIRST_MOD_SPEC | 0x26, - LRMM_F0RC5 = SPD_FIRST_MOD_SPEC | 0x27, - LRMM_F0RC4 = SPD_FIRST_MOD_SPEC | 0x28, - LRMM_F1RC11 = SPD_FIRST_MOD_SPEC | 0x29, - LRMM_F1RC8 = SPD_FIRST_MOD_SPEC | 0x2a, - LRMM_F1RC13 = SPD_FIRST_MOD_SPEC | 0x2b, - LRMM_F1RC12 = SPD_FIRST_MOD_SPEC | 0x2c, - LRMM_F1RC15 = SPD_FIRST_MOD_SPEC | 0x2d, - LRMM_F1RC14 = SPD_FIRST_MOD_SPEC | 0x2e, - LRMM_F3RC9_800_1600 = SPD_FIRST_MOD_SPEC | 0x2f, - LRMM_F3RC8_800_1600 = SPD_FIRST_MOD_SPEC | 0x30, - LRMM_F4RC11_800_1600 = SPD_FIRST_MOD_SPEC | 0x31, - LRMM_F3RC11_800_1600 = SPD_FIRST_MOD_SPEC | 0x32, - LRMM_F4RC10_800_1600 = SPD_FIRST_MOD_SPEC | 0x33, - LRMM_F3RC10_800_1600 = SPD_FIRST_MOD_SPEC | 0x34, - LRMM_F6RC11_800_1600 = SPD_FIRST_MOD_SPEC | 0x35, - LRMM_F5RC11_800_1600 = SPD_FIRST_MOD_SPEC | 0x36, - LRMM_F6RC10_800_1600 = SPD_FIRST_MOD_SPEC | 0x37, - LRMM_F5RC10_800_1600 = SPD_FIRST_MOD_SPEC | 0x38, - LRMM_F8RC11_800_1600 = SPD_FIRST_MOD_SPEC | 0x39, - LRMM_F7RC11_800_1600 = SPD_FIRST_MOD_SPEC | 0x3a, - LRMM_F8RC10_800_1600 = SPD_FIRST_MOD_SPEC | 0x3b, - LRMM_F7RC10_800_1600 = SPD_FIRST_MOD_SPEC | 0x3c, - LRMM_F10RC11_800_1600 = SPD_FIRST_MOD_SPEC | 0x3d, - LRMM_F9RC11_800_1600 = SPD_FIRST_MOD_SPEC | 0x3e, - LRMM_F10RC10_800_1600 = SPD_FIRST_MOD_SPEC | 0x3f, - LRMM_F9RC10_800_1600 = SPD_FIRST_MOD_SPEC | 0x40, - LRMM_RTT_WR_800_1600 = SPD_FIRST_MOD_SPEC | 0x41, - LRMM_RTT_NOM_800_1600 = SPD_FIRST_MOD_SPEC | 0x42, - LRMM_IMPEDANCE_800_1600 = SPD_FIRST_MOD_SPEC | 0x43, - LRMM_F3RC9_1333_1600 = SPD_FIRST_MOD_SPEC | 0x44, - LRMM_F3RC8_1333_1600 = SPD_FIRST_MOD_SPEC | 0x45, - LRMM_F4RC11_1333_1600 = SPD_FIRST_MOD_SPEC | 0x46, - LRMM_F3RC11_1333_1600 = SPD_FIRST_MOD_SPEC | 0x47, - LRMM_F4RC10_1333_1600 = SPD_FIRST_MOD_SPEC | 0x48, - LRMM_F3RC10_1333_1600 = SPD_FIRST_MOD_SPEC | 0x49, - LRMM_F6RC11_1333_1600 = SPD_FIRST_MOD_SPEC | 0x4a, - LRMM_F5RC11_1333_1600 = SPD_FIRST_MOD_SPEC | 0x4b, - LRMM_F6RC10_1333_1600 = SPD_FIRST_MOD_SPEC | 0x4c, - LRMM_F5RC10_1333_1600 = SPD_FIRST_MOD_SPEC | 0x4d, - LRMM_F8RC11_1333_1600 = SPD_FIRST_MOD_SPEC | 0x4e, - LRMM_F7RC11_1333_1600 = SPD_FIRST_MOD_SPEC | 0x4f, - LRMM_F8RC10_1333_1600 = SPD_FIRST_MOD_SPEC | 0x50, - LRMM_F7RC10_1333_1600 = SPD_FIRST_MOD_SPEC | 0x51, - LRMM_F10RC11_1333_1600 = SPD_FIRST_MOD_SPEC | 0x52, - LRMM_F9RC11_1333_1600 = SPD_FIRST_MOD_SPEC | 0x53, - LRMM_F10RC10_1333_1600 = SPD_FIRST_MOD_SPEC | 0x54, - LRMM_F9RC10_1333_1600 = SPD_FIRST_MOD_SPEC | 0x55, - LRMM_RTT_WR_1333_1600 = SPD_FIRST_MOD_SPEC | 0x56, - LRMM_RTT_NOM_1333_1600 = SPD_FIRST_MOD_SPEC | 0x57, - LRMM_IMPEDANCE_1333_1600 = SPD_FIRST_MOD_SPEC | 0x58, - LRMM_F3RC9_1866_2133 = SPD_FIRST_MOD_SPEC | 0x59, - LRMM_F3RC8_1866_2133 = SPD_FIRST_MOD_SPEC | 0x5a, - LRMM_F4RC11_1866_2133 = SPD_FIRST_MOD_SPEC | 0x5b, - LRMM_F3RC11_1866_2133 = SPD_FIRST_MOD_SPEC | 0x5c, - LRMM_F4RC10_1866_2133 = SPD_FIRST_MOD_SPEC | 0x5d, - LRMM_F3RC10_1866_2133 = SPD_FIRST_MOD_SPEC | 0x5e, - LRMM_F6RC11_1866_2133 = SPD_FIRST_MOD_SPEC | 0x5f, - LRMM_F5RC11_1866_2133 = SPD_FIRST_MOD_SPEC | 0x60, - LRMM_F6RC10_1866_2133 = SPD_FIRST_MOD_SPEC | 0x61, - LRMM_F5RC10_1866_2133 = SPD_FIRST_MOD_SPEC | 0x62, - LRMM_F8RC11_1866_2133 = SPD_FIRST_MOD_SPEC | 0x63, - LRMM_F7RC11_1866_2133 = SPD_FIRST_MOD_SPEC | 0x64, - LRMM_F8RC10_1866_2133 = SPD_FIRST_MOD_SPEC | 0x65, - LRMM_F7RC10_1866_2133 = SPD_FIRST_MOD_SPEC | 0x66, - LRMM_F10RC11_1866_2133 = SPD_FIRST_MOD_SPEC | 0x67, - LRMM_F9RC11_1866_2133 = SPD_FIRST_MOD_SPEC | 0x68, - LRMM_F10RC10_1866_2133 = SPD_FIRST_MOD_SPEC | 0x69, - LRMM_F9RC10_1866_2133 = SPD_FIRST_MOD_SPEC | 0x6a, - LRMM_RTT_WR_1866_2133 = SPD_FIRST_MOD_SPEC | 0x6b, - LRMM_RTT_NOM_1866_2133 = SPD_FIRST_MOD_SPEC | 0x6c, - LRMM_IMPEDANCE_1866_2133 = SPD_FIRST_MOD_SPEC | 0x6d, - LRMM_MIN_DELAY_150V = SPD_FIRST_MOD_SPEC | 0x6e, - LRMM_MAX_DELAY_150V = SPD_FIRST_MOD_SPEC | 0x6f, - LRMM_MIN_DELAY_135V = SPD_FIRST_MOD_SPEC | 0x70, - LRMM_MAX_DELAY_135V = SPD_FIRST_MOD_SPEC | 0x71, - LRMM_MIN_DELAY_125V = SPD_FIRST_MOD_SPEC | 0x72, - LRMM_MAX_DELAY_125V = SPD_FIRST_MOD_SPEC | 0x73, - LRMM_PERSONALITY_BYTE0 = SPD_FIRST_MOD_SPEC | 0x74, - LRMM_PERSONALITY_BYTE1 = SPD_FIRST_MOD_SPEC | 0x75, - LRMM_PERSONALITY_BYTE2 = SPD_FIRST_MOD_SPEC | 0x76, - LRMM_PERSONALITY_BYTE3 = SPD_FIRST_MOD_SPEC | 0x77, - LRMM_PERSONALITY_BYTE4 = SPD_FIRST_MOD_SPEC | 0x78, - LRMM_PERSONALITY_BYTE5 = SPD_FIRST_MOD_SPEC | 0x79, - LRMM_PERSONALITY_BYTE6 = SPD_FIRST_MOD_SPEC | 0x7a, - LRMM_PERSONALITY_BYTE7 = SPD_FIRST_MOD_SPEC | 0x7b, - LRMM_PERSONALITY_BYTE8 = SPD_FIRST_MOD_SPEC | 0x7c, - LRMM_PERSONALITY_BYTE9 = SPD_FIRST_MOD_SPEC | 0x7d, - LRMM_PERSONALITY_BYTE10 = SPD_FIRST_MOD_SPEC | 0x7e, - LRMM_PERSONALITY_BYTE11 = SPD_FIRST_MOD_SPEC | 0x7f, - LRMM_PERSONALITY_BYTE12 = SPD_FIRST_MOD_SPEC | 0x80, - LRMM_PERSONALITY_BYTE13 = SPD_FIRST_MOD_SPEC | 0x81, - LRMM_PERSONALITY_BYTE14 = SPD_FIRST_MOD_SPEC | 0x82, - SPD_LAST_MOD_SPEC, - - // This keyword should be last in the list - // Invalid Keyword - INVALID_SPD_KEYWORD = 0xFFFF, -}; - -/** - * @brief VPD Message Types - */ -enum VPD_MSG_TYPE -{ - VPD_WRITE_DIMM = 0x00C1, //< DIMM SPD - VPD_WRITE_PROC = 0x00C2, //< Processor MVPD - VPD_WRITE_MEMBUF = 0x00C3, //< Centaur FRU VPD -}; - -/** - * @brief Message definition for VPD Write Request - * - * - data0 : - * - [16] VPD Record Number - * - [32] 4-byte ASCII String for record name - * 'XXXX'=Entire VPD section from PNOR - * - [16] 2-byte ASCII String for keyword or offset into SPD - * 'XX'=Entire VPD record - * - data1 : - * - [64] Size of binary data in bytes - * - extra data : Binary VPD Data - */ -union VpdWriteMsg_t -{ - uint64_t data0; - struct - { - uint16_t rec_num; //< VPD_REC_NUM - char record[4]; //< ASCII Record Name - union - { - char keyword[2]; //< ASCII Keyword (for IBM VPD) - uint16_t offset; //< Offset into record in bytes (for DIMM SPD) - }; - } PACKED; -}; - - -}; // end SPD - -#endif diff --git a/src/include/usr/spd/spdif.H b/src/include/usr/spd/spdif.H deleted file mode 100644 index 41bd94ffc..000000000 --- a/src/include/usr/spd/spdif.H +++ /dev/null @@ -1,122 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/usr/spd/spdif.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 - */ -/** - * @file spdif.H - * - * @brief External SPD interfaces - * - */ -#ifndef __SPDIF_H -#define __SPDIF_H -// ----------------------------------------------- -// Includes -// ----------------------------------------------- -#include - -namespace SPD -{ - -/** - * @brief This structure is used to transfer common information needed - * for reading the address from the PNOR RP. - */ -struct pnorInformation -{ - uint64_t segmentSize; - uint64_t maxSegments; - PNOR::SectionId pnorSection; - PNOR::SideSelect pnorSide; -}; - -/** - * @brief This Function is used to query the PNOR RP and get the address of - * the data section. It is also used to then read from that address the - * number of bytes requested. - * NOTE: This function is defined here because it is used by both the SPD - * and MVPD code. - * - * @param[in] i_byteAddr - The offset into the section of the data to be read. - * - * @param[in] i_numBytes - The number of bytes to read. - * - * @param[out] o_data - The data buffer. - * - * @param[in] i_target - The target to read the data for. - * - * @param[in] i_pnorInfo - Data required to query for the PNOR data address. - * - * @param[in/out] io_cachedAddr - This is the address that is, or will be read - * from the PNOR RP and saved for future use. - * - * @param[in] i_mutex - Mutex from calling code to be used for setting - * io_isAddrCached and io_cachedAddr. - * - * @return errHndl_t - NULL if successful, otherwise a pointer to the error - * log. -*/ -errlHndl_t readPNOR ( uint64_t i_byteAddr, - size_t i_numBytes, - void * o_data, - TARGETING::Target * i_target, - pnorInformation & i_pnorInfo, - uint64_t &io_cachedAddr, - mutex_t * i_mutex ); - -/** - * @brief This function will write the PNOR at the correct offset and number - * of bytes for the keyword requested. - * - * @param[in] i_byteAddr - The offset to access in the PNOR. - * - * @param[in] i_numBytes - The number of bytes to write. - * - * @param[in] i_data - The data buffer of the data to be written. - * - * @param[in] i_target - The chip target to access the data for. - * - * @param[in] i_pnorInfo - Information about the PNOR section and side that we - * need to know to make the request. - * - * @param[in/out] io_cachedAddr - The address offset to the data chunk in - * PNOR. - * - * @param[in] i_mutex - The mutex to lock/unlock while setting io_isAddrCached - * and io_cachedAddr. It is assumed that those parameters are global - * variables in the code where they reside. - * - * @return errlHndl_t - NULL if successful, otherwise a pointer to the error - * log. - */ -errlHndl_t writePNOR ( uint64_t i_byteAddr, - size_t i_numBytes, - void * i_data, - TARGETING::Target * i_target, - pnorInformation & i_pnorInfo, - uint64_t &io_cachedAddr, - mutex_t * i_mutex ); - - -}; // end SPD - -#endif diff --git a/src/include/usr/spd/spdreasoncodes.H b/src/include/usr/spd/spdreasoncodes.H deleted file mode 100644 index 96b207494..000000000 --- a/src/include/usr/spd/spdreasoncodes.H +++ /dev/null @@ -1,94 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/usr/spd/spdreasoncodes.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 - */ -/** - * @file spdreasoncodes.H - * - * @brief Reason codes and module ids for the SPD device driver - * - */ -#ifndef __SPDREASONCODES_H -#define __SPDREASONCODES_H -// ----------------------------------------------- -// Includes -// ----------------------------------------------- -#include - -namespace SPD -{ - -/** -* @enum spdModuleid -* -* @brief Module Ids used in created errorlogs. Indicates which -* functions an error log was created in. -* -*/ -enum spdModuleId -{ - SPD_INVALID_MODULE = 0x00, - SPD_GET_KEYWORD_VALUE = 0x01, - SPD_GET_VALUE = 0x02, - SPD_CHECK_SIZE = 0x03, - SPD_READ_BINARY_FILE = 0x04, - SPD_WRITE_KEYWORD_VALUE = 0x05, - SPD_SPECIAL_CASES = 0x06, - SPD_PRESENCE_DETECT = 0x07, - SPD_CHECK_MODULE_SPECIFIC_KEYWORD = 0x08, - SPD_GET_PNOR_ADDR = 0x09, - SPD_WRITE_VALUE = 0x0a, - SPD_GET_KEYWORD_ENTRY = 0x0b, - SPD_WRITE_DATA = 0x0c, -}; - -/** - * @enum spdReasonCode - * - * @brief Reasoncodes used to describe what errors are being indicated. - * - */ -enum spdReasonCode -{ - SPD_INVALID_REASONCODE = SPD_COMP_ID | 0x00, // Invalid Reasoncode - SPD_INVALID_BASIC_MEMORY_TYPE = SPD_COMP_ID | 0x01, - SPD_BASIC_MEMORY_TYPE = SPD_COMP_ID | 0x02, - SPD_INVALID_SPD_KEYWORD = SPD_COMP_ID | 0x03, - SPD_MEMTYPE_NOT_SUPPORTED = SPD_COMP_ID | 0x04, - SPD_INSUFFICIENT_BUFFER_SIZE = SPD_COMP_ID | 0x05, - SPD_INSUFFICIENT_FILE_SIZE = SPD_COMP_ID | 0x06, - SPD_NOT_SUPPORTED = SPD_COMP_ID | 0x07, - SPD_KEYWORD_NOT_FOUND = SPD_COMP_ID | 0x08, - SPD_MOD_SPECIFIC_MISMATCH_UMM = SPD_COMP_ID | 0x09, - SPD_MOD_SPECIFIC_MISMATCH_RMM = SPD_COMP_ID | 0x0a, - SPD_MOD_SPECIFIC_MISMATCH_CMM = SPD_COMP_ID | 0x0b, - SPD_MOD_SPECIFIC_MISMATCH_LRMM = SPD_COMP_ID | 0x0c, - SPD_MOD_SPECIFIC_UNSUPPORTED = SPD_COMP_ID | 0x0d, - SPD_SIZE_MISMATCH = SPD_COMP_ID | 0x0e, - SPD_INVALID_WRITE_METHOD = SPD_COMP_ID | 0x0f, - SPD_NULL_ENTRY = SPD_COMP_ID | 0x10, - SPD_KEYWORD_NOT_WRITABLE = SPD_COMP_ID | 0x11, -}; - -}; // end SPD - -#endif diff --git a/src/include/usr/vpd/mvpdenums.H b/src/include/usr/vpd/mvpdenums.H new file mode 100644 index 000000000..ec512694f --- /dev/null +++ b/src/include/usr/vpd/mvpdenums.H @@ -0,0 +1,134 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/vpd/mvpdenums.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 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 */ +/** + * @file mvpdenums.H + * + * @brief Enums for the MVPD fields to be requested. + * + */ +#ifndef __MVPDENUMS_H +#define __MVPDENUMS_H + +namespace MVPD +{ + +/** +* @brief Enumeration for the MVPD Records that contain +* the keyword enumerations below. +*/ +enum mvpdRecord +{ + MVPD_FIRST_RECORD = 0x00, + CRP0 = MVPD_FIRST_RECORD, + CP00 = 0x01, + VINI = 0x02, + LRP0 = 0x03, + LRP1 = 0x04, + LRP2 = 0x05, + LRP3 = 0x06, + LRP4 = 0x07, + LRP5 = 0x08, + LRP6 = 0x09, + LRP7 = 0x0a, + LRP8 = 0x0b, + LRP9 = 0x0c, + LRPA = 0x0d, + LRPB = 0x0e, + LRPC = 0x0f, + LRPD = 0x10, + LRPE = 0x11, + LWP0 = 0x12, + LWP1 = 0x13, + LWP2 = 0x14, + LWP3 = 0x15, + LWP4 = 0x16, + LWP5 = 0x17, + LWP6 = 0x18, + LWP7 = 0x19, + LWP8 = 0x1a, + LWP9 = 0x1b, + LWPA = 0x1c, + LWPB = 0x1d, + LWPC = 0x1e, + LWPD = 0x1f, + LWPE = 0x20, + VWML = 0x21, + + // Last Record + MVPD_LAST_RECORD, + MVPD_TEST_RECORD, // Test purposes ONLY! + MVPD_INVALID_RECORD = 0xFFFF, +}; + +/** +* @brief Enumerations for MVPD keywords that can be +* accessed in the MVPD. +*/ +enum mvpdKeyword +{ + MVPD_FIRST_KEYWORD = 0x00, + VD = MVPD_FIRST_KEYWORD, + ED = 0x01, + TE = 0x02, + DD = 0x03, + pdP = 0x04, + ST = 0x05, + DN = 0x06, + PG = 0x07, + PK = 0x08, + pdR = 0x09, + pdV = 0x0a, + pdH = 0x0b, + SB = 0x0c, + DR = 0x0d, + VZ = 0x0e, + CC = 0x0f, + CE = 0x10, + FN = 0x11, + PN = 0x12, + SN = 0x13, + PR = 0x14, + HE = 0x15, + CT = 0x16, + HW = 0x17, + pdM = 0x18, + IN = 0x19, + pd2 = 0x1a, + pd3 = 0x1b, + OC = 0x1c, + FO = 0x1d, + pdI = 0x1e, + pdG = 0x1f, + MK = 0x20, + PB = 0x21, + CH = 0x22, + + // Last Keyword + MVPD_LAST_KEYWORD, + MVPD_TEST_KEYWORD, // Test purposes ONLY! + INVALID_MVPD_KEYWORD = 0xFFFF, +}; + +}; // end MVPD + +#endif diff --git a/src/include/usr/vpd/spdenums.H b/src/include/usr/vpd/spdenums.H new file mode 100644 index 000000000..98a428606 --- /dev/null +++ b/src/include/usr/vpd/spdenums.H @@ -0,0 +1,258 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/vpd/spdenums.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 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 __SPDENUMS_H +#define __SPDENUMS_H + +#include + +namespace SPD +{ + +/** +* @brief Enumerations for the start of each of the different sections of +* keywords available to read. +*/ +enum +{ + SPD_FIRST_NORM_KEYWORD = 0x0, + SPD_FIRST_MOD_SPEC = 0x8000, +}; + +/** +* @brief Enumerations for fields that can be accessed in the SPD +*/ +enum +{ + // ============================================================== + // Normal SPD Kewords + CRC_EXCLUDE = SPD_FIRST_NORM_KEYWORD | 0x00, + SPD_BYTES_TOTAL = SPD_FIRST_NORM_KEYWORD | 0x01, + SPD_BYTES_USED = SPD_FIRST_NORM_KEYWORD | 0x02, + SPD_MAJOR_REVISION = SPD_FIRST_NORM_KEYWORD | 0x03, + SPD_MINOR_REVISION = SPD_FIRST_NORM_KEYWORD | 0x04, + BASIC_MEMORY_TYPE = SPD_FIRST_NORM_KEYWORD | 0x05, + MODULE_TYPE = SPD_FIRST_NORM_KEYWORD | 0x06, + BANK_ADDRESS_BITS = SPD_FIRST_NORM_KEYWORD | 0x07, + DENSITY = SPD_FIRST_NORM_KEYWORD | 0x08, + ROW_ADDRESS = SPD_FIRST_NORM_KEYWORD | 0x09, + COL_ADDRESS = SPD_FIRST_NORM_KEYWORD | 0x0a, + MODULE_NOMINAL_VOLTAGE = SPD_FIRST_NORM_KEYWORD | 0x0b, + MODULE_RANKS = SPD_FIRST_NORM_KEYWORD | 0x0c, + MODULE_DRAM_WIDTH = SPD_FIRST_NORM_KEYWORD | 0x0d, + ECC_BITS = SPD_FIRST_NORM_KEYWORD | 0x0e, + MODULE_MEMORY_BUS_WIDTH = SPD_FIRST_NORM_KEYWORD | 0x0f, + FTB_DIVIDEND = SPD_FIRST_NORM_KEYWORD | 0x10, + FTB_DIVISOR = SPD_FIRST_NORM_KEYWORD | 0x11, + MTB_DIVIDEND = SPD_FIRST_NORM_KEYWORD | 0x12, + MTB_DIVISOR = SPD_FIRST_NORM_KEYWORD | 0x13, + TCK_MIN = SPD_FIRST_NORM_KEYWORD | 0x14, + CAS_LATENCIES_SUPPORTED = SPD_FIRST_NORM_KEYWORD | 0x15, + MIN_CAS_LATENCY = SPD_FIRST_NORM_KEYWORD | 0x16, + TWR_MIN = SPD_FIRST_NORM_KEYWORD | 0x17, + TRCD_MIN = SPD_FIRST_NORM_KEYWORD | 0x18, + TRRD_MIN = SPD_FIRST_NORM_KEYWORD | 0x19, + TRP_MIN = SPD_FIRST_NORM_KEYWORD | 0x1a, + TRC_MIN = SPD_FIRST_NORM_KEYWORD | 0x1b, + TRAS_MIN = SPD_FIRST_NORM_KEYWORD | 0x1c, + TRFC_MIN = SPD_FIRST_NORM_KEYWORD | 0x1d, + TWTR_MIN = SPD_FIRST_NORM_KEYWORD | 0x1e, + TRTP_MIN = SPD_FIRST_NORM_KEYWORD | 0x1f, + TFAW_MIN = SPD_FIRST_NORM_KEYWORD | 0x20, + DLL_OFF = SPD_FIRST_NORM_KEYWORD | 0x21, + RZQ_7 = SPD_FIRST_NORM_KEYWORD | 0x22, + RZQ_6 = SPD_FIRST_NORM_KEYWORD | 0x23, + PASR = SPD_FIRST_NORM_KEYWORD | 0x24, + ODTS = SPD_FIRST_NORM_KEYWORD | 0x25, + ASR = SPD_FIRST_NORM_KEYWORD | 0x26, + ETR_1X = SPD_FIRST_NORM_KEYWORD | 0x27, + ETR = SPD_FIRST_NORM_KEYWORD | 0x28, + THERMAL_SENSOR_PRESENT = SPD_FIRST_NORM_KEYWORD | 0x29, + THERMAL_SENSOR_ACCURACY = SPD_FIRST_NORM_KEYWORD | 0x2a, + SDRAM_DEVICE_TYPE_NONSTD = SPD_FIRST_NORM_KEYWORD | 0x2b, + SDRAM_DEVICE_TYPE = SPD_FIRST_NORM_KEYWORD | 0x2c, + MODULE_TYPE_SPECIFIC_SECTION = SPD_FIRST_NORM_KEYWORD | 0x2d, + MODULE_MANUFACTURER_ID = SPD_FIRST_NORM_KEYWORD | 0x2e, + MODULE_MANUFACTURING_LOCATION = SPD_FIRST_NORM_KEYWORD | 0x2f, + MODULE_MANUFACTURING_DATE = SPD_FIRST_NORM_KEYWORD | 0x30, + MODULE_SERIAL_NUMBER = SPD_FIRST_NORM_KEYWORD | 0x31, + MODULE_CRC = SPD_FIRST_NORM_KEYWORD | 0x32, + MODULE_PART_NUMBER = SPD_FIRST_NORM_KEYWORD | 0x33, + MODULE_REVISION_CODE = SPD_FIRST_NORM_KEYWORD | 0x34, + DRAM_MANUFACTURER_ID = SPD_FIRST_NORM_KEYWORD | 0x35, + MANUFACTURER_SPECIFIC_DATA = SPD_FIRST_NORM_KEYWORD | 0x36, + TCKMIN_FINE_OFFSET = SPD_FIRST_NORM_KEYWORD | 0x37, + TAAMIN_FINE_OFFSET = SPD_FIRST_NORM_KEYWORD | 0x38, + TRCDMIN_FINE_OFFSET = SPD_FIRST_NORM_KEYWORD | 0x39, + TRPMIN_FINE_OFFSET = SPD_FIRST_NORM_KEYWORD | 0x3a, + TRCMIN_FINE_OFFSET = SPD_FIRST_NORM_KEYWORD | 0x3b, + MODULE_THERMAL_SENSOR = SPD_FIRST_NORM_KEYWORD | 0x3c, + SDRAM_OPTIONAL_FEATURES = SPD_FIRST_NORM_KEYWORD | 0x3d, + SDRAM_THERMAL_REFRESH_OPTIONS = SPD_FIRST_NORM_KEYWORD | 0x3e, + DIMM_BAD_DQ_DATA = SPD_FIRST_NORM_KEYWORD | 0x3f, + SDRAM_DIE_COUNT = SPD_FIRST_NORM_KEYWORD | 0x40, + SDRAM_DEVICE_TYPE_SIGNAL_LOADING = SPD_FIRST_NORM_KEYWORD | 0x41, + SPD_LAST_NORM_KEYWORD, + + // ============================================================== + // Module Specific Keywords + MODSPEC_COM_NOM_HEIGHT_MAX = SPD_FIRST_MOD_SPEC | 0x00, + MODSPEC_COM_MAX_THICK_BACK = SPD_FIRST_MOD_SPEC | 0x01, + MODSPEC_COM_MAX_THICK_FRONT = SPD_FIRST_MOD_SPEC | 0x02, + MODSPEC_COM_RAW_CARD_EXT = SPD_FIRST_MOD_SPEC | 0x03, + MODSPEC_COM_RAW_CARD_REV = SPD_FIRST_MOD_SPEC | 0x04, + MODSPEC_COM_RAW_CARD = SPD_FIRST_MOD_SPEC | 0x05, + MODSPEC_COM_ADDR_MAPPING = SPD_FIRST_MOD_SPEC | 0x06, + RMM_ROWS_RDIMM = SPD_FIRST_MOD_SPEC | 0x07, + RMM_REGS_RDIMM = SPD_FIRST_MOD_SPEC | 0x08, + RMM_HEAT_SP = SPD_FIRST_MOD_SPEC | 0x09, + RMM_HEAT_SP_CHARS = SPD_FIRST_MOD_SPEC | 0x0a, + RMM_MFR_ID_CODE = SPD_FIRST_MOD_SPEC | 0x0b, + RMM_REG_REV_NUM = SPD_FIRST_MOD_SPEC | 0x0c, + RMM_REG_TYPE = SPD_FIRST_MOD_SPEC | 0x0d, + RMM_RC1 = SPD_FIRST_MOD_SPEC | 0x0e, + RMM_RC0 = SPD_FIRST_MOD_SPEC | 0x0f, + RMM_RC3 = SPD_FIRST_MOD_SPEC | 0x10, + RMM_RC2 = SPD_FIRST_MOD_SPEC | 0x11, + RMM_RC5 = SPD_FIRST_MOD_SPEC | 0x12, + RMM_RC4 = SPD_FIRST_MOD_SPEC | 0x13, + RMM_RC7 = SPD_FIRST_MOD_SPEC | 0x14, + RMM_RC6 = SPD_FIRST_MOD_SPEC | 0x15, + RMM_RC9 = SPD_FIRST_MOD_SPEC | 0x16, + RMM_RC8 = SPD_FIRST_MOD_SPEC | 0x17, + RMM_RC11 = SPD_FIRST_MOD_SPEC | 0x18, + RMM_RC10 = SPD_FIRST_MOD_SPEC | 0x19, + RMM_RC13 = SPD_FIRST_MOD_SPEC | 0x1a, + RMM_RC12 = SPD_FIRST_MOD_SPEC | 0x1b, + RMM_RC15 = SPD_FIRST_MOD_SPEC | 0x1c, + RMM_RC14 = SPD_FIRST_MOD_SPEC | 0x1d, + LRMM_HEAT_SP = SPD_FIRST_MOD_SPEC | 0x1e, + LRMM_RANK_NUMBERING = SPD_FIRST_MOD_SPEC | 0x1f, + LRMM_MEMBUF_ORIEN = SPD_FIRST_MOD_SPEC | 0x20, + LRMM_NUM_ROWS = SPD_FIRST_MOD_SPEC | 0x21, + LRMM_MIRRORING = SPD_FIRST_MOD_SPEC | 0x22, + LRMM_REVISION_NUM = SPD_FIRST_MOD_SPEC | 0x23, + LRMM_MFR_ID_CODE = SPD_FIRST_MOD_SPEC | 0x24, + LRMM_F0RC3 = SPD_FIRST_MOD_SPEC | 0x25, + LRMM_F0RC2 = SPD_FIRST_MOD_SPEC | 0x26, + LRMM_F0RC5 = SPD_FIRST_MOD_SPEC | 0x27, + LRMM_F0RC4 = SPD_FIRST_MOD_SPEC | 0x28, + LRMM_F1RC11 = SPD_FIRST_MOD_SPEC | 0x29, + LRMM_F1RC8 = SPD_FIRST_MOD_SPEC | 0x2a, + LRMM_F1RC13 = SPD_FIRST_MOD_SPEC | 0x2b, + LRMM_F1RC12 = SPD_FIRST_MOD_SPEC | 0x2c, + LRMM_F1RC15 = SPD_FIRST_MOD_SPEC | 0x2d, + LRMM_F1RC14 = SPD_FIRST_MOD_SPEC | 0x2e, + LRMM_F3RC9_800_1600 = SPD_FIRST_MOD_SPEC | 0x2f, + LRMM_F3RC8_800_1600 = SPD_FIRST_MOD_SPEC | 0x30, + LRMM_F4RC11_800_1600 = SPD_FIRST_MOD_SPEC | 0x31, + LRMM_F3RC11_800_1600 = SPD_FIRST_MOD_SPEC | 0x32, + LRMM_F4RC10_800_1600 = SPD_FIRST_MOD_SPEC | 0x33, + LRMM_F3RC10_800_1600 = SPD_FIRST_MOD_SPEC | 0x34, + LRMM_F6RC11_800_1600 = SPD_FIRST_MOD_SPEC | 0x35, + LRMM_F5RC11_800_1600 = SPD_FIRST_MOD_SPEC | 0x36, + LRMM_F6RC10_800_1600 = SPD_FIRST_MOD_SPEC | 0x37, + LRMM_F5RC10_800_1600 = SPD_FIRST_MOD_SPEC | 0x38, + LRMM_F8RC11_800_1600 = SPD_FIRST_MOD_SPEC | 0x39, + LRMM_F7RC11_800_1600 = SPD_FIRST_MOD_SPEC | 0x3a, + LRMM_F8RC10_800_1600 = SPD_FIRST_MOD_SPEC | 0x3b, + LRMM_F7RC10_800_1600 = SPD_FIRST_MOD_SPEC | 0x3c, + LRMM_F10RC11_800_1600 = SPD_FIRST_MOD_SPEC | 0x3d, + LRMM_F9RC11_800_1600 = SPD_FIRST_MOD_SPEC | 0x3e, + LRMM_F10RC10_800_1600 = SPD_FIRST_MOD_SPEC | 0x3f, + LRMM_F9RC10_800_1600 = SPD_FIRST_MOD_SPEC | 0x40, + LRMM_RTT_WR_800_1600 = SPD_FIRST_MOD_SPEC | 0x41, + LRMM_RTT_NOM_800_1600 = SPD_FIRST_MOD_SPEC | 0x42, + LRMM_IMPEDANCE_800_1600 = SPD_FIRST_MOD_SPEC | 0x43, + LRMM_F3RC9_1333_1600 = SPD_FIRST_MOD_SPEC | 0x44, + LRMM_F3RC8_1333_1600 = SPD_FIRST_MOD_SPEC | 0x45, + LRMM_F4RC11_1333_1600 = SPD_FIRST_MOD_SPEC | 0x46, + LRMM_F3RC11_1333_1600 = SPD_FIRST_MOD_SPEC | 0x47, + LRMM_F4RC10_1333_1600 = SPD_FIRST_MOD_SPEC | 0x48, + LRMM_F3RC10_1333_1600 = SPD_FIRST_MOD_SPEC | 0x49, + LRMM_F6RC11_1333_1600 = SPD_FIRST_MOD_SPEC | 0x4a, + LRMM_F5RC11_1333_1600 = SPD_FIRST_MOD_SPEC | 0x4b, + LRMM_F6RC10_1333_1600 = SPD_FIRST_MOD_SPEC | 0x4c, + LRMM_F5RC10_1333_1600 = SPD_FIRST_MOD_SPEC | 0x4d, + LRMM_F8RC11_1333_1600 = SPD_FIRST_MOD_SPEC | 0x4e, + LRMM_F7RC11_1333_1600 = SPD_FIRST_MOD_SPEC | 0x4f, + LRMM_F8RC10_1333_1600 = SPD_FIRST_MOD_SPEC | 0x50, + LRMM_F7RC10_1333_1600 = SPD_FIRST_MOD_SPEC | 0x51, + LRMM_F10RC11_1333_1600 = SPD_FIRST_MOD_SPEC | 0x52, + LRMM_F9RC11_1333_1600 = SPD_FIRST_MOD_SPEC | 0x53, + LRMM_F10RC10_1333_1600 = SPD_FIRST_MOD_SPEC | 0x54, + LRMM_F9RC10_1333_1600 = SPD_FIRST_MOD_SPEC | 0x55, + LRMM_RTT_WR_1333_1600 = SPD_FIRST_MOD_SPEC | 0x56, + LRMM_RTT_NOM_1333_1600 = SPD_FIRST_MOD_SPEC | 0x57, + LRMM_IMPEDANCE_1333_1600 = SPD_FIRST_MOD_SPEC | 0x58, + LRMM_F3RC9_1866_2133 = SPD_FIRST_MOD_SPEC | 0x59, + LRMM_F3RC8_1866_2133 = SPD_FIRST_MOD_SPEC | 0x5a, + LRMM_F4RC11_1866_2133 = SPD_FIRST_MOD_SPEC | 0x5b, + LRMM_F3RC11_1866_2133 = SPD_FIRST_MOD_SPEC | 0x5c, + LRMM_F4RC10_1866_2133 = SPD_FIRST_MOD_SPEC | 0x5d, + LRMM_F3RC10_1866_2133 = SPD_FIRST_MOD_SPEC | 0x5e, + LRMM_F6RC11_1866_2133 = SPD_FIRST_MOD_SPEC | 0x5f, + LRMM_F5RC11_1866_2133 = SPD_FIRST_MOD_SPEC | 0x60, + LRMM_F6RC10_1866_2133 = SPD_FIRST_MOD_SPEC | 0x61, + LRMM_F5RC10_1866_2133 = SPD_FIRST_MOD_SPEC | 0x62, + LRMM_F8RC11_1866_2133 = SPD_FIRST_MOD_SPEC | 0x63, + LRMM_F7RC11_1866_2133 = SPD_FIRST_MOD_SPEC | 0x64, + LRMM_F8RC10_1866_2133 = SPD_FIRST_MOD_SPEC | 0x65, + LRMM_F7RC10_1866_2133 = SPD_FIRST_MOD_SPEC | 0x66, + LRMM_F10RC11_1866_2133 = SPD_FIRST_MOD_SPEC | 0x67, + LRMM_F9RC11_1866_2133 = SPD_FIRST_MOD_SPEC | 0x68, + LRMM_F10RC10_1866_2133 = SPD_FIRST_MOD_SPEC | 0x69, + LRMM_F9RC10_1866_2133 = SPD_FIRST_MOD_SPEC | 0x6a, + LRMM_RTT_WR_1866_2133 = SPD_FIRST_MOD_SPEC | 0x6b, + LRMM_RTT_NOM_1866_2133 = SPD_FIRST_MOD_SPEC | 0x6c, + LRMM_IMPEDANCE_1866_2133 = SPD_FIRST_MOD_SPEC | 0x6d, + LRMM_MIN_DELAY_150V = SPD_FIRST_MOD_SPEC | 0x6e, + LRMM_MAX_DELAY_150V = SPD_FIRST_MOD_SPEC | 0x6f, + LRMM_MIN_DELAY_135V = SPD_FIRST_MOD_SPEC | 0x70, + LRMM_MAX_DELAY_135V = SPD_FIRST_MOD_SPEC | 0x71, + LRMM_MIN_DELAY_125V = SPD_FIRST_MOD_SPEC | 0x72, + LRMM_MAX_DELAY_125V = SPD_FIRST_MOD_SPEC | 0x73, + LRMM_PERSONALITY_BYTE0 = SPD_FIRST_MOD_SPEC | 0x74, + LRMM_PERSONALITY_BYTE1 = SPD_FIRST_MOD_SPEC | 0x75, + LRMM_PERSONALITY_BYTE2 = SPD_FIRST_MOD_SPEC | 0x76, + LRMM_PERSONALITY_BYTE3 = SPD_FIRST_MOD_SPEC | 0x77, + LRMM_PERSONALITY_BYTE4 = SPD_FIRST_MOD_SPEC | 0x78, + LRMM_PERSONALITY_BYTE5 = SPD_FIRST_MOD_SPEC | 0x79, + LRMM_PERSONALITY_BYTE6 = SPD_FIRST_MOD_SPEC | 0x7a, + LRMM_PERSONALITY_BYTE7 = SPD_FIRST_MOD_SPEC | 0x7b, + LRMM_PERSONALITY_BYTE8 = SPD_FIRST_MOD_SPEC | 0x7c, + LRMM_PERSONALITY_BYTE9 = SPD_FIRST_MOD_SPEC | 0x7d, + LRMM_PERSONALITY_BYTE10 = SPD_FIRST_MOD_SPEC | 0x7e, + LRMM_PERSONALITY_BYTE11 = SPD_FIRST_MOD_SPEC | 0x7f, + LRMM_PERSONALITY_BYTE12 = SPD_FIRST_MOD_SPEC | 0x80, + LRMM_PERSONALITY_BYTE13 = SPD_FIRST_MOD_SPEC | 0x81, + LRMM_PERSONALITY_BYTE14 = SPD_FIRST_MOD_SPEC | 0x82, + SPD_LAST_MOD_SPEC, + + // This keyword should be last in the list + // Invalid Keyword + INVALID_SPD_KEYWORD = 0xFFFF, +}; + +}; // end SPD + +#endif diff --git a/src/include/usr/vpd/vpdreasoncodes.H b/src/include/usr/vpd/vpdreasoncodes.H new file mode 100644 index 000000000..55de5f773 --- /dev/null +++ b/src/include/usr/vpd/vpdreasoncodes.H @@ -0,0 +1,110 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/vpd/vpdreasoncodes.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 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 __VPDREASONCODES_H +#define __VPDREASONCODES_H + +// ----------------------------------------------- +// Includes +// ----------------------------------------------- +#include + +namespace VPD +{ + +/** +* @enum vpdModuleid +* +* @brief Module Ids used in created errorlogs. Indicates which +* functions an error log was created in. +* +*/ +enum vpdModuleId +{ + VPD_INVALID_MODULE = 0x00, + + // Common VPD + + + // Proc MVPD + VPD_MVPD_READ_BINARY_FILE = 0x31, + VPD_MVPD_READ = 0x32, + VPD_MVPD_WRITE = 0x33, + VPD_MVPD_TRANSLATE_RECORD = 0x34, + VPD_MVPD_TRANSLATE_KEYWORD = 0x35, + VPD_MVPD_FIND_RECORD_OFFSET = 0x36, + VPD_MVPD_RETRIEVE_KEYWORD = 0x37, + VPD_MVPD_FETCH_DATA = 0x38, + VPD_MVPD_CHECK_BUFFER_SIZE = 0x39, + + // DIMM SPD + VPD_SPD_GET_KEYWORD_VALUE = 0x61, + VPD_SPD_GET_VALUE = 0x62, + VPD_SPD_CHECK_SIZE = 0x63, + VPD_SPD_READ_BINARY_FILE = 0x64, + VPD_SPD_WRITE_KEYWORD_VALUE = 0x65, + VPD_SPD_SPECIAL_CASES = 0x66, + VPD_SPD_PRESENCE_DETECT = 0x67, + VPD_SPD_CHECK_MODULE_SPECIFIC_KEYWORD = 0x68, + VPD_SPD_GET_PNOR_ADDR = 0x69, + VPD_SPD_WRITE_VALUE = 0x6A, + VPD_SPD_GET_KEYWORD_ENTRY = 0x6B, + VPD_SPD_WRITE_DATA = 0x6C, + + // Centaur FRU VPD + +}; + +/** + * @enum vpdReasonCode + * + * @brief Reasoncodes used to describe what errors are being indicated. + * + */ +enum vpdReasonCode +{ + VPD_INVALID_REASONCODE = VPD_COMP_ID | 0x00, // Invalid Reasoncode + VPD_INSUFFICIENT_FILE_SIZE = VPD_COMP_ID | 0x01, + VPD_OPERATION_NOT_SUPPORTED = VPD_COMP_ID | 0x02, + VPD_RECORD_NOT_FOUND = VPD_COMP_ID | 0x03, + VPD_KEYWORD_NOT_FOUND = VPD_COMP_ID | 0x04, + VPD_RECORD_MISMATCH = VPD_COMP_ID | 0x05, + VPD_INSUFFICIENT_BUFFER_SIZE = VPD_COMP_ID | 0x06, + VPD_INVALID_BASIC_MEMORY_TYPE = VPD_COMP_ID | 0x07, + VPD_BASIC_MEMORY_TYPE = VPD_COMP_ID | 0x08, + VPD_INVALID_SPD_KEYWORD = VPD_COMP_ID | 0x09, + VPD_MEMTYPE_NOT_SUPPORTED = VPD_COMP_ID | 0x0A, + VPD_KEYWORD_NOT_WRITABLE = VPD_COMP_ID | 0x0B, + VPD_NOT_SUPPORTED = VPD_COMP_ID | 0x0C, + VPD_MOD_SPECIFIC_MISMATCH_UMM = VPD_COMP_ID | 0x0D, + VPD_MOD_SPECIFIC_MISMATCH_RMM = VPD_COMP_ID | 0x0E, + VPD_MOD_SPECIFIC_MISMATCH_CMM = VPD_COMP_ID | 0x0F, + VPD_MOD_SPECIFIC_MISMATCH_LRMM = VPD_COMP_ID | 0x10, + VPD_MOD_SPECIFIC_UNSUPPORTED = VPD_COMP_ID | 0x11, + VPD_SIZE_MISMATCH = VPD_COMP_ID | 0x12, + VPD_INVALID_WRITE_METHOD = VPD_COMP_ID | 0x13, + VPD_NULL_ENTRY = VPD_COMP_ID | 0x14, +}; + +}; // end MVPD + +#endif -- cgit v1.2.1