]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkPkg/Include/Framework/Legacy16.h
Clean up Doxygen commenting.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Framework / Legacy16.h
index 5ca865aaee58f53d6cdaec381a0401531ac26331..a4ce8a054db38f23eebff0bca29bf95b63882a23 100644 (file)
@@ -1,10 +1,10 @@
-/** @file\r
+/** @file
   The header file provides interface definitions exposed by CSM (Compatible Support Module).\r
   \r
   The CSM provides compatibility support between the Framework and traditional, legacy BIOS code \r
   and allows booting a traditional OS or booting an EFI OS off a device that requires a traditional \r
   option ROM (OpROM).  \r
-\r
+
   These definitions are from Compatibility Support Module Spec Version 0.97.\r
   
   Copyright (c) 2007-2009, Intel Corporation
@@ -30,7 +30,7 @@ typedef UINT8                       PARALLEL_MODE;
 
 #define EFI_COMPATIBILITY16_TABLE_SIGNATURE SIGNATURE_32 ('I', 'F', 'E', '$')
 
-///\r
+///
 /// There is a table located within the traditional BIOS in either the 0xF000:xxxx or 0xE000:xxxx\r
 /// physical address range. It is located on a 16-byte boundary and provides the physical address of the\r
 /// entry point for the Compatibility16 functions. These functions provide the platform-specific\r
@@ -38,67 +38,67 @@ typedef UINT8                       PARALLEL_MODE;
 /// thunking by using EFI_LEGACY_BIOS_PROTOCOL.FarCall86() with the 32-bit physical\r
 /// entry point.\r
 ///
-typedef struct {\r
+typedef struct {
   ///\r
   /// The string "$EFI" denotes the start of the EfiCompatibility table. Byte 0 is "I," byte\r
   /// 1 is "F," byte 2 is "E," and byte 3 is "$" and is normally accessed as a DWORD or UINT32.\r
   ///
-  UINT32                            Signature;\r
+  UINT32                            Signature;
   \r
   ///\r
   /// The value required such that byte checksum of TableLength equals zero.\r
   ///
-  UINT8                             TableChecksum;\r
+  UINT8                             TableChecksum;
   \r
   ///\r
   /// The length of this table.\r
   ///
-  UINT8                             TableLength;\r
+  UINT8                             TableLength;
   \r
   ///\r
   /// The major EFI revision for which this table was generated.\r
   /// 
-  UINT8                             EfiMajorRevision;\r
+  UINT8                             EfiMajorRevision;
   \r
   ///\r
   /// The minor EFI revision for which this table was generated.\r
   ///
-  UINT8                             EfiMinorRevision;\r
+  UINT8                             EfiMinorRevision;
   \r
   ///\r
   /// The major revision of this table.\r
   ///
-  UINT8                             TableMajorRevision;\r
+  UINT8                             TableMajorRevision;
   \r
   ///\r
   /// The minor revision of this table.\r
   ///
-  UINT8                             TableMinorRevision;\r
+  UINT8                             TableMinorRevision;
   \r
   ///\r
   /// Reserved for future usage.\r
   ///
-  UINT16                            Reserved;\r
+  UINT16                            Reserved;
   \r
   ///\r
   /// The segment of the entry point within the traditional BIOS for Compatibility16 functions.\r
   ///
-  UINT16                            Compatibility16CallSegment;\r
+  UINT16                            Compatibility16CallSegment;
   \r
   ///\r
   /// The offset of the entry point within the traditional BIOS for Compatibility16 functions.\r
   ///
-  UINT16                            Compatibility16CallOffset;\r
+  UINT16                            Compatibility16CallOffset;
   \r
   ///\r
   /// The segment of the entry point within the traditional BIOS for EfiCompatibility to invoke the PnP installation check.\r
   ///
-  UINT16                            PnPInstallationCheckSegment;\r
+  UINT16                            PnPInstallationCheckSegment;
   \r
   ///\r
   /// The Offset of the entry point within the traditional BIOS for EfiCompatibility to invoke the PnP installation check.\r
   ///
-  UINT16                            PnPInstallationCheckOffset;\r
+  UINT16                            PnPInstallationCheckOffset;
   \r
   ///\r
   /// EFI system resources table. Type EFI_SYSTEM_TABLE is defined in the IntelPlatform Innovation Framework for EFI \r
@@ -109,7 +109,7 @@ typedef struct {
   ///\r
   /// The address of an OEM-provided identifier string. The string is null terminated.\r
   ///
-  UINT32                            OemIdStringPointer;\r
+  UINT32                            OemIdStringPointer;
   \r
   ///\r
   /// The 32-bit physical address where ACPI RSD PTR is stored within the traditional\r
@@ -117,92 +117,92 @@ typedef struct {
   /// reserved is the maximum for ACPI 2.0. The EfiCompatibility will fill in the ACPI\r
   /// RSD PTR with either the ACPI 1.0b or 2.0 values.\r
   ///
-  UINT32                            AcpiRsdPtrPointer;\r
+  UINT32                            AcpiRsdPtrPointer;
   \r
   ///\r
   /// The OEM revision number. Usage is undefined but provided for OEM module usage.\r
   ///
-  UINT16                            OemRevision;\r
+  UINT16                            OemRevision;
   \r
   ///\r
   /// The 32-bit physical address where INT15 E820 data is stored within the traditional\r
   /// BIOS. The EfiCompatibility code will fill in the E820Pointer value and copy the\r
   /// data to the indicated area.\r
   ///
-  UINT32                            E820Pointer;\r
+  UINT32                            E820Pointer;
   \r
   ///\r
   /// The length of the E820 data and is filled in by the EfiCompatibility code.\r
   ///
-  UINT32                            E820Length;\r
+  UINT32                            E820Length;
   \r
   ///\r
   /// The 32-bit physical address where the $PIR table is stored in the traditional BIOS.\r
   /// The EfiCompatibility code will fill in the IrqRoutingTablePointer value and\r
   /// copy the data to the indicated area.\r
   ///
-  UINT32                            IrqRoutingTablePointer;\r
+  UINT32                            IrqRoutingTablePointer;
   \r
   ///\r
   /// The length of the $PIR table and is filled in by the EfiCompatibility code.\r
   ///
-  UINT32                            IrqRoutingTableLength;\r
+  UINT32                            IrqRoutingTableLength;
   \r
   ///\r
   /// The 32-bit physical address where the MP table is stored in the traditional BIOS.\r
   /// The EfiCompatibility code will fill in the MpTablePtr value and copy the data to the indicated area.\r
   ///
-  UINT32                            MpTablePtr;\r
+  UINT32                            MpTablePtr;
   \r
   ///\r
   /// The length of the MP table and is filled in by the EfiCompatibility code.\r
   ///
-  UINT32                            MpTableLength;\r
+  UINT32                            MpTableLength;
   \r
   ///\r
   /// The segment of the OEM-specific INT table/code.\r
   /// 
-  UINT16                            OemIntSegment;\r
+  UINT16                            OemIntSegment;
   \r
   ///\r
   /// The offset of the OEM-specific INT table/code.\r
   ///
-  UINT16                            OemIntOffset;\r
+  UINT16                            OemIntOffset;
   \r
   ///\r
   /// The segment of the OEM-specific 32-bit table/code.\r
   ///
-  UINT16                            Oem32Segment;\r
+  UINT16                            Oem32Segment;
   \r
   ///\r
   /// The offset of the OEM-specific 32-bit table/code.\r
   ///
-  UINT16                            Oem32Offset;\r
+  UINT16                            Oem32Offset;
   \r
   ///\r
   /// The segment of the OEM-specific 16-bit table/code.\r
   ///
-  UINT16                            Oem16Segment;\r
+  UINT16                            Oem16Segment;
   \r
   ///\r
   /// The offset of the OEM-specific 16-bit table/code.\r
   ///
-  UINT16                            Oem16Offset;\r
+  UINT16                            Oem16Offset;
   \r
   ///\r
   /// The segment of the TPM binary passed to 16-bit CSM.\r
   ///
-  UINT16                            TpmSegment;\r
+  UINT16                            TpmSegment;
   \r
   ///\r
   /// The offset of the TPM binary passed to 16-bit CSM.\r
   ///
-  UINT16                            TpmOffset;\r
+  UINT16                            TpmOffset;
   \r
   ///\r
   /// A pointer to a string identifying the independent BIOS vendor.\r
   ///
-  UINT32                            IbvPointer;\r
+  UINT32                            IbvPointer;
   \r
   ///\r
   /// This field is NULL for all systems not supporting PCI Express. This field is the base\r
@@ -212,7 +212,7 @@ typedef struct {
   /// Compatibility16InitializeYourself() is defined in Compatability16\r
   /// Functions.\r
   ///
-  UINT32                            PciExpressBase;\r
+  UINT32                            PciExpressBase;
   \r
   ///\r
   /// Maximum PCI bus number assigned.\r
@@ -224,7 +224,7 @@ typedef struct {
 /// Functions provided by the CSM binary which communicate between the EfiCompatibility \r
 /// and Compatability16 code.
 ///
-typedef enum {\r
+typedef enum {
   ///\r
   /// Causes the Compatibility16 code to do any internal initialization required.\r
   /// Input:\r
@@ -233,7 +233,7 @@ typedef enum {
   /// Return:\r
   ///   AX = Return Status codes\r
   ///
-  Compatibility16InitializeYourself    = 0x0000,\r
+  Compatibility16InitializeYourself    = 0x0000,
   \r
   ///\r
   /// Causes the Compatibility16 BIOS to perform any drive number translations to match the boot sequence.\r
@@ -243,7 +243,7 @@ typedef enum {
   /// Return:\r
   ///   AX = Returned status codes\r
   ///
-  Compatibility16UpdateBbs             = 0x0001,\r
+  Compatibility16UpdateBbs             = 0x0001,
   \r
   ///\r
   /// Allows the Compatibility16 code to perform any final actions before booting. The Compatibility16\r
@@ -254,7 +254,7 @@ typedef enum {
   /// Return:\r
   ///   AX = Returned status codes\r
   ///
-  Compatibility16PrepareToBoot         = 0x0002,\r
+  Compatibility16PrepareToBoot         = 0x0002,
   \r
   ///\r
   /// Causes the Compatibility16 BIOS to boot. The Compatibility16 code is Read/Only.\r
@@ -263,7 +263,7 @@ typedef enum {
   /// Output:\r
   ///   AX = Returned status codes\r
   ///
-  Compatibility16Boot                  = 0x0003,\r
+  Compatibility16Boot                  = 0x0003,
   \r
   ///\r
   /// Allows the Compatibility16 code to get the last device from which a boot was attempted. This is\r
@@ -274,7 +274,7 @@ typedef enum {
   ///   AX = Returned status codes\r
   ///   BX = Priority number of the boot device.\r
   ///
-  Compatibility16RetrieveLastBootDevice= 0x0004,\r
+  Compatibility16RetrieveLastBootDevice= 0x0004,
   \r
   ///\r
   /// Allows the Compatibility16 code rehook INT13, INT18, and/or INT19 after dispatching a legacy OpROM.\r
@@ -285,7 +285,7 @@ typedef enum {
   ///   AX = Returned status codes\r
   ///   BX = Number of non-BBS-compliant devices found. Equals 0 if BBS compliant.\r
   ///
-  Compatibility16DispatchOprom         = 0x0005,\r
+  Compatibility16DispatchOprom         = 0x0005,
   \r
   ///\r
   /// Finds a free area in the 0xFxxxx or 0xExxxx region of the specified length and returns the address\r
@@ -302,7 +302,7 @@ typedef enum {
   ///   AX = Returned status codes\r
   ///   DS:BX = Address of the region\r
   ///
-  Compatibility16GetTableAddress       = 0x0006,\r
+  Compatibility16GetTableAddress       = 0x0006,
   \r
   ///\r
   /// Enables the EfiCompatibility module to do any nonstandard processing of keyboard LEDs or state.\r
@@ -315,7 +315,7 @@ typedef enum {
   /// Output:\r
   ///     AX = Returned status codes\r
   ///
-  Compatibility16SetKeyboardLeds       = 0x0007,\r
+  Compatibility16SetKeyboardLeds       = 0x0007,
   \r
   ///\r
   /// Enables the EfiCompatibility module to install an interrupt handler for PCI mass media devices that\r
@@ -339,67 +339,67 @@ typedef struct {
   UINT16  OpromSegment;                 ///< The segment where the OpROM was placed. Offset is assumed to be 3.
   UINT8   PciBus;                       ///< The PCI bus.
   UINT8   PciDeviceFunction;            ///< The PCI device * 0x08 | PCI function.
-  UINT8   NumberBbsEntries;             ///< The number of valid BBS table entries upon entry and exit. The IBV code may\r
-                                        ///< increase this number, if BBS-compliant devices also hook INTs in order to force the\r
+  UINT8   NumberBbsEntries;             ///< The number of valid BBS table entries upon entry and exit. The IBV code may
+                                        ///< increase this number, if BBS-compliant devices also hook INTs in order to force the
                                         ///< OpROM BIOS Setup to be executed.
   VOID    *BbsTablePointer;             ///< Pointer to the BBS table.
-  UINT16  OpromDestinationSegment;      ///< The segment where the OpROM can be relocated to. If this value is 0x0000, this\r
+  UINT16  OpromDestinationSegment;      ///< The segment where the OpROM can be relocated to. If this value is 0x0000, this
                                         ///< means that the relocation of this run time code is not supported.
 } EFI_DISPATCH_OPROM_TABLE;
 
 ///
 /// EFI_TO_COMPATIBILITY16_INIT_TABLE
 ///
-typedef struct {\r
+typedef struct {
   ///\r
   /// Starting address of memory under 1 MB. The ending address is assumed to be 640 KB or 0x9FFFF.\r
   ///
-  UINT32                            BiosLessThan1MB;\r
+  UINT32                            BiosLessThan1MB;
   \r
   ///\r
   /// Starting address of the high memory block.\r
   ///
-  UINT32                            HiPmmMemory;\r
+  UINT32                            HiPmmMemory;
   \r
   ///\r
   /// Length of high memory block.\r
   ///
-  UINT32                            HiPmmMemorySizeInBytes;\r
+  UINT32                            HiPmmMemorySizeInBytes;
   \r
   ///\r
   /// The segment of the reverse thunk call code.\r
   ///
-  UINT16                            ReverseThunkCallSegment;\r
+  UINT16                            ReverseThunkCallSegment;
   \r
   ///\r
   /// The offset of the reverse thunk call code.\r
   ///
-  UINT16                            ReverseThunkCallOffset;\r
+  UINT16                            ReverseThunkCallOffset;
   \r
   ///\r
   /// The number of E820 entries copied to the Compatibility16 BIOS.\r
   ///
-  UINT32                            NumberE820Entries;\r
+  UINT32                            NumberE820Entries;
   \r
   ///\r
   /// The amount of usable memory above 1 MB, e.g., E820 type 1 memory.\r
   ///
-  UINT32                            OsMemoryAbove1Mb;\r
+  UINT32                            OsMemoryAbove1Mb;
   \r
   ///\r
   /// The start of thunk code in main memory. Memory cannot be used by BIOS or PMM.\r
   ///
-  UINT32                            ThunkStart;\r
+  UINT32                            ThunkStart;
   \r
   ///\r
   /// The size of the thunk code.\r
   ///
-  UINT32                            ThunkSizeInBytes;\r
+  UINT32                            ThunkSizeInBytes;
   \r
   ///\r
   /// Starting address of memory under 1 MB.\r
   ///
-  UINT32                            LowPmmMemory;\r
+  UINT32                            LowPmmMemory;
   \r
   ///\r
   /// Length of low Memory block.\r
@@ -408,7 +408,7 @@ typedef struct {
 } EFI_TO_COMPATIBILITY16_INIT_TABLE;
 
 ///
-/// DEVICE_PRODUCER_SERIAL & its modes
+/// DEVICE_PRODUCER_SERIAL
 ///
 typedef struct {
   UINT16                            Address;    ///< I/O address assigned to the serial port
@@ -416,14 +416,18 @@ typedef struct {
   SERIAL_MODE                       Mode;       ///< Mode of serial port. Values are defined below.
 } DEVICE_PRODUCER_SERIAL;
 
+///
+/// DEVICE_PRODUCER_SERIAL's modes
+///@{
 #define DEVICE_SERIAL_MODE_NORMAL               0x00
 #define DEVICE_SERIAL_MODE_IRDA                 0x01
 #define DEVICE_SERIAL_MODE_ASK_IR               0x02
 #define DEVICE_SERIAL_MODE_DUPLEX_HALF          0x00
 #define DEVICE_SERIAL_MODE_DUPLEX_FULL          0x10
+///@)
 
 ///
-/// DEVICE_PRODUCER_PARALLEL & its modes
+/// DEVICE_PRODUCER_PARALLEL
 ///
 typedef struct {
   UINT16                            Address;  ///< I/O address assigned to the parallel port
@@ -432,10 +436,14 @@ typedef struct {
   PARALLEL_MODE                     Mode;     ///< Mode of the parallel port. Values are defined below.
 } DEVICE_PRODUCER_PARALLEL;
 
+///
+/// DEVICE_PRODUCER_PARALLEL's modes
+///@{
 #define DEVICE_PARALLEL_MODE_MODE_OUTPUT_ONLY   0x00
 #define DEVICE_PARALLEL_MODE_MODE_BIDIRECTIONAL 0x01
 #define DEVICE_PARALLEL_MODE_MODE_EPP           0x02
 #define DEVICE_PARALLEL_MODE_MODE_ECP           0x03
+///@}
 
 ///
 /// DEVICE_PRODUCER_FLOPPY
@@ -475,9 +483,9 @@ typedef struct {
 } ATAPI_IDENTIFY;
 
 ///
-/// HDD_INFO & its status
+/// HDD_INFO
 ///
-typedef struct {\r
+typedef struct {
   ///\r
   /// Status of IDE device. Values are defined below. There is one HDD_INFO structure\r
   /// per IDE controller. The IdentifyDrive is per drive. Index 0 is master and index\r
@@ -488,34 +496,34 @@ typedef struct {
   ///\r
   /// PCI bus of IDE controller.\r
   ///
-  UINT32                            Bus;\r
+  UINT32                            Bus;
   \r
   ///\r
   /// PCI device of IDE controller.\r
   ///
-  UINT32                            Device;\r
+  UINT32                            Device;
   \r
   ///\r
   /// PCI function of IDE controller.\r
   ///
-  UINT32                            Function;\r
+  UINT32                            Function;
   \r
   ///\r
   /// Command ports base address.\r
   ///
-  UINT16                            CommandBaseAddress;\r
+  UINT16                            CommandBaseAddress;
   \r
   ///\r
   /// Control ports base address.\r
   ///
-  UINT16                            ControlBaseAddress;\r
+  UINT16                            ControlBaseAddress;
   \r
   ///\r
   /// Bus master address\r
   ///
-  UINT16                            BusMasterAddress;\r
+  UINT16                            BusMasterAddress;
   
-  UINT8                             HddIrq;\r
+  UINT8                             HddIrq;
   \r
   ///\r
   /// Data that identifies the drive data, one per possible attached drive\r
@@ -523,6 +531,9 @@ typedef struct {
   ATAPI_IDENTIFY                    IdentifyDrive[2];
 } HDD_INFO;
 
+///
+/// HDD_INFO status bits
+///
 #define HDD_PRIMARY               0x01
 #define HDD_SECONDARY             0x02
 #define HDD_MASTER_ATAPI_CDROM    0x04
@@ -556,68 +567,68 @@ typedef struct {
 ///
 /// BBS_TABLE, device type values & boot priority values
 ///
-typedef struct {\r
+typedef struct {
   ///\r
   /// The boot priority for this boot device. Values are defined below.\r
   ///
-  UINT16                            BootPriority;\r
+  UINT16                            BootPriority;
   \r
   ///\r
   /// The PCI bus for this boot device.\r
   ///
-  UINT32                            Bus;\r
+  UINT32                            Bus;
   \r
   ///\r
   /// The PCI device for this boot device.\r
   ///
-  UINT32                            Device;\r
+  UINT32                            Device;
   \r
   ///\r
   /// The PCI function for the boot device.\r
   ///
-  UINT32                            Function;\r
+  UINT32                            Function;
   \r
   ///\r
   /// The PCI class for this boot device.\r
   ///
-  UINT8                             Class;\r
+  UINT8                             Class;
   \r
   ///\r
   /// The PCI Subclass for this boot device.\r
   ///
-  UINT8                             SubClass;\r
+  UINT8                             SubClass;
   \r
   ///\r
   /// Segment:offset address of an ASCIIZ description string describing the manufacturer.\r
   ///
-  UINT16                            MfgStringOffset;\r
+  UINT16                            MfgStringOffset;
   \r
   ///\r
   /// Segment:offset address of an ASCIIZ description string describing the manufacturer.\r
   ///  
-  UINT16                            MfgStringSegment;\r
+  UINT16                            MfgStringSegment;
   \r
   ///\r
   /// BBS device type. BBS device types are defined below.\r
   ///
-  UINT16                            DeviceType;\r
+  UINT16                            DeviceType;
   \r
   ///\r
   /// Status of this boot device. Type BBS_STATUS_FLAGS is defined below.\r
   ///
-  BBS_STATUS_FLAGS                  StatusFlags;\r
+  BBS_STATUS_FLAGS                  StatusFlags;
   \r
   ///\r
   /// Segment:Offset address of boot loader for IPL devices or install INT13 handler for\r
   /// BCV devices.\r
   ///
-  UINT16                            BootHandlerOffset;\r
+  UINT16                            BootHandlerOffset;
   \r
   ///\r
   /// Segment:Offset address of boot loader for IPL devices or install INT13 handler for\r
   /// BCV devices.\r
   ///  
-  UINT16                            BootHandlerSegment;\r
+  UINT16                            BootHandlerSegment;
   \r
   ///\r
   /// Segment:offset address of an ASCIIZ description string describing this device.\r
@@ -627,33 +638,33 @@ typedef struct {
   ///\r
   /// Segment:offset address of an ASCIIZ description string describing this device.\r
   ///\r
-  UINT16                            DescStringSegment;\r
+  UINT16                            DescStringSegment;
   \r
   ///\r
   /// Reserved.\r
   ///
-  UINT32                            InitPerReserved;\r
+  UINT32                            InitPerReserved;
   \r
   ///\r
   /// The use of these fields is IBV dependent. They can be used to flag that an OpROM\r
   /// has hooked the specified IRQ. The OpROM may be BBS compliant as some SCSI\r
   /// BBS-compliant OpROMs also hook IRQ vectors in order to run their BIOS Setup\r
   ///
-  UINT32                            AdditionalIrq13Handler;\r
+  UINT32                            AdditionalIrq13Handler;
   \r
   ///\r
   /// The use of these fields is IBV dependent. They can be used to flag that an OpROM\r
   /// has hooked the specified IRQ. The OpROM may be BBS compliant as some SCSI\r
   /// BBS-compliant OpROMs also hook IRQ vectors in order to run their BIOS Setup\r
   ///  
-  UINT32                            AdditionalIrq18Handler;\r
+  UINT32                            AdditionalIrq18Handler;
   \r
   ///\r
   /// The use of these fields is IBV dependent. They can be used to flag that an OpROM\r
   /// has hooked the specified IRQ. The OpROM may be BBS compliant as some SCSI\r
   /// BBS-compliant OpROMs also hook IRQ vectors in order to run their BIOS Setup\r
   ///  
-  UINT32                            AdditionalIrq19Handler;\r
+  UINT32                            AdditionalIrq19Handler;
   \r
   ///\r
   /// The use of these fields is IBV dependent. They can be used to flag that an OpROM\r
@@ -668,6 +679,9 @@ typedef struct {
   UINT32                            IBV2;
 } BBS_TABLE;
 
+///
+/// BBS device type values
+///@{
 #define BBS_FLOPPY              0x01
 #define BBS_HARDDISK            0x02
 #define BBS_CDROM               0x03
@@ -676,31 +690,36 @@ typedef struct {
 #define BBS_EMBED_NETWORK       0x06
 #define BBS_BEV_DEVICE          0x80
 #define BBS_UNKNOWN             0xff
+///@}
 
+///
+/// BBS boot priority values
+///@{
 #define BBS_DO_NOT_BOOT_FROM    0xFFFC
 #define BBS_LOWEST_PRIORITY     0xFFFD
 #define BBS_UNPRIORITIZED_ENTRY 0xFFFE
 #define BBS_IGNORE_ENTRY        0xFFFF
+///@}
 
 ///
-/// SMM_ATTRIBUTES & relating type, port and data size constants
+/// SMM_ATTRIBUTES
 ///
-typedef struct {\r
+typedef struct {
   ///\r
   /// Access mechanism used to generate the soft SMI. Defined types are below. The other\r
   /// values are reserved for future usage.\r
   ///
-  UINT16                            Type : 3;\r
+  UINT16                            Type : 3;
   \r
   ///\r
   /// Size of "port" in bits. Defined values are below.\r
   ///
-  UINT16                            PortGranularity : 3;\r
+  UINT16                            PortGranularity : 3;
   \r
   ///\r
   /// Size of data in bits. Defined values are below.\r
   ///
-  UINT16                            DataGranularity : 3;\r
+  UINT16                            DataGranularity : 3;
   \r
   ///\r
   /// Reserved for future use.\r
@@ -708,18 +727,30 @@ typedef struct {
   UINT16                            Reserved : 7;
 } SMM_ATTRIBUTES;
 
+///
+/// SMM_ATTRIBUTES type values
+///@{
 #define STANDARD_IO       0x00
 #define STANDARD_MEMORY   0x01
+///@}
 
+///
+/// SMM_ATTRIBUTES port size constants
+///@{
 #define PORT_SIZE_8       0x00
 #define PORT_SIZE_16      0x01
 #define PORT_SIZE_32      0x02
 #define PORT_SIZE_64      0x03
+///@}
 
+///
+/// SMM_ATTRIBUTES data size constants
+///@{
 #define DATA_SIZE_8       0x00
 #define DATA_SIZE_16      0x01
 #define DATA_SIZE_32      0x02
 #define DATA_SIZE_64      0x03
+///@}
 
 ///
 /// SMM_FUNCTION & relating constants
@@ -729,12 +760,20 @@ typedef struct {
   UINT16                            Owner : 1;
 } SMM_FUNCTION;
 
+///
+/// SMM_FUNCTION Function constants
+///@{
 #define INT15_D042        0x0000
 #define GET_USB_BOOT_INFO 0x0001
 #define DMI_PNP_50_57     0x0002
+///@}
 
+///
+/// SMM_FUNCTION Owner constants
+///@{
 #define STANDARD_OWNER    0x0
 #define OEM_OWNER         0x1
+///@}
 
 /**
   * SMM_ENTRY
@@ -742,22 +781,22 @@ typedef struct {
   * This structure assumes both port and data sizes are 1. SmmAttribute must be
   * properly to reflect that assumption.
 **/
