]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | This file makes the BaseTypes.h backward compatible with the ones used in the \r | |
3 | past for EFI and Tiano development. It's mostly just prepending an EFI_ on the \r | |
4 | definitions.\r | |
5 | \r | |
6 | Copyright (c) 2006, Intel Corporation \r | |
7 | All rights reserved. This program and the accompanying materials \r | |
8 | are licensed and made available under the terms and conditions of the BSD License \r | |
9 | which accompanies this distribution. The full text of the license may be found at \r | |
10 | http://opensource.org/licenses/bsd-license.php \r | |
11 | \r | |
12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
14 | \r | |
15 | Module Name: UefiBaseTypes.h\r | |
16 | \r | |
17 | **/\r | |
18 | \r | |
19 | #ifndef __UEFI_BASE_TYPES_H__\r | |
20 | #define __UEFI_BASE_TYPES_H__\r | |
21 | \r | |
22 | #include <Common/BaseTypes.h>\r | |
23 | \r | |
24 | typedef UINT64 EFI_LBA;\r | |
25 | \r | |
26 | #define EFIERR(_a) ENCODE_ERROR(_a)\r | |
27 | \r | |
28 | #define EFI_MAX_BIT MAX_BIT\r | |
29 | #define EFI_MAX_ADDRESS MAX_ADDRESS\r | |
30 | #define EFI_BREAKPOINT() CpuBreakpoint ()\r | |
31 | #define EFI_DEADLOOP() CpuDeadLoop ()\r | |
32 | #define EFI_ERROR(A) RETURN_ERROR(A)\r | |
33 | \r | |
34 | typedef GUID EFI_GUID;\r | |
35 | typedef RETURN_STATUS EFI_STATUS;\r | |
36 | \r | |
37 | #define EFI_SUCCESS RETURN_SUCCESS \r | |
38 | #define EFI_LOAD_ERROR RETURN_LOAD_ERROR \r | |
39 | #define EFI_INVALID_PARAMETER RETURN_INVALID_PARAMETER \r | |
40 | #define EFI_UNSUPPORTED RETURN_UNSUPPORTED \r | |
41 | #define EFI_BAD_BUFFER_SIZE RETURN_BAD_BUFFER_SIZE \r | |
42 | #define EFI_BUFFER_TOO_SMALL RETURN_BUFFER_TOO_SMALL \r | |
43 | #define EFI_NOT_READY RETURN_NOT_READY \r | |
44 | #define EFI_DEVICE_ERROR RETURN_DEVICE_ERROR \r | |
45 | #define EFI_WRITE_PROTECTED RETURN_WRITE_PROTECTED \r | |
46 | #define EFI_OUT_OF_RESOURCES RETURN_OUT_OF_RESOURCES \r | |
47 | #define EFI_VOLUME_CORRUPTED RETURN_VOLUME_CORRUPTED \r | |
48 | #define EFI_VOLUME_FULL RETURN_VOLUME_FULL \r | |
49 | #define EFI_NO_MEDIA RETURN_NO_MEDIA \r | |
50 | #define EFI_MEDIA_CHANGED RETURN_MEDIA_CHANGED \r | |
51 | #define EFI_NOT_FOUND RETURN_NOT_FOUND \r | |
52 | #define EFI_ACCESS_DENIED RETURN_ACCESS_DENIED \r | |
53 | #define EFI_NO_RESPONSE RETURN_NO_RESPONSE \r | |
54 | #define EFI_NO_MAPPING RETURN_NO_MAPPING \r | |
55 | #define EFI_TIMEOUT RETURN_TIMEOUT \r | |
56 | #define EFI_NOT_STARTED RETURN_NOT_STARTED \r | |
57 | #define EFI_ALREADY_STARTED RETURN_ALREADY_STARTED \r | |
58 | #define EFI_ABORTED RETURN_ABORTED \r | |
59 | #define EFI_ICMP_ERROR RETURN_ICMP_ERROR \r | |
60 | #define EFI_TFTP_ERROR RETURN_TFTP_ERROR \r | |
61 | #define EFI_PROTOCOL_ERROR RETURN_PROTOCOL_ERROR \r | |
62 | #define EFI_INCOMPATIBLE_VERSION RETURN_INCOMPATIBLE_VERSION \r | |
63 | #define EFI_SECURITY_VIOLATION RETURN_SECURITY_VIOLATION \r | |
64 | #define EFI_CRC_ERROR RETURN_CRC_ERROR \r | |
65 | #define EFI_END_OF_MEDIA RETURN_END_OF_MEDIA\r | |
66 | #define EFI_END_OF_FILE RETURN_END_OF_FILE\r | |
67 | \r | |
68 | #define EFI_WARN_UNKNOWN_GLYPH RETURN_WARN_UNKNOWN_GLYPH \r | |
69 | #define EFI_WARN_DELETE_FAILURE RETURN_WARN_DELETE_FAILURE \r | |
70 | #define EFI_WARN_WRITE_FAILURE RETURN_WARN_WRITE_FAILURE \r | |
71 | #define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL\r | |
72 | \r | |
73 | //\r | |
74 | // The EFI memory allocation functions work in units of EFI_PAGEs that are\r | |
75 | // 4K. This should in no way be confused with the page size of the processor.\r | |
76 | // An EFI_PAGE is just the quanta of memory in EFI.\r | |
77 | //\r | |
78 | #define EFI_PAGE_MASK 0xFFF\r | |
79 | #define EFI_PAGE_SHIFT 12\r | |
80 | \r | |
81 | #define EFI_SIZE_TO_PAGES(a) (((a) >> EFI_PAGE_SHIFT) + (((a) & EFI_PAGE_MASK) ? 1 : 0))\r | |
82 | \r | |
83 | #define EFI_PAGES_TO_SIZE(a) ( (a) << EFI_PAGE_SHIFT)\r | |
84 | \r | |
85 | #endif\r |