TianoCore EDK2 master
Loading...
Searching...
No Matches
Acpi.c File Reference
#include "UefiLibInternal.h"
#include <IndustryStandard/Acpi.h>
#include <Guid/Acpi.h>

Go to the source code of this file.

Functions

EFI_ACPI_COMMON_HEADERScanTableInSDT (IN EFI_ACPI_DESCRIPTION_HEADER *Sdt, IN UINTN TablePointerSize, IN UINT32 Signature, IN EFI_ACPI_COMMON_HEADER *PreviousTable OPTIONAL, OUT BOOLEAN *PreviousTableLocated OPTIONAL)
 
EFI_ACPI_COMMON_HEADERLocateAcpiFacsFromFadt (IN EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *Fadt)
 
EFI_ACPI_COMMON_HEADERLocateAcpiDsdtFromFadt (IN EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *Fadt)
 
EFI_ACPI_COMMON_HEADERLocateAcpiTableInAcpiConfigurationTable (IN EFI_GUID *AcpiGuid, IN UINT32 Signature, IN EFI_ACPI_COMMON_HEADER *PreviousTable OPTIONAL, OUT BOOLEAN *PreviousTableLocated OPTIONAL)
 
EFI_ACPI_COMMON_HEADER *EFIAPI EfiLocateNextAcpiTable (IN UINT32 Signature, IN EFI_ACPI_COMMON_HEADER *PreviousTable OPTIONAL)
 
EFI_ACPI_COMMON_HEADER *EFIAPI EfiLocateFirstAcpiTable (IN UINT32 Signature)
 

Detailed Description

This module provides help function for finding ACPI table.

Copyright (c) 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Acpi.c.

Function Documentation

◆ EfiLocateFirstAcpiTable()

EFI_ACPI_COMMON_HEADER *EFIAPI EfiLocateFirstAcpiTable ( IN UINT32  Signature)

This function locates first ACPI table in XSDT/RSDT based on Signature.

This function will locate the first ACPI table in XSDT/RSDT based on Signature in gEfiAcpi20TableGuid system configuration table first, and then gEfiAcpi10TableGuid system configuration table. This function will locate in XSDT first, and then RSDT. For DSDT, this function will locate XDsdt in FADT first, and then Dsdt in FADT. For FACS, this function will locate XFirmwareCtrl in FADT first, and then FirmwareCtrl in FADT.

Parameters
SignatureACPI table signature.
Returns
First ACPI table or NULL if not found.

Definition at line 441 of file Acpi.c.

◆ EfiLocateNextAcpiTable()

EFI_ACPI_COMMON_HEADER *EFIAPI EfiLocateNextAcpiTable ( IN UINT32  Signature,
IN EFI_ACPI_COMMON_HEADER *PreviousTable  OPTIONAL 
)

This function locates next ACPI table in XSDT/RSDT based on Signature and previous returned Table.

If PreviousTable is NULL: This function will locate the first ACPI table in XSDT/RSDT based on Signature in gEfiAcpi20TableGuid system configuration table first, and then gEfiAcpi10TableGuid system configuration table. This function will locate in XSDT first, and then RSDT. For DSDT, this function will locate XDsdt in FADT first, and then Dsdt in FADT. For FACS, this function will locate XFirmwareCtrl in FADT first, and then FirmwareCtrl in FADT.

If PreviousTable is not NULL:

  1. If it could be located in XSDT in gEfiAcpi20TableGuid system configuration table, then this function will just locate next table in XSDT in gEfiAcpi20TableGuid system configuration table.
  2. If it could be located in RSDT in gEfiAcpi20TableGuid system configuration table, then this function will just locate next table in RSDT in gEfiAcpi20TableGuid system configuration table.
  3. If it could be located in RSDT in gEfiAcpi10TableGuid system configuration table, then this function will just locate next table in RSDT in gEfiAcpi10TableGuid system configuration table.

It's not supported that PreviousTable is not NULL but PreviousTable->Signature is not same with Signature, NULL will be returned.

Parameters
SignatureACPI table signature.
PreviousTablePointer to previous returned table to locate next table, or NULL to locate first table.
Returns
Next ACPI table or NULL if not found.

Definition at line 363 of file Acpi.c.

◆ LocateAcpiDsdtFromFadt()

To locate DSDT in FADT.

Parameters
FadtFADT table pointer.
Returns
DSDT table pointer or NULL if not found.

Definition at line 129 of file Acpi.c.

◆ LocateAcpiFacsFromFadt()

To locate FACS in FADT.

Parameters
FadtFADT table pointer.
Returns
FACS table pointer or NULL if not found.

Definition at line 95 of file Acpi.c.

◆ LocateAcpiTableInAcpiConfigurationTable()

EFI_ACPI_COMMON_HEADER * LocateAcpiTableInAcpiConfigurationTable ( IN EFI_GUID AcpiGuid,
IN UINT32  Signature,
IN EFI_ACPI_COMMON_HEADER *PreviousTable  OPTIONAL,
OUT BOOLEAN *PreviousTableLocated  OPTIONAL 
)

To locate ACPI table in ACPI ConfigurationTable.

Parameters
AcpiGuidThe GUID used to get ACPI ConfigurationTable.
SignatureACPI table signature.
PreviousTablePointer to previous returned table to locate next table, or NULL to locate first table.
PreviousTableLocatedPointer to the indicator to return whether the previous returned table could be located or not, or NULL if PreviousTable is NULL.

If PreviousTable is NULL and PreviousTableLocated is not NULL, then ASSERT(). If PreviousTable is not NULL and PreviousTableLocated is NULL, then ASSERT(). If AcpiGuid is NULL, then ASSERT().

Returns
ACPI table or NULL if not found.

Definition at line 173 of file Acpi.c.

◆ ScanTableInSDT()

EFI_ACPI_COMMON_HEADER * ScanTableInSDT ( IN EFI_ACPI_DESCRIPTION_HEADER Sdt,
IN UINTN  TablePointerSize,
IN UINT32  Signature,
IN EFI_ACPI_COMMON_HEADER *PreviousTable  OPTIONAL,
OUT BOOLEAN *PreviousTableLocated  OPTIONAL 
)

This function scans ACPI table in XSDT/RSDT.

Parameters
SdtACPI XSDT/RSDT.
TablePointerSizeSize of table pointer: 8(XSDT) or 4(RSDT).
SignatureACPI table signature.
PreviousTablePointer to previous returned table to locate next table, or NULL to locate first table.
PreviousTableLocatedPointer to the indicator about whether the previous returned table could be located, or NULL if PreviousTable is NULL.

If PreviousTable is NULL and PreviousTableLocated is not NULL, then ASSERT(). If PreviousTable is not NULL and PreviousTableLocated is NULL, then ASSERT().

Returns
ACPI table or NULL if not found.

Definition at line 32 of file Acpi.c.