PiStatusCode.h revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
/** @file
StatusCode related definitions in PI.
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference:
These status codes are defined in UEFI Platform Initialization Specification 1.2,
Volume 3: Shared Architectural Elements.
**/
#ifndef __PI_STATUS_CODE_H__
#define __PI_STATUS_CODE_H__
//
// Required for IA32, X64, IPF, ARM and EBC defines for CPU exception types
//
#include <Protocol/DebugSupport.h>
///
/// Status Code Type Definition.
///
typedef UINT32 EFI_STATUS_CODE_TYPE;
///
/// A Status Code Type is made up of the code type and severity.
/// All values masked by EFI_STATUS_CODE_RESERVED_MASK are
/// reserved for use by this specification.
///
///@{
#define EFI_STATUS_CODE_TYPE_MASK 0x000000FF
#define EFI_STATUS_CODE_SEVERITY_MASK 0xFF000000
#define EFI_STATUS_CODE_RESERVED_MASK 0x00FFFF00
///@}
///
/// Definition of code types. All other values masked by
/// EFI_STATUS_CODE_TYPE_MASK are reserved for use by
/// this specification.
///
///@{
#define EFI_PROGRESS_CODE 0x00000001
#define EFI_ERROR_CODE 0x00000002
#define EFI_DEBUG_CODE 0x00000003
///@}
///
/// Definitions of severities, all other values masked by
/// EFI_STATUS_CODE_SEVERITY_MASK are reserved for use by
/// this specification.
/// Uncontained errors are major errors that could not contained
/// to the specific component that is reporting the error.
/// For example, if a memory error was not detected early enough,
/// the bad data could be consumed by other drivers.
///
///@{
#define EFI_ERROR_MINOR 0x40000000
#define EFI_ERROR_MAJOR 0x80000000
#define EFI_ERROR_UNRECOVERED 0x90000000
#define EFI_ERROR_UNCONTAINED 0xa0000000
///@}
///
/// Status Code Value Definition.
///
typedef UINT32 EFI_STATUS_CODE_VALUE;
///
/// A Status Code Value is made up of the class, subclass, and
/// an operation.
///
///@{
#define EFI_STATUS_CODE_CLASS_MASK 0xFF000000
#define EFI_STATUS_CODE_SUBCLASS_MASK 0x00FF0000
#define EFI_STATUS_CODE_OPERATION_MASK 0x0000FFFF
///@}
///
/// Definition of Status Code extended data header.
/// The data will follow HeaderSize bytes from the beginning of
/// the structure and is Size bytes long.
///
typedef struct {
///
/// The size of the structure. This is specified to enable future expansion.
///
///
/// The size of the data in bytes. This does not include the size of the header structure.
///
///
/// The GUID defining the type of the data.
///
///
/// General partitioning scheme for Progress and Error Codes are:
/// - 0x0000-0x0FFF Shared by all sub-classes in a given class.
/// - 0x1000-0x7FFF Subclass Specific.
/// - 0x8000-0xFFFF OEM specific.
///@{
#define EFI_SUBCLASS_SPECIFIC 0x1000
#define EFI_OEM_SPECIFIC 0x8000
///@}
///
/// Debug Code definitions for all classes and subclass.
/// Only one debug code is defined at this point and should
/// be used for anything that is sent to the debug stream.
///
///@{
#define EFI_DC_UNSPECIFIED 0x0
///@}
///
/// Class definitions.
/// Values of 4-127 are reserved for future use by this specification.
/// Values in the range 127-255 are reserved for OEM use.
///
///@{
#define EFI_COMPUTING_UNIT 0x00000000
#define EFI_PERIPHERAL 0x01000000
#define EFI_IO_BUS 0x02000000
#define EFI_SOFTWARE 0x03000000
///@}
///
/// Computing Unit Subclass definitions.
/// Values of 8-127 are reserved for future use by this specification.
/// Values of 128-255 are reserved for OEM use.
///
///@{
///@}
///
/// Computing Unit Class Progress Code definitions.
/// These are shared by all subclasses.
///
///@{
#define EFI_CU_PC_INIT_BEGIN 0x00000000
#define EFI_CU_PC_INIT_END 0x00000001
///@}
//
// Computing Unit Unspecified Subclass Progress Code definitions.
//
///
/// Computing Unit Host Processor Subclass Progress Code definitions.
///@{
///@}
//
// Computing Unit Firmware Processor Subclass Progress Code definitions.
//
//
// Computing Unit IO Processor Subclass Progress Code definitions.
//
///
/// Computing Unit Cache Subclass Progress Code definitions.
///
///@{
///@}
///
/// Computing Unit Memory Subclass Progress Code definitions.
///
///@{
///@}
//
// Computing Unit Chipset Subclass Progress Code definitions.
//
///
/// South Bridge initialization prior to memory detection.
///
///
/// North Bridge initialization prior to memory detection.
///
///
/// South Bridge initialization after memory detection.
///
///
/// North Bridge initialization after memory detection.
///
///
/// PCI Host Bridge DXE initialization.
///
///
/// North Bridge DXE initialization.
///
///
/// North Bridge specific SMM initialization in DXE.
///
///
/// Initialization of the South Bridge specific UEFI Runtime Services.
///
///
/// South Bridge DXE initialization
///
///
/// South Bridge specific SMM initialization in DXE.
///
///
/// Initialization of the South Bridge devices.
///
///
/// Computing Unit Class Error Code definitions.
/// These are shared by all subclasses.
///
///@{
#define EFI_CU_EC_NON_SPECIFIC 0x00000000
#define EFI_CU_EC_DISABLED 0x00000001
#define EFI_CU_EC_NOT_SUPPORTED 0x00000002
#define EFI_CU_EC_NOT_DETECTED 0x00000003
#define EFI_CU_EC_NOT_CONFIGURED 0x00000004
///@}
//
// Computing Unit Unspecified Subclass Error Code definitions.
//
///
/// Computing Unit Host Processor Subclass Error Code definitions.
///
///@{
///@}
///
/// Computing Unit Firmware Processor Subclass Error Code definitions.
///
///@{
///@}
//
// Computing Unit IO Processor Subclass Error Code definitions.
//
///
/// Computing Unit Cache Subclass Error Code definitions.
///
///@{
///@}
///
/// Computing Unit Memory Subclass Error Code definitions.
///
///@{
///@}
///
/// Computing Unit Chipset Subclass Error Code definitions.
///
///@{
///@}
///
/// Peripheral Subclass definitions.
/// Values of 12-127 are reserved for future use by this specification.
/// Values of 128-255 are reserved for OEM use.
///
///@{
///@}
///
/// Peripheral Class Progress Code definitions.
/// These are shared by all subclasses.
///
///@{
#define EFI_P_PC_INIT 0x00000000
#define EFI_P_PC_RESET 0x00000001
#define EFI_P_PC_DISABLE 0x00000002
#define EFI_P_PC_PRESENCE_DETECT 0x00000003
#define EFI_P_PC_ENABLE 0x00000004
#define EFI_P_PC_RECONFIG 0x00000005
#define EFI_P_PC_DETECTED 0x00000006
///@}
//
// Peripheral Class Unspecified Subclass Progress Code definitions.
//
///
/// Peripheral Class Keyboard Subclass Progress Code definitions.
///
///@{
///@}
///
/// Peripheral Class Mouse Subclass Progress Code definitions.
///
///@{
///@}
//
// Peripheral Class Local Console Subclass Progress Code definitions.
//
//
// Peripheral Class Remote Console Subclass Progress Code definitions.
//
///
/// Peripheral Class Serial Port Subclass Progress Code definitions.
///
///@{
///@}
//
// Peripheral Class Parallel Port Subclass Progress Code definitions.
//
//
// Peripheral Class Fixed Media Subclass Progress Code definitions.
//
//
// Peripheral Class Removable Media Subclass Progress Code definitions.
//
//
// Peripheral Class Audio Input Subclass Progress Code definitions.
//
//
// Peripheral Class Audio Output Subclass Progress Code definitions.
//
//
// Peripheral Class LCD Device Subclass Progress Code definitions.
//
//
// Peripheral Class Network Subclass Progress Code definitions.
//
///
/// Peripheral Class Error Code definitions.
/// These are shared by all subclasses.
///
///@{
#define EFI_P_EC_NON_SPECIFIC 0x00000000
#define EFI_P_EC_DISABLED 0x00000001
#define EFI_P_EC_NOT_SUPPORTED 0x00000002
#define EFI_P_EC_NOT_DETECTED 0x00000003
#define EFI_P_EC_NOT_CONFIGURED 0x00000004
#define EFI_P_EC_INTERFACE_ERROR 0x00000005
#define EFI_P_EC_CONTROLLER_ERROR 0x00000006
#define EFI_P_EC_INPUT_ERROR 0x00000007
#define EFI_P_EC_OUTPUT_ERROR 0x00000008
#define EFI_P_EC_RESOURCE_CONFLICT 0x00000009
///@}
//
// Peripheral Class Unspecified Subclass Error Code definitions.
//
///
/// Peripheral Class Keyboard Subclass Error Code definitions.
///
///@{
///@}
///
/// Peripheral Class Mouse Subclass Error Code definitions.
///
///@{
///@}
//
// Peripheral Class Local Console Subclass Error Code definitions.
//
//
// Peripheral Class Remote Console Subclass Error Code definitions.
//
//
// Peripheral Class Serial Port Subclass Error Code definitions.
//
//
// Peripheral Class Parallel Port Subclass Error Code definitions.
//
//
// Peripheral Class Fixed Media Subclass Error Code definitions.
//
//
// Peripheral Class Removable Media Subclass Error Code definitions.
//
//
// Peripheral Class Audio Input Subclass Error Code definitions.
//
//
// Peripheral Class Audio Output Subclass Error Code definitions.
//
//
// Peripheral Class LCD Device Subclass Error Code definitions.
//
//
// Peripheral Class Network Subclass Error Code definitions.
//
///
/// IO Bus Subclass definitions.
/// Values of 14-127 are reserved for future use by this specification.
/// Values of 128-255 are reserved for OEM use.
///
///@{
///@}
///
/// IO Bus Class Progress Code definitions.
/// These are shared by all subclasses.
///
///@{
#define EFI_IOB_PC_INIT 0x00000000
#define EFI_IOB_PC_RESET 0x00000001
#define EFI_IOB_PC_DISABLE 0x00000002
#define EFI_IOB_PC_DETECT 0x00000003
#define EFI_IOB_PC_ENABLE 0x00000004
#define EFI_IOB_PC_RECONFIG 0x00000005
#define EFI_IOB_PC_HOTPLUG 0x00000006
///@}
//
// IO Bus Class Unspecified Subclass Progress Code definitions.
//
///
/// IO Bus Class PCI Subclass Progress Code definitions.
///
///@{
///@}
//
// IO Bus Class USB Subclass Progress Code definitions.
//
//
// IO Bus Class IBA Subclass Progress Code definitions.
//
//
// IO Bus Class AGP Subclass Progress Code definitions.
//
//
// IO Bus Class PC Card Subclass Progress Code definitions.
//
//
// IO Bus Class LPC Subclass Progress Code definitions.
//
//
// IO Bus Class SCSI Subclass Progress Code definitions.
//
//
//
//
// IO Bus Class FC Subclass Progress Code definitions.
//
//
// IO Bus Class IP Network Subclass Progress Code definitions.
//
//
// IO Bus Class SMBUS Subclass Progress Code definitions.
//
//
// IO Bus Class I2C Subclass Progress Code definitions.
//
///
/// IO Bus Class Error Code definitions.
/// These are shared by all subclasses.
///
///@{
#define EFI_IOB_EC_NON_SPECIFIC 0x00000000
#define EFI_IOB_EC_DISABLED 0x00000001
#define EFI_IOB_EC_NOT_SUPPORTED 0x00000002
#define EFI_IOB_EC_NOT_DETECTED 0x00000003
#define EFI_IOB_EC_NOT_CONFIGURED 0x00000004
#define EFI_IOB_EC_INTERFACE_ERROR 0x00000005
#define EFI_IOB_EC_CONTROLLER_ERROR 0x00000006
#define EFI_IOB_EC_READ_ERROR 0x00000007
#define EFI_IOB_EC_WRITE_ERROR 0x00000008
#define EFI_IOB_EC_RESOURCE_CONFLICT 0x00000009
///@}
//
// IO Bus Class Unspecified Subclass Error Code definitions.
//
///
/// IO Bus Class PCI Subclass Error Code definitions.
///
///@{
///@}
//
// IO Bus Class USB Subclass Error Code definitions.
//
//
// IO Bus Class IBA Subclass Error Code definitions.
//
//
// IO Bus Class AGP Subclass Error Code definitions.
//
//
// IO Bus Class PC Card Subclass Error Code definitions.
//
//
// IO Bus Class LPC Subclass Error Code definitions.
//
//
// IO Bus Class SCSI Subclass Error Code definitions.
//
//
//
//
// IO Bus Class FC Subclass Error Code definitions.
//
//
// IO Bus Class IP Network Subclass Error Code definitions.
//
//
// IO Bus Class SMBUS Subclass Error Code definitions.
//
//
// IO Bus Class I2C Subclass Error Code definitions.
//
///
/// Software Subclass definitions.
/// Values of 14-127 are reserved for future use by this specification.
/// Values of 128-255 are reserved for OEM use.
///
///@{
///@}
///
/// Software Class Progress Code definitions.
/// These are shared by all subclasses.
///
///@{
#define EFI_SW_PC_INIT 0x00000000
#define EFI_SW_PC_LOAD 0x00000001
#define EFI_SW_PC_INIT_BEGIN 0x00000002
#define EFI_SW_PC_INIT_END 0x00000003
#define EFI_SW_PC_AUTHENTICATE_BEGIN 0x00000004
#define EFI_SW_PC_AUTHENTICATE_END 0x00000005
#define EFI_SW_PC_INPUT_WAIT 0x00000006
#define EFI_SW_PC_USER_SETUP 0x00000007
///@}
//
// Software Class Unspecified Subclass Progress Code definitions.
//
///
/// Software Class SEC Subclass Progress Code definitions.
///
///@{
///@}
///
/// Software Class PEI Core Subclass Progress Code definitions.
///
///@{
///@}
///
/// Software Class PEI Module Subclass Progress Code definitions.
///
///@{
///@}
///
/// Software Class DXE Core Subclass Progress Code definitions.
///
///@{
///@}
///
/// Software Class DXE BS Driver Subclass Progress Code definitions.
///
///@{
///@}
//
// Software Class SMM Driver Subclass Progress Code definitions.
//
//
// Software Class EFI Application Subclass Progress Code definitions.
//
//
// Software Class EFI OS Loader Subclass Progress Code definitions.
//
///
/// Software Class EFI RT Subclass Progress Code definitions.
///
///@{
///@}
//
// Software Class X64 Exception Subclass Progress Code definitions.
//
//
// Software Class ARM Exception Subclass Progress Code definitions.
//
//
// Software Class EBC Exception Subclass Progress Code definitions.
//
//
// Software Class IA32 Exception Subclass Progress Code definitions.
//
//
// Software Class X64 Exception Subclass Progress Code definitions.
//
//
// Software Class IPF Exception Subclass Progress Code definitions.
//
///
/// Software Class PEI Services Subclass Progress Code definitions.
///
///@{
///@}
///
/// Software Class EFI Boot Services Subclass Progress Code definitions.
///
///@{
///@}
///
/// Software Class EFI Runtime Services Subclass Progress Code definitions.
///
///@{
///@}
///
/// Software Class EFI DXE Services Subclass Progress Code definitions
///
///@{
///@}
///
/// Software Class Error Code definitions.
/// These are shared by all subclasses.
///
///@{
#define EFI_SW_EC_NON_SPECIFIC 0x00000000
#define EFI_SW_EC_LOAD_ERROR 0x00000001
#define EFI_SW_EC_INVALID_PARAMETER 0x00000002
#define EFI_SW_EC_UNSUPPORTED 0x00000003
#define EFI_SW_EC_INVALID_BUFFER 0x00000004
#define EFI_SW_EC_OUT_OF_RESOURCES 0x00000005
#define EFI_SW_EC_ABORTED 0x00000006
#define EFI_SW_EC_ILLEGAL_SOFTWARE_STATE 0x00000007
#define EFI_SW_EC_ILLEGAL_HARDWARE_STATE 0x00000008
#define EFI_SW_EC_START_ERROR 0x00000009
#define EFI_SW_EC_BAD_DATE_TIME 0x0000000A
#define EFI_SW_EC_CFG_INVALID 0x0000000B
#define EFI_SW_EC_CFG_CLR_REQUEST 0x0000000C
#define EFI_SW_EC_CFG_DEFAULT 0x0000000D
#define EFI_SW_EC_PWD_INVALID 0x0000000E
#define EFI_SW_EC_PWD_CLR_REQUEST 0x0000000F
#define EFI_SW_EC_PWD_CLEARED 0x00000010
#define EFI_SW_EC_EVENT_LOG_FULL 0x00000011
///@}
//
// Software Class Unspecified Subclass Error Code definitions.
//
//
// Software Class SEC Subclass Error Code definitions.
//
///
/// Software Class PEI Core Subclass Error Code definitions.
///
///@{
///@}
///
/// Software Class PEI Module Subclass Error Code definitions.
///
///@{
///@}
///
/// Software Class DXE Foundation Subclass Error Code definitions.
///
///@{
///@}
///
/// Software Class DXE Boot Service Driver Subclass Error Code definitions.
///
///@{
///@}
//
// Software Class DXE Runtime Service Driver Subclass Error Code definitions.
//
//
// Software Class SMM Driver Subclass Error Code definitions.
//
//
// Software Class EFI Application Subclass Error Code definitions.
//
//
// Software Class EFI OS Loader Subclass Error Code definitions.
//
//
// Software Class EFI RT Subclass Error Code definitions.
//
//
// Software Class EFI AL Subclass Error Code definitions.
//
///
/// Software Class EBC Exception Subclass Error Code definitions.
/// These exceptions are derived from the debug protocol definitions in the EFI
/// specification.
///
///@{
#define EFI_SW_EC_EBC_UNDEFINED 0x00000000
#define EFI_SW_EC_EBC_DEBUG EXCEPT_EBC_DEBUG
#define EFI_SW_EC_EBC_STEP EXCEPT_EBC_STEP
///@}
///
/// Software Class IA32 Exception Subclass Error Code definitions.
/// These exceptions are derived from the debug protocol definitions in the EFI
/// specification.
///
///@{
#define EFI_SW_EC_IA32_NMI EXCEPT_IA32_NMI
#define EFI_SW_EC_IA32_SIMD EXCEPT_IA32_SIMD
///@}
///
/// Software Class IPF Exception Subclass Error Code definitions.
/// These exceptions are derived from the debug protocol definitions in the EFI
/// specification.
///
///@{
///@}
///
/// Software Class PEI Service Subclass Error Code definitions.
///
///@{
///@}
//
// Software Class EFI Boot Service Subclass Error Code definitions.
//
//
// Software Class EFI Runtime Service Subclass Error Code definitions.
//
///
/// Software Class EFI DXE Service Subclass Error Code definitions.
///
///@{
///@}
///
/// Software Class DXE RT Driver Subclass Progress Code definitions.
///
///@{
///@}
///
/// Software Class X64 Exception Subclass Error Code definitions.
/// These exceptions are derived from the debug protocol
/// definitions in the EFI specification.
///
///@{
#define EFI_SW_EC_X64_DEBUG EXCEPT_X64_DEBUG
#define EFI_SW_EC_X64_NMI EXCEPT_X64_NMI
#define EFI_SW_EC_X64_BOUND EXCEPT_X64_BOUND
#define EFI_SW_EC_X64_SIMD EXCEPT_X64_SIMD
///@}
///
/// Software Class ARM Exception Subclass Error Code definitions.
/// These exceptions are derived from the debug protocol
/// definitions in the EFI specification.
///
///@{
#define EFI_SW_EC_ARM_RESET EXCEPT_ARM_RESET
#define EFI_SW_EC_ARM_IRQ EXCEPT_ARM_IRQ
#define EFI_SW_EC_ARM_FIQ EXCEPT_ARM_FIQ
///@}
#endif