abaca2a399
Some stages in bootflow prefer to use 16 bytes UUID instead of traditional 2 bytes FWID to identify the firmware components they verify/validate. Hence add version 2 of hash table which identifies firmware components using UUID. Other than UUID and a reserved field for alignment reasons, the format of the hash table is very similar to hash table v1. BUG=b:277292697 TEST=Build and boot to OS in Myst with PSP Verstage enabled. Ensure that the hash table v2 is built and installed into BIOS image for the components that are configured in amdfw.cfg file. Ensure that the validation by PSP is successful for all the relevant components during the boot flow. Change-Id: I2899154086cf8e90c3327178157b07ead034b16e Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76586 Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
51 lines
1.2 KiB
Makefile
51 lines
1.2 KiB
Makefile
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
top ?= $(abspath ../..)
|
|
ifneq ($(CC),)
|
|
HOSTCC ?= $(CC)
|
|
else
|
|
HOSTCC ?= cc
|
|
endif
|
|
|
|
READ_SRC = amdfwread.c
|
|
READ_OBJ = $(READ_SRC:%.c=%.o)
|
|
TOOL_SRC = amdfwtool.c data_parse.c signed_psp.c handle_file.c
|
|
TOOL_OBJ = $(TOOL_SRC:%.c=%.o)
|
|
HEADER=amdfwtool.h
|
|
TARGETS = amdfwread amdfwtool
|
|
WERROR=-Werror
|
|
CFLAGS=-O2 -Wall -Wextra -Wshadow ${WERROR}
|
|
CFLAGS += -I $(top)/src/commonlib/bsd/include
|
|
CFLAGS += -D_GNU_SOURCE # memmem() from string.h
|
|
|
|
ifneq ($(PKG_CONFIG),)
|
|
HOSTPKGCONFIG ?= $(PKG_CONFIG)
|
|
else
|
|
HOSTPKGCONFIG ?= pkg-config
|
|
endif
|
|
CFLAGS += $(shell $(HOSTPKGCONFIG) --cflags libcrypto)
|
|
LDFLAGS += $(shell $(HOSTPKGCONFIG) --libs libcrypto)
|
|
|
|
all: $(TARGETS)
|
|
|
|
amdfwread: $(READ_OBJ)
|
|
$(HOSTCC) $(READ_OBJ) $(LDFLAGS) -o $@
|
|
|
|
amdfwtool: $(TOOL_OBJ)
|
|
$(HOSTCC) $(TOOL_OBJ) $(LDFLAGS) -o $@
|
|
|
|
%.o: %.c $(HEADER)
|
|
$(HOSTCC) $(CFLAGS) -c -o $@ $<
|
|
|
|
clean:
|
|
@rm -f $(TARGETS) $(READ_OBJ) $(TOOL_OBJ)
|
|
|
|
distclean: clean
|
|
|
|
help:
|
|
@echo "${TARGETS}: Tools to create and read from AMD firmware combinations"
|
|
@echo "Targets: all, clean, distclean, help"
|
|
@echo "To disable warnings as errors, run make as:"
|
|
@echo " make all WERROR=\"\""
|
|
|
|
.PHONY: all clean distclean help
|