Skip to content

Commit

Permalink
Add BPM firmware update procedure
Browse files Browse the repository at this point in the history
Adds the necessary code to update the firmware data of the BPM. This
commit doesn't support the config data portion of the update. The BPM
code hasn't been hooked into the existing NVDIMM code yet either. These
things, along with error paths, will be added in future commits.

Change-Id: I11aa8b8afda26a093682765e488a4de0e31c0f6c
RTC:210367
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79277
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Roland Veloz <rveloz@us.ibm.com>
Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
  • Loading branch information
MRaybuck authored and dcrowell77 committed Jul 23, 2019
1 parent c865c73 commit f18f9f2
Show file tree
Hide file tree
Showing 9 changed files with 1,877 additions and 5 deletions.
10 changes: 7 additions & 3 deletions src/build/buildpnor/buildBpmFlashImages.pl
Expand Up @@ -145,6 +145,8 @@ sub generateFirmwareImage

# The address offsets in the file are prefixed with the @ symbol.
use constant ADDRESS_LINE => "\@";
use constant FW_START_ADDRESS_8000 => "\@8000";
use constant FW_START_ADDRESS_A000 => "\@A000";

# Each line is plain text where each byte is separated by spaces.
# To determine how many bytes are on the line divide by characters per byte
Expand Down Expand Up @@ -173,8 +175,9 @@ sub generateFirmwareImage
last;
}

# Ignore data from addresses below @8000 because the firmware data
# only begins from @8000 onward.
# There are two possible addresses where the firmware data section can
# start: @8000 or @A000. Ignore all data until we reach either of those
# addresses since it's only after that, that the firmware data begins.
if (substr($line, 0, 1) eq ADDRESS_LINE)
{
$currentAddress = hex substr($line, 1, 4);
Expand All @@ -183,7 +186,8 @@ sub generateFirmwareImage
printf("Found address offset: 0x%04x\n", $currentAddress);
}

if ($line eq "\@8000")
if ( ($line eq FW_START_ADDRESS_8000)
|| ($line eq FW_START_ADDRESS_A000))
{
$inFirmwareSection = 1;
}
Expand Down
10 changes: 10 additions & 0 deletions src/include/usr/hbotcompid.H
Expand Up @@ -495,6 +495,16 @@ const char EXPUPD_COMP_NAME[] = "expupd";

//@}

//
/** @name BPM
* BPM flash update component
*/
//@{
const compId_t BPM_COMP_ID = 0x4300;
const char BPM_COMP_NAME[] = "bpm";

//@}

//
//
/** @name HDAT
Expand Down
4 changes: 4 additions & 0 deletions src/include/usr/util/utillidmgr.H
Expand Up @@ -63,6 +63,10 @@ enum LidId
TARGETING_BINARY_LIDID = 0x81e00630,
NVDIMM_16GB_LIDID = 0x81e00640,
NVDIMM_32GB_LIDID = 0x81e00641,
NVDIMM_16GB_BPM_FW_LIDID = 0x81e00642,
NVDIMM_32GB_BPM_FW_LIDID = 0x81e00643,
NVDIMM_16GB_BPM_CONFIG_LIDID = 0x81e00644,
NVDIMM_32GB_BPM_CONFIG_LIDID = 0x81e00645,
UCD_LIDID = 0x81e00650,

INVALID_LIDID = 0xFFFFFFFF
Expand Down

0 comments on commit f18f9f2

Please sign in to comment.