Skip to content

Commit

Permalink
Add new path in EEPROM device op to allow reading from new EECACHE
Browse files Browse the repository at this point in the history
Recently a new EECACHE section was introduced to Hostboot. This section
gets populated with a copy of every PRIMARY_VPD eeprom (someday could
contain other eeprom roles also) during host_discover_targets. This
commit add support to allow users to select where they want to perform
their EEPROM device operation. If they pass CACHE to the deviceOp macro
then a read will come from the pnor cache, writes will write to pnor
cache and then also write to the eeprom HW. If HARDWARE is passed in
then reads and writes will be directly done on the eeprom hardware.
If AUTOSELECT is passed the code will check our cache to see if we have
a copy of the eeprom in question, if we have a copy we will go the
CACHE path, if no copy exists we will go the HARDWARE path. Along with
this change some reorganization was done w/ the eeprom related files.

RTC: 196805
Change-Id: If2c4e5d3e338a1a10780740c1a019eb4af003b73
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70822
Reviewed-by: Matt Derksen <[email protected]>
Tested-by: Jenkins Server <[email protected]>
Tested-by: Jenkins OP Build CI <[email protected]>
Tested-by: FSP CI Jenkins <[email protected]>
Reviewed-by: Roland Veloz <[email protected]>
Tested-by: Jenkins OP HW <[email protected]>
Reviewed-by: Daniel M. Crowell <[email protected]>
  • Loading branch information
crgeddes authored and dcrowell77 committed Feb 16, 2019
1 parent bc80fc6 commit e6832f7
Show file tree
Hide file tree
Showing 28 changed files with 3,329 additions and 2,603 deletions.
9 changes: 5 additions & 4 deletions src/build/configs/simics_axone.config
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
set DJVPD_READ_FROM_HW

# You can enabled MVPD read from HW but adds time to IPL
#set MVPD_READ_FROM_HW

#skip enabling checkstop analysis until OCC is ready in simics
unset IPLTIME_CHECKSTOP_ANALYSIS

#Try to keep a list of things this does
# - skipping setting voltages in istep 8.12, nothing on other side of AVSbus
# in simics currently.
set AXONE_BRING_UP

set SUPPORT_EEPROM_CACHING
set SUPPORT_EEPROM_CACHING

35 changes: 25 additions & 10 deletions src/build/simics/standalone.simics
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,41 @@ if ($hb_skip_vpd_preload == 0) {

# If Axone and Beyond, load VPD into DDIMM VPD
if ($hb_mode == 0){
$dimmSpd = $hb_script_location + "/dimmspd.dat"
$dimmSpd = $hb_script_location + "/dimmspd.dat"
$procMvpd = "/gsa/rchgsa/home/c/r/crgeddes/documents/hbBuild/procvpd.dat"

proc_hb0.seeprom0_image.load-file $procMvpd
echo " - loaded MVPD to seeprom0"

proc_hb0.seeprom2_image.load-file $procMvpd
echo " - loaded MVPD to seeprom2"

ddimm0.VPD_0_image.load-file $dimmSpd
echo " - loaded SPD to DDIMM0"
echo " - loaded SPD to DDIMM0"

ddimm1.VPD_0_image.load-file $dimmSpd
echo " - loaded SPD to DDIMM1"
echo " - loaded SPD to DDIMM1"

ddimm2.VPD_0_image.load-file $dimmSpd
echo " - loaded SPD to DDIMM2"
echo " - loaded SPD to DDIMM2"

ddimm3.VPD_0_image.load-file $dimmSpd
echo " - loaded SPD to DDIMM3"
echo " - loaded SPD to DDIMM3"

ddimm4.VPD_0_image.load-file $dimmSpd
echo " - loaded SPD to DDIMM4"
echo " - loaded SPD to DDIMM4"

ddimm5.VPD_0_image.load-file $dimmSpd
echo " - loaded SPD to DDIMM5"
echo " - loaded SPD to DDIMM5"

ddimm6.VPD_0_image.load-file $dimmSpd
echo " - loaded SPD to DDIMM6"
echo " - loaded SPD to DDIMM6"

ddimm7.VPD_0_image.load-file $dimmSpd
echo " - loaded SPD to DDIMM7"
echo " - loaded SPD to DDIMM7"

ddimm8.VPD_0_image.load-file $dimmSpd
echo " - loaded SPD to DDIMM8"
echo " - loaded SPD to DDIMM8"
}

# Turn on all processor cec-chips
Expand Down
8 changes: 5 additions & 3 deletions src/include/usr/devicefw/userif.H
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,14 @@ namespace DeviceFW
/**
* Construct the device addressing parameters for the EEPROM device ops.
* @param[in] i_eeprom_enum - The chip number of the EEPROM to access. See
* eeprom_chip_types_t in eepromif.H
* EEPROM_ROLE in eeprom_const.H
* @param[in] i_offset - The internal offset of the EEPROM slave device.
* @param[in] i_deviceSelect - Choose which device you want to perform op on:
* AUTOSELECT , CACHE, or HARDWARE
*/
#define DEVICE_EEPROM_ADDRESS( i_eeprom_enum, i_offset )\
#define DEVICE_EEPROM_ADDRESS( i_eeprom_enum, i_offset, i_deviceSelect )\
DeviceFW::EEPROM, static_cast<uint64_t>(( i_eeprom_enum )),\
static_cast<uint64_t>(( i_offset ))
static_cast<uint64_t>(( i_offset )), static_cast<uint64_t>((i_deviceSelect))

/**
* Construct the device addressing parameters for the TPM device ops.
Expand Down
2 changes: 1 addition & 1 deletion src/include/usr/errl/errli2c.H
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ struct I2cMatchingInfo_t
uint8_t port;
uint8_t devAddr;
uint8_t chipCount;
EEPROM::eeprom_chip_types_t chipType;
EEPROM::EEPROM_ROLE chipType;
const TARGETING::Target* tgt;
uint8_t targetAncestryDepth;
};
Expand Down
73 changes: 0 additions & 73 deletions src/include/usr/i2c/eepromCache_const.H

This file was deleted.

Loading

0 comments on commit e6832f7

Please sign in to comment.