TianoCore EDK2 master
Loading...
Searching...
No Matches
RsdpParser.c File Reference
#include <Library/UefiLib.h>
#include "AcpiParser.h"
#include "AcpiTableParser.h"

Go to the source code of this file.

Functions

STATIC VOID EFIAPI ValidateRsdtAddress (IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
 
STATIC VOID EFIAPI ValidateXsdtAddress (IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
 
VOID EFIAPI ParseAcpiRsdp (IN BOOLEAN Trace, IN UINT8 *Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision)
 

Variables

STATIC CONST UINT64 * XsdtAddress
 
STATIC CONST ACPI_PARSER RsdpParser []
 

Detailed Description

RSDP table parser

Copyright (c) 2016 - 2024, Arm Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent

Reference(s):
  • ACPI 6.2 Specification - Errata A, September 2017

Definition in file RsdpParser.c.

Function Documentation

◆ ParseAcpiRsdp()

VOID EFIAPI ParseAcpiRsdp ( IN BOOLEAN  Trace,
IN UINT8 *  Ptr,
IN UINT32  AcpiTableLength,
IN UINT8  AcpiTableRevision 
)

This function parses the ACPI RSDP table.

This function invokes the parser for the XSDT table. Note - This function does not support parsing of RSDT table.

This function also performs a RAW dump of the ACPI table and validates the checksum.

Parameters
[in]TraceIf TRUE, trace the ACPI fields.
[in]PtrPointer to the start of the buffer.
[in]AcpiTableLengthLength of the ACPI table.
[in]AcpiTableRevisionRevision of the ACPI table.

Definition at line 126 of file RsdpParser.c.

◆ ValidateRsdtAddress()

STATIC VOID EFIAPI ValidateRsdtAddress ( IN UINT8 *  Ptr,
IN UINT32  Length,
IN VOID *  Context 
)

This function validates the RSDT Address.

Parameters
[in]PtrPointer to the start of the field data.
[in]LengthLength of the field.
[in]ContextPointer to context specific information e.g. this could be a pointer to the ACPI table header.

Definition at line 29 of file RsdpParser.c.

◆ ValidateXsdtAddress()

STATIC VOID EFIAPI ValidateXsdtAddress ( IN UINT8 *  Ptr,
IN UINT32  Length,
IN VOID *  Context 
)

This function validates the XSDT Address.

Parameters
[in]PtrPointer to the start of the field data.
[in]LengthLength of the field.
[in]ContextPointer to context specific information e.g. this could be a pointer to the ACPI table header.

Definition at line 67 of file RsdpParser.c.

Variable Documentation

◆ RsdpParser

STATIC CONST ACPI_PARSER RsdpParser[]
Initial value:
= {
{ L"Signature", 8, 0, NULL, Dump8Chars, NULL, NULL, NULL },
{ L"Checksum", 1, 8, L"0x%x", NULL, NULL, NULL, NULL },
{ L"Oem ID", 6, 9, NULL, Dump6Chars, NULL, NULL, NULL },
{ L"Revision", 1, 15, L"%d", NULL, NULL, NULL, NULL },
{ L"RSDT Address", 4, 16, L"0x%x", NULL, NULL, ValidateRsdtAddress, NULL },
{ L"Length", 4, 20, L"%d", NULL, NULL, NULL, NULL },
{ L"XSDT Address", 8, 24, L"0x%lx", NULL, (VOID **)&XsdtAddress,
{ L"Extended Checksum", 1, 32, L"0x%x", NULL, NULL, NULL, NULL },
{ L"Reserved", 3, 33, L"%x %x %x", Dump3Chars, NULL, NULL, NULL }
}
VOID EFIAPI Dump8Chars(IN CONST CHAR16 *Format OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length)
Definition: AcpiParser.c:408
VOID EFIAPI Dump3Chars(IN CONST CHAR16 *Format OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length)
Definition: AcpiParser.c:326
VOID EFIAPI Dump6Chars(IN CONST CHAR16 *Format OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length)
Definition: AcpiParser.c:379
#define NULL
Definition: Base.h:319
STATIC VOID EFIAPI ValidateRsdtAddress(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
Definition: RsdpParser.c:29
STATIC VOID EFIAPI ValidateXsdtAddress(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
Definition: RsdpParser.c:67

An array describing the ACPI RSDP Table.

Definition at line 97 of file RsdpParser.c.

◆ XsdtAddress

STATIC CONST UINT64* XsdtAddress

Definition at line 16 of file RsdpParser.c.