lib/Makefile.inc: Add cbfs header pointer on !BOOTBLOCK_IN_CBFS

On some x86 targets it the bootblock is loaded via a different
mechanism, like via the AMD PSP or Intel IFWI. Some payloads need that
pointer so add it to cbfs.

Note that on Intel APL this file is not used, which is why the
bootblock still needs to contain the pointer in the ARCH_X86 part.
It is not worth it to add logic to specifically deal with APL as this is
a legacy feature anyway.

For AMD non-car platform this fixes cbfs access in SeaBIOS.

Change-Id: If46e80e3eed5cc3f59964ac58e507f927fc563c4
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64483
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
Arthur Heymans 2022-05-18 21:37:58 +02:00 committed by Felix Held
parent 5b757b597a
commit 2efd8315f2
1 changed files with 12 additions and 3 deletions

View File

@ -402,9 +402,18 @@ cbfs_master_header-position := 0
ifeq ($(CONFIG_ARCH_X86),y)
$(call src-to-obj,bootblock,$(dir)/master_header_pointer.c): $(obj)/fmap_config.h
bootblock-y += master_header_pointer.c
else
cbfs-files-y += header_pointer
endif
NEED_CBFS_POINTER=
ifneq ($(CONFIG_ARCH_X86),y)
NEED_CBFS_POINTER=y
endif
ifneq ($(CONFIG_BOOTBLOCK_IN_CBFS),y)
NEED_CBFS_POINTER=y
endif
cbfs-files-$(NEED_CBFS_POINTER) += header_pointer
header_pointer-file := master_header_pointer.c:struct
header_pointer-position := -4
header_pointer-type := "cbfs header"
endif