blob: 68463fb3eda75f2648f9cc5319060cc43cce81f5 [file] [log] [blame]
Aaron Durbin8a414a02015-10-01 17:02:45 -05001/** @file
2 Processor or Compiler specific defines and types for IA-32 architecture.
3
4Copyright 2015 Google Inc.
5Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
6This program and the accompanying materials are licensed and made available under
7the terms and conditions of the BSD License that accompanies this distribution.
8The full text of the license may be found at
9http://opensource.org/licenses/bsd-license.php.
10
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12WITHOUT 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///
34typedef uint64_t UINT64;
35///
36/// 8-byte signed value.
37///
38typedef int64_t INT64;
39///
40/// 4-byte unsigned value.
41///
42typedef uint32_t UINT32;
43///
44/// 4-byte signed value.
45///
46typedef int32_t INT32;
47///
48/// 2-byte unsigned value.
49///
50typedef 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///
55typedef uint16_t CHAR16;
56///
57/// 2-byte signed value.
58///
59typedef 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///
64typedef unsigned char BOOLEAN;
65///
66/// 1-byte unsigned value.
67///
68typedef unsigned char UINT8;
69///
70/// 1-byte Character
71///
72typedef char CHAR8;
73///
74/// 1-byte signed value
75///
76typedef 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///
82typedef 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///
87typedef 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
103