include/efi: Add EFI Status code definitions

This patch adds EFI status code macros in `efi_datatype.h` to implement
FSP debug event handler natively in coreboot.

Added `PiStatusCode.h` and `StatusCodeDataTypeId.h` files for
`UDK base >= 2017`, as these files were added with UDK version 2017.

BUG=b:225544587
TEST=Able to build and boot Brya.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Ib2debb6a50581456783dc9f22f892f8f92a25509
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63006
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
Subrata Banik 2022-03-23 03:48:32 +05:30 committed by Felix Held
parent 2f4fe94331
commit e8ec7d2c38
1 changed files with 12 additions and 0 deletions

View File

@ -7,13 +7,23 @@
#include <Uefi/UefiBaseType.h> #include <Uefi/UefiBaseType.h>
#if CONFIG_UDK_VERSION >= CONFIG_UDK_2017_VERSION #if CONFIG_UDK_VERSION >= CONFIG_UDK_2017_VERSION
#include <Guid/StatusCodeDataTypeId.h>
#include <Pi/PiPeiCis.h> #include <Pi/PiPeiCis.h>
#include <Pi/PiStatusCode.h>
#include <Protocol/MpService.h> #include <Protocol/MpService.h>
/* Data structure for EFI_PEI_SERVICE. */ /* Data structure for EFI_PEI_SERVICE. */
typedef EFI_PEI_SERVICES efi_pei_services; typedef EFI_PEI_SERVICES efi_pei_services;
/* Structure that describes information about a logical CPU. */ /* Structure that describes information about a logical CPU. */
typedef EFI_PROCESSOR_INFORMATION efi_processor_information; typedef EFI_PROCESSOR_INFORMATION efi_processor_information;
/* Status code type definition */
typedef EFI_STATUS_CODE_TYPE efi_status_code_type_t;
/* Status value type definition */
typedef EFI_STATUS_CODE_VALUE efi_status_code_value_t;
/* Status data type definition */
typedef EFI_STATUS_CODE_DATA efi_status_code_data_t;
/* Status string data type definition */
typedef EFI_STATUS_CODE_STRING_DATA efi_status_code_string_data;
#endif #endif
/* Basic Data types */ /* Basic Data types */
@ -47,6 +57,8 @@ typedef INTN efi_intn_t;
typedef EFI_STATUS efi_return_status_t; typedef EFI_STATUS efi_return_status_t;
/* Data structure for EFI_PHYSICAL_ADDRESS */ /* Data structure for EFI_PHYSICAL_ADDRESS */
typedef EFI_PHYSICAL_ADDRESS efi_physical_address; typedef EFI_PHYSICAL_ADDRESS efi_physical_address;
/* 128-bit buffer containing a unique identifier value */
typedef EFI_GUID efi_guid_t;
/* /*
* The function prototype for invoking a function on an * The function prototype for invoking a function on an