summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubrata Banik <subratabanik@google.com>2022-03-14 16:33:34 +0530
committerSubrata Banik <subratabanik@google.com>2022-03-17 06:00:54 +0000
commit242e2665d005576a081908873fa7652895e8e60d (patch)
tree27676dc07f25027ff3d69ff10c9f2c9b410ea83a
parent6e3d42ab4269ca6c82db9a129bff2429c42f5aeb (diff)
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 <subratabanik@google.com> Change-Id: Ie9177814fcf41e5950ace94050356f0273f765c5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62787 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anil Kumar K <anil.kumar.k@intel.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
-rw-r--r--src/include/efi/efi_datatype.h15
1 files 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 <Base.h>
-#include <PiPei.h>
#include <Uefi/UefiBaseType.h>
+#if CONFIG_UDK_VERSION >= CONFIG_UDK_2017_VERSION
+#include <Pi/PiPeiCis.h>
+
+/* 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.