Aaron Durbin | 8a414a0 | 2015-10-01 17:02:45 -0500 | [diff] [blame] | 1 | /** @file |
| 2 | Processor or Compiler specific defines and types for IA-32 architecture. |
| 3 | |
| 4 | Copyright 2015 Google Inc. |
| 5 | Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR> |
| 6 | This program and the accompanying materials are licensed and made available under |
| 7 | the terms and conditions of the BSD License that accompanies this distribution. |
| 8 | The full text of the license may be found at |
| 9 | http://opensource.org/licenses/bsd-license.php. |
| 10 | |
| 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. |
| 13 | |
| 14 | **/ |
| 15 | |
| 16 | #ifndef __PROCESSOR_BIND_H__ |
| 17 | #define __PROCESSOR_BIND_H__ |
| 18 | |
| 19 | |
| 20 | /* |
| 21 | * This to mimic a processor binding for EDK. This is just to provide the |
| 22 | * processor types. |
| 23 | */ |
| 24 | #include <inttypes.h> |
| 25 | |
| 26 | /// |
| 27 | /// Define the processor type so other code can make processor based choices. |
| 28 | /// |
| 29 | #define MDE_CPU_IA32 |
| 30 | |
| 31 | /// |
| 32 | /// 8-byte unsigned value. |
| 33 | /// |
| 34 | typedef uint64_t UINT64; |
| 35 | /// |
| 36 | /// 8-byte signed value. |
| 37 | /// |
| 38 | typedef int64_t INT64; |
| 39 | /// |
| 40 | /// 4-byte unsigned value. |
| 41 | /// |
| 42 | typedef uint32_t UINT32; |
| 43 | /// |
| 44 | /// 4-byte signed value. |
| 45 | /// |
| 46 | typedef int32_t INT32; |
| 47 | /// |
| 48 | /// 2-byte unsigned value. |
| 49 | /// |
| 50 | typedef uint16_t UINT16; |
| 51 | /// |
| 52 | /// 2-byte Character. Unless otherwise specified all strings are stored in the |
| 53 | /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards. |
| 54 | /// |
| 55 | typedef uint16_t CHAR16; |
| 56 | /// |
| 57 | /// 2-byte signed value. |
| 58 | /// |
| 59 | typedef int16_t INT16; |
| 60 | /// |
| 61 | /// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other |
| 62 | /// values are undefined. |
| 63 | /// |
| 64 | typedef unsigned char BOOLEAN; |
| 65 | /// |
| 66 | /// 1-byte unsigned value. |
| 67 | /// |
| 68 | typedef unsigned char UINT8; |
| 69 | /// |
| 70 | /// 1-byte Character |
| 71 | /// |
| 72 | typedef char CHAR8; |
| 73 | /// |
| 74 | /// 1-byte signed value |
| 75 | /// |
| 76 | typedef signed char INT8; |
| 77 | |
| 78 | /// |
| 79 | /// Unsigned value of native width. (4 bytes on supported 32-bit processor instructions; |
| 80 | /// 8 bytes on supported 64-bit processor instructions.) |
| 81 | /// |
| 82 | typedef uintptr_t UINTN; |
| 83 | /// |
| 84 | /// Signed value of native width. (4 bytes on supported 32-bit processor instructions; |
| 85 | /// 8 bytes on supported 64-bit processor instructions.) |
| 86 | /// |
| 87 | typedef intptr_t INTN; |
| 88 | |
| 89 | // |
| 90 | // Processor specific defines |
| 91 | // |
| 92 | |
| 93 | /// |
| 94 | /// A value of native width with the highest bit set. |
| 95 | // Not needed for non-runtime, but it shouldb |
| 96 | /// |
| 97 | //#define MAX_BIT 0x80000000 |
| 98 | |
| 99 | // No API requirements as this is not for runtime. |
| 100 | #define EFIAPI |
| 101 | |
| 102 | #endif |