]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Library/FrameworkUefiLib/Acpi.c
Remove IntelFrameworkModulePkg
[mirror_edk2.git] / IntelFrameworkPkg / Library / FrameworkUefiLib / Acpi.c
CommitLineData
c1a00d09
SZ
1/** @file\r
2 This module provides help function for finding ACPI table.\r
3\r
4 Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>\r
22a69a5e 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
c1a00d09
SZ
6\r
7**/\r
8\r
9#include "UefiLibInternal.h"\r
10#include <IndustryStandard/Acpi.h>\r
11\r
12/**\r
13 This function locates next ACPI table in XSDT/RSDT based on Signature and\r
14 previous returned Table.\r
15\r
16 If PreviousTable is NULL:\r
17 This function will locate the first ACPI table in XSDT/RSDT based on\r
18 Signature in gEfiAcpi20TableGuid system configuration table first, and then\r
19 gEfiAcpi10TableGuid system configuration table.\r
20 This function will locate in XSDT first, and then RSDT.\r
21 For DSDT, this function will locate XDsdt in FADT first, and then Dsdt in\r
22 FADT.\r
23 For FACS, this function will locate XFirmwareCtrl in FADT first, and then\r
24 FirmwareCtrl in FADT.\r
25\r
26 If PreviousTable is not NULL:\r
27 1. If it could be located in XSDT in gEfiAcpi20TableGuid system configuration\r
28 table, then this function will just locate next table in XSDT in\r
29 gEfiAcpi20TableGuid system configuration table.\r
30 2. If it could be located in RSDT in gEfiAcpi20TableGuid system configuration\r
31 table, then this function will just locate next table in RSDT in\r
32 gEfiAcpi20TableGuid system configuration table.\r
33 3. If it could be located in RSDT in gEfiAcpi10TableGuid system configuration\r
34 table, then this function will just locate next table in RSDT in\r
35 gEfiAcpi10TableGuid system configuration table.\r
36\r
37 It's not supported that PreviousTable is not NULL but PreviousTable->Signature\r
38 is not same with Signature, NULL will be returned.\r
39\r
40 @param Signature ACPI table signature.\r
41 @param PreviousTable Pointer to previous returned table to locate next\r
42 table, or NULL to locate first table.\r
43\r
44 @return Next ACPI table or NULL if not found.\r
45\r
46**/\r
47EFI_ACPI_COMMON_HEADER *\r
48EFIAPI\r
49EfiLocateNextAcpiTable (\r
50 IN UINT32 Signature,\r
51 IN EFI_ACPI_COMMON_HEADER *PreviousTable OPTIONAL\r
52 )\r
53{\r
54 ASSERT (FALSE);\r
55 return NULL;\r
56}\r
57\r
58/**\r
59 This function locates first ACPI table in XSDT/RSDT based on Signature.\r
60\r
61 This function will locate the first ACPI table in XSDT/RSDT based on\r
62 Signature in gEfiAcpi20TableGuid system configuration table first, and then\r
63 gEfiAcpi10TableGuid system configuration table.\r
64 This function will locate in XSDT first, and then RSDT.\r
65 For DSDT, this function will locate XDsdt in FADT first, and then Dsdt in\r
66 FADT.\r
67 For FACS, this function will locate XFirmwareCtrl in FADT first, and then\r
68 FirmwareCtrl in FADT.\r
69\r
70 @param Signature ACPI table signature.\r
71\r
72 @return First ACPI table or NULL if not found.\r
73\r
74**/\r
75EFI_ACPI_COMMON_HEADER *\r
76EFIAPI\r
77EfiLocateFirstAcpiTable (\r
78 IN UINT32 Signature\r
79 )\r
80{\r
81 return EfiLocateNextAcpiTable (Signature, NULL);\r
82}\r