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