blob: aa7f40795df953316de005cd667b94d8b7813d60 [file] [log] [blame]
Patrick Georgi55189c92020-05-10 20:09:31 +02001/* SPDX-License-Identifier: BSD-2-Clause */
Aaron Durbin8a414a02015-10-01 17:02:45 -05002/** @file
Patrick Georgiea063cb2020-05-08 19:28:13 +02003 * Processor or Compiler specific defines and types for IA-32 architecture.
4 */
Aaron Durbin8a414a02015-10-01 17:02:45 -05005
Aaron Durbin8a414a02015-10-01 17:02:45 -05006#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///
24typedef uint64_t UINT64;
25///
26/// 8-byte signed value.
27///
28typedef int64_t INT64;
29///
30/// 4-byte unsigned value.
31///
32typedef uint32_t UINT32;
33///
34/// 4-byte signed value.
35///
36typedef int32_t INT32;
37///
38/// 2-byte unsigned value.
39///
40typedef 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///
45typedef uint16_t CHAR16;
46///
47/// 2-byte signed value.
48///
49typedef 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///
54typedef unsigned char BOOLEAN;
55///
56/// 1-byte unsigned value.
57///
58typedef unsigned char UINT8;
59///
60/// 1-byte Character
61///
62typedef char CHAR8;
63///
64/// 1-byte signed value
65///
66typedef 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///
72typedef 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///
77typedef 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