2 This file contains some basic ACPI definitions that are consumed by drivers
3 that do not care about ACPI versions.
5 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
7 This program and the accompanying materials are licensed and made available
8 under the terms and conditions of the BSD License which accompanies this
9 distribution. The full text of the license may be found at:
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
23 // Common table header, this prefaces all ACPI tables, including FACS, but
24 // excluding the RSD PTR structure
29 } EFI_ACPI_COMMON_HEADER
;
32 // Common ACPI description table header. This structure prefaces most ACPI tables.
45 UINT32 CreatorRevision
;
46 } EFI_ACPI_DESCRIPTION_HEADER
;
50 // Define for Pci Host Bridge Resource Allocation
52 #define ACPI_ADDRESS_SPACE_DESCRIPTOR 0x8A
53 #define ACPI_END_TAG_DESCRIPTOR 0x79
55 #define ACPI_ADDRESS_SPACE_TYPE_MEM 0x00
56 #define ACPI_ADDRESS_SPACE_TYPE_IO 0x01
57 #define ACPI_ADDRESS_SPACE_TYPE_BUS 0x02
60 // Power Management Timer frequency is fixed at 3.579545MHz
62 #define ACPI_TIMER_FREQUENCY 3579545
65 // Make sure structures match spec
75 UINT64 AddrSpaceGranularity
;
78 UINT64 AddrTranslationOffset
;
80 } EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
;
85 } EFI_ACPI_END_TAG_DESCRIPTOR
;
88 // General use definitions
90 #define EFI_ACPI_RESERVED_BYTE 0x00
91 #define EFI_ACPI_RESERVED_WORD 0x0000
92 #define EFI_ACPI_RESERVED_DWORD 0x00000000
93 #define EFI_ACPI_RESERVED_QWORD 0x0000000000000000
96 // Resource Type Specific Flags
97 // Ref ACPI specification 6.4.3.5.5
99 // Bit [0] : Write Status, _RW
101 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_WRITE (1 << 0)
102 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_ONLY (0 << 0)
104 // Bit [2:1] : Memory Attributes, _MEM
106 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_NON_CACHEABLE (0 << 1)
107 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE (1 << 1)
108 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_WRITE_COMBINING (2 << 1)
109 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE (3 << 1)
111 // Bit [4:3] : Memory Attributes, _MTP
113 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_MEMORY (0 << 3)
114 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_RESERVED (1 << 3)
115 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_ACPI (2 << 3)
116 #define EFI_APCI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_NVS (3 << 3)
118 // Bit [5] : Memory to I/O Translation, _TTP
120 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_TRANSLATION (1 << 5)
121 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_STATIC (0 << 5)