]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Common/EdkIIGlueBaseTypes.h
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Include / Common / EdkIIGlueBaseTypes.h
1 /*++
2
3 Copyright (c) 2004 - 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12
13 Module Name:
14
15 EdkIIGlueBaseTypes.h
16
17 Abstract:
18
19 Defines additional data types for use by Base modules
20
21 --*/
22
23 #ifndef __EDKII_GLUE_BASE_TYPES_H__
24 #define __EDKII_GLUE_BASE_TYPES_H__
25
26 #include "..\EdkIIGlueConfig.h"
27
28 #define BREAKPOINT EFI_BREAKPOINT
29 #define DEADLOOP EFI_DEADLOOP
30
31 #define MAX_BIT EFI_MAX_BIT
32 #define MAX_ADDRESS EFI_MAX_ADDRESS
33
34 #ifndef UINT8_MAX
35 #define UINT8_MAX 0xff
36 #endif
37
38 //
39 // EFI Error Codes common to all execution phases
40 //
41
42 typedef INTN RETURN_STATUS;
43
44 ///
45 /// Set the upper bit to indicate EFI Error.
46 ///
47 #define ENCODE_ERROR(a) (MAX_BIT | (a))
48
49 #define ENCODE_WARNING(a) (a)
50 #define RETURN_ERROR(a) ((a) < 0)
51
52 #define RETURN_SUCCESS 0
53 #define RETURN_LOAD_ERROR ENCODE_ERROR (1)
54 #define RETURN_INVALID_PARAMETER ENCODE_ERROR (2)
55 #define RETURN_UNSUPPORTED ENCODE_ERROR (3)
56 #define RETURN_BAD_BUFFER_SIZE ENCODE_ERROR (4)
57 #define RETURN_BUFFER_TOO_SMALL ENCODE_ERROR (5)
58 #define RETURN_NOT_READY ENCODE_ERROR (6)
59 #define RETURN_DEVICE_ERROR ENCODE_ERROR (7)
60 #define RETURN_WRITE_PROTECTED ENCODE_ERROR (8)
61 #define RETURN_OUT_OF_RESOURCES ENCODE_ERROR (9)
62 #define RETURN_VOLUME_CORRUPTED ENCODE_ERROR (10)
63 #define RETURN_VOLUME_FULL ENCODE_ERROR (11)
64 #define RETURN_NO_MEDIA ENCODE_ERROR (12)
65 #define RETURN_MEDIA_CHANGED ENCODE_ERROR (13)
66 #define RETURN_NOT_FOUND ENCODE_ERROR (14)
67 #define RETURN_ACCESS_DENIED ENCODE_ERROR (15)
68 #define RETURN_NO_RESPONSE ENCODE_ERROR (16)
69 #define RETURN_NO_MAPPING ENCODE_ERROR (17)
70 #define RETURN_TIMEOUT ENCODE_ERROR (18)
71 #define RETURN_NOT_STARTED ENCODE_ERROR (19)
72 #define RETURN_ALREADY_STARTED ENCODE_ERROR (20)
73 #define RETURN_ABORTED ENCODE_ERROR (21)
74 #define RETURN_ICMP_ERROR ENCODE_ERROR (22)
75 #define RETURN_TFTP_ERROR ENCODE_ERROR (23)
76 #define RETURN_PROTOCOL_ERROR ENCODE_ERROR (24)
77 #define RETURN_INCOMPATIBLE_VERSION ENCODE_ERROR (25)
78 #define RETURN_SECURITY_VIOLATION ENCODE_ERROR (26)
79 #define RETURN_CRC_ERROR ENCODE_ERROR (27)
80 #define RETURN_END_OF_MEDIA ENCODE_ERROR (28)
81 #define RETURN_END_OF_FILE ENCODE_ERROR (31)
82
83 #define RETURN_WARN_UNKNOWN_GLYPH ENCODE_WARNING (1)
84 #define RETURN_WARN_DELETE_FAILURE ENCODE_WARNING (2)
85 #define RETURN_WARN_WRITE_FAILURE ENCODE_WARNING (3)
86 #define RETURN_WARN_BUFFER_TOO_SMALL ENCODE_WARNING (4)
87
88 typedef UINT64 PHYSICAL_ADDRESS;
89
90 #endif