summaryrefslogtreecommitdiffstats
path: root/src/include/efi
diff options
context:
space:
mode:
authorSubrata Banik <subrata.banik@intel.com>2019-02-27 18:37:27 +0530
committerSubrata Banik <subrata.banik@intel.com>2019-03-09 04:25:31 +0000
commit9d712bcc4fc7f19dadbfc298e3d3ee8ae58c9c82 (patch)
treeb16a5dabe91a48617ffe3e210cef871330eff1ee /src/include/efi
parente4cb23c68225d2973f771d61b5dc7725a1c92c2f (diff)
downloadcoreboot-9d712bcc4fc7f19dadbfc298e3d3ee8ae58c9c82.tar.gz
coreboot-9d712bcc4fc7f19dadbfc298e3d3ee8ae58c9c82.tar.bz2
coreboot-9d712bcc4fc7f19dadbfc298e3d3ee8ae58c9c82.zip
include/efi/efi_datatype: Convert EFI datatypes as per coreboot specification
This patch replaces commonly used EFI datatypes and structures into coreboot compatible datatypes as below: typedef UINTN efi_uintn_t Change-Id: I79cdaaa1dd63d248692989d943a15ad178c46369 Signed-off-by: Subrata Banik <subrata.banik@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31648 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Diffstat (limited to 'src/include/efi')
-rw-r--r--src/include/efi/efi_datatype.h87
1 files changed, 87 insertions, 0 deletions
diff --git a/src/include/efi/efi_datatype.h b/src/include/efi/efi_datatype.h
new file mode 100644
index 000000000000..053d7133c42d
--- /dev/null
+++ b/src/include/efi/efi_datatype.h
@@ -0,0 +1,87 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+/* Create EFI equivalent datatype in coreboot based on UEFI specification */
+#ifndef __EFI_DATATYPE_H__
+#define __EFI_DATATYPE_H__
+
+#include <Base.h>
+#include <PiPei.h>
+#include <Ppi/MpServices.h>
+
+/* Basic Data types */
+
+/* 8-byte unsigned value. */
+typedef UINT64 efi_uint64_t;
+
+/* 8-byte signed value. */
+typedef INT64 efi_int64_t;
+
+/* 4-byte unsigned value. */
+typedef UINT32 efi_uint32_t;
+
+/* 4-byte signed value. */
+typedef INT32 efi_int32_t;
+
+/* 2-byte unsigned value. */
+typedef UINT16 efi_uint16_t;
+
+/* 2-byte Character. */
+typedef CHAR16 efi_char16_t;
+
+/* 2-byte signed value. */
+typedef INT16 efi_int16_t;
+
+/* Logical Boolean. */
+typedef BOOLEAN efi_boolean_t;
+
+/* 1-byte unsigned value. */
+typedef UINT8 efi_uint8_t;
+
+/* 1-byte Character */
+typedef CHAR8 efi_char8_t;
+
+/* 1-byte signed value */
+typedef INT8 efi_int8_t;
+
+/* Unsigned value of native width. */
+typedef UINTN efi_uintn_t;
+
+/* Signed value of native width. */
+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 UEFI PI Multi-processor PPI */
+typedef EFI_PEI_MP_SERVICES_PPI efi_pei_mp_services_ppi;
+
+/* 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.
+ */
+typedef
+void
+(EFIAPI *efi_ap_procedure)(void *buffer);
+
+#endif