Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48173 )
Change subject: HACK: src/commonlib/fsp_relocate: Fix compilation under x86_64 ......................................................................
HACK: src/commonlib/fsp_relocate: Fix compilation under x86_64
Change-Id: I0e3099fae1b70bfe9ec0abbdddb4231ab5e2f388 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/commonlib/fsp_relocate.c M src/vendorcode/intel/Makefile.inc M src/vendorcode/intel/edk2/UDK2015/MdePkg/Include/Ia32/ProcessorBind.h M src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Ia32/ProcessorBind.h 4 files changed, 27 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/73/48173/1
diff --git a/src/commonlib/fsp_relocate.c b/src/commonlib/fsp_relocate.c index 5d326b6..0e5556f 100644 --- a/src/commonlib/fsp_relocate.c +++ b/src/commonlib/fsp_relocate.c @@ -12,6 +12,8 @@
/* Default bind FSP 1.1 API to edk2 UEFI 2.4 types. */ #include <vendorcode/intel/edk2/uefi_2.4/uefi_types.h> +#define UINTN size_t + #include <vendorcode/intel/fsp/fsp1_1/IntelFspPkg/Include/FspInfoHeader.h>
/* Restore original packing policy. */ diff --git a/src/vendorcode/intel/Makefile.inc b/src/vendorcode/intel/Makefile.inc index 23ae587..3a8d491 100644 --- a/src/vendorcode/intel/Makefile.inc +++ b/src/vendorcode/intel/Makefile.inc @@ -6,18 +6,38 @@ # ProcessorBind.h isn't just about types. There's compiler definitions as well # as ABI enforcement. Luckily long is not used in Ia32/ProcessorBind.h for # a fixed width type. +ifeq ($(CONFIG_ARCH_ALL_STAGES_X86_32),y) CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/uefi_2.4/MdePkg/Include/Ia32 +endif +ifeq ($(CONFIG_ARCH_ALL_STAGES_X86_64),y) +CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/uefi_2.4/MdePkg/Include/X64 +endif CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/uefi_2.4/MdePkg/Include else ifeq ($(CONFIG_UDK_2015_BINDING),y) +ifeq ($(CONFIG_ARCH_ALL_STAGES_X86_32),y) CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/UDK2015/MdePkg/Include/Ia32 +endif +ifeq ($(CONFIG_ARCH_ALL_STAGES_X86_64),y) +CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/UDK2015/MdePkg/Include/X64 +endif CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/UDK2015/MdePkg/Include CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/UDK2015/IntelFsp2Pkg/Include else ifeq ($(CONFIG_UDK_2017_BINDING),y) +ifeq ($(CONFIG_ARCH_ALL_STAGES_X86_32),y) CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Ia32 +endif +ifeq ($(CONFIG_ARCH_ALL_STAGES_X86_64),y) +CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/UDK2017/MdePkg/Include/X64 +endif CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/UDK2017/MdePkg/Include CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/UDK2017/IntelFsp2Pkg/Include else ifeq ($(CONFIG_UDK_202005_BINDING),y) +ifeq ($(CONFIG_ARCH_ALL_STAGES_X86_32),y) CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/edk2-stable202005/MdePkg/Include/Ia32 +endif +ifeq ($(CONFIG_ARCH_ALL_STAGES_X86_64),y) +CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/edk2-stable202005/MdePkg/Include/X64 +endif CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/edk2-stable202005/MdePkg/Include CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/edk2-stable202005/IntelFsp2Pkg/Include endif diff --git a/src/vendorcode/intel/edk2/UDK2015/MdePkg/Include/Ia32/ProcessorBind.h b/src/vendorcode/intel/edk2/UDK2015/MdePkg/Include/Ia32/ProcessorBind.h index 2f77042..0394e02 100644 --- a/src/vendorcode/intel/edk2/UDK2015/MdePkg/Include/Ia32/ProcessorBind.h +++ b/src/vendorcode/intel/edk2/UDK2015/MdePkg/Include/Ia32/ProcessorBind.h @@ -275,7 +275,7 @@ /// /// GCC specific method for EFIAPI calling convention. /// - #define EFIAPI __attribute__((cdecl)) + #define EFIAPI #else /// /// The default for a non Microsoft* or GCC compiler is to assume the EFI ABI diff --git a/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Ia32/ProcessorBind.h b/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Ia32/ProcessorBind.h index 69eba65..5d3ed0c 100644 --- a/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Ia32/ProcessorBind.h +++ b/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Ia32/ProcessorBind.h @@ -278,11 +278,15 @@ /// #define EFIAPI __cdecl #elif defined(__GNUC__) +#ifndef __x86_64__ /// /// GCC specific method for EFIAPI calling convention. /// #define EFIAPI __attribute__((cdecl)) #else + #define EFIAPI +#endif +#else /// /// The default for a non Microsoft* or GCC compiler is to assume the EFI ABI /// is the standard.
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48173
to look at the new patch set (#2).
Change subject: HACK: src/commonlib/fsp_relocate: Fix compilation under x86_64 ......................................................................
HACK: src/commonlib/fsp_relocate: Fix compilation under x86_64
Change-Id: I0e3099fae1b70bfe9ec0abbdddb4231ab5e2f388 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/commonlib/fsp_relocate.c M src/drivers/intel/fsp2_0/memory_init.c M src/vendorcode/intel/Makefile.inc M src/vendorcode/intel/edk2/UDK2015/IntelFsp2Pkg/Include/FspEas/FspApi.h M src/vendorcode/intel/edk2/UDK2015/MdePkg/Include/Ia32/ProcessorBind.h M src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Ia32/ProcessorBind.h 6 files changed, 69 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/73/48173/2
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Andrey Petrov, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48173
to look at the new patch set (#5).
Change subject: vendorcode/intel/Makefile: Add x86_64 support ......................................................................
vendorcode/intel/Makefile: Add x86_64 support
This allows to compile FSP related tools (like the FSP loader) in x86_64 mode, but it doesn't add support for properly running x86_32 FSP on x86_64. This is handled in a separate patch.
Change-Id: I0e3099fae1b70bfe9ec0abbdddb4231ab5e2f388 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/vendorcode/intel/Makefile.inc 1 file changed, 8 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/73/48173/5
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48173 )
Change subject: vendorcode/intel/Makefile: Add x86_64 support ......................................................................
Patch Set 8: Code-Review+2
Attention is currently required from: Patrick Rudolph. Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48173 )
Change subject: vendorcode/intel/Makefile: Add x86_64 support ......................................................................
Patch Set 10: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48173 )
Change subject: vendorcode/intel/Makefile: Add x86_64 support ......................................................................
vendorcode/intel/Makefile: Add x86_64 support
This allows to compile FSP related tools (like the FSP loader) in x86_64 mode, but it doesn't add support for properly running x86_32 FSP on x86_64. This is handled in a separate patch.
Change-Id: I0e3099fae1b70bfe9ec0abbdddb4231ab5e2f388 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/48173 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Subrata Banik subrata.banik@intel.com Reviewed-by: Arthur Heymans arthur@aheymans.xyz --- M src/vendorcode/intel/Makefile.inc 1 file changed, 8 insertions(+), 4 deletions(-)
Approvals: build bot (Jenkins): Verified Arthur Heymans: Looks good to me, approved Subrata Banik: Looks good to me, approved
diff --git a/src/vendorcode/intel/Makefile.inc b/src/vendorcode/intel/Makefile.inc index 23ae587..b49dc64 100644 --- a/src/vendorcode/intel/Makefile.inc +++ b/src/vendorcode/intel/Makefile.inc @@ -6,18 +6,22 @@ # ProcessorBind.h isn't just about types. There's compiler definitions as well # as ABI enforcement. Luckily long is not used in Ia32/ProcessorBind.h for # a fixed width type. -CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/uefi_2.4/MdePkg/Include/Ia32 +CPPFLAGS_x86_32 += -I$(src)/vendorcode/intel/edk2/uefi_2.4/MdePkg/Include/Ia32 +CPPFLAGS_x86_64 += -I$(src)/vendorcode/intel/edk2/uefi_2.4/MdePkg/Include/X64 CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/uefi_2.4/MdePkg/Include else ifeq ($(CONFIG_UDK_2015_BINDING),y) -CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/UDK2015/MdePkg/Include/Ia32 +CPPFLAGS_x86_32 += -I$(src)/vendorcode/intel/edk2/UDK2015/MdePkg/Include/Ia32 +CPPFLAGS_x86_64 += -I$(src)/vendorcode/intel/edk2/UDK2015/MdePkg/Include/X64 CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/UDK2015/MdePkg/Include CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/UDK2015/IntelFsp2Pkg/Include else ifeq ($(CONFIG_UDK_2017_BINDING),y) -CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Ia32 +CPPFLAGS_x86_32 += -I$(src)/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Ia32 +CPPFLAGS_x86_64 += -I$(src)/vendorcode/intel/edk2/UDK2017/MdePkg/Include/X64 CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/UDK2017/MdePkg/Include CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/UDK2017/IntelFsp2Pkg/Include else ifeq ($(CONFIG_UDK_202005_BINDING),y) -CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/edk2-stable202005/MdePkg/Include/Ia32 +CPPFLAGS_x86_32 += -I$(src)/vendorcode/intel/edk2/edk2-stable202005/MdePkg/Include/Ia32 +CPPFLAGS_x86_64 += -I$(src)/vendorcode/intel/edk2/edk2-stable202005/MdePkg/Include/X64 CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/edk2-stable202005/MdePkg/Include CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/edk2-stable202005/IntelFsp2Pkg/Include endif