XenevaOS
Loading...
Searching...
No Matches
ProcessorBind.h
Go to the documentation of this file.
1
15#ifndef __PROCESSOR_BIND_H__
16#define __PROCESSOR_BIND_H__
17
21#define MDE_CPU_IA32
22
23//
24// Make sure we are using the correct packing rules per EFI specification
25//
26#if !defined(__GNUC__)
27#pragma pack()
28#endif
29
30#if defined(__INTEL_COMPILER)
31//
32// Disable ICC's remark #869: "Parameter" was never referenced warning.
33// This is legal ANSI C code so we disable the remark that is turned on with -Wall
34//
35#pragma warning ( disable : 869 )
36
37//
38// Disable ICC's remark #1418: external function definition with no prior declaration.
39// This is legal ANSI C code so we disable the remark that is turned on with /W4
40//
41#pragma warning ( disable : 1418 )
42
43//
44// Disable ICC's remark #1419: external declaration in primary source file
45// This is legal ANSI C code so we disable the remark that is turned on with /W4
46//
47#pragma warning ( disable : 1419 )
48
49//
50// Disable ICC's remark #593: "Variable" was set but never used.
51// This is legal ANSI C code so we disable the remark that is turned on with /W4
52//
53#pragma warning ( disable : 593 )
54
55#endif
56
57
58#if defined(_MSC_EXTENSIONS)
59
60//
61// Disable warning that make it impossible to compile at /W4
62// This only works for Microsoft* tools
63//
64
65//
66// Disabling bitfield type checking warnings.
67//
68#pragma warning ( disable : 4214 )
69
70//
71// Disabling the unreferenced formal parameter warnings.
72//
73#pragma warning ( disable : 4100 )
74
75//
76// Disable slightly different base types warning as CHAR8 * can not be set
77// to a constant string.
78//
79#pragma warning ( disable : 4057 )
80
81//
82// ASSERT(FALSE) or while (TRUE) are legal constructs so suppress this warning
83//
84#pragma warning ( disable : 4127 )
85
86//
87// This warning is caused by functions defined but not used. For precompiled header only.
88//
89#pragma warning ( disable : 4505 )
90
91//
92// This warning is caused by empty (after preprocessing) source file. For precompiled header only.
93//
94#pragma warning ( disable : 4206 )
95
96#if _MSC_VER == 1800 || _MSC_VER == 1900 || _MSC_VER >= 1910
97
98//
99// Disable these warnings for VS2013.
100//
101
102//
103// This warning is for potentially uninitialized local variable, and it may cause false
104// positive issues in VS2013 and VS2015 build
105//
106#pragma warning ( disable : 4701 )
107
108//
109// This warning is for potentially uninitialized local pointer variable, and it may cause
110// false positive issues in VS2013 and VS2015 build
111//
112#pragma warning ( disable : 4703 )
113
114#endif
115
116#endif
117
118
119#if defined(_MSC_EXTENSIONS)
120
121 //
122 // use Microsoft C compiler dependent integer width types
123 //
124
128 typedef unsigned __int64 UINT64;
132 typedef __int64 INT64;
136 typedef unsigned __int32 UINT32;
140 typedef __int32 INT32;
144 typedef unsigned short UINT16;
149 typedef unsigned short CHAR16;
153 typedef short INT16;
158 typedef unsigned char BOOLEAN;
162 typedef unsigned char UINT8;
166 typedef char CHAR8;
170 typedef signed char INT8;
171#else
175 typedef unsigned long long UINT64;
179 typedef long long INT64;
183 typedef unsigned int UINT32;
187 typedef int INT32;
191 typedef unsigned short UINT16;
196 typedef unsigned short CHAR16;
200 typedef short INT16;
205 typedef unsigned char BOOLEAN;
209 typedef unsigned char UINT8;
213 typedef char CHAR8;
217 typedef signed char INT8;
218#endif
219
224typedef UINT32 UINTN;
229typedef INT32 INTN;
230
231//
232// Processor specific defines
233//
234
238#define MAX_BIT 0x80000000
242#define MAX_2_BITS 0xC0000000
243
247#define MAX_ADDRESS 0xFFFFFFFF
248
252#define MAX_INTN ((INTN)0x7FFFFFFF)
253#define MAX_UINTN ((UINTN)0xFFFFFFFF)
254
258#define MIN_INTN (((INTN)-2147483647) - 1)
259
263#define CPU_STACK_ALIGNMENT sizeof(UINTN)
264
268#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000)
269#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x1000)
270
271//
272// Modifier to ensure that all protocol member functions and EFI intrinsics
273// use the correct C calling convention. All protocol member functions and
274// EFI intrinsics are required to modify their member functions with EFIAPI.
275//
276#ifdef EFIAPI
280#elif defined(_MSC_EXTENSIONS)
284 #define EFIAPI __cdecl
285#elif defined(__GNUC__)
289 #define EFIAPI __attribute__((cdecl))
290#else
295 #define EFIAPI
296#endif
297
298#if defined(__GNUC__)
303 #define ASM_GLOBAL .globl
304#endif
305
316#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
317
318#ifndef __USER_LABEL_PREFIX__
319#define __USER_LABEL_PREFIX__ _
320#endif
321
322#endif
323
unsigned short UINT16
Definition ProcessorBind.h:104
unsigned char BOOLEAN
Definition ProcessorBind.h:107
char CHAR8
Definition ProcessorBind.h:109
UINT64 UINTN
Definition ProcessorBind.h:118
unsigned long long UINT64
Definition ProcessorBind.h:100
short INT16
Definition ProcessorBind.h:106
int INT32
Definition ProcessorBind.h:103
long long INT64
Definition ProcessorBind.h:101
unsigned short CHAR16
Definition ProcessorBind.h:105
signed char INT8
Definition ProcessorBind.h:110
INT64 INTN
Definition ProcessorBind.h:124
unsigned char UINT8
Definition ProcessorBind.h:108
unsigned int UINT32
Definition ProcessorBind.h:102