Changeset 99404 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/X64
- Timestamp:
- Apr 14, 2023 3:17:44 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 156854
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-145445 /vendor/edk2/current 103735-103757,103769-103776,129194-156846
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/X64/Nasm.inc
r89983 r99404 1 1 ;------------------------------------------------------------------------------ 2 2 ; 3 ; Copyright (c) 2019 - 202 1, Intel Corporation. All rights reserved.<BR>3 ; Copyright (c) 2019 - 2022, Intel Corporation. All rights reserved.<BR> 4 4 ; SPDX-License-Identifier: BSD-2-Clause-Patent 5 5 ; … … 10 10 ;------------------------------------------------------------------------------ 11 11 12 %macro SAVEPREVSSP 0 13 DB 0xF3, 0x0F, 0x01, 0xEA 12 ; 13 ; Macro for the PVALIDATE instruction, defined in AMD APM volume 3. 14 ; NASM feature request URL: https://bugzilla.nasm.us/show_bug.cgi?id=3392753 15 ; 16 %macro PVALIDATE 0 17 DB 0xF2, 0x0F, 0x01, 0xFF 14 18 %endmacro 15 19 16 %macro CLRSSBSY_RAX 0 17 DB 0xF3, 0x0F, 0xAE, 0x30 18 %endmacro 19 20 %macro RSTORSSP_RAX 0 21 DB 0xF3, 0x0F, 0x01, 0x28 22 %endmacro 23 24 %macro SETSSBSY 0 25 DB 0xF3, 0x0F, 0x01, 0xE8 26 %endmacro 27 28 %macro READSSP_RAX 0 29 DB 0xF3, 0x48, 0x0F, 0x1E, 0xC8 30 %endmacro 31 32 %macro INCSSP_RAX 0 33 DB 0xF3, 0x48, 0x0F, 0xAE, 0xE8 20 ; 21 ; Macro for the RMPADJUST instruction, defined in AMD APM volume 3. 22 ; NASM feature request URL: https://bugzilla.nasm.us/show_bug.cgi?id=3392754 23 ; 24 %macro RMPADJUST 0 25 DB 0xF3, 0x0F, 0x01, 0xFE 34 26 %endmacro 35 27 -
trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/X64/ProcessorBind.h
r85718 r99404 18 18 // Make sure we are using the correct packing rules per EFI specification 19 19 // 20 #if !defined (__GNUC__)21 #pragma pack()22 #endif 23 24 #if defined (__GNUC__) && defined(__pic__) && !defined(USING_LTO) && !defined(__APPLE__)20 #if !defined (__GNUC__) 21 #pragma pack() 22 #endif 23 24 #if defined (__GNUC__) && defined (__pic__) && !defined (USING_LTO) && !defined (__APPLE__) 25 25 // 26 26 // Mark all symbol declarations and references as hidden, meaning they will … … 33 33 // pragma in that case (and doing so will cause other issues). 34 34 // 35 #pragma GCC visibility push (hidden)36 #endif 37 38 #if defined (__INTEL_COMPILER)35 #pragma GCC visibility push (hidden) 36 #endif 37 38 #if defined (__INTEL_COMPILER) 39 39 // 40 40 // Disable ICC's remark #869: "Parameter" was never referenced warning. 41 41 // This is legal ANSI C code so we disable the remark that is turned on with -Wall 42 42 // 43 #pragma warning ( disable : 869 )43 #pragma warning ( disable : 869 ) 44 44 45 45 // … … 47 47 // This is legal ANSI C code so we disable the remark that is turned on with /W4 48 48 // 49 #pragma warning ( disable : 1418 )49 #pragma warning ( disable : 1418 ) 50 50 51 51 // … … 53 53 // This is legal ANSI C code so we disable the remark that is turned on with /W4 54 54 // 55 #pragma warning ( disable : 1419 )55 #pragma warning ( disable : 1419 ) 56 56 57 57 // … … 59 59 // This is legal ANSI C code so we disable the remark that is turned on with /W4 60 60 // 61 #pragma warning ( disable : 593 ) 62 63 #endif 64 65 66 #if defined(_MSC_EXTENSIONS) 61 #pragma warning ( disable : 593 ) 62 63 #endif 64 65 #if defined (_MSC_EXTENSIONS) 67 66 68 67 // … … 74 73 // Disabling bitfield type checking warnings. 75 74 // 76 #pragma warning ( disable : 4214 )75 #pragma warning ( disable : 4214 ) 77 76 78 77 // 79 78 // Disabling the unreferenced formal parameter warnings. 80 79 // 81 #pragma warning ( disable : 4100 )80 #pragma warning ( disable : 4100 ) 82 81 83 82 // … … 85 84 // to a constant string. 86 85 // 87 #pragma warning ( disable : 4057 )86 #pragma warning ( disable : 4057 ) 88 87 89 88 // 90 89 // ASSERT(FALSE) or while (TRUE) are legal constructs so suppress this warning 91 90 // 92 #pragma warning ( disable : 4127 )91 #pragma warning ( disable : 4127 ) 93 92 94 93 // 95 94 // This warning is caused by functions defined but not used. For precompiled header only. 96 95 // 97 #pragma warning ( disable : 4505 )96 #pragma warning ( disable : 4505 ) 98 97 99 98 // 100 99 // This warning is caused by empty (after preprocessing) source file. For precompiled header only. 101 100 // 102 #pragma warning ( disable : 4206 )103 104 #if defined(_MSC_VER) && _MSC_VER >= 1800101 #pragma warning ( disable : 4206 ) 102 103 #if defined (_MSC_VER) && _MSC_VER >= 1800 105 104 106 105 // … … 112 111 // positive issues in VS2013 and VS2015 build 113 112 // 114 #pragma warning ( disable : 4701 )113 #pragma warning ( disable : 4701 ) 115 114 116 115 // … … 118 117 // false positive issues in VS2013 and VS2015 build 119 118 // 120 #pragma warning ( disable : 4703 ) 121 122 #endif 123 124 #endif 125 126 127 #if defined(_MSC_EXTENSIONS) 128 // 129 // use Microsoft C compiler dependent integer width types 130 // 131 132 /// 133 /// 8-byte unsigned value 134 /// 135 typedef unsigned __int64 UINT64; 136 /// 137 /// 8-byte signed value 138 /// 139 typedef __int64 INT64; 140 /// 141 /// 4-byte unsigned value 142 /// 143 typedef unsigned __int32 UINT32; 144 /// 145 /// 4-byte signed value 146 /// 147 typedef __int32 INT32; 148 /// 149 /// 2-byte unsigned value 150 /// 151 typedef unsigned short UINT16; 152 /// 153 /// 2-byte Character. Unless otherwise specified all strings are stored in the 154 /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards. 155 /// 156 typedef unsigned short CHAR16; 157 /// 158 /// 2-byte signed value 159 /// 160 typedef short INT16; 161 /// 162 /// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other 163 /// values are undefined. 164 /// 165 typedef unsigned char BOOLEAN; 166 /// 167 /// 1-byte unsigned value 168 /// 169 typedef unsigned char UINT8; 170 /// 171 /// 1-byte Character 172 /// 173 typedef char CHAR8; 174 /// 175 /// 1-byte signed value 176 /// 177 typedef signed char INT8; 119 #pragma warning ( disable : 4703 ) 120 121 #endif 122 123 #endif 124 125 #if defined (_MSC_EXTENSIONS) 126 // 127 // use Microsoft C compiler dependent integer width types 128 // 129 130 /// 131 /// 8-byte unsigned value 132 /// 133 typedef unsigned __int64 UINT64; 134 /// 135 /// 8-byte signed value 136 /// 137 typedef __int64 INT64; 138 /// 139 /// 4-byte unsigned value 140 /// 141 typedef unsigned __int32 UINT32; 142 /// 143 /// 4-byte signed value 144 /// 145 typedef __int32 INT32; 146 /// 147 /// 2-byte unsigned value 148 /// 149 typedef unsigned short UINT16; 150 /// 151 /// 2-byte Character. Unless otherwise specified all strings are stored in the 152 /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards. 153 /// 154 typedef unsigned short CHAR16; 155 /// 156 /// 2-byte signed value 157 /// 158 typedef short INT16; 159 /// 160 /// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other 161 /// values are undefined. 162 /// 163 typedef unsigned char BOOLEAN; 164 /// 165 /// 1-byte unsigned value 166 /// 167 typedef unsigned char UINT8; 168 /// 169 /// 1-byte Character 170 /// 171 typedef char CHAR8; 172 /// 173 /// 1-byte signed value 174 /// 175 typedef signed char INT8; 178 176 #else 179 180 181 182 typedef unsigned long longUINT64;183 184 185 186 typedef long longINT64;187 188 189 190 typedef unsigned intUINT32;191 192 193 194 typedef intINT32;195 196 197 198 typedef unsigned shortUINT16;199 200 201 202 203 typedef unsigned shortCHAR16;204 205 206 207 typedef shortINT16;208 209 210 211 212 typedef unsigned charBOOLEAN;213 214 215 216 typedef unsigned charUINT8;217 218 219 220 typedef charCHAR8;221 222 223 224 typedef signed charINT8;177 /// 178 /// 8-byte unsigned value 179 /// 180 typedef unsigned long long UINT64; 181 /// 182 /// 8-byte signed value 183 /// 184 typedef long long INT64; 185 /// 186 /// 4-byte unsigned value 187 /// 188 typedef unsigned int UINT32; 189 /// 190 /// 4-byte signed value 191 /// 192 typedef int INT32; 193 /// 194 /// 2-byte unsigned value 195 /// 196 typedef unsigned short UINT16; 197 /// 198 /// 2-byte Character. Unless otherwise specified all strings are stored in the 199 /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards. 200 /// 201 typedef unsigned short CHAR16; 202 /// 203 /// 2-byte signed value 204 /// 205 typedef short INT16; 206 /// 207 /// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other 208 /// values are undefined. 209 /// 210 typedef unsigned char BOOLEAN; 211 /// 212 /// 1-byte unsigned value 213 /// 214 typedef unsigned char UINT8; 215 /// 216 /// 1-byte Character 217 /// 218 typedef char CHAR8; 219 /// 220 /// 1-byte signed value 221 /// 222 typedef signed char INT8; 225 223 #endif 226 224 … … 229 227 /// 8 bytes on supported 64-bit processor instructions) 230 228 /// 231 typedef UINT64 229 typedef UINT64 UINTN; 232 230 /// 233 231 /// Signed value of native width. (4 bytes on supported 32-bit processor instructions, 234 232 /// 8 bytes on supported 64-bit processor instructions) 235 233 /// 236 typedef INT64 INTN; 237 234 typedef INT64 INTN; 238 235 239 236 // … … 244 241 /// A value of native width with the highest bit set. 245 242 /// 246 #define MAX_BIT 243 #define MAX_BIT 0x8000000000000000ULL 247 244 /// 248 245 /// A value of native width with the two highest bits set. … … 253 250 /// Maximum legal x64 address 254 251 /// 255 #define MAX_ADDRESS 252 #define MAX_ADDRESS 0xFFFFFFFFFFFFFFFFULL 256 253 257 254 /// 258 255 /// Maximum usable address at boot time 259 256 /// 260 #define MAX_ALLOC_ADDRESS 257 #define MAX_ALLOC_ADDRESS MAX_ADDRESS 261 258 262 259 /// … … 269 266 /// Minimum legal x64 INTN value. 270 267 /// 271 #define MIN_INTN 268 #define MIN_INTN (((INTN)-9223372036854775807LL) - 1) 272 269 273 270 /// 274 271 /// The stack alignment required for x64 275 272 /// 276 #define CPU_STACK_ALIGNMENT 273 #define CPU_STACK_ALIGNMENT 16 277 274 278 275 /// 279 276 /// Page allocation granularity for x64 280 277 /// 281 #define DEFAULT_PAGE_ALLOCATION_GRANULARITY 282 #define RUNTIME_PAGE_ALLOCATION_GRANULARITY 278 #define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000) 279 #define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x1000) 283 280 284 281 // … … 288 285 // 289 286 #ifdef EFIAPI 290 291 292 293 #elif defined (_MSC_EXTENSIONS)294 295 296 297 #define EFIAPI__cdecl298 #elif defined (__GNUC__)299 300 301 302 303 304 305 306 307 287 /// 288 /// If EFIAPI is already defined, then we use that definition. 289 /// 290 #elif defined (_MSC_EXTENSIONS) 291 /// 292 /// Microsoft* compiler specific method for EFIAPI calling convention. 293 /// 294 #define EFIAPI __cdecl 295 #elif defined (__GNUC__) 296 /// 297 /// Define the standard calling convention regardless of optimization level. 298 /// The GCC support assumes a GCC compiler that supports the EFI ABI. The EFI 299 /// ABI is much closer to the x64 Microsoft* ABI than standard x64 (x86-64) 300 /// GCC ABI. Thus a standard x64 (x86-64) GCC compiler can not be used for 301 /// x64. Warning the assembly code in the MDE x64 does not follow the correct 302 /// ABI for the standard x64 (x86-64) GCC. 303 /// 304 #define EFIAPI 308 305 #else 309 310 311 312 313 314 #endif 315 316 #if defined (__GNUC__) || defined(__clang__)317 318 319 320 321 #define ASM_GLOBAL.globl306 /// 307 /// The default for a non Microsoft* or GCC compiler is to assume the EFI ABI 308 /// is the standard. 309 /// 310 #define EFIAPI 311 #endif 312 313 #if defined (__GNUC__) || defined (__clang__) 314 /// 315 /// For GNU assembly code, .global or .globl can declare global symbols. 316 /// Define this macro to unify the usage. 317 /// 318 #define ASM_GLOBAL .globl 322 319 #endif 323 320 … … 332 329 333 330 **/ 334 #define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)331 #define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer) 335 332 336 333 #ifndef __USER_LABEL_PREFIX__ … … 339 336 340 337 #endif 341
Note:
See TracChangeset
for help on using the changeset viewer.