1 /*++ 2 3 Copyright (c) 2007, Intel Corporation. All rights reserved.<BR> 4 This program and the accompanying materials 5 are licensed and made available under the terms and conditions of the BSD License 6 which accompanies this distribution. The full text of the license may be found at 7 http://opensource.org/licenses/bsd-license.php 8 9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 11 12 Module Name: 13 14 AcpiCommon.h 15 16 Abstract: 17 18 This file contains some basic ACPI definitions that are consumed by drivers 19 that do not care about ACPI versions. 20 21 --*/ 22 23 #ifndef _ACPI_COMMON_H_ 24 #define _ACPI_COMMON_H_ 25 26 #include "Tiano.h" 27 28 // 29 // Common table header, this prefaces all ACPI tables, including FACS, but 30 // excluding the RSD PTR structure 31 // 32 typedef struct { 33 UINT32 Signature; 34 UINT32 Length; 35 } EFI_ACPI_COMMON_HEADER; 36 37 // 38 // Common ACPI description table header. This structure prefaces most ACPI tables. 39 // 40 #pragma pack(1) 41 42 typedef struct { 43 UINT32 Signature; 44 UINT32 Length; 45 UINT8 Revision; 46 UINT8 Checksum; 47 UINT8 OemId[6]; 48 UINT64 OemTableId; 49 UINT32 OemRevision; 50 UINT32 CreatorId; 51 UINT32 CreatorRevision; 52 } EFI_ACPI_DESCRIPTION_HEADER; 53 54 #pragma pack() 55 // 56 // Define for Pci Host Bridge Resource Allocation 57 // 58 #define ACPI_ADDRESS_SPACE_DESCRIPTOR 0x8A 59 #define ACPI_END_TAG_DESCRIPTOR 0x79 60 61 #define ACPI_ADDRESS_SPACE_TYPE_MEM 0x00 62 #define ACPI_ADDRESS_SPACE_TYPE_IO 0x01 63 #define ACPI_ADDRESS_SPACE_TYPE_BUS 0x02 64 65 // 66 // Make sure structures match spec 67 // 68 #pragma pack(1) 69 70 typedef struct { 71 UINT8 Desc; 72 UINT16 Len; 73 UINT8 ResType; 74 UINT8 GenFlag; 75 UINT8 SpecificFlag; 76 UINT64 AddrSpaceGranularity; 77 UINT64 AddrRangeMin; 78 UINT64 AddrRangeMax; 79 UINT64 AddrTranslationOffset; 80 UINT64 AddrLen; 81 } EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR; 82 83 typedef struct { 84 UINT8 Desc; 85 UINT8 Checksum; 86 } EFI_ACPI_END_TAG_DESCRIPTOR; 87 88 // 89 // General use definitions 90 // 91 #define EFI_ACPI_RESERVED_BYTE 0x00 92 #define EFI_ACPI_RESERVED_WORD 0x0000 93 #define EFI_ACPI_RESERVED_DWORD 0x00000000 94 #define EFI_ACPI_RESERVED_QWORD 0x0000000000000000 95 96 #pragma pack() 97 98 #endif 99