Attention is currently required from: Andrey Petrov, Bora Guvendik, Ronak Kanabar, Wonkyu Kim.

Jérémy Compostella uploaded patch set #2 to this change.

View Change

drivers/intel/fsp2_0: Support FSP 2.4 64-bits

FSP 2.4 brings FSP 64-bits support which requires some adjustments in
coreboot:

- Stack alignment:

1. FSP functions must be called with the stack 16-bytes aligned.
This is already setup properly with the default value of the
`mpreferred-stack-boundary' compiler option (4).

2. The FSP stack buffer supplied by coreboot through the `StackBase'
UPD must be 16-bytes aligned.

- The EDK2 EFIAPI macro definition relies on compiler flags such as
__GNUC__ which is not working well when included by coreboot. While it
has no side-effect on i386 because the C calling convention used by
coreboot and FSP are the same, it breaks on x86_64 because FSP/UEFI
uses the Microsoft x64 calling convention while coreboot uses the
System V AMD64 ABI.

Fortunately, EDK2 header allows to override the EFIAPI
definition. The __ms_abi__ attribute works for both i386 and x86_64.

This attribute has to be set to all functions calling or called by
the FSP.

- The EFI_STATUS/efi_return_status_t size changes with the
architecture (32-bits vs 64-bits). To print statuses independently
of the architecture we leverage the size_t 'z' print format which is
generally aligned with the architecture size too.

In addition, this commit sets`PLATFORM_USES_FSP2_X86_32' to `n' by
default if FSP 2.4 is enabled as 64-bits FSP should be norm moving
forward.

Change-Id: If0397f5cc8d0f4f1872bd37a001fe42e0c37ec99
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
---
M src/drivers/intel/fsp2_0/Kconfig
M src/drivers/intel/fsp2_0/debug.c
M src/drivers/intel/fsp2_0/fsp_debug_event.c
M src/drivers/intel/fsp2_0/include/fsp/api.h
M src/drivers/intel/fsp2_0/include/fsp/debug.h
M src/drivers/intel/fsp2_0/include/fsp/fsp_debug_event.h
M src/drivers/intel/fsp2_0/include/fsp/info_header.h
M src/drivers/intel/fsp2_0/include/fsp/soc_binding.h
M src/drivers/intel/fsp2_0/include/fsp/util.h
M src/drivers/intel/fsp2_0/memory_init.c
M src/drivers/intel/fsp2_0/ppi/mp_service1.c
M src/drivers/intel/fsp2_0/ppi/mp_service2.c
M src/drivers/intel/fsp2_0/silicon_init.c
M src/drivers/intel/fsp2_0/util.c
M src/include/efi/efi_datatype.h
M src/soc/amd/common/fsp/fsp_reset.c
M src/soc/intel/common/fsp_reset.c
M src/soc/intel/xeon_sp/bootblock.c
18 files changed, 94 insertions(+), 63 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/80277/2

To view, visit change 80277. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: If0397f5cc8d0f4f1872bd37a001fe42e0c37ec99
Gerrit-Change-Number: 80277
Gerrit-PatchSet: 2
Gerrit-Owner: Jérémy Compostella <jeremy.compostella@intel.com>
Gerrit-Reviewer: Andrey Petrov <andrey.petrov@gmail.com>
Gerrit-Reviewer: Bora Guvendik <bora.guvendik@intel.com>
Gerrit-Reviewer: Ronak Kanabar <ronak.kanabar@intel.com>
Gerrit-Reviewer: Wonkyu Kim <wonkyu.kim@intel.com>
Gerrit-CC: Ashish Kumar Mishra <ashish.k.mishra@intel.com>
Gerrit-CC: Subrata Banik <subratabanik@google.com>
Gerrit-CC: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Attention: Bora Guvendik <bora.guvendik@intel.com>
Gerrit-Attention: Wonkyu Kim <wonkyu.kim@intel.com>
Gerrit-Attention: Ronak Kanabar <ronak.kanabar@intel.com>
Gerrit-Attention: Andrey Petrov <andrey.petrov@gmail.com>
Gerrit-MessageType: newpatchset