-typedef struct {\r
+typedef struct {
   ///\r
   /// Describes the access mechanism, SmmPort, and SmmData sizes. Type\r
   /// SMM_ATTRIBUTES is defined below.\r
   ///
-  SMM_ATTRIBUTES                    SmmAttributes;\r
+  SMM_ATTRIBUTES                    SmmAttributes;
   \r
   ///\r
   /// Function Soft SMI is to perform. Type SMM_FUNCTION is defined below.\r
   ///
-  SMM_FUNCTION                      SmmFunction;\r
+  SMM_FUNCTION                      SmmFunction;
   \r
   ///\r
   /// SmmPort size depends upon SmmAttributes and ranges from2 bytes to 16 bytes\r
   ///
-  UINT8                             SmmPort;\r
+  UINT8                             SmmPort;
   \r
   ///\r
   /// SmmData size depends upon SmmAttributes and ranges from2 bytes to 16 bytes\r
@@ -776,22 +815,22 @@ typedef struct {
 ///
 /// UDC_ATTRIBUTES
 ///
-typedef struct {\r
+typedef struct {
   ///\r
   /// This bit set indicates that the ServiceAreaData is valid.\r
   ///
-  UINT8                             DirectoryServiceValidity : 1;\r
+  UINT8                             DirectoryServiceValidity : 1;
   \r
   ///\r
   /// This bit set indicates to use the Reserve Area Boot Code Address (RACBA) only if\r
   /// DirectoryServiceValidity is 0.\r
   ///
-  UINT8                             RabcaUsedFlag : 1;\r
+  UINT8                             RabcaUsedFlag : 1;
   \r
   ///\r
   /// This bit set indicates to execute hard disk diagnostics.\r
   ///
-  UINT8                             ExecuteHddDiagnosticsFlag : 1;\r
+  UINT8                             ExecuteHddDiagnosticsFlag : 1;
   \r
   ///\r
   /// Reserved for future use. Set to 0.\r
@@ -802,40 +841,40 @@ typedef struct {
 ///
 /// UD_TABLE
 ///
-typedef struct {\r
+typedef struct {
   ///\r
   /// This field contains the bit-mapped attributes of the PARTIES information. Type\r
   /// UDC_ATTRIBUTES is defined below.\r
   ///
-  UDC_ATTRIBUTES                    Attributes;\r
+  UDC_ATTRIBUTES                    Attributes;
   \r
   ///\r
   /// This field contains the zero-based device on which the selected\r
   /// ServiceDataArea is present. It is 0 for master and 1 for the slave device.  \r
   ///
-  UINT8                             DeviceNumber;\r
+  UINT8                             DeviceNumber;
   \r
   ///\r
   /// This field contains the zero-based index into the BbsTable for the parent device.\r
   /// This index allows the user to reference the parent device information such as PCI\r
   /// bus, device function.\r
   ///
-  UINT8                             BbsTableEntryNumberForParentDevice;\r
+  UINT8                             BbsTableEntryNumberForParentDevice;
   \r
   ///\r
   /// This field contains the zero-based index into the BbsTable for the boot entry.\r
   ///
-  UINT8                             BbsTableEntryNumberForBoot;\r
+  UINT8                             BbsTableEntryNumberForBoot;
   \r
   ///\r
   /// This field contains the zero-based index into the BbsTable for the HDD diagnostics entry.\r
   ///
-  UINT8                             BbsTableEntryNumberForHddDiag;\r
+  UINT8                             BbsTableEntryNumberForHddDiag;
   \r
   ///\r
   /// The raw Beer data.\r
   ///
-  UINT8                             BeerData[128];\r
+  UINT8                             BeerData[128];
   \r
   ///\r
   /// The raw data of selected service area.\r