1. add some comments for structures

2. refined doxgen format comments.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6803 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff 2008-12-02 08:15:14 +00:00
parent 1fc0ee170c
commit 427987f5bc
9 changed files with 443 additions and 377 deletions

View File

@ -82,6 +82,9 @@ typedef struct {
#pragma pack()
///
/// the End tag identifies an end of resource data.
///
typedef struct {
UINT8 Desc;
UINT8 Checksum;

View File

@ -135,12 +135,8 @@ typedef struct {
UINT8 sense_key_specific_17;
} ATAPI_REQUEST_SENSE_DATA;
//
// The followings are defined in SFF-8070i(ATAPI Removable Rewritable Specification)
//
///
/// READ CAPACITY Data
/// READ CAPACITY Data, defined in SFF-8070i(ATAPI Removable Rewritable Specification)
///
typedef struct {
UINT8 LastLba3;
@ -155,6 +151,7 @@ typedef struct {
///
/// Capacity List Header + Current/Maximum Capacity Descriptor,
/// defined in SFF-8070i(ATAPI Removable Rewritable Specification)
///
typedef struct {
UINT8 reserved_0;
@ -173,7 +170,7 @@ typedef struct {
} ATAPI_READ_FORMAT_CAPACITY_DATA;
///
/// Test Unit Ready Command
/// Test Unit Ready Command, defined in SFF-8070i(ATAPI Removable Rewritable Specification)
///
typedef struct {
UINT8 opcode;
@ -191,7 +188,7 @@ typedef struct {
} ATAPI_TEST_UNIT_READY_CMD;
///
/// INQUIRY Command
/// INQUIRY Command, defined in SFF-8070i(ATAPI Removable Rewritable Specification)
///
typedef struct {
UINT8 opcode;
@ -210,7 +207,7 @@ typedef struct {
} ATAPI_INQUIRY_CMD;
///
/// REQUEST SENSE Command
/// REQUEST SENSE Command, defined in SFF-8070i(ATAPI Removable Rewritable Specification)
///
typedef struct {
UINT8 opcode;
@ -229,7 +226,7 @@ typedef struct {
} ATAPI_REQUEST_SENSE_CMD;
///
/// READ (10) Command
/// READ (10) Command, defined in SFF-8070i(ATAPI Removable Rewritable Specification)
///
typedef struct {
UINT8 opcode;
@ -248,7 +245,7 @@ typedef struct {
} ATAPI_READ10_CMD;
///
/// READ Format Capacity Command
/// READ Format Capacity Command, defined in SFF-8070i(ATAPI Removable Rewritable Specification)
///
typedef struct {
UINT8 opcode;
@ -267,7 +264,7 @@ typedef struct {
} ATAPI_READ_FORMAT_CAP_CMD;
///
/// MODE SENSE Command
/// MODE SENSE Command, defined in SFF-8070i(ATAPI Removable Rewritable Specification)
///
typedef struct {
UINT8 opcode;

View File

@ -2,8 +2,8 @@
Support for PCI 2.2 standard.
This file includes the definitions in the following specifications,
PCI Local Bus Specification, 2.0
PCI-to-PCI Bridge Architecture Specification,
PCI Local Bus Specification, 2.2
PCI-to-PCI Bridge Architecture Specification, Revision 1.2
PC Card Standard, 8.0
Copyright (c) 2006 - 2008, Intel Corporation
@ -25,8 +25,12 @@
#define PCI_MAX_DEVICE 31
#define PCI_MAX_FUNC 7
#pragma pack(1)
///
/// Common header region in PCI Configuration Space
/// Section 6.1, PCI Local Bus Specification, 2.2
///
typedef struct {
UINT16 VendorId;
UINT16 DeviceId;
@ -40,6 +44,10 @@ typedef struct {
UINT8 BIST;
} PCI_DEVICE_INDEPENDENT_REGION;
///
/// PCI Device header region in PCI Configuration Space
/// Section 6.1, PCI Local Bus Specification, 2.2
///
typedef struct {
UINT32 Bar[6];
UINT32 CISPtr;
@ -55,13 +63,18 @@ typedef struct {
UINT8 MaxLat;
} PCI_DEVICE_HEADER_TYPE_REGION;
///
/// PCI Device Configuration Space
/// Section 6.1, PCI Local Bus Specification, 2.2
///
typedef struct {
PCI_DEVICE_INDEPENDENT_REGION Hdr;
PCI_DEVICE_HEADER_TYPE_REGION Device;
} PCI_TYPE00;
///
/// defined in PCI-to-PCI Bridge Architecture Specification
/// PCI-PCI Bridge header region in PCI Configuration Space
/// Section 3.2, PCI-PCI Bridge Architecture, Version 1.2
///
typedef struct {
UINT32 Bar[2];
@ -88,6 +101,10 @@ typedef struct {
UINT16 BridgeControl;
} PCI_BRIDGE_CONTROL_REGISTER;
///
/// PCI-to-PCI Bridge Configuration Space
/// Section 3.2, PCI-PCI Bridge Architecture, Version 1.2
///
typedef struct {
PCI_DEVICE_INDEPENDENT_REGION Hdr;
PCI_BRIDGE_CONTROL_REGISTER Bridge;
@ -99,7 +116,8 @@ typedef union {
} PCI_TYPE_GENERIC;
///
/// CardBus Conroller Configuration Space, defined in PC Card Standard. 8.0
/// CardBus Conroller Configuration Space,
/// Section 4.5.1, PC Card Standard. 8.0
///
typedef struct {
UINT32 CardBusSocketReg; ///< Cardus Socket/ExCA Base
@ -437,13 +455,18 @@ typedef union {
#define EFI_PCI_CAPABILITY_ID_MSI 0x05
#define EFI_PCI_CAPABILITY_ID_HOTPLUG 0x06
///
/// Capabilities List Header
/// Section 6.7, PCI Local Bus Specification, 2.2
///
typedef struct {
UINT8 CapabilityID;
UINT8 NextItemPtr;
} EFI_PCI_CAPABILITY_HDR;
///
/// Capability EFI_PCI_CAPABILITY_ID_PMI, defined in PCI Power Management Interface Specifiction
/// Power Management Register Block Definition
/// Section 3.2, PCI Power Management Interface Specifiction, Revision 1.2
///
typedef struct {
EFI_PCI_CAPABILITY_HDR Hdr;
@ -454,7 +477,8 @@ typedef struct {
} EFI_PCI_CAPABILITY_PMI;
///
/// Capability EFI_PCI_CAPABILITY_ID_AGP, defined in Accelerated Graphics Port Interface Specification
/// A.G.P Capability
/// Section 6.1.4, Accelerated Graphics Port Interface Specification, Revision 1.0
///
typedef struct {
EFI_PCI_CAPABILITY_HDR Hdr;
@ -465,7 +489,8 @@ typedef struct {
} EFI_PCI_CAPABILITY_AGP;
///
/// Capability EFI_PCI_CAPABILITY_ID_VPD, in PCI2.2 Spec.
/// VPD Capability Structure
/// Appendix I, PCI Local Bus Specification, 2.2
///
typedef struct {
EFI_PCI_CAPABILITY_HDR Hdr;
@ -474,7 +499,8 @@ typedef struct {
} EFI_PCI_CAPABILITY_VPD;
///
/// Capability EFI_PCI_CAPABILITY_ID_SLOTID, defined in PCI-to-PCI Bridge Architeture Specification
/// Slot Numbering Capabilities Register
/// Section 3.2.6, PCI-to-PCI Bridge Architeture Specification, Revision 1.2
///
typedef struct {
EFI_PCI_CAPABILITY_HDR Hdr;
@ -483,7 +509,8 @@ typedef struct {
} EFI_PCI_CAPABILITY_SLOTID;
///
/// Capability EFI_PCI_CAPABILITY_ID_MSI, defined in PCI2.2
/// Message Capability Structure for 32-bit Message Address
/// Section 6.8.1, PCI Local Bus Specification, 2.2
///
typedef struct {
EFI_PCI_CAPABILITY_HDR Hdr;
@ -492,6 +519,10 @@ typedef struct {
UINT16 MsgDataReg;
} EFI_PCI_CAPABILITY_MSI32;
///
/// Message Capability Structure for 64-bit Message Address
/// Section 6.8.1, PCI Local Bus Specification, 2.2
///
typedef struct {
EFI_PCI_CAPABILITY_HDR Hdr;
UINT16 MsgCtrlReg;
@ -501,7 +532,8 @@ typedef struct {
} EFI_PCI_CAPABILITY_MSI64;
///
/// Capability EFI_PCI_CAPABILITY_ID_HOTPLUG, defined in CompactPCI Hot Swap Specification PICMG 2.1, R1.0
/// Capability EFI_PCI_CAPABILITY_ID_HOTPLUG,
/// CompactPCI Hot Swap Specification PICMG 2.1, R1.0
///
typedef struct {
EFI_PCI_CAPABILITY_HDR Hdr;
@ -546,12 +578,20 @@ typedef struct {
#define PCI_CODE_TYPE_PCAT_IMAGE 0x00
#define EFI_PCI_EXPANSION_ROM_HEADER_COMPRESSED 0x0001 ///< defined in UEFI spec.
///
/// Standard PCI Expansion ROM Header
/// Section 13.4.2, Unified Extensible Firmware Interface Specification, Version 2.1
///
typedef struct {
UINT16 Signature; ///< 0xaa55
UINT8 Reserved[0x16];
UINT16 PcirOffset;
} PCI_EXPANSION_ROM_HEADER;
///
/// Legacy ROM Header Extensions
/// Section 6.3.3.1, PCI Local Bus Specification, 2.2
///
typedef struct {
UINT16 Signature; ///< 0xaa55
UINT8 Size512;
@ -560,6 +600,10 @@ typedef struct {
UINT16 PcirOffset;
} EFI_LEGACY_EXPANSION_ROM_HEADER;
///
/// PCI Data Structure Format
/// Section 6.3.1.2, PCI Local Bus Specification, 2.2
///
typedef struct {
UINT32 Signature; ///< "PCIR"
UINT16 VendorId;
@ -576,7 +620,8 @@ typedef struct {
} PCI_DATA_STRUCTURE;
///
/// defined in EFI/UEFI Spec
/// EFI PCI Expansion ROM Header
/// Section 13.4.2, Unified Extensible Firmware Interface Specification, Version 2.1
///
typedef struct {
UINT16 Signature; ///< 0xaa55

View File

@ -34,7 +34,8 @@
#pragma pack(1)
///
/// Capability EFI_PCI_CAPABILITY_ID_PCIX, defined in PCI-X Addendum to the PCI Local Bus Specification
/// PCI-X Capabilities List,
/// Section 7.2, PCI-X Addendum to the PCI Local Bus Specification, Revision 1.0b
///
typedef struct {
EFI_PCI_CAPABILITY_HDR Hdr;
@ -42,8 +43,9 @@ typedef struct {
UINT32 StatusReg;
} EFI_PCI_CAPABILITY_PCIX;
///
/// Capability EFI_PCI_CAPABILITY_PCIX_BRDG, defined in PCI-X Addendum to the PCI Local Bus Specification
///
/// PCI-X Bridge Capabilities List,
/// Section 8.6.2, PCI-X Addendum to the PCI Local Bus Specification, Revision 1.0b
///
typedef struct {
EFI_PCI_CAPABILITY_HDR Hdr;

View File

@ -33,7 +33,8 @@
#pragma pack(1)
///
/// defined in PCI Firmware Specification
/// PCI Data Structure Format
/// Section 5.1.2, PCI Firmware Specification, Revision 3.0
///
typedef struct {
UINT32 Signature; ///< "PCIR"

View File

@ -21,9 +21,9 @@
#ifndef __PE_IMAGE_H__
#define __PE_IMAGE_H__
///
/// PE32+ Subsystem type for EFI images
///
//
// PE32+ Subsystem type for EFI images
//
#define EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION 10
#define EFI_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
#define EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12
@ -32,9 +32,9 @@
#define EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER 13 ///< defined PI Specification, 1.0
///
/// PE32+ Machine type for EFI images
///
//
// PE32+ Machine type for EFI images
//
#define IMAGE_FILE_MACHINE_I386 0x014c
#define IMAGE_FILE_MACHINE_IA64 0x0200
#define IMAGE_FILE_MACHINE_EBC 0x0EBC
@ -48,9 +48,9 @@
#define EFI_IMAGE_MACHINE_EBC IMAGE_FILE_MACHINE_EBC
#define EFI_IMAGE_MACHINE_X64 IMAGE_FILE_MACHINE_X64
///
/// EXE file formats
///
//
// EXE file formats
//
#define EFI_IMAGE_DOS_SIGNATURE SIGNATURE_16('M', 'Z')
#define EFI_IMAGE_OS2_SIGNATURE SIGNATURE_16('N', 'E')
#define EFI_IMAGE_OS2_SIGNATURE_LE SIGNATURE_16('L', 'E')
@ -100,9 +100,9 @@ typedef struct {
///
#define EFI_IMAGE_SIZEOF_FILE_HEADER 20
///
/// Characteristics
///
//
// Characteristics
//
#define EFI_IMAGE_FILE_RELOCS_STRIPPED BIT0 ///< 0x0001 Relocation info stripped from file.
#define EFI_IMAGE_FILE_EXECUTABLE_IMAGE BIT1 ///< 0x0002 File is executable (i.e. no unresolved externel references).
#define EFI_IMAGE_FILE_LINE_NUMS_STRIPPED BIT2 ///< 0x0004 Line nunbers stripped from file.
@ -114,9 +114,9 @@ typedef struct {
#define EFI_IMAGE_FILE_DLL BIT13 ///< 0x2000 File is a DLL.
#define EFI_IMAGE_FILE_BYTES_REVERSED_HI BIT15 ///< 0x8000 Bytes of machine word are reversed.
///
/// Other Machine Types
///
//
// Other Machine Types
//
#define EFI_IMAGE_FILE_MACHINE_UNKNOWN 0 ///< Any machine type
#define EFI_IMAGE_FILE_MACHINE_I386 0x14c ///< Intel 386.
#define EFI_IMAGE_FILE_MACHINE_R3000 0x162 ///< MIPS* little-endian, 0540 big-endian
@ -136,9 +136,9 @@ typedef struct {
#define EFI_IMAGE_ROM_OPTIONAL_HDR_MAGIC 0x107
///
/// Directory Entries
///
//
// Directory Entries
//
#define EFI_IMAGE_DIRECTORY_ENTRY_EXPORT 0
#define EFI_IMAGE_DIRECTORY_ENTRY_IMPORT 1
#define EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE 2
@ -160,7 +160,10 @@ typedef struct {
/// after NT additional fields.
///
#define EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b
///
/// Optional Header Standard Fields for PE32
///
typedef struct {
///
/// Standard fields.
@ -175,7 +178,7 @@ typedef struct {
UINT32 BaseOfCode;
UINT32 BaseOfData; ///< PE32 contains this additional field, which is absent in PE32+
///
/// NT additional fields.
/// Optional Header Windows-Specific Fields.
///
UINT32 ImageBase;
UINT32 SectionAlignment;
@ -209,10 +212,13 @@ typedef struct {
///
#define EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b
///
/// Optional Header Standard Fields for PE32+
///
typedef struct {
//
// Standard fields.
//
///
/// Standard fields.
///
UINT16 Magic;
UINT8 MajorLinkerVersion;
UINT8 MinorLinkerVersion;
@ -221,9 +227,9 @@ typedef struct {
UINT32 SizeOfUninitializedData;
UINT32 AddressOfEntryPoint;
UINT32 BaseOfCode;
//
// NT additional fields.
//
///
/// Optional Header Windows-Specific Fields.
///
UINT64 ImageBase;
UINT32 SectionAlignment;
UINT32 FileAlignment;
@ -331,9 +337,9 @@ typedef EFI_IMAGE_NT_HEADERS64 EFI_IMAGE_NT_HEADERS;
) \
)
///
/// Other Windows Subsystem Values
///
//
// Other Windows Subsystem Values
//
#define EFI_IMAGE_SUBSYSTEM_UNKNOWN 0
#define EFI_IMAGE_SUBSYSTEM_NATIVE 1
#define EFI_IMAGE_SUBSYSTEM_WINDOWS_GUI 2
@ -346,6 +352,9 @@ typedef EFI_IMAGE_NT_HEADERS64 EFI_IMAGE_NT_HEADERS;
///
#define EFI_IMAGE_SIZEOF_SHORT_NAME 8
///
/// Section Table, this table immediately follows the optional header
///
typedef struct {
UINT8 Name[EFI_IMAGE_SIZEOF_SHORT_NAME];
union {
@ -367,9 +376,9 @@ typedef struct {
///
#define EFI_IMAGE_SIZEOF_SECTION_HEADER 40
///
/// Section Flags Values
///
//
// Section Flags Values
//
#define EFI_IMAGE_SCN_TYPE_NO_PAD BIT3 ///< 0x00000008 ///< Reserved.
#define EFI_IMAGE_SCN_CNT_CODE BIT5 ///< 0x00000020
#define EFI_IMAGE_SCN_CNT_INITIALIZED_DATA BIT6 ///< 0x00000040
@ -401,17 +410,17 @@ typedef struct {
///
#define EFI_IMAGE_SIZEOF_SYMBOL 18
///
/// Symbols have a section number of the section in which they are
/// defined. Otherwise, section numbers have the following meanings:
///
//
// Symbols have a section number of the section in which they are
// defined. Otherwise, section numbers have the following meanings:
//
#define EFI_IMAGE_SYM_UNDEFINED (UINT16) 0 ///< Symbol is undefined or is common.
#define EFI_IMAGE_SYM_ABSOLUTE (UINT16) -1 ///< Symbol is an absolute value.
#define EFI_IMAGE_SYM_DEBUG (UINT16) -2 ///< Symbol is a special debug item.
///
/// Symbol Type (fundamental) values.
///
//
// Symbol Type (fundamental) values.
//
#define EFI_IMAGE_SYM_TYPE_NULL 0 ///< no type.
#define EFI_IMAGE_SYM_TYPE_VOID 1 ///< no valid type.
#define EFI_IMAGE_SYM_TYPE_CHAR 2 ///< type character.
@ -429,17 +438,17 @@ typedef struct {
#define EFI_IMAGE_SYM_TYPE_UINT 14
#define EFI_IMAGE_SYM_TYPE_DWORD 15
///
/// Symbol Type (derived) values.
///
//
// Symbol Type (derived) values.
//
#define EFI_IMAGE_SYM_DTYPE_NULL 0 ///< no derived type.
#define EFI_IMAGE_SYM_DTYPE_POINTER 1
#define EFI_IMAGE_SYM_DTYPE_FUNCTION 2
#define EFI_IMAGE_SYM_DTYPE_ARRAY 3
///
/// Storage classes.
///
//
// Storage classes.
//
#define EFI_IMAGE_SYM_CLASS_END_OF_FUNCTION ((UINT8) -1)
#define EFI_IMAGE_SYM_CLASS_NULL 0
#define EFI_IMAGE_SYM_CLASS_AUTOMATIC 1
@ -477,18 +486,18 @@ typedef struct {
#define EFI_IMAGE_N_BTSHFT 4
#define EFI_IMAGE_N_TSHIFT 2
///
/// Communal selection types.
///
//
// Communal selection types.
//
#define EFI_IMAGE_COMDAT_SELECT_NODUPLICATES 1
#define EFI_IMAGE_COMDAT_SELECT_ANY 2
#define EFI_IMAGE_COMDAT_SELECT_SAME_SIZE 3
#define EFI_IMAGE_COMDAT_SELECT_EXACT_MATCH 4
#define EFI_IMAGE_COMDAT_SELECT_ASSOCIATIVE 5
///
/// the following values only be referred in PeCoff, not defined in PECOFF.
///
//
// the following values only be referred in PeCoff, not defined in PECOFF.
//
#define EFI_IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 1
#define EFI_IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2
#define EFI_IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3
@ -507,9 +516,9 @@ typedef struct {
///
#define EFI_IMAGE_SIZEOF_RELOCATION 10
///
/// I386 relocation types.
///
//
// I386 relocation types.
//
#define EFI_IMAGE_REL_I386_ABSOLUTE 0x0000 ///< Reference is absolute, no relocation is necessary
#define EFI_IMAGE_REL_I386_DIR16 0x0001 ///< Direct 16-bit reference to the symbols virtual address
#define EFI_IMAGE_REL_I386_REL16 0x0002 ///< PC-relative 16-bit reference to the symbols virtual address
@ -520,9 +529,9 @@ typedef struct {
#define EFI_IMAGE_REL_I386_SECREL 0x000B
#define EFI_IMAGE_REL_I386_REL32 0x0014 ///< PC-relative 32-bit reference to the symbols virtual address
///
/// x64 processor relocation types.
///
//
// x64 processor relocation types.
//
#define IMAGE_REL_AMD64_ABSOLUTE 0x0000
#define IMAGE_REL_AMD64_ADDR64 0x0001
#define IMAGE_REL_AMD64_ADDR32 0x0002
@ -554,9 +563,9 @@ typedef struct {
///
#define EFI_IMAGE_SIZEOF_BASE_RELOCATION 8
///
/// Based relocation types.
///
//
// Based relocation types.
//
#define EFI_IMAGE_REL_BASED_ABSOLUTE 0
#define EFI_IMAGE_REL_BASED_HIGH 1
#define EFI_IMAGE_REL_BASED_LOW 2
@ -583,9 +592,9 @@ typedef struct {
///
#define EFI_IMAGE_SIZEOF_LINENUMBER 6
///
/// Archive format.
///
//
// Archive format.
//
#define EFI_IMAGE_ARCHIVE_START_SIZE 8
#define EFI_IMAGE_ARCHIVE_START "!<arch>\n"
#define EFI_IMAGE_ARCHIVE_END "`\n"
@ -593,6 +602,9 @@ typedef struct {
#define EFI_IMAGE_ARCHIVE_LINKER_MEMBER "/ "
#define EFI_IMAGE_ARCHIVE_LONGNAMES_MEMBER "// "
///
/// Archive Member Headers
///
typedef struct {
UINT8 Name[16]; ///< File member name - `/' terminated.
UINT8 Date[12]; ///< File member date - decimal.
@ -609,9 +621,9 @@ typedef struct {
#define EFI_IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60
///
/// DLL Support
///
//
// DLL Support
//
///
/// Export Directory Table
@ -638,6 +650,9 @@ typedef struct {
UINT8 Name[1];
} EFI_IMAGE_IMPORT_BY_NAME;
///
/// Import Address Table RVA (Thunk Table)
///
typedef struct {
union {
UINT32 Function;

File diff suppressed because it is too large Load Diff

View File

@ -334,6 +334,7 @@ typedef enum {
#pragma pack(1)
///
/// Descriptor header for Report/Physical Descriptors
/// HID 1.1, section 6.2.1
///
typedef struct hid_class_descriptor {
UINT8 DescriptorType;
@ -343,6 +344,7 @@ typedef struct hid_class_descriptor {
///
/// The HID descriptor identifies the length and type
/// of subordinate descriptors for a device.
/// HID 1.1, section 6.2.1
///
typedef struct hid_descriptor {
UINT8 Length;

View File

@ -1,6 +1,6 @@
/** @file
ACPI Watchdog Action Table (WADT) as defined at
Microsoft Hardware Watchdog Timers Design Specification
Microsoft Hardware Watchdog Timers Design Specification.
Copyright (c) 2008, Intel Corporation
All rights reserved. This program and the accompanying materials