From 552d96423109ce112513f493edd286f708d9df19 Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Tue, 6 Nov 2018 15:52:36 -0600 Subject: Hack to force OCMB presence detection Temporary code that assumes the OCMB is present if the target is in the model. Also adds a check to throw an error instead of crashing if VPD_REC_NUM isn't set. Change-Id: Iba87d13093f0044bdf28a10621561e02d10faaf6 RTC: 196805 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68488 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Tested-by: Jenkins OP HW Reviewed-by: Christian R. Geddes Reviewed-by: Nicholas E. Bofferding --- src/include/usr/devicefw/userif.H | 46 +++++++++++++++++++++--------------- src/include/usr/vpd/vpdreasoncodes.H | 10 ++++++-- 2 files changed, 35 insertions(+), 21 deletions(-) (limited to 'src/include/usr') diff --git a/src/include/usr/devicefw/userif.H b/src/include/usr/devicefw/userif.H index a6c7f26b0..cf00cfee1 100644 --- a/src/include/usr/devicefw/userif.H +++ b/src/include/usr/devicefw/userif.H @@ -49,29 +49,29 @@ namespace DeviceFW enum AccessType { - SCOM = 0, - PNOR, - MAILBOX, - PRESENT, - FSI, - SPD, + SCOM = 0, // SCOM registers + PNOR, // PNOR flash + MAILBOX, // FSP mailbox + PRESENT, // Presence detection + FSI, // FSI/CFAM registers + SPD, // Serial Presence Detect Data for JEDEC DIMMs MVPD, // Module (processor) VPD CVPD, // Centaur (memory buffer) VPD - SCAN, - EEPROM, - GPIO, - LPC, + SCAN, // Scan rings + EEPROM, // Standard EEPROM/SEEPROM over i2c + GPIO, // GPIO registers + LPC, // Low Pin Count bus IPMIBT, // As opposed to other phy's - PVPD, - TPM, - SIO, - AHB_SIO, + PVPD, // Planar VPD + TPM, // Trusted Platform Module + SIO, // BMC Super I/O registers + AHB_SIO, // AST Hostbridge via SIO DVPD, // Direct access memory VPD - DEPRECATED_MEMD_VPD, - NODECOMM, - NVDIMM, - FAPI_I2C, - MMIO, + NODECOMM, // Internode communication + NVDIMM, // Non-volatile DIMM controller access + FAPI_I2C, // FAPI2-triggered i2c accesses + MMIO, // Memory Mapped I/O + IDEC, // Read and set EC and CHIPID values LAST_ACCESS_TYPE, }; @@ -405,6 +405,14 @@ namespace DeviceFW static_cast((i_offset)), \ static_cast((i_accessLimit)) + /** + * @brief Additional device addressing parameters for MMIO ops. + * Construct the device addressing parameters for the IDEC operation + * (no parameters) + */ + #define DEVICE_IDEC_ADDRESS()\ + DeviceFW::IDEC + /** * @brief Perform a hardware read operation. * diff --git a/src/include/usr/vpd/vpdreasoncodes.H b/src/include/usr/vpd/vpdreasoncodes.H index a0c552b29..92aea3196 100644 --- a/src/include/usr/vpd/vpdreasoncodes.H +++ b/src/include/usr/vpd/vpdreasoncodes.H @@ -49,6 +49,7 @@ enum vpdModuleId VPD_WRITE_PNOR = 0x10, VPD_ENSURE_CACHE_IS_IN_SYNC = 0x11, VPD_GET_PN_AND_SN = 0x12, + VPD_GET_VPD_LOCATION = 0x13, // IPVPD VPD_IPVPD_TRANSLATE_RECORD = 0x20, @@ -85,8 +86,6 @@ enum vpdModuleId VPD_SPD_GET_MOD_TYPE = 0x6E, VPD_SPD_FETCH_DATA = 0x6F, - // Centaur FRU VPD - // Runtime VPD VPD_RT_GET_ADDR = 0x80, VPD_RT_WRITE_PNOR = 0x81, @@ -96,6 +95,12 @@ enum vpdModuleId VPD_SEND_I2C_LOCK_MSG = 0x85, VPD_FILL_I2C_LOCK_MSG = 0x86, + // DDIMM VPD + MOD_OCMBPRESENCEDETECT = 0x90, + + // Centaur FRU VPD + + }; /** @@ -149,6 +154,7 @@ enum vpdReasonCode VPD_RT_NODE_TOO_LARGE = VPD_COMP_ID | 0x3b, VPD_CANNOT_WRITE_OVERRIDDEN_VPD = VPD_COMP_ID | 0x3c, VPD_FAILED_TO_RESOLVE_NODE_TARGET = VPD_COMP_ID | 0x3d, + VPD_BAD_REC_NUM = VPD_COMP_ID | 0x3e, }; -- cgit v1.2.1