iPXE
ProcessorBind.h
Go to the documentation of this file.
1 #ifndef _IPXE_EFI_PROCESSOR_BIND_H
2 #define _IPXE_EFI_PROCESSOR_BIND_H
3 
4 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
5 
6 /*
7  * EFI header files rely on having the CPU architecture directory
8  * present in the search path in order to pick up ProcessorBind.h. We
9  * use this header file as a quick indirection layer.
10  * - mcb30
11  */
12 
13 #ifdef EFI_HOSTONLY
14 
15 /*
16  * We cannot rely on the EDK2 ProcessorBind.h headers when compiling a
17  * binary for execution on the build host itself, since the host's CPU
18  * architecture may not even be supported by EDK2.
19  */
20 
21 /* Define the basic integer types in terms of the host's <stdint.h> */
22 #include <stdint.h>
23 typedef int8_t INT8;
24 typedef int16_t INT16;
25 typedef int32_t INT32;
26 typedef int64_t INT64;
27 typedef uint8_t UINT8;
28 typedef long INTN;
29 typedef uint16_t UINT16;
30 typedef uint32_t UINT32;
31 typedef uint64_t UINT64;
32 typedef unsigned long UINTN;
33 typedef int8_t CHAR8;
34 typedef int16_t CHAR16;
35 typedef uint8_t BOOLEAN;
36 
37 /* Define EFIAPI as whatever API the host uses by default */
38 #define EFIAPI
39 
40 /* Define an architecture-neutral MDE_CPU macro to prevent build errors */
41 #define MDE_CPU_EBC
42 
43 /* Define MAX_BIT in terms of UINTN */
44 #define MAX_BIT ( ( ( UINTN ) 1U ) << ( ( 8 * sizeof ( UINTN ) ) - 1 ) )
45 
46 #else /* EFI_HOSTONLY */
47 
48 #ifdef __i386__
50 #endif
51 
52 #ifdef __x86_64__
54 #endif
55 
56 #ifdef __arm__
58 #endif
59 
60 #ifdef __aarch64__
62 #endif
63 
64 #ifdef __loongarch__
66 #endif
67 
68 #endif /* EFI_HOSTONLY */
69 
70 #endif /* _IPXE_EFI_PROCESSOR_BIND_H */
int INT32
Definition: ProcessorBind.h:99
unsigned short uint16_t
Definition: stdint.h:11
unsigned char BOOLEAN
INT64 INTN
Signed value of native width.
unsigned int UINT32
Definition: ProcessorBind.h:98
unsigned long long uint64_t
Definition: stdint.h:13
unsigned short CHAR16
unsigned char UINT8
Processor or Compiler specific defines and types for ARM.
long long INT64
Definition: ProcessorBind.h:97
Processor or Compiler specific defines and types x64 (Intel 64, AMD64).
signed long long int64_t
Definition: stdint.h:18
Processor or Compiler specific defines and types for LoongArch.
signed char int8_t
Definition: stdint.h:15
short INT16
unsigned short UINT16
unsigned char uint8_t
Definition: stdint.h:10
UINT64 UINTN
Unsigned value of native width.
unsigned int uint32_t
Definition: stdint.h:12
unsigned long long UINT64
Definition: ProcessorBind.h:96
FILE_LICENCE(BSD2_PATENT)
signed int int32_t
Definition: stdint.h:17
char CHAR8
Processor or Compiler specific defines and types for AArch64.
Processor or Compiler specific defines and types for IA-32 architecture.
signed short int16_t
Definition: stdint.h:16
signed char INT8