Patrick Georgi | 55189c9 | 2020-05-10 20:09:31 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: BSD-2-Clause */ |
Aaron Durbin | 8a414a0 | 2015-10-01 17:02:45 -0500 | [diff] [blame] | 2 | /** @file |
Patrick Georgi | ea063cb | 2020-05-08 19:28:13 +0200 | [diff] [blame] | 3 | * Processor or Compiler specific defines and types for IA-32 architecture. |
| 4 | */ |
Aaron Durbin | 8a414a0 | 2015-10-01 17:02:45 -0500 | [diff] [blame] | 5 | |
Aaron Durbin | 8a414a0 | 2015-10-01 17:02:45 -0500 | [diff] [blame] | 6 | #ifndef __PROCESSOR_BIND_H__ |
| 7 | #define __PROCESSOR_BIND_H__ |
| 8 | |
| 9 | |
| 10 | /* |
| 11 | * This to mimic a processor binding for EDK. This is just to provide the |
| 12 | * processor types. |
| 13 | */ |
| 14 | #include <inttypes.h> |
| 15 | |
| 16 | /// |
| 17 | /// Define the processor type so other code can make processor based choices. |
| 18 | /// |
| 19 | #define MDE_CPU_IA32 |
| 20 | |
| 21 | /// |
| 22 | /// 8-byte unsigned value. |
| 23 | /// |
| 24 | typedef uint64_t UINT64; |
| 25 | /// |
| 26 | /// 8-byte signed value. |
| 27 | /// |
| 28 | typedef int64_t INT64; |
| 29 | /// |
| 30 | /// 4-byte unsigned value. |
| 31 | /// |
| 32 | typedef uint32_t UINT32; |
| 33 | /// |
| 34 | /// 4-byte signed value. |
| 35 | /// |
| 36 | typedef int32_t INT32; |
| 37 | /// |
| 38 | /// 2-byte unsigned value. |
| 39 | /// |
| 40 | typedef uint16_t UINT16; |
| 41 | /// |
| 42 | /// 2-byte Character. Unless otherwise specified all strings are stored in the |
| 43 | /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards. |
| 44 | /// |
| 45 | typedef uint16_t CHAR16; |
| 46 | /// |
| 47 | /// 2-byte signed value. |
| 48 | /// |
| 49 | typedef int16_t INT16; |
| 50 | /// |
| 51 | /// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other |
| 52 | /// values are undefined. |
| 53 | /// |
| 54 | typedef unsigned char BOOLEAN; |
| 55 | /// |
| 56 | /// 1-byte unsigned value. |
| 57 | /// |
| 58 | typedef unsigned char UINT8; |
| 59 | /// |
| 60 | /// 1-byte Character |
| 61 | /// |
| 62 | typedef char CHAR8; |
| 63 | /// |
| 64 | /// 1-byte signed value |
| 65 | /// |
| 66 | typedef signed char INT8; |
| 67 | |
| 68 | /// |
| 69 | /// Unsigned value of native width. (4 bytes on supported 32-bit processor instructions; |
| 70 | /// 8 bytes on supported 64-bit processor instructions.) |
| 71 | /// |
| 72 | typedef uintptr_t UINTN; |
| 73 | /// |
| 74 | /// Signed value of native width. (4 bytes on supported 32-bit processor instructions; |
| 75 | /// 8 bytes on supported 64-bit processor instructions.) |
| 76 | /// |
| 77 | typedef intptr_t INTN; |
| 78 | |
| 79 | // |
| 80 | // Processor specific defines |
| 81 | // |
| 82 | |
| 83 | /// |
| 84 | /// A value of native width with the highest bit set. |
| 85 | // Not needed for non-runtime, but it shouldb |
| 86 | /// |
| 87 | //#define MAX_BIT 0x80000000 |
| 88 | |
| 89 | // No API requirements as this is not for runtime. |
| 90 | #define EFIAPI |
| 91 | |
| 92 | #endif |