Use existing EFI_GUID and efi_guid_t instead of struct efi_guid.
This is pre-work before making a common HOB library.
- Change 'struct efi_guid' to efi_guit_t
- Remove 'struct efi_guid'
- Define GUIDs with EFI_GUID() macro
- Use guidcmp() instead of compare_guid()
- Remove compare_guid()
Signed-off-by: Aiden Park
Reviewed-by: Andy Shevchenko
Reviewed-by: Bin Meng
Tested on MinnowMax
Tested-by: Bin Meng
---
Changes in v8:
* Remove unnecessary parentheses reported from checkpatch
Changes in v7:
* Split HOB library into EFI_GUID pre-work and making a common lirary
arch/x86/include/asm/fsp/fsp_ffs.h | 4 +-
arch/x86/include/asm/fsp/fsp_fv.h | 4 +-
arch/x86/include/asm/fsp/fsp_hob.h | 76 +
arch/x86/include/asm/fsp/fsp_support.h | 6 +-
arch/x86/include/asm/fsp/fsp_types.h | 8 ---
arch/x86/lib/fsp/fsp_support.c | 78 ++
cmd/x86/fsp.c | 10 ++--
7 files changed, 81 insertions(+), 105 deletions(-)
diff --git a/arch/x86/include/asm/fsp/fsp_ffs.h
b/arch/x86/include/asm/fsp/fsp_ffs.h
index 61ce63c08e..b7558e5a17 100644
--- a/arch/x86/include/asm/fsp/fsp_ffs.h
+++ b/arch/x86/include/asm/fsp/fsp_ffs.h
@@ -45,7 +45,7 @@ struct __packed ffs_file_header {
* This GUID is the file name.
* It is used to uniquely identify the file.
*/
- struct efi_guid name;
+ efi_guid_t name;
/* Used to verify the integrity of the file */
union ffs_integrity integrity;
/* Identifies the type of file */
@@ -68,7 +68,7 @@ struct __packed ffs_file_header2 {
* Name in any given firmware volume, except if the file type is
* EFI_FV_FILE_TYPE_FFS_PAD.
*/
- struct efi_guid name;
+ efi_guid_t name;
/* Used to verify the integrity of the file */
union ffs_integrity integrity;
/* Identifies the type of file */
diff --git a/arch/x86/include/asm/fsp/fsp_fv.h
b/arch/x86/include/asm/fsp/fsp_fv.h
index 190aedcf44..511dfb78b8 100644
--- a/arch/x86/include/asm/fsp/fsp_fv.h
+++ b/arch/x86/include/asm/fsp/fsp_fv.h
@@ -80,7 +80,7 @@ struct fv_header {
* Declares the file system with which the firmware volume
* is formatted.
*/
- struct efi_guid fs_guid;
+ efi_guid_t fs_guid;
/*
* Length in bytes of the complete firmware volume, including
* the header.
@@ -128,7 +128,7 @@ struct fv_header {
/* Extension header pointed by ExtHeaderOffset of volume header */
struct fv_ext_header {
/* firmware volume name */
- struct efi_guid fv_name;
+ efi_guid_t fv_name;
/* Size of the rest of the extension header including this structure */
u32 ext_hdr_size;
};
diff --git a/arch/x86/include/asm/fsp/fsp_hob.h
b/arch/x86/include/asm/fsp/fsp_hob.h
index 00657b62c7..843d7b513b 100644
--- a/arch/x86/include/asm/fsp/fsp_hob.h
+++ b/arch/x86/include/asm/fsp/fsp_hob.h
@@ -8,6 +8,7 @@
#define __FSP_HOB_H__
#include
+#include
/* Type of HOB Header */
#define HOB_TYPE_MEM_ALLOC 0x0002
@@ -40,7 +41,7 @@ struct hob_mem_alloc {
* present for the memory allocation HOB. Type efi_guid is defined in
* InstallProtocolInterface() in the UEFI 2.0 specification.
*/
- struct efi_guid name;
+ efi_guid_t name;
/*
* The base address of memory allocated by this HOB.
* Type phys_addr_t is defined in AllocatePages() in the UEFI 2.0
@@ -106,7 +107,7 @@ struct hob_res_desc {
* used by HOB consumer phase components to correlate device
* ownership of a resource.
*/
- struct efi_guid owner;
+ efi_guid_t owner;
u32 type;
u32 attr;
/* The physical start address of the resource region */
@@ -122,7 +123,7 @@ struct hob_res_desc {
struct hob_guid {
struct hob_header hdr;
/* A GUID that defines the contents of this HOB */
- struct efi_guid name;
+ efi_guid_t name;
/* GUID specific data goes here */
};
@@ -223,56 +224,57 @@ static inline u16 get_guid_hob_data_size(const struct
hob_header *hdr)
#define FSP_GUID_DATA4_6 0x3f
#define FSP_GUID_DATA4_7 0x0c
+#define FSP_GUID_BYTE0 0xbe
+#define FSP_GUID_BYTE1 0x40
+#define FSP_GUID_BYTE2 0x27
+#define FSP_GUID_BYTE3 0x91
+#define FSP_GUID_BYTE4 0x84
+#define FSP_GUID_BYTE5 0x22
+#define FSP_GUID_BYTE6 0x34
+#define FSP_GUID_BYTE7 0x47
+#define FSP_GUID_BYTE8 FSP_GUID_DATA4_0
+#define FSP_GUID_BYTE9 FSP_GUID_DATA4_1
+#define FSP_GUID_BYTE10FSP_GUID_DATA4_2
+#define FSP_GUID_BYTE11FSP_GUID_DATA4_3
+#define