From 242e2665d005576a081908873fa7652895e8e60d Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Mon, 14 Mar 2022 16:33:34 +0530 Subject: [PATCH] include/efi: Clean up efi_datatype.h file This patch cleans up `efi_datatype.h` to allow other SoC and/or driver code to use this file. `PiPei.h` file only gets added from UDK2017 hence, the platform with the older EDK2 base (prior to UDK2017) is unable to resolve this file dependency. This CL removed the `PiPei.h` header and only added the required header file `PiPeiCis.h` for platforms with UDK base >= 2017. BUG=b:200113959 TEST=Able to build Brya. Signed-off-by: Subrata Banik Change-Id: Ie9177814fcf41e5950ace94050356f0273f765c5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62787 Tested-by: build bot (Jenkins) Reviewed-by: Anil Kumar K Reviewed-by: Angel Pons Reviewed-by: Tim Wawrzynczak --- src/include/efi/efi_datatype.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/include/efi/efi_datatype.h b/src/include/efi/efi_datatype.h index be96e3fd3a..7eefad3391 100644 --- a/src/include/efi/efi_datatype.h +++ b/src/include/efi/efi_datatype.h @@ -4,9 +4,17 @@ #ifndef __EFI_DATATYPE_H__ #define __EFI_DATATYPE_H__ #include -#include #include +#if CONFIG_UDK_VERSION >= CONFIG_UDK_2017_VERSION +#include + +/* Data structure for EFI_PEI_SERVICE. */ +typedef EFI_PEI_SERVICES efi_pei_services; +/* Structure that describes information about a logical CPU. */ +typedef EFI_PROCESSOR_INFORMATION efi_processor_information; +#endif + /* Basic Data types */ /* 8-byte unsigned value. */ typedef UINT64 efi_uint64_t; @@ -36,14 +44,9 @@ typedef UINTN efi_uintn_t; typedef INTN efi_intn_t; /* Status codes common to all execution phases */ typedef EFI_STATUS efi_return_status_t; -/* Data structure */ -/* Data structure for EFI_PEI_SERVICE. */ -typedef EFI_PEI_SERVICES efi_pei_services; /* Data structure for EFI_PHYSICAL_ADDRESS */ typedef EFI_PHYSICAL_ADDRESS efi_physical_address; -/* Structure that describes information about a logical CPU. */ -typedef EFI_PROCESSOR_INFORMATION efi_processor_information; /* * The function prototype for invoking a function on an * Application Processor.