xref: /aosp_15_r20/external/coreboot/src/vendorcode/intel/edk2/uefi_2.4/uefi_types.h (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 /**
2 
3 Copyright (C) 2013, Intel Corporation
4 
5 Redistribution and use in source and binary forms, with or without modification,
6 are permitted provided that the following conditions are met:
7 
8 * Redistributions of source code must retain the above copyright notice, this
9   list of conditions and the following disclaimer.
10 * Redistributions in binary form must reproduce the above copyright notice, this
11   list of conditions and the following disclaimer in the documentation and/or
12   other materials provided with the distribution.
13 * Neither the name of Intel Corporation nor the names of its contributors may
14   be used to endorse or promote products derived from this software without
15   specific prior written permission.
16 
17   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27   THE POSSIBILITY OF SUCH DAMAGE.
28 
29 **/
30 
31 #ifndef __UEFI_TYPES_H__
32 #define __UEFI_TYPES_H__
33 
34 //
35 // Set the UEFI types and attributes
36 //
37 #include <stdlib.h>
38 #include <Uefi/UefiBaseType.h>
39 #include <Pi/PiBootMode.h>
40 #include <Pi/PiFirmwareFile.h>
41 #include <Pi/PiFirmwareVolume.h>
42 #include <Uefi/UefiMultiPhase.h>
43 #include <Pi/PiHob.h>
44 #include <Protocol/GraphicsOutput.h>
45 #include <Library/HobLib.h>
46 #include <Guid/FirmwareFileSystem2.h>
47 #include <IndustryStandard/PeImage.h>
48 
49 ///
50 /// For GNU assembly code, .global or .globl can declare global symbols.
51 /// Define this macro to unify the usage.
52 ///
53 #if defined(ASM_GLOBAL)
54 #undef ASM_GLOBAL
55 #endif
56 #define ASM_GLOBAL .global
57 
58 //
59 // Define the ASSERT support
60 //
debug_dead_loop(void)61 static inline void debug_dead_loop(void)
62 {
63 	for (;;)
64 		;
65 }
66 
67 #define _ASSERT(expression)  debug_dead_loop()
68 #ifndef ASSERT
69 #define ASSERT(expression)			\
70 	do {					\
71 		if (!(expression)) {		\
72 			_ASSERT(expression);	\
73 		}				\
74 	} while (FALSE)
75 #endif
76 
77 //
78 // Contents of the PEI_GRAPHICS_INFO_HOB
79 //
80 typedef struct {
81 	EFI_PHYSICAL_ADDRESS			FrameBufferBase;
82 	UINT32					FrameBufferSize;
83 	EFI_GRAPHICS_OUTPUT_MODE_INFORMATION	GraphicsMode;
84 } EFI_PEI_GRAPHICS_INFO_HOB;
85 
86 //
87 // Define the known GUIDs
88 //
89 #define EFI_PEI_GRAPHICS_INFO_HOB_GUID				\
90 {								\
91 	0x39f62cce, 0x6825, 0x4669,				\
92 	{ 0xbb, 0x56, 0x54, 0x1a, 0xba, 0x75, 0x3a, 0x07 }	\
93 }
94 
95 #define FSP_BOOTLOADER_TEMP_MEMORY_HOB_GUID			\
96 {								\
97 	0xbbcff46c, 0xc8d3, 0x4113,				\
98 	{0x89, 0x85, 0xb9, 0xd4, 0xf3, 0xb3, 0xf6, 0x4e}	\
99 }
100 
101 #define FSP_BOOTLOADER_TOLUM_HOB_GUID				\
102 {								\
103 	0x73ff4f56, 0xaa8e, 0x4451,				\
104 	{ 0xb3, 0x16, 0x36, 0x35, 0x36, 0x67, 0xad, 0x44 }	\
105 }
106 
107 #define FSP_INFO_HEADER_GUID					\
108 {								\
109 	0x912740BE, 0x2284, 0x4734,				\
110 	{0xB9, 0x71, 0x84, 0xB0, 0x27, 0x35, 0x3F, 0x0C}	\
111 }
112 
113 #define FSP_NON_VOLATILE_STORAGE_HOB_GUID			\
114 {								\
115 	0x721acf02, 0x4d77, 0x4c2a,				\
116 	{0xb3, 0xdc, 0x27, 0x0b, 0x7b, 0xa9, 0xe4, 0xb0}	\
117 }
118 
119 #define FSP_RESERVED_MEMORY_RESOURCE_HOB_GUID			\
120 {								\
121 	0x69a79759, 0x1373, 0x4367,				\
122 	{ 0xa6, 0xc4, 0xc7, 0xf5, 0x9e, 0xfd, 0x98, 0x6e }	\
123 }
124 
125 #define FSP_SMBIOS_MEMORY_INFO_GUID				\
126 {								\
127 	0x01a1108c, 0x9dee, 0x4984,				\
128 	{ 0x88, 0xc3, 0xee, 0xe8, 0xc4, 0x9e, 0xfb, 0x89 }	\
129 }
130 
131 #endif	/* __UEFI_TYPES_H__*/
132