util/apcb: Add apcb edit tool for phoenix

Add a new apcb edit tool, apcb_v3a_edit.py, that injects SPDs into
an APCB for phoenix platform.

The tool makes several assumptions:
 * Each SPD only uses blocks 0, 1, 3 and 5. All other blocks are zero.
 * Each block is 64 bytes.
 * Dimm and socket are always 0
 * Unused SPD entries are zero'd

BUG=b:281983434
BRANCH=None
TEST=build, flash, boot myst

Change-Id: Ifb50287de77138170714a702ab87d56427aacfef
Signed-off-by: Rob Barnes <robbarnes@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76188
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Rob Barnes
2023-06-14 11:19:53 -06:00
committed by Felix Held
parent 7758b47e3b
commit d6b58d5c76
3 changed files with 148 additions and 17 deletions

View File

@@ -28,23 +28,22 @@ APCB_SOURCES = $(MAINBOARD_BLOBS_DIR)/$(APCB_NAME).bin
# Add the below section back in after the apcbtool is updated to handle the
# Phoenix APCB SPD configuration.
#ifneq ($(wildcard $(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/memory/Makefile.inc),)
#
#LIB_SPD_DEPS = $(SPD_SOURCES)
#
#APCB_SOURCES = $(obj)/$(APCB_NAME).gen
#
#$(obj)/$(APCB_NAME).gen: $(SPD_SOURCES) \
# $(APCB_V3_EDIT_TOOL) \
# $(MAINBOARD_BLOBS_DIR)/$(APCB_NAME).bin
# $(APCB_V3_EDIT_TOOL) $(MAINBOARD_BLOBS_DIR)/$(APCB_NAME).bin \
# $(obj)/$(APCB_NAME).gen \
# --spd_sources $(SPD_SOURCES) \
# --mem_type 'lp5'
#else
#$(info SPD sources not found. Skipping APCB.)
#files_added:: die_no_apcb
#endif
ifneq ($(wildcard $(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/memory/Makefile.inc),)
LIB_SPD_DEPS = $(SPD_SOURCES)
APCB_SOURCES = $(obj)/$(APCB_NAME).gen
$(obj)/$(APCB_NAME).gen: $(SPD_SOURCES) \
$(APCB_V3A_EDIT_TOOL) \
$(MAINBOARD_BLOBS_DIR)/$(APCB_NAME).bin
$(APCB_V3A_EDIT_TOOL) $(MAINBOARD_BLOBS_DIR)/$(APCB_NAME).bin \
$(obj)/$(APCB_NAME).gen \
--spd_sources $(SPD_SOURCES)
else
$(info SPD sources not found. Skipping APCB.)
files_added:: die_no_apcb
endif
else
$(info APCB sources not found. Skipping APCB.)