878ddf1f |
1 | /** @file\r |
2 | Processor or compiler specific defines and types for EBC.\r |
3 | \r |
4 | We currently only have one EBC complier so there may be some Intel compiler\r |
5 | specific functions in this file.\r |
6 | \r |
7 | Copyright (c) 2006, Intel Corporation \r |
8 | All rights reserved. This program and the accompanying materials \r |
9 | are licensed and made available under the terms and conditions of the BSD License \r |
10 | which accompanies this distribution. The full text of the license may be found at \r |
11 | http://opensource.org/licenses/bsd-license.php \r |
12 | \r |
13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r |
14 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r |
15 | \r |
16 | Module Name: ProcessorBind.h\r |
17 | \r |
18 | **/\r |
19 | \r |
20 | #ifndef __PROCESSOR_BIND_H__\r |
21 | #define __PROCESSOR_BIND_H__\r |
22 | \r |
23 | //\r |
24 | // Define the processor type so other code can make processor based choices\r |
25 | //\r |
26 | #define MDE_CPU_EBC\r |
27 | \r |
28 | //\r |
29 | // Native integer types\r |
30 | //\r |
31 | typedef char INT8;\r |
32 | typedef unsigned char BOOLEAN;\r |
33 | typedef unsigned char UINT8;\r |
34 | typedef unsigned char CHAR8;\r |
35 | \r |
36 | typedef short INT16;\r |
37 | typedef unsigned short UINT16;\r |
38 | typedef unsigned short CHAR16;\r |
39 | \r |
40 | typedef int INT32;\r |
41 | typedef unsigned int UINT32;\r |
42 | \r |
43 | typedef __int64 INT64;\r |
44 | typedef unsigned __int64 UINT64;\r |
45 | \r |
46 | //\r |
47 | // "long" type scales to the processor native size with EBC compiler\r |
48 | //\r |
49 | typedef long INTN;\r |
50 | typedef unsigned long UINTN;\r |
51 | \r |
52 | #define UINT8_MAX 0xff\r |
53 | \r |
54 | //\r |
55 | // Scalable macro to set the most significant bit in a natural number\r |
56 | //\r |
57 | #define MAX_BIT 0x8000000000000000ULL \r |
58 | #define MAX_2_BITS 0xC000000000000000ULL\r |
59 | \r |
60 | \r |
61 | //\r |
62 | // Maximum legal EBC address\r |
63 | //\r |
64 | #define MAX_ADDRESS 0xFFFFFFFFFFFFFFFFULL\r |
65 | \r |
66 | //\r |
67 | // Modifier to ensure that all protocol member functions and EFI intrinsics\r |
68 | // use the correct C calling convention. All protocol member functions and\r |
69 | // EFI intrinsics are required to modify thier member functions with EFIAPI.\r |
70 | //\r |
71 | #define EFIAPI \r |
72 | \r |
73 | //\r |
74 | // The Microsoft* C compiler can removed references to unreferenced data items\r |
75 | // if the /OPT:REF linker option is used. We defined a macro as this is a \r |
76 | // a non standard extension. Currently not supported by the EBC compiler\r |
77 | //\r |
78 | #define GLOBAL_REMOVE_IF_UNREFERENCED\r |
79 | \r |
80 | #endif \r |
81 | \r |