]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Pi/PiStatusCode.h
1. Clean up MdePkg internal header files
[mirror_edk2.git] / MdePkg / Include / Pi / PiStatusCode.h
CommitLineData
d7dfd027
LG
1/** @file\r
2 StatusCode related definitions in PI.\r
3\r
4 Copyright (c) 2009, Intel Corporation \r
5 All rights reserved. This program and the accompanying materials \r
6 are licensed and made available under the terms and conditions of the BSD License \r
7 which accompanies this distribution. The full text of the license may be found at \r
8 http://opensource.org/licenses/bsd-license.php \r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
13 @par Revision Reference:\r
14 PI Version 1.0\r
15\r
16**/\r
17\r
18#ifndef __PI_STATUS_CODE_H__\r
19#define __PI_STATUS_CODE_H__\r
20\r
21///\r
22/// Status Code Type Definition\r
23///\r
24typedef UINT32 EFI_STATUS_CODE_TYPE;\r
25\r
26//\r
27// A Status Code Type is made up of the code type and severity\r
28// All values masked by EFI_STATUS_CODE_RESERVED_MASK are\r
29// reserved for use by this specification.\r
30//\r
31#define EFI_STATUS_CODE_TYPE_MASK 0x000000FF\r
32#define EFI_STATUS_CODE_SEVERITY_MASK 0xFF000000\r
33#define EFI_STATUS_CODE_RESERVED_MASK 0x00FFFF00\r
34\r
35//\r
36// Definition of code types, all other values masked by\r
37// EFI_STATUS_CODE_TYPE_MASK are reserved for use by\r
38// this specification.\r
39//\r
40#define EFI_PROGRESS_CODE 0x00000001\r
41#define EFI_ERROR_CODE 0x00000002\r
42#define EFI_DEBUG_CODE 0x00000003\r
43\r
44//\r
45// Definitions of severities, all other values masked by\r
46// EFI_STATUS_CODE_SEVERITY_MASK are reserved for use by\r
47// this specification.\r
48// Uncontained errors are major errors that could not contained\r
49// to the specific component that is reporting the error\r
50// For example, if a memory error was not detected early enough,\r
51// the bad data could be consumed by other drivers.\r
52//\r
53#define EFI_ERROR_MINOR 0x40000000\r
54#define EFI_ERROR_MAJOR 0x80000000\r
55#define EFI_ERROR_UNRECOVERED 0x90000000\r
56#define EFI_ERROR_UNCONTAINED 0xa0000000\r
57\r
58///\r
59/// Status Code Value Definition\r
60///\r
61typedef UINT32 EFI_STATUS_CODE_VALUE;\r
62\r
63//\r
64// A Status Code Value is made up of the class, subclass, and\r
65// an operation.\r
66//\r
67#define EFI_STATUS_CODE_CLASS_MASK 0xFF000000\r
68#define EFI_STATUS_CODE_SUBCLASS_MASK 0x00FF0000\r
69#define EFI_STATUS_CODE_OPERATION_MASK 0x0000FFFF\r
70\r
71///\r
72/// Definition of Status Code extended data header.\r
73/// The data will follow HeaderSize bytes from the beginning of\r
74/// the structure and is Size bytes long.\r
75///\r
76typedef struct {\r
77 ///\r
78 /// The size of the structure. This is specified to enable future expansion.\r
79 ///\r
80 UINT16 HeaderSize;\r
81 ///\r
82 /// The size of the data in bytes. This does not include the size of the header structure.\r
83 ///\r
84 UINT16 Size;\r
85 ///\r
86 /// The GUID defining the type of the data.\r
87 ///\r
88 EFI_GUID Type;\r
89} EFI_STATUS_CODE_DATA;\r
90\r
91\r
92///\r
93/// Bit values for Authentication Status\r
94///\r
95/// xx00 Image was not signed.\r
96/// xxx1 Platform security policy override. Assumes same meaning as 0010 (the image was signed, the\r
97/// signature was tested, and the signature passed authentication test).\r
98/// 0010 Image was signed, the signature was tested, and the signature passed authentication test.\r
99/// 0110 Image was signed and the signature was not tested.\r
100/// 1010 Image was signed, the signature was tested, and the signature failed the authentication test.\r
101///\r
102#define EFI_AUTH_STATUS_PLATFORM_OVERRIDE 0x01\r
103#define EFI_AUTH_STATUS_IMAGE_SIGNED 0x02\r
104#define EFI_AUTH_STATUS_NOT_TESTED 0x04\r
105#define EFI_AUTH_STATUS_TEST_FAILED 0x08\r
106#define EFI_AUTH_STATUS_ALL 0x0f\r
107\r
108#endif\r