Update the header file coding style (alignment, comment, etc.)

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7893 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
gdong1 2009-03-16 10:29:27 +00:00
parent c40aa22af0
commit 9205b2d766
7 changed files with 1077 additions and 1192 deletions

File diff suppressed because it is too large Load Diff

View File

@ -32,44 +32,39 @@
typedef typedef
VOID VOID
(EFIAPI *EFI_AP_PROCEDURE)( (EFIAPI *EFI_AP_PROCEDURE)(
IN VOID *Buffer IN VOID *Buffer
); );
typedef struct { typedef struct {
EFI_TABLE_HEADER Hdr; EFI_TABLE_HEADER Hdr;
// //
// Time services // Time services
// //
EFI_GET_TIME GetTime; EFI_GET_TIME GetTime;
EFI_SET_TIME SetTime; EFI_SET_TIME SetTime;
EFI_GET_WAKEUP_TIME GetWakeupTime; EFI_GET_WAKEUP_TIME GetWakeupTime;
EFI_SET_WAKEUP_TIME SetWakeupTime; EFI_SET_WAKEUP_TIME SetWakeupTime;
// //
// Virtual memory services // Virtual memory services
// //
EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap; EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap;
EFI_CONVERT_POINTER ConvertPointer; EFI_CONVERT_POINTER ConvertPointer;
// //
// Variable services // Variable services
// //
EFI_GET_VARIABLE GetVariable; EFI_GET_VARIABLE GetVariable;
EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName; EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName;
EFI_SET_VARIABLE SetVariable; EFI_SET_VARIABLE SetVariable;
// //
// Misc // Misc
// //
EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount; EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount;
EFI_RESET_SYSTEM ResetSystem; EFI_RESET_SYSTEM ResetSystem;
// //
// Framework extension to UEFI 2.0 runtime table // Framework extension to UEFI 2.0 runtime table
// It was moved to a protocol to not conflict with UEFI 2.0 // It was moved to a protocol to not conflict with UEFI 2.0
// //
EFI_REPORT_STATUS_CODE ReportStatusCode; EFI_REPORT_STATUS_CODE ReportStatusCode;
} FRAMEWORK_EFI_RUNTIME_SERVICES; } FRAMEWORK_EFI_RUNTIME_SERVICES;
#define EFI_EVENT_RUNTIME_CONTEXT 0x20000000 #define EFI_EVENT_RUNTIME_CONTEXT 0x20000000
@ -77,18 +72,16 @@ typedef struct {
#define EFI_EVENT_SIGNAL_READY_TO_BOOT 0x00000203 #define EFI_EVENT_SIGNAL_READY_TO_BOOT 0x00000203
#define EFI_EVENT_SIGNAL_LEGACY_BOOT 0x00000204 #define EFI_EVENT_SIGNAL_LEGACY_BOOT 0x00000204
typedef struct { typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header; EFI_DEVICE_PATH_PROTOCOL Header;
EFI_GUID TianoSpecificDevicePath; EFI_GUID TianoSpecificDevicePath;
UINT32 Type; UINT32 Type;
} TIANO_DEVICE_PATH; } TIANO_DEVICE_PATH;
#define TIANO_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH_TYPE 0x01 #define TIANO_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH_TYPE 0x01
typedef struct { typedef struct {
TIANO_DEVICE_PATH Tiano; TIANO_DEVICE_PATH Tiano;
EFI_GUID NameGuid; EFI_GUID NameGuid;
} FRAMEWORK_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH; } FRAMEWORK_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;
#endif #endif

View File

