TianoCore EDK2 master
Loading...
Searching...
No Matches
ProcessorBind.h
Go to the documentation of this file.
1
10#ifndef PROCESSOR_BIND_H__
11#define PROCESSOR_BIND_H__
12
16#define MDE_CPU_RISCV64
17
18//
19// Make sure we are using the correct packing rules per EFI specification
20//
21#if !defined (__GNUC__)
22 #pragma pack()
23#endif
24
28typedef unsigned long long UINT64 __attribute__ ((aligned (8)));
32typedef long long INT64 __attribute__ ((aligned (8)));
36typedef unsigned int UINT32 __attribute__ ((aligned (4)));
40typedef int INT32 __attribute__ ((aligned (4)));
44typedef unsigned short UINT16 __attribute__ ((aligned (2)));
49typedef unsigned short CHAR16 __attribute__ ((aligned (2)));
53typedef short INT16 __attribute__ ((aligned (2)));
58typedef unsigned char BOOLEAN;
62typedef unsigned char UINT8;
66typedef char CHAR8;
70typedef signed char INT8;
75typedef UINT64 UINTN __attribute__ ((aligned (8)));
80typedef INT64 INTN __attribute__ ((aligned (8)));
81
82//
83// Processor specific defines
84//
85
89#define MAX_BIT 0x8000000000000000ULL
93#define MAX_2_BITS 0xC000000000000000ULL
94
98#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFFULL
99
103#define MAX_ALLOC_ADDRESS 0xFFFFFFFFFFFFULL
104
108#define MAX_INTN ((INTN)0x7FFFFFFFFFFFFFFFULL)
109#define MAX_UINTN ((UINTN)0xFFFFFFFFFFFFFFFFULL)
110
114#define CPU_STACK_ALIGNMENT 16
115
119#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000)
120#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x1000)
121
122//
123// Modifier to ensure that all protocol member functions and EFI intrinsics
124// use the correct C calling convention. All protocol member functions and
125// EFI intrinsics are required to modify their member functions with EFIAPI.
126//
127#ifdef EFIAPI
131#elif defined (__GNUC__)
140#define EFIAPI
141#else
146#define EFIAPI
147#endif
148
149#if defined (__GNUC__)
154#define ASM_GLOBAL .globl
155#endif
156
167#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
168
169#ifndef __USER_LABEL_PREFIX__
170#define __USER_LABEL_PREFIX__
171#endif
172
173#endif
UINT64 UINTN
INT64 INTN
unsigned long long UINT64 __attribute__((aligned(8)))
Definition: ProcessorBind.h:28