Home | History | Annotate | Download | only in IndustryStandard
      1 /** @file
      2   ACPI 1.0b definitions from the ACPI Specification, revision 1.0b
      3 
      4   Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
      5 
      6   This program and the accompanying materials are licensed and made available
      7   under the terms and conditions of the BSD License which accompanies this
      8   distribution.  The full text of the license may be found at
      9     http://opensource.org/licenses/bsd-license.php
     10 
     11   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     12   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     13 
     14 **/
     15 
     16 #ifndef _ACPI_1_0_H_
     17 #define _ACPI_1_0_H_
     18 
     19 #include "IndustryStandard/Acpi.h"
     20 
     21 //
     22 // Ensure proper structure formats
     23 //
     24 #pragma pack(1)
     25 //
     26 // ACPI 1.0b table structures
     27 //
     28 //
     29 // Root System Description Pointer Structure
     30 //
     31 typedef struct {
     32   UINT64  Signature;
     33   UINT8   Checksum;
     34   UINT8   OemId[6];
     35   UINT8   Reserved;
     36   UINT32  RsdtAddress;
     37 } EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
     38 
     39 //
     40 // Root System Description Table
     41 // No definition needed as it is a common description table header followed by a
     42 // variable number of UINT32 table pointers.
     43 //
     44 //
     45 // RSDT Revision (as defined in ACPI 1.0b spec.)
     46 //
     47 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
     48 
     49 //
     50 // Fixed ACPI Description Table Structure (FADT)
     51 //
     52 typedef struct {
     53   EFI_ACPI_DESCRIPTION_HEADER Header;
     54   UINT32                      FirmwareCtrl;
     55   UINT32                      Dsdt;
     56   UINT8                       IntModel;
     57   UINT8                       Reserved1;
     58   UINT16                      SciInt;
     59   UINT32                      SmiCmd;
     60   UINT8                       AcpiEnable;
     61   UINT8                       AcpiDisable;
     62   UINT8                       S4BiosReq;
     63   UINT8                       Reserved2;
     64   UINT32                      Pm1aEvtBlk;
     65   UINT32                      Pm1bEvtBlk;
     66   UINT32                      Pm1aCntBlk;
     67   UINT32                      Pm1bCntBlk;
     68   UINT32                      Pm2CntBlk;
     69   UINT32                      PmTmrBlk;
     70   UINT32                      Gpe0Blk;
     71   UINT32                      Gpe1Blk;
     72   UINT8                       Pm1EvtLen;
     73   UINT8                       Pm1CntLen;
     74   UINT8                       Pm2CntLen;
     75   UINT8                       PmTmLen;
     76   UINT8                       Gpe0BlkLen;
     77   UINT8                       Gpe1BlkLen;
     78   UINT8                       Gpe1Base;
     79   UINT8                       Reserved3;
     80   UINT16                      PLvl2Lat;
     81   UINT16                      PLvl3Lat;
     82   UINT16                      FlushSize;
     83   UINT16                      FlushStride;
     84   UINT8                       DutyOffset;
     85   UINT8                       DutyWidth;
     86   UINT8                       DayAlrm;
     87   UINT8                       MonAlrm;
     88   UINT8                       Century;
     89   UINT8                       Reserved4;
     90   UINT8                       Reserved5;
     91   UINT8                       Reserved6;
     92   UINT32                      Flags;
     93 } EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE;
     94 
     95 //
     96 // FADT Version (as defined in ACPI 1.0b spec.)
     97 //
     98 #define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION  0x01
     99 
    100 //
    101 // Fixed ACPI Description Table Fixed Feature Flags
    102 // All other bits are reserved and must be set to 0.
    103 //
    104 #define EFI_ACPI_1_0_WBINVD       (1 << 0)
    105 #define EFI_ACPI_1_0_WBINVD_FLUSH (1 << 1)
    106 #define EFI_ACPI_1_0_PROC_C1      (1 << 2)
    107 #define EFI_ACPI_1_0_P_LVL2_UP    (1 << 3)
    108 #define EFI_ACPI_1_0_PWR_BUTTON   (1 << 4)
    109 #define EFI_ACPI_1_0_SLP_BUTTON   (1 << 5)
    110 #define EFI_ACPI_1_0_FIX_RTC      (1 << 6)
    111 #define EFI_ACPI_1_0_RTC_S4       (1 << 7)
    112 #define EFI_ACPI_1_0_TMR_VAL_EXT  (1 << 8)
    113 #define EFI_ACPI_1_0_DCK_CAP      (1 << 9)
    114 
    115 #define EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION  0x0
    116 //
    117 // Firmware ACPI Control Structure
    118 //
    119 typedef struct {
    120   UINT32  Signature;
    121   UINT32  Length;
    122   UINT32  HardwareSignature;
    123   UINT32  FirmwareWakingVector;
    124   UINT32  GlobalLock;
    125   UINT32  Flags;
    126   UINT8   Reserved[40];
    127 } EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
    128 
    129 //
    130 // Firmware Control Structure Feature Flags
    131 // All other bits are reserved and must be set to 0.
    132 //
    133 #define EFI_ACPI_1_0_S4BIOS_F (1 << 0)
    134 
    135 //
    136 // Multiple APIC Description Table header definition.  The rest of the table
    137 // must be defined in a platform specific manner.
    138 //
    139 typedef struct {
    140   EFI_ACPI_DESCRIPTION_HEADER Header;
    141   UINT32                      LocalApicAddress;
    142   UINT32                      Flags;
    143 } EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
    144 
    145 //
    146 // MADT Revision (as defined in ACPI 1.0b spec.)
    147 //
    148 #define EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
    149 
    150 //
    151 // Multiple APIC Flags
    152 // All other bits are reserved and must be set to 0.
    153 //
    154 #define EFI_ACPI_1_0_PCAT_COMPAT  (1 << 0)
    155 
    156 //
    157 // Multiple APIC Description Table APIC structure types
    158 // All other values between 0x09 an 0xFF are reserved and
    159 // will be ignored by OSPM.
    160 //
    161 #define EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC           0x00
    162 #define EFI_ACPI_1_0_IO_APIC                        0x01
    163 #define EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE      0x02
    164 #define EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE  0x03
    165 #define EFI_ACPI_1_0_LOCAL_APIC_NMI                 0x04
    166 
    167 //
    168 // APIC Structure Definitions
    169 //
    170 //
    171 // Processor Local APIC Structure Definition
    172 //
    173 typedef struct {
    174   UINT8   Type;
    175   UINT8   Length;
    176   UINT8   AcpiProcessorId;
    177   UINT8   ApicId;
    178   UINT32  Flags;
    179 } EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
    180 
    181 //
    182 // Local APIC Flags.  All other bits are reserved and must be 0.
    183 //
    184 #define EFI_ACPI_1_0_LOCAL_APIC_ENABLED (1 << 0)
    185 
    186 //
    187 // IO APIC Structure
    188 //
    189 typedef struct {
    190   UINT8   Type;
    191   UINT8   Length;
    192   UINT8   IoApicId;
    193   UINT8   Reserved;
    194   UINT32  IoApicAddress;
    195   UINT32  SystemVectorBase;
    196 } EFI_ACPI_1_0_IO_APIC_STRUCTURE;
    197 
    198 //
    199 // Interrupt Source Override Structure
    200 //
    201 typedef struct {
    202   UINT8   Type;
    203   UINT8   Length;
    204   UINT8   Bus;
    205   UINT8   Source;
    206   UINT32  GlobalSystemInterruptVector;
    207   UINT16  Flags;
    208 } EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
    209 
    210 //
    211 // Non-Maskable Interrupt Source Structure
    212 //
    213 typedef struct {
    214   UINT8   Type;
    215   UINT8   Length;
    216   UINT16  Flags;
    217   UINT32  GlobalSystemInterruptVector;
    218 } EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
    219 
    220 //
    221 // Local APIC NMI Structure
    222 //
    223 typedef struct {
    224   UINT8   Type;
    225   UINT8   Length;
    226   UINT8   AcpiProcessorId;
    227   UINT16  Flags;
    228   UINT8   LocalApicInti;
    229 } EFI_ACPI_1_0_LOCAL_APIC_NMI_STRUCTURE;
    230 
    231 //
    232 // Smart Battery Description Table (SBST)
    233 //
    234 typedef struct {
    235   EFI_ACPI_DESCRIPTION_HEADER Header;
    236   UINT32                      WarningEnergyLevel;
    237   UINT32                      LowEnergyLevel;
    238   UINT32                      CriticalEnergyLevel;
    239 } EFI_ACPI_1_0_SMART_BATTERY_DESCRIPTION_TABLE;
    240 
    241 //
    242 // Known table signatures
    243 //
    244 //
    245 // "RSD PTR " Root System Description Pointer
    246 //
    247 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE  0x2052545020445352ULL
    248 
    249 //
    250 // "APIC" Multiple APIC Description Table
    251 //
    252 #define EFI_ACPI_1_0_APIC_SIGNATURE 0x43495041
    253 
    254 //
    255 // "DSDT" Differentiated System Description Table
    256 //
    257 #define EFI_ACPI_1_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  0x54445344
    258 
    259 //
    260 // "FACS" Firmware ACPI Control Structure
    261 //
    262 #define EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE  0x53434146
    263 
    264 //
    265 // "FACP" Fixed ACPI Description Table
    266 //
    267 #define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE 0x50434146
    268 
    269 //
    270 // "PSDT" Persistent System Description Table
    271 //
    272 #define EFI_ACPI_1_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  0x54445350
    273 
    274 //
    275 // "RSDT" Root System Description Table
    276 //
    277 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  0x54445352
    278 
    279 //
    280 // "SBST" Smart Battery Specification Table
    281 //
    282 #define EFI_ACPI_1_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE  0x54534253
    283 
    284 //
    285 // "SSDT" Secondary System Description Table
    286 //
    287 #define EFI_ACPI_1_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445353
    288 
    289 #pragma pack()
    290 
    291 #endif
    292