@ -75,12 +75,12 @@
// Define values for the flags fields in some VFR opcodes. These are // Define values for the flags fields in some VFR opcodes. These are
// bitmasks. // bitmasks.
// //
#define FRAMEWORK_EFI_IFR_FLAG_DEFAULT 0x01 #define FRAMEWORK_EFI_IFR_FLAG_DEFAULT 0x01
#define FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING 0x02 #define FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING 0x02
#define FRAMEWORK_EFI_IFR_FLAG_INTERACTIVE 0x04 #define FRAMEWORK_EFI_IFR_FLAG_INTERACTIVE 0x04
#define FRAMEWORK_EFI_IFR_FLAG_NV_ACCESS 0x08 #define FRAMEWORK_EFI_IFR_FLAG_NV_ACCESS 0x08
#define FRAMEWORK_EFI_IFR_FLAG_RESET_REQUIRED 0x10 #define FRAMEWORK_EFI_IFR_FLAG_RESET_REQUIRED 0x10
#define FRAMEWORK_EFI_IFR_FLAG_LATE_CHECK 0x20 #define FRAMEWORK_EFI_IFR_FLAG_LATE_CHECK 0x20
#define EFI_NON_DEVICE_CLASS 0x00 // Useful when you do not want something in the Device Manager #define EFI_NON_DEVICE_CLASS 0x00 // Useful when you do not want something in the Device Manager
#define EFI_DISK_DEVICE_CLASS 0x01 #define EFI_DISK_DEVICE_CLASS 0x01
@ -111,258 +111,259 @@
// IFR Structure definitions // IFR Structure definitions
// //
typedef struct { typedef struct {
UINT8 OpCode; UINT8 OpCode;
UINT8 Length; UINT8 Length;
} FRAMEWORK_EFI_IFR_OP_HEADER; } FRAMEWORK_EFI_IFR_OP_HEADER;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
EFI_GUID Guid; EFI_GUID Guid;
STRING_REF FormSetTitle; STRING_REF FormSetTitle;
STRING_REF Help; STRING_REF Help;
EFI_PHYSICAL_ADDRESS CallbackHandle; EFI_PHYSICAL_ADDRESS CallbackHandle;
UINT16 Class; UINT16 Class;
UINT16 SubClass; UINT16 SubClass;
UINT16 NvDataSize; // set once, size of the NV data as defined in the script UINT16 NvDataSize; // set once, size of the NV data as defined in the script
} FRAMEWORK_EFI_IFR_FORM_SET; } FRAMEWORK_EFI_IFR_FORM_SET;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT16 FormId; UINT16 FormId;
STRING_REF FormTitle; STRING_REF FormTitle;
} FRAMEWORK_EFI_IFR_FORM; } FRAMEWORK_EFI_IFR_FORM;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT16 LabelId; UINT16 LabelId;
} FRAMEWORK_EFI_IFR_LABEL; } FRAMEWORK_EFI_IFR_LABEL;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
STRING_REF SubTitle; STRING_REF SubTitle;
} FRAMEWORK_EFI_IFR_SUBTITLE; } FRAMEWORK_EFI_IFR_SUBTITLE;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
STRING_REF Help; STRING_REF Help;
STRING_REF Text; STRING_REF Text;
STRING_REF TextTwo; STRING_REF TextTwo;
UINT8 Flags; // This is included solely for purposes of interactive/dynamic support. UINT8 Flags; // This is included solely for purposes of interactive/dynamic support.
UINT16 Key; // Value to be passed to caller to identify this particular op-code UINT16 Key; // Value to be passed to caller to identify this particular op-code
} FRAMEWORK_EFI_IFR_TEXT; } FRAMEWORK_EFI_IFR_TEXT;
// //
// goto // goto
// //
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT16 FormId; UINT16 FormId;
STRING_REF Prompt; STRING_REF Prompt;
STRING_REF Help; // The string Token for the context-help STRING_REF Help; // The string Token for the context-help
UINT8 Flags; // This is included solely for purposes of interactive/dynamic support. UINT8 Flags; // This is included solely for purposes of interactive/dynamic support.
UINT16 Key; // Value to be passed to caller to identify this particular op-code UINT16 Key; // Value to be passed to caller to identify this particular op-code
} FRAMEWORK_EFI_IFR_REF; } FRAMEWORK_EFI_IFR_REF;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
} FRAMEWORK_EFI_IFR_END_FORM; } FRAMEWORK_EFI_IFR_END_FORM;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
} FRAMEWORK_EFI_IFR_END_FORM_SET; } FRAMEWORK_EFI_IFR_END_FORM_SET;
// //
// Also notice that the IFR_ONE_OF and IFR_CHECK_BOX are identical in structure......code assumes this to be true, if this ever // Also notice that the IFR_ONE_OF and IFR_CHECK_BOX are identical in structure......
// changes we need to revisit the InitializeTagStructures code // code assumes this to be true, if this ever changes we need to revisit the InitializeTagStructures code
// //
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT16 QuestionId; // The ID designating what the question is about...sucked in from a #define, likely in the form of a variable name UINT16 QuestionId; // The ID designating what the question is about...
UINT8 Width; // The Size of the Data being saved UINT8 Width; // The Size of the Data being saved
STRING_REF Prompt; // The String Token for the Prompt STRING_REF Prompt; // The String Token for the Prompt
STRING_REF Help; // The string Token for the context-help STRING_REF Help; // The string Token for the context-help
} FRAMEWORK_EFI_IFR_ONE_OF; } FRAMEWORK_EFI_IFR_ONE_OF;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT16 QuestionId; // The offset in NV for storage of the data UINT16 QuestionId; // The offset in NV for storage of the data
UINT8 MaxEntries; // The maximum number of options in the ordered list (=size of NVStore) UINT8 MaxEntries; // The maximum number of options in the ordered list (=size of NVStore)
STRING_REF Prompt; // The string token for the prompt STRING_REF Prompt; // The string token for the prompt
STRING_REF Help; // The string token for the context-help STRING_REF Help; // The string token for the context-help
} FRAMEWORK_EFI_IFR_ORDERED_LIST; } FRAMEWORK_EFI_IFR_ORDERED_LIST;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT16 QuestionId; // The ID designating what the question is about...sucked in from a #define, likely in the form of a variable name UINT16 QuestionId; // The ID designating what the question is about...
UINT8 Width; // The Size of the Data being saved UINT8 Width; // The Size of the Data being saved
STRING_REF Prompt; // The String Token for the Prompt STRING_REF Prompt; // The String Token for the Prompt
STRING_REF Help; // The string Token for the context-help STRING_REF Help; // The string Token for the context-help
UINT8 Flags; // For now, if non-zero, means that it is the default option, - further definition likely UINT8 Flags; // If non-zero, means that it is the default option
UINT16 Key; // Value to be passed to caller to identify this particular op-code UINT16 Key; // Value to be passed to caller to identify this particular op-code
} FRAMEWORK_EFI_IFR_CHECKBOX, FRAMEWORK_EFI_IFR_CHECK_BOX; } FRAMEWORK_EFI_IFR_CHECKBOX, FRAMEWORK_EFI_IFR_CHECK_BOX;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
STRING_REF Option; // The string token describing the option STRING_REF Option; // The string token describing the option
UINT16 Value; // The value associated with this option that is stored in the NVRAM if chosen UINT16 Value; // The value associated with this option that is stored in the NVRAM
UINT8 Flags; // For now, if non-zero, means that it is the default option, - further definition likely above UINT8 Flags; // If non-zero, means that it is the default option
UINT16 Key; // Value to be passed to caller to identify this particular op-code UINT16 Key; // Value to be passed to caller to identify this particular op-code
} FRAMEWORK_EFI_IFR_ONE_OF_OPTION; } FRAMEWORK_EFI_IFR_ONE_OF_OPTION;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT16 QuestionId; // The ID designating what the question is about...sucked in from a #define, likely in the form of a variable name UINT16 QuestionId; // The ID designating what the question is about...
UINT8 Width; // The Size of the Data being saved UINT8 Width; // The Size of the Data being saved
STRING_REF Prompt; // The String Token for the Prompt STRING_REF Prompt; // The String Token for the Prompt
STRING_REF Help; // The string Token for the context-help STRING_REF Help; // The string Token for the context-help
UINT8 Flags; // This is included solely for purposes of interactive/dynamic support. UINT8 Flags; // This is included solely for purposes of interactive/dynamic support.
UINT16 Key; // Value to be passed to caller to identify this particular op-code UINT16 Key; // Value to be passed to caller to identify this particular op-code
UINT16 Minimum; UINT16 Minimum;
UINT16 Maximum; UINT16 Maximum;
UINT16 Step; // If step is 0, then manual input is specified, otherwise, left/right arrow selection is called for UINT16 Step; // Zero means manual input, otherwise, arrow selection is called for
UINT16 Default; UINT16 Default;
} FRAMEWORK_EFI_IFR_NUMERIC; } FRAMEWORK_EFI_IFR_NUMERIC;
// //
// There is an interesting twist with regards to Time and Date. This is one of the few items which can accept input from // There is an interesting twist with regards to Time and Date. This is one of the few items which can accept input
// a user, however may or may not need to use storage in the NVRAM space. The decided method for determining if NVRAM space // from a user, however may or may not need to use storage in the NVRAM space. The decided method for determining
// will be used (only for a TimeOp or DateOp) is: If .QuestionId == 0 && .Width == 0 (normally an impossibility) then use system // if NVRAM space will be used (only for a TimeOp or DateOp) is: If .QuestionId == 0 && .Width == 0 (normally an
// resources to store the data away and not NV resources. In other words, the setup engine will call gRT->SetTime, and gRT->SetDate // impossibility) then use system resources to store the data away and not NV resources. In other words, the setup
// for the saving of data, and the values displayed will be from the gRT->GetXXXX series of calls. // engine will call gRT->SetTime, and gRT->SetDate for the saving of data, and the values displayed will be from the
// gRT->GetXXXX series of calls.
// //
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_NUMERIC Hour; FRAMEWORK_EFI_IFR_NUMERIC Hour;
FRAMEWORK_EFI_IFR_NUMERIC Minute; FRAMEWORK_EFI_IFR_NUMERIC Minute;
FRAMEWORK_EFI_IFR_NUMERIC Second; FRAMEWORK_EFI_IFR_NUMERIC Second;
} FRAMEWORK_EFI_IFR_TIME; } FRAMEWORK_EFI_IFR_TIME;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_NUMERIC Year; FRAMEWORK_EFI_IFR_NUMERIC Year;
FRAMEWORK_EFI_IFR_NUMERIC Month; FRAMEWORK_EFI_IFR_NUMERIC Month;
FRAMEWORK_EFI_IFR_NUMERIC Day; FRAMEWORK_EFI_IFR_NUMERIC Day;
} FRAMEWORK_EFI_IFR_DATE; } FRAMEWORK_EFI_IFR_DATE;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT16 QuestionId; // The ID designating what the question is about...sucked in from a #define, likely in the form of a variable name UINT16 QuestionId;// The ID designating what the question is about...
UINT8 Width; // The Size of the Data being saved @bug -- remove someday UINT8 Width; // The Size of the Data being saved
STRING_REF Prompt; // The String Token for the Prompt STRING_REF Prompt; // The String Token for the Prompt
STRING_REF Help; // The string Token for the context-help STRING_REF Help; // The string Token for the context-help
UINT8 Flags; // This is included solely for purposes of interactive/dynamic support. UINT8 Flags; // This is included solely for purposes of interactive/dynamic support.
UINT16 Key; // Value to be passed to caller to identify this particular op-code UINT16 Key; // Value to be passed to caller to identify this particular op-code
UINT8 MinSize; // Minimum allowable sized password UINT8 MinSize; // Minimum allowable sized password
UINT8 MaxSize; // Maximum allowable sized password UINT8 MaxSize; // Maximum allowable sized password
UINT16 Encoding; UINT16 Encoding;
} FRAMEWORK_EFI_IFR_PASSWORD; } FRAMEWORK_EFI_IFR_PASSWORD;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT16 QuestionId; // The ID designating what the question is about...sucked in from a #define, likely in the form of a variable name UINT16 QuestionId; // The ID designating what the question is about...
UINT8 Width; // The Size of the Data being saved @bug -- remove someday UINT8 Width; // The Size of the Data being saved
STRING_REF Prompt; // The String Token for the Prompt STRING_REF Prompt; // The String Token for the Prompt
STRING_REF Help; // The string Token for the context-help STRING_REF Help; // The string Token for the context-help
UINT8 Flags; // This is included solely for purposes of interactive/dynamic support. UINT8 Flags; // This is included solely for purposes of interactive/dynamic support.
UINT16 Key; // Value to be passed to caller to identify this particular op-code UINT16 Key; // Value to be passed to caller to identify this particular op-code
UINT8 MinSize; // Minimum allowable sized password UINT8 MinSize; // Minimum allowable sized password
UINT8 MaxSize; // Maximum allowable sized password UINT8 MaxSize; // Maximum allowable sized password
} FRAMEWORK_EFI_IFR_STRING; } FRAMEWORK_EFI_IFR_STRING;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
} FRAMEWORK_EFI_IFR_END_ONE_OF; } FRAMEWORK_EFI_IFR_END_ONE_OF;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT16 Value; UINT16 Value;
UINT16 Key; UINT16 Key;
} FRAMEWORK_EFI_IFR_HIDDEN; } FRAMEWORK_EFI_IFR_HIDDEN;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT8 Flags; UINT8 Flags;
} FRAMEWORK_EFI_IFR_SUPPRESS; } FRAMEWORK_EFI_IFR_SUPPRESS;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT8 Flags; UINT8 Flags;
} FRAMEWORK_EFI_IFR_GRAY_OUT; } FRAMEWORK_EFI_IFR_GRAY_OUT;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
STRING_REF Popup; STRING_REF Popup;
UINT8 Flags; UINT8 Flags;
} FRAMEWORK_EFI_IFR_INCONSISTENT; } FRAMEWORK_EFI_IFR_INCONSISTENT;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT16 QuestionId; // offset into variable storage UINT16 QuestionId; // offset into variable storage
UINT8 Width; // size of variable storage UINT8 Width; // size of variable storage
UINT16 Value; // value to compare against UINT16 Value; // value to compare against
} FRAMEWORK_EFI_IFR_EQ_ID_VAL; } FRAMEWORK_EFI_IFR_EQ_ID_VAL;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT16 QuestionId; // offset into variable storage UINT16 QuestionId; // offset into variable storage
UINT8 Width; // size of variable storage UINT8 Width; // size of variable storage
UINT16 ListLength; UINT16 ListLength;
UINT16 ValueList[1]; UINT16 ValueList[1];
} FRAMEWORK_EFI_IFR_EQ_ID_LIST; } FRAMEWORK_EFI_IFR_EQ_ID_LIST;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT16 QuestionId1; // offset into variable storage for first value to compare UINT16 QuestionId1; // offset into variable storage for first value to compare
UINT8 Width; // size of variable storage (must be same for both) UINT8 Width; // size of variable storage (must be same for both)
UINT16 QuestionId2; // offset into variable storage for second value to compare UINT16 QuestionId2; // offset into variable storage for second value to compare
} FRAMEWORK_EFI_IFR_EQ_ID_ID; } FRAMEWORK_EFI_IFR_EQ_ID_ID;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT16 VariableId; // offset into variable storage UINT16 VariableId; // offset into variable storage
UINT16 Value; // value to compare against UINT16 Value; // value to compare against
} FRAMEWORK_EFI_IFR_EQ_VAR_VAL; } FRAMEWORK_EFI_IFR_EQ_VAR_VAL;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
} FRAMEWORK_EFI_IFR_AND; } FRAMEWORK_EFI_IFR_AND;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
} FRAMEWORK_EFI_IFR_OR; } FRAMEWORK_EFI_IFR_OR;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
} FRAMEWORK_EFI_IFR_NOT; } FRAMEWORK_EFI_IFR_NOT;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
} FRAMEWORK_EFI_IFR_END_EXPR, FRAMEWORK_EFI_IFR_END_IF; } FRAMEWORK_EFI_IFR_END_EXPR, FRAMEWORK_EFI_IFR_END_IF;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT16 FormId; UINT16 FormId;
STRING_REF Prompt; STRING_REF Prompt;
STRING_REF Help; STRING_REF Help;
UINT8 Flags; UINT8 Flags;
UINT16 Key; UINT16 Key;
} FRAMEWORK_EFI_IFR_SAVE_DEFAULTS; } FRAMEWORK_EFI_IFR_SAVE_DEFAULTS;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
STRING_REF Help; STRING_REF Help;
STRING_REF Text; STRING_REF Text;
STRING_REF TextTwo; // optional text STRING_REF TextTwo; // optional text
} FRAMEWORK_EFI_IFR_INVENTORY; } FRAMEWORK_EFI_IFR_INVENTORY;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
EFI_GUID Guid; // GUID for the variable EFI_GUID Guid; // GUID for the variable
UINT16 VarId; // variable store ID, as referenced elsewhere in the form UINT16 VarId; // variable store ID, as referenced elsewhere in the form
UINT16 Size; // size of the variable storage UINT16 Size; // size of the variable storage
} FRAMEWORK_EFI_IFR_VARSTORE; } FRAMEWORK_EFI_IFR_VARSTORE;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT16 VarId; // variable store ID, as referenced elsewhere in the form UINT16 VarId; // variable store ID, as referenced elsewhere in the form
} FRAMEWORK_EFI_IFR_VARSTORE_SELECT; } FRAMEWORK_EFI_IFR_VARSTORE_SELECT;
// //
@ -372,25 +373,25 @@ typedef struct {
// IFR opcodes use the VarId as defined here. // IFR opcodes use the VarId as defined here.
// //
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT16 VarId; // variable store ID, as referenced elsewhere in the form UINT16 VarId; // variable store ID, as referenced elsewhere in the form
UINT16 SecondaryVarId; // variable store ID, as referenced elsewhere in the form UINT16 SecondaryVarId; // variable store ID, as referenced elsewhere in the form
} FRAMEWORK_EFI_IFR_VARSTORE_SELECT_PAIR; } FRAMEWORK_EFI_IFR_VARSTORE_SELECT_PAIR;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
} FRAMEWORK_EFI_IFR_TRUE; } FRAMEWORK_EFI_IFR_TRUE;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
} FRAMEWORK_EFI_IFR_FALSE; } FRAMEWORK_EFI_IFR_FALSE;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
} FRAMEWORK_EFI_IFR_GT; } FRAMEWORK_EFI_IFR_GT;
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
} FRAMEWORK_EFI_IFR_GE; } FRAMEWORK_EFI_IFR_GE;
// //
@ -399,10 +400,10 @@ typedef struct {
#define FRAMEWORK_EFI_IFR_RESTORE_DEFAULTS FRAMEWORK_EFI_IFR_SAVE_DEFAULTS #define FRAMEWORK_EFI_IFR_RESTORE_DEFAULTS FRAMEWORK_EFI_IFR_SAVE_DEFAULTS
typedef struct { typedef struct {
FRAMEWORK_EFI_IFR_OP_HEADER Header; FRAMEWORK_EFI_IFR_OP_HEADER Header;
STRING_REF Title; // The string token for the banner title STRING_REF Title; // The string token for the banner title
UINT16 LineNumber; // 1-based line number UINT16 LineNumber; // 1-based line number
UINT8 Alignment; // left, center, or right-aligned UINT8 Alignment; // left, center, or right-aligned
} FRAMEWORK_EFI_IFR_BANNER; } FRAMEWORK_EFI_IFR_BANNER;
#define FRAMEWORK_EFI_IFR_BANNER_ALIGN_LEFT 0 #define FRAMEWORK_EFI_IFR_BANNER_ALIGN_LEFT 0

View File

@ -25,12 +25,12 @@
// //
// Capsule volume HOB -- identical to a firmware volume // Capsule volume HOB -- identical to a firmware volume
// //
#define EFI_HOB_TYPE_CV 0x0008 #define EFI_HOB_TYPE_CV 0x0008
typedef struct { typedef struct {
EFI_HOB_GENERIC_HEADER Header; EFI_HOB_GENERIC_HEADER Header;
EFI_PHYSICAL_ADDRESS BaseAddress; EFI_PHYSICAL_ADDRESS BaseAddress;
UINT64 Length; UINT64 Length;
} EFI_HOB_CAPSULE_VOLUME; } EFI_HOB_CAPSULE_VOLUME;
#endif #endif

View File

@ -25,60 +25,55 @@
#include <Base.h> #include <Base.h>
//
// All structures defined in this header file are packed on byte boundary
//
#pragma pack(1) #pragma pack(1)
typedef UINT8 SERIAL_MODE; typedef UINT8 SERIAL_MODE;
typedef UINT8 PARALLEL_MODE; typedef UINT8 PARALLEL_MODE;
/////////////////////////////////////////////////////////////////////////////// //
// EFI_COMPATIBILITY16_TABLE is located at a 16-byte boundary starting with the // EFI_COMPATIBILITY16_TABLE is located at a 16-byte boundary starting with the
// signature "$EFI" // signature "$EFI"
/////////////////////////////////////////////////////////////////////////////// //
#define EFI_COMPATIBILITY16_TABLE_SIGNATURE SIGNATURE_32 ('I', 'F', 'E', '$') #define EFI_COMPATIBILITY16_TABLE_SIGNATURE SIGNATURE_32 ('I', 'F', 'E', '$')
typedef struct { typedef struct {
UINT32 Signature; // "$EFI" UINT32 Signature;
UINT8 TableChecksum; UINT8 TableChecksum;
UINT8 TableLength; UINT8 TableLength;
UINT8 EfiMajorRevision; UINT8 EfiMajorRevision;
UINT8 EfiMinorRevision; UINT8 EfiMinorRevision;
UINT8 TableMajorRevision; UINT8 TableMajorRevision;
UINT8 TableMinorRevision; UINT8 TableMinorRevision;
UINT16 Reserved; UINT16 Reserved;
UINT16 Compatibility16CallSegment; UINT16 Compatibility16CallSegment;
UINT16 Compatibility16CallOffset; UINT16 Compatibility16CallOffset;
UINT16 PnPInstallationCheckSegment; UINT16 PnPInstallationCheckSegment;
UINT16 PnPInstallationCheckOffset; UINT16 PnPInstallationCheckOffset;
UINT32 EfiSystemTable; // The physical address of EFI_SYSTEM_TABLE UINT32 EfiSystemTable; // The physical address of EFI_SYSTEM_TABLE
UINT32 OemIdStringPointer; UINT32 OemIdStringPointer;
UINT32 AcpiRsdPtrPointer; UINT32 AcpiRsdPtrPointer;
UINT16 OemRevision; UINT16 OemRevision;
UINT32 E820Pointer; UINT32 E820Pointer;
UINT32 E820Length; UINT32 E820Length;
UINT32 IrqRoutingTablePointer; UINT32 IrqRoutingTablePointer;
UINT32 IrqRoutingTableLength; UINT32 IrqRoutingTableLength;
UINT32 MpTablePtr; UINT32 MpTablePtr;
UINT32 MpTableLength; UINT32 MpTableLength;
UINT16 OemIntSegment; UINT16 OemIntSegment;
UINT16 OemIntOffset; UINT16 OemIntOffset;
UINT16 Oem32Segment; UINT16 Oem32Segment;
UINT16 Oem32Offset; UINT16 Oem32Offset;
UINT16 Oem16Segment; UINT16 Oem16Segment;
UINT16 Oem16Offset; UINT16 Oem16Offset;
UINT16 TpmSegment; UINT16 TpmSegment;
UINT16 TpmOffset; UINT16 TpmOffset;
UINT32 IbvPointer; UINT32 IbvPointer;
UINT32 PciExpressBase; UINT32 PciExpressBase;
UINT8 LastPciBus; UINT8 LastPciBus;
} EFI_COMPATIBILITY16_TABLE; } EFI_COMPATIBILITY16_TABLE;
/////////////////////////////////////////////////////////////////////////////// //
// Functions provided by the CSM binary // Functions provided by the CSM binary
/////////////////////////////////////////////////////////////////////////////// //
typedef enum { typedef enum {
Legacy16InitializeYourself = 0x0000, Legacy16InitializeYourself = 0x0000,
Legacy16UpdateBbs = 0x0001, Legacy16UpdateBbs = 0x0001,
@ -91,34 +86,34 @@ typedef enum {
Legacy16InstallPciHandler = 0x0008 Legacy16InstallPciHandler = 0x0008
} EFI_COMPATIBILITY_FUNCTIONS; } EFI_COMPATIBILITY_FUNCTIONS;
/////////////////////////////////////////////////////////////////////////////// //
// EFI_TO_COMPATIBILITY16_INIT_TABLE // EFI_TO_COMPATIBILITY16_INIT_TABLE
/////////////////////////////////////////////////////////////////////////////// //
typedef struct { typedef struct {
UINT32 BiosLessThan1MB; UINT32 BiosLessThan1MB;
UINT32 HiPmmMemory; UINT32 HiPmmMemory;
UINT32 HiPmmMemorySizeInBytes; UINT32 HiPmmMemorySizeInBytes;
UINT16 ReverseThunkCallSegment; UINT16 ReverseThunkCallSegment;
UINT16 ReverseThunkCallOffset; UINT16 ReverseThunkCallOffset;
UINT32 NumberE820Entries; UINT32 NumberE820Entries;
UINT32 OsMemoryAbove1Mb; UINT32 OsMemoryAbove1Mb;
UINT32 ThunkStart; UINT32 ThunkStart;
UINT32 ThunkSizeInBytes; UINT32 ThunkSizeInBytes;
UINT32 LowPmmMemory; UINT32 LowPmmMemory;
UINT32 LowPmmMemorySizeInBytes; UINT32 LowPmmMemorySizeInBytes;
} EFI_TO_COMPATIBILITY16_INIT_TABLE; } EFI_TO_COMPATIBILITY16_INIT_TABLE;
/////////////////////////////////////////////////////////////////////////////// //
// EFI_TO_COMPATIBILITY16_BOOT_TABLE // EFI_TO_COMPATIBILITY16_BOOT_TABLE
/////////////////////////////////////////////////////////////////////////////// //
// //
// DEVICE_PRODUCER_SERIAL & its modes // DEVICE_PRODUCER_SERIAL & its modes
// //
typedef struct { typedef struct {
UINT16 Address; UINT16 Address;
UINT8 Irq; UINT8 Irq;
SERIAL_MODE Mode; SERIAL_MODE Mode;
} DEVICE_PRODUCER_SERIAL; } DEVICE_PRODUCER_SERIAL;
#define DEVICE_SERIAL_MODE_NORMAL 0x00 #define DEVICE_SERIAL_MODE_NORMAL 0x00
@ -131,10 +126,10 @@ typedef struct {
// DEVICE_PRODUCER_PARALLEL & its modes // DEVICE_PRODUCER_PARALLEL & its modes
// //
typedef struct { typedef struct {
UINT16 Address; UINT16 Address;
UINT8 Irq; UINT8 Irq;
UINT8 Dma; UINT8 Dma;
PARALLEL_MODE Mode; PARALLEL_MODE Mode;
} DEVICE_PRODUCER_PARALLEL; } DEVICE_PRODUCER_PARALLEL;
#define DEVICE_PARALLEL_MODE_MODE_OUTPUT_ONLY 0x00 #define DEVICE_PARALLEL_MODE_MODE_OUTPUT_ONLY 0x00
@ -146,52 +141,52 @@ typedef struct {
// DEVICE_PRODUCER_FLOPPY // DEVICE_PRODUCER_FLOPPY
// //
typedef struct { typedef struct {
UINT16 Address; UINT16 Address;
UINT8 Irq; UINT8 Irq;
UINT8 Dma; UINT8 Dma;
UINT8 NumberOfFloppy; UINT8 NumberOfFloppy;
} DEVICE_PRODUCER_FLOPPY; } DEVICE_PRODUCER_FLOPPY;
// //
// LEGACY_DEVICE_FLAGS // LEGACY_DEVICE_FLAGS
// //
typedef struct { typedef struct {
UINT32 A20Kybd : 1; UINT32 A20Kybd : 1;
UINT32 A20Port90 : 1; UINT32 A20Port90 : 1;
UINT32 Reserved : 30; UINT32 Reserved : 30;
} LEGACY_DEVICE_FLAGS; } LEGACY_DEVICE_FLAGS;
// //
// DEVICE_PRODUCER_DATA_HEADER // DEVICE_PRODUCER_DATA_HEADER
// //
typedef struct { typedef struct {
DEVICE_PRODUCER_SERIAL Serial[4]; DEVICE_PRODUCER_SERIAL Serial[4];
DEVICE_PRODUCER_PARALLEL Parallel[3]; DEVICE_PRODUCER_PARALLEL Parallel[3];
DEVICE_PRODUCER_FLOPPY Floppy; DEVICE_PRODUCER_FLOPPY Floppy;
UINT8 MousePresent; UINT8 MousePresent;
LEGACY_DEVICE_FLAGS Flags; LEGACY_DEVICE_FLAGS Flags;
} DEVICE_PRODUCER_DATA_HEADER; } DEVICE_PRODUCER_DATA_HEADER;
// //
// ATAPI_IDENTIFY // ATAPI_IDENTIFY
// //
typedef struct { typedef struct {
UINT16 Raw[256]; UINT16 Raw[256];
} ATAPI_IDENTIFY; } ATAPI_IDENTIFY;
// //
// HDD_INFO & its status // HDD_INFO & its status
// //
typedef struct { typedef struct {
UINT16 Status; UINT16 Status;
UINT32 Bus; UINT32 Bus;
UINT32 Device; UINT32 Device;
UINT32 Function; UINT32 Function;
UINT16 CommandBaseAddress; UINT16 CommandBaseAddress;
UINT16 ControlBaseAddress; UINT16 ControlBaseAddress;
UINT16 BusMasterAddress; UINT16 BusMasterAddress;
UINT8 HddIrq; UINT8 HddIrq;
ATAPI_IDENTIFY IdentifyDrive[2]; ATAPI_IDENTIFY IdentifyDrive[2];
} HDD_INFO; } HDD_INFO;
#define HDD_PRIMARY 0x01 #define HDD_PRIMARY 0x01
@ -207,52 +202,52 @@ typedef struct {
// BBS_STATUS_FLAGS // BBS_STATUS_FLAGS
// //
typedef struct { typedef struct {
UINT16 OldPosition : 4; UINT16 OldPosition : 4;
UINT16 Reserved1 : 4; UINT16 Reserved1 : 4;
UINT16 Enabled : 1; UINT16 Enabled : 1;
UINT16 Failed : 1; UINT16 Failed : 1;
UINT16 MediaPresent : 2; UINT16 MediaPresent : 2;
UINT16 Reserved2 : 4; UINT16 Reserved2 : 4;
} BBS_STATUS_FLAGS; } BBS_STATUS_FLAGS;
// //
// BBS_TABLE, device type values & boot priority values // BBS_TABLE, device type values & boot priority values
// //
typedef struct { typedef struct {
UINT16 BootPriority; UINT16 BootPriority;
UINT32 Bus; UINT32 Bus;
UINT32 Device; UINT32 Device;
UINT32 Function; UINT32 Function;
UINT8 Class; UINT8 Class;
UINT8 SubClass; UINT8 SubClass;
UINT16 MfgStringOffset; UINT16 MfgStringOffset;
UINT16 MfgStringSegment; UINT16 MfgStringSegment;
UINT16 DeviceType; UINT16 DeviceType;
BBS_STATUS_FLAGS StatusFlags; BBS_STATUS_FLAGS StatusFlags;
UINT16 BootHandlerOffset; UINT16 BootHandlerOffset;
UINT16 BootHandlerSegment; UINT16 BootHandlerSegment;
UINT16 DescStringOffset; UINT16 DescStringOffset;
UINT16 DescStringSegment; UINT16 DescStringSegment;
UINT32 InitPerReserved; UINT32 InitPerReserved;
UINT32 AdditionalIrq13Handler; UINT32 AdditionalIrq13Handler;
UINT32 AdditionalIrq18Handler; UINT32 AdditionalIrq18Handler;
UINT32 AdditionalIrq19Handler; UINT32 AdditionalIrq19Handler;
UINT32 AdditionalIrq40Handler; UINT32 AdditionalIrq40Handler;
UINT8 AssignedDriveNumber; UINT8 AssignedDriveNumber;
UINT32 AdditionalIrq41Handler; UINT32 AdditionalIrq41Handler;
UINT32 AdditionalIrq46Handler; UINT32 AdditionalIrq46Handler;
UINT32 IBV1; UINT32 IBV1;
UINT32 IBV2; UINT32 IBV2;
} BBS_TABLE; } BBS_TABLE;
#define BBS_FLOPPY 0x01 #define BBS_FLOPPY 0x01
#define BBS_HARDDISK 0x02 #define BBS_HARDDISK 0x02
#define BBS_CDROM 0x03 #define BBS_CDROM 0x03
#define BBS_PCMCIA 0x04 #define BBS_PCMCIA 0x04
#define BBS_USB 0x05 #define BBS_USB 0x05
#define BBS_EMBED_NETWORK 0x06 #define BBS_EMBED_NETWORK 0x06
#define BBS_BEV_DEVICE 0x80 #define BBS_BEV_DEVICE 0x80
#define BBS_UNKNOWN 0xff #define BBS_UNKNOWN 0xff
#define BBS_DO_NOT_BOOT_FROM 0xFFFC #define BBS_DO_NOT_BOOT_FROM 0xFFFC
#define BBS_LOWEST_PRIORITY 0xFFFD #define BBS_LOWEST_PRIORITY 0xFFFD
@ -263,10 +258,10 @@ typedef struct {
// SMM_ATTRIBUTES & relating type, port and data size constants // SMM_ATTRIBUTES & relating type, port and data size constants
// //
typedef struct { typedef struct {
UINT16 Type : 3; UINT16 Type : 3;
UINT16 PortGranularity : 3; UINT16 PortGranularity : 3;
UINT16 DataGranularity : 3; UINT16 DataGranularity : 3;
UINT16 Reserved : 7; UINT16 Reserved : 7;
} SMM_ATTRIBUTES; } SMM_ATTRIBUTES;
#define STANDARD_IO 0x00 #define STANDARD_IO 0x00
@ -286,8 +281,8 @@ typedef struct {
// SMM_FUNCTION & relating constants // SMM_FUNCTION & relating constants
// //
typedef struct { typedef struct {
UINT16 Function : 15; UINT16 Function : 15;
UINT16 Owner : 1; UINT16 Owner : 1;
} SMM_FUNCTION; } SMM_FUNCTION;
#define INT15_D042 0x0000 #define INT15_D042 0x0000
@ -304,41 +299,41 @@ typedef struct {
// properly to reflect that assumption. // properly to reflect that assumption.
// //
typedef struct { typedef struct {
SMM_ATTRIBUTES SmmAttributes; SMM_ATTRIBUTES SmmAttributes;
SMM_FUNCTION SmmFunction; SMM_FUNCTION SmmFunction;
UINT8 SmmPort; UINT8 SmmPort;
UINT8 SmmData; UINT8 SmmData;
} SMM_ENTRY; } SMM_ENTRY;
// //
// SMM_TABLE // SMM_TABLE
// //
typedef struct { typedef struct {
UINT16 NumSmmEntries; UINT16 NumSmmEntries;
SMM_ENTRY SmmEntry; SMM_ENTRY SmmEntry;
} SMM_TABLE; } SMM_TABLE;
// //
// UDC_ATTRIBUTES // UDC_ATTRIBUTES
// //
typedef struct { typedef struct {
UINT8 DirectoryServiceValidity : 1; UINT8 DirectoryServiceValidity : 1;
UINT8 RabcaUsedFlag : 1; UINT8 RabcaUsedFlag : 1;
UINT8 ExecuteHddDiagnosticsFlag : 1; UINT8 ExecuteHddDiagnosticsFlag : 1;
UINT8 Reserved : 5; UINT8 Reserved : 5;
} UDC_ATTRIBUTES; } UDC_ATTRIBUTES;
// //
// UD_TABLE // UD_TABLE
// //
typedef struct { typedef struct {
UDC_ATTRIBUTES Attributes; UDC_ATTRIBUTES Attributes;
UINT8 DeviceNumber; UINT8 DeviceNumber;
UINT8 BbsTableEntryNumberForParentDevice; UINT8 BbsTableEntryNumberForParentDevice;
UINT8 BbsTableEntryNumberForBoot; UINT8 BbsTableEntryNumberForBoot;
UINT8 BbsTableEntryNumberForHddDiag; UINT8 BbsTableEntryNumberForHddDiag;
UINT8 BeerData[128]; UINT8 BeerData[128];
UINT8 ServiceAreaData[64]; UINT8 ServiceAreaData[64];
} UD_TABLE; } UD_TABLE;
// //
@ -349,61 +344,55 @@ typedef struct {
#define MAX_IDE_CONTROLLER 8 #define MAX_IDE_CONTROLLER 8
typedef struct { typedef struct {
UINT16 MajorVersion; UINT16 MajorVersion;
UINT16 MinorVersion; UINT16 MinorVersion;
UINT32 AcpiTable; // 4 GB range UINT32 AcpiTable; // 4 GB range
UINT32 SmbiosTable; // 4 GB range UINT32 SmbiosTable; // 4 GB range
UINT32 SmbiosTableLength; UINT32 SmbiosTableLength;
// //
// Legacy SIO state // Legacy SIO state
// //
DEVICE_PRODUCER_DATA_HEADER SioData; DEVICE_PRODUCER_DATA_HEADER SioData;
UINT16 DevicePathType;
UINT16 DevicePathType; UINT16 PciIrqMask;
UINT16 PciIrqMask; UINT32 NumberE820Entries;
UINT32 NumberE820Entries;
// //
// Controller & Drive Identify[2] per controller information // Controller & Drive Identify[2] per controller information
// //
HDD_INFO HddInfo[MAX_IDE_CONTROLLER]; HDD_INFO HddInfo[MAX_IDE_CONTROLLER];
UINT32 NumberBbsEntries;
UINT32 NumberBbsEntries; UINT32 BbsTable;
UINT32 BbsTable; UINT32 SmmTable;
UINT32 SmmTable; UINT32 OsMemoryAbove1Mb;
UINT32 OsMemoryAbove1Mb; UINT32 UnconventionalDeviceTable;
UINT32 UnconventionalDeviceTable;
} EFI_TO_COMPATIBILITY16_BOOT_TABLE; } EFI_TO_COMPATIBILITY16_BOOT_TABLE;
/////////////////////////////////////////////////////////////////////////////// //
// EFI_LEGACY_INSTALL_PCI_HANDLER // EFI_LEGACY_INSTALL_PCI_HANDLER
/////////////////////////////////////////////////////////////////////////////// //
typedef struct { typedef struct {
UINT8 PciBus; UINT8 PciBus;
UINT8 PciDeviceFun; UINT8 PciDeviceFun;
UINT8 PciSegment; UINT8 PciSegment;
UINT8 PciClass; UINT8 PciClass;
UINT8 PciSubclass; UINT8 PciSubclass;
UINT8 PciInterface; UINT8 PciInterface;
// //
// Primary section // Primary section
// //
UINT8 PrimaryIrq; UINT8 PrimaryIrq;
UINT8 PrimaryReserved; UINT8 PrimaryReserved;
UINT16 PrimaryControl; UINT16 PrimaryControl;
UINT16 PrimaryBase; UINT16 PrimaryBase;
UINT16 PrimaryBusMaster; UINT16 PrimaryBusMaster;
// //
// Secondary Section // Secondary Section
// //
UINT8 SecondaryIrq; UINT8 SecondaryIrq;
UINT8 SecondaryReserved; UINT8 SecondaryReserved;
UINT16 SecondaryControl; UINT16 SecondaryControl;
UINT16 SecondaryBase; UINT16 SecondaryBase;
UINT16 SecondaryBusMaster; UINT16 SecondaryBusMaster;
} EFI_LEGACY_INSTALL_PCI_HANDLER; } EFI_LEGACY_INSTALL_PCI_HANDLER;
// //

View File

@ -36,8 +36,8 @@ typedef struct _FRAMEWORK_EFI_PEI_SERVICES FRAMEWORK_EFI_PEI_SERVICES;
typedef typedef
EFI_STATUS EFI_STATUS
(EFIAPI *EFI_PEIM_ENTRY_POINT)( (EFIAPI *EFI_PEIM_ENTRY_POINT)(
IN EFI_FFS_FILE_HEADER *FfsHeader, IN EFI_FFS_FILE_HEADER *FfsHeader,
IN EFI_PEI_SERVICES **PeiServices IN EFI_PEI_SERVICES **PeiServices
); );
/** /**
@ -58,9 +58,9 @@ EFI_STATUS
typedef typedef
EFI_STATUS EFI_STATUS
(EFIAPI *EFI_PEI_FFS_FIND_NEXT_VOLUME)( (EFIAPI *EFI_PEI_FFS_FIND_NEXT_VOLUME)(
IN FRAMEWORK_EFI_PEI_SERVICES **PeiServices, IN FRAMEWORK_EFI_PEI_SERVICES **PeiServices,
IN UINTN Instance, IN UINTN Instance,
IN OUT EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader IN OUT EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader
); );
/** /**
@ -76,18 +76,18 @@ EFI_STATUS
@param FileHeader Pointer to the current file from which to begin searching.This pointer will be @param FileHeader Pointer to the current file from which to begin searching.This pointer will be
updated upon return to reflect the file found. updated upon return to reflect the file found.
@retval EFI_SUCCESS The file was found. @retval EFI_SUCCESS The file was found.
@retval EFI_NOT_FOUND The file was not found. @retval EFI_NOT_FOUND The file was not found.
@retval EFI_NOT_FOUND The header checksum was not zero. @retval EFI_NOT_FOUND The header checksum was not zero.
**/ **/
typedef typedef
EFI_STATUS EFI_STATUS
(EFIAPI *EFI_PEI_FFS_FIND_NEXT_FILE)( (EFIAPI *EFI_PEI_FFS_FIND_NEXT_FILE)(
IN FRAMEWORK_EFI_PEI_SERVICES **PeiServices, IN FRAMEWORK_EFI_PEI_SERVICES **PeiServices,
IN EFI_FV_FILETYPE SearchType, IN EFI_FV_FILETYPE SearchType,
IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader, IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader,
IN OUT EFI_FFS_FILE_HEADER **FileHeader IN OUT EFI_FFS_FILE_HEADER **FileHeader
); );
/** /**
@ -99,72 +99,73 @@ EFI_STATUS
@param FfsFileHeader A pointer to the file header that contains the set of sections to be searched. @param FfsFileHeader A pointer to the file header that contains the set of sections to be searched.
@param SectionData A pointer to the discovered section, if successful. @param SectionData A pointer to the discovered section, if successful.
@retval EFI_SUCCESS The section was found. @retval EFI_SUCCESS The section was found.
@retval EFI_NOT_FOUND The section was not found. @retval EFI_NOT_FOUND The section was not found.
**/ **/
typedef typedef
EFI_STATUS EFI_STATUS
(EFIAPI *EFI_PEI_FFS_FIND_SECTION_DATA)( (EFIAPI *EFI_PEI_FFS_FIND_SECTION_DATA)(
IN FRAMEWORK_EFI_PEI_SERVICES **PeiServices, IN FRAMEWORK_EFI_PEI_SERVICES **PeiServices,
IN EFI_SECTION_TYPE SectionType, IN EFI_SECTION_TYPE SectionType,
IN EFI_FFS_FILE_HEADER *FfsFileHeader, IN EFI_FFS_FILE_HEADER *FfsFileHeader,
IN OUT VOID **SectionData IN OUT VOID **SectionData
); );
struct _FRAMEWORK_EFI_PEI_SERVICES { struct _FRAMEWORK_EFI_PEI_SERVICES {
EFI_TABLE_HEADER Hdr; EFI_TABLE_HEADER Hdr;
// //
// PPI Functions // PPI Functions
// //
EFI_PEI_INSTALL_PPI InstallPpi; EFI_PEI_INSTALL_PPI InstallPpi;
EFI_PEI_REINSTALL_PPI ReInstallPpi; EFI_PEI_REINSTALL_PPI ReInstallPpi;
EFI_PEI_LOCATE_PPI LocatePpi; EFI_PEI_LOCATE_PPI LocatePpi;
EFI_PEI_NOTIFY_PPI NotifyPpi; EFI_PEI_NOTIFY_PPI NotifyPpi;
// //
// Boot Mode Functions // Boot Mode Functions
// //
EFI_PEI_GET_BOOT_MODE GetBootMode; EFI_PEI_GET_BOOT_MODE GetBootMode;
EFI_PEI_SET_BOOT_MODE SetBootMode; EFI_PEI_SET_BOOT_MODE SetBootMode;
// //
// HOB Functions // HOB Functions
// //
EFI_PEI_GET_HOB_LIST GetHobList; EFI_PEI_GET_HOB_LIST GetHobList;
EFI_PEI_CREATE_HOB CreateHob; EFI_PEI_CREATE_HOB CreateHob;
// //
// Firmware Volume Functions // Firmware Volume Functions
// //
EFI_PEI_FFS_FIND_NEXT_VOLUME FfsFindNextVolume; EFI_PEI_FFS_FIND_NEXT_VOLUME FfsFindNextVolume;
EFI_PEI_FFS_FIND_NEXT_FILE FfsFindNextFile; EFI_PEI_FFS_FIND_NEXT_FILE FfsFindNextFile;
EFI_PEI_FFS_FIND_SECTION_DATA FfsFindSectionData; EFI_PEI_FFS_FIND_SECTION_DATA FfsFindSectionData;
// //
// PEI Memory Functions // PEI Memory Functions
// //
EFI_PEI_INSTALL_PEI_MEMORY InstallPeiMemory; EFI_PEI_INSTALL_PEI_MEMORY InstallPeiMemory;
EFI_PEI_ALLOCATE_PAGES AllocatePages; EFI_PEI_ALLOCATE_PAGES AllocatePages;
EFI_PEI_ALLOCATE_POOL AllocatePool; EFI_PEI_ALLOCATE_POOL AllocatePool;
EFI_PEI_COPY_MEM CopyMem; EFI_PEI_COPY_MEM CopyMem;
EFI_PEI_SET_MEM SetMem; EFI_PEI_SET_MEM SetMem;
// //
// Status Code // Status Code
EFI_PEI_REPORT_STATUS_CODE ReportStatusCode; //
EFI_PEI_REPORT_STATUS_CODE ReportStatusCode;
// //
// Reset // Reset
// //
EFI_PEI_RESET_SYSTEM ResetSystem; EFI_PEI_RESET_SYSTEM ResetSystem;
// //
// (the following interfaces are installed by publishing PEIM) // (the following interfaces are installed by publishing PEIM)
// //
// I/O Abstractions // I/O Abstractions
// //
EFI_PEI_CPU_IO_PPI *CpuIo; EFI_PEI_CPU_IO_PPI *CpuIo;
EFI_PEI_PCI_CFG_PPI *PciCfg; EFI_PEI_PCI_CFG_PPI *PciCfg;
}; };
typedef struct { typedef struct {
UINTN BootFirmwareVolume; UINTN BootFirmwareVolume;
UINTN SizeOfCacheAsRam; UINTN SizeOfCacheAsRam;
EFI_PEI_PPI_DESCRIPTOR *DispatchTable; EFI_PEI_PPI_DESCRIPTOR *DispatchTable;
} EFI_PEI_STARTUP_DESCRIPTOR; } EFI_PEI_STARTUP_DESCRIPTOR;
#endif #endif

View File

@ -6,13 +6,12 @@
<pre> <pre>
Section: Contents: Section: Contents:
1 General Status Code Definitions 1 Class definitions
2 Class definitions 2 Computing Unit Subclasses, Progress and Error Codes
3 Computing Unit Subclasses, Progress and Error Codes 3 Peripheral Subclasses, Progress and Error Codes.
4 Peripheral Subclasses, Progress and Error Codes. 4 IO Bus Subclasses, Progress and Error Codes.
5 IO Bus Subclasses, Progress and Error Codes. 5 Software Subclasses, Progress and Error Codes.
6 Software Subclasses, Progress and Error Codes. 6 Debug Codes
7 Debug Codes
</pre> </pre>
Copyright (c) 2007, Intel Corporation Copyright (c) 2007, Intel Corporation
@ -37,10 +36,7 @@
#include <PiPei.h> #include <PiPei.h>
// //
// /////////////////////////////////////////////////////////////////////////////
// Section 1 // Section 1
///////////////////////////////////////////////////////////////////////////////
//
// Class definitions // Class definitions
// Values of 4-127 are reserved for future use by this // Values of 4-127 are reserved for future use by this
// specification. // specification.
@ -60,11 +56,8 @@
#define EFI_SUBCLASS_SPECIFIC 0x1000 #define EFI_SUBCLASS_SPECIFIC 0x1000
#define EFI_OEM_SPECIFIC 0x8000 #define EFI_OEM_SPECIFIC 0x8000
// //
// /////////////////////////////////////////////////////////////////////////////
// Section 2 // Section 2
///////////////////////////////////////////////////////////////////////////////
//
// Computing Unit Subclass definitions. // Computing Unit Subclass definitions.
// Values of 8-127 are reserved for future use by this // Values of 8-127 are reserved for future use by this
// specification. // specification.
@ -195,10 +188,8 @@
// Computing Unit Chipset Subclass Error Code definitions. // Computing Unit Chipset Subclass Error Code definitions.
// //
///////////////////////////////////////////////////////////////////////////////
// Section 4
///////////////////////////////////////////////////////////////////////////////
// //
// Section 3
// Peripheral Subclass definitions. // Peripheral Subclass definitions.
// Values of 12-127 are reserved for future use by this // Values of 12-127 are reserved for future use by this
// specification. // specification.
@ -336,10 +327,8 @@
// Peripheral Class Network Subclass Error Code definitions. // Peripheral Class Network Subclass Error Code definitions.
// //
///////////////////////////////////////////////////////////////////////////////
// Section 5
///////////////////////////////////////////////////////////////////////////////
// //
// Section 4
// IO Bus Subclass definitions. // IO Bus Subclass definitions.
// Values of 14-127 are reserved for future use by this // Values of 14-127 are reserved for future use by this
// specification. // specification.
@ -475,10 +464,8 @@
// IO Bus Class I2C Subclass Error Code definitions. // IO Bus Class I2C Subclass Error Code definitions.
// //
///////////////////////////////////////////////////////////////////////////////
// Section 6
///////////////////////////////////////////////////////////////////////////////
// //
// Section 5
// Software Subclass definitions. // Software Subclass definitions.
// Values of 14-127 are reserved for future use by this // Values of 14-127 are reserved for future use by this
// specification. // specification.
@ -870,10 +857,8 @@
// Software Class EFI DXE Service Subclass Error Code definitions. // Software Class EFI DXE Service Subclass Error Code definitions.
// //
///////////////////////////////////////////////////////////////////////////////
// Section 7
///////////////////////////////////////////////////////////////////////////////
// //
// Section 6
// Debug Code definitions for all classes and subclass // Debug Code definitions for all classes and subclass
// Only one debug code is defined at this point and should // Only one debug code is defined at this point and should
// be used for anything that gets sent to debug stream. // be used for anything that gets sent to debug stream.