]>
Commit | Line | Data |
---|---|---|
b303605e MK |
1 | /** @file\r |
2 | This is an implementation of the ACPI platform driver. Requirements for\r | |
3 | this driver are defined in the Tiano ACPI External Product Specification,\r | |
4 | revision 0.3.6.\r | |
5 | \r | |
6 | Copyright (c) 2013-2015 Intel Corporation.\r | |
7 | \r | |
8 | This program and the accompanying materials\r | |
9 | are licensed and made available under the terms and conditions of the BSD License\r | |
10 | which accompanies this distribution. The full text of the license may be found at\r | |
11 | http://opensource.org/licenses/bsd-license.php\r | |
12 | \r | |
13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
14 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
15 | \r | |
16 | \r | |
17 | **/\r | |
18 | \r | |
19 | #ifndef _ACPI_PLATFORM_H_\r | |
20 | #define _ACPI_PLATFORM_H_\r | |
21 | \r | |
22 | //\r | |
23 | // Statements that include other header files\r | |
24 | //\r | |
25 | \r | |
26 | #include <PiDxe.h>\r | |
27 | #include <IntelQNCDxe.h>\r | |
28 | #include <Platform.h>\r | |
29 | #include <PlatformBoards.h>\r | |
30 | #include <Ioh.h>\r | |
31 | #include <QNCCommonDefinitions.h>\r | |
32 | \r | |
33 | #include <Protocol/GlobalNvsArea.h>\r | |
34 | #include <Protocol/MpService.h>\r | |
35 | #include <Protocol/AcpiSystemDescriptionTable.h>\r | |
36 | #include <Protocol/FirmwareVolume2.h>\r | |
37 | \r | |
38 | #include <Library/UefiDriverEntryPoint.h>\r | |
39 | #include <Library/UefiBootServicesTableLib.h>\r | |
40 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
41 | #include <Library/DebugLib.h>\r | |
42 | #include <Library/BaseMemoryLib.h>\r | |
43 | #include <Library/IoLib.h>\r | |
44 | #include <Library/PcdLib.h>\r | |
45 | #include <Library/UefiLib.h>\r | |
46 | #include <Library/DxeServicesLib.h>\r | |
47 | #include <Library/DevicePathLib.h>\r | |
48 | #include <Library/MemoryAllocationLib.h>\r | |
49 | #include <Library/QNCAccessLib.h>\r | |
50 | #include <Library/PlatformHelperLib.h>\r | |
51 | \r | |
52 | #include <IndustryStandard/Acpi.h>\r | |
53 | #include <IndustryStandard/HighPrecisionEventTimerTable.h>\r | |
54 | #include <IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h>\r | |
55 | \r | |
56 | #include "Madt.h"\r | |
57 | #include "AcpiPciUpdate.h"\r | |
58 | \r | |
59 | #pragma pack(1)\r | |
60 | typedef struct {\r | |
61 | UINT8 StartByte;\r | |
62 | UINT32 NameStr;\r | |
63 | UINT8 OpCode;\r | |
64 | UINT16 Size; // Hardcode to 16bit width because the table we use is fixed size\r | |
65 | UINT8 NumEntries;\r | |
66 | } EFI_ACPI_NAME_COMMAND;\r | |
67 | \r | |
68 | typedef struct {\r | |
69 | UINT8 PackageOp;\r | |
70 | UINT8 PkgLeadByte;\r | |
71 | UINT8 NumEntries;\r | |
72 | UINT8 DwordPrefix0;\r | |
73 | UINT32 CoreFreq;\r | |
74 | UINT8 DwordPrefix1;\r | |
75 | UINT32 Power;\r | |
76 | UINT8 DwordPrefix2;\r | |
77 | UINT32 TransLatency;\r | |
78 | UINT8 DwordPrefix3;\r | |
79 | UINT32 BMLatency;\r | |
80 | UINT8 DwordPrefix4;\r | |
81 | UINT32 Control;\r | |
82 | UINT8 DwordPrefix5;\r | |
83 | UINT32 Status;\r | |
84 | } EFI_PSS_PACKAGE;\r | |
85 | #pragma pack()\r | |
86 | \r | |
87 | \r | |
88 | #define AML_NAME_OP 0x08\r | |
89 | #define AML_METHOD_OP 0x14\r | |
90 | #define AML_OPREGION_OP 0x80\r | |
91 | #define AML_PACKAGE_OP 0x12 // Package operator.\r | |
92 | \r | |
93 | //\r | |
94 | // ACPI table information used to initialize tables.\r | |
95 | //\r | |
96 | #define EFI_ACPI_OEM_ID "INTEL "\r | |
97 | #define EFI_ACPI_OEM_TABLE_ID 0x2020204F4E414954ULL // "TIANO "\r | |
98 | #define EFI_ACPI_OEM_REVISION 0x00000002\r | |
99 | #define EFI_ACPI_CREATOR_ID 0x5446534D // "MSFT"\r | |
100 | #define EFI_ACPI_CREATOR_REVISION 0x01000013\r | |
101 | \r | |
102 | #define ACPI_COMPATIBLE_1_0 0\r | |
103 | #define ACPI_COMPATIBLE_2_0 1\r | |
104 | #define ACPI_COMPATIBLE_3_0 2\r | |
105 | \r | |
106 | \r | |
107 | \r | |
108 | \r | |
109 | //\r | |
110 | // Private Driver Data\r | |
111 | //\r | |
112 | \r | |
113 | //\r | |
114 | // Define Union of IO APIC & Local APIC structure;\r | |
115 | //\r | |
116 | \r | |
117 | typedef union {\r | |
118 | EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC_STRUCTURE AcpiLocalApic;\r | |
119 | EFI_ACPI_2_0_IO_APIC_STRUCTURE AcpiIoApic;\r | |
120 | struct {\r | |
121 | UINT8 Type;\r | |
122 | UINT8 Length;\r | |
123 | } AcpiApicCommon;\r | |
124 | } ACPI_APIC_STRUCTURE_PTR;\r | |
125 | \r | |
126 | #endif\r |