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

Go to the source code of this file.

Macros

#define SLIT_ELEMENT(Ptr, i, j)   *(Ptr + (i * LocalityCount) + j)
 

Functions

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

Variables

STATIC CONST UINT64 * SlitSystemLocalityCount
 
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo
 
STATIC CONST ACPI_PARSER SlitParser []
 

Detailed Description

SLIT table parser

Copyright (c) 2016 - 2019, 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 SlitParser.c.

Macro Definition Documentation

◆ SLIT_ELEMENT

#define SLIT_ELEMENT (   Ptr,
  i,
 
)    *(Ptr + (i * LocalityCount) + j)

Macro to get the value of a System Locality

Definition at line 33 of file SlitParser.c.

Function Documentation

◆ ParseAcpiSlit()

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

This function parses the ACPI SLIT table. When trace is enabled this function parses the SLIT table and traces the ACPI table fields.

This function also validates System Localities for the following:

  • Diagonal elements have a normalized value of 10
  • Relative distance from System Locality at i*N+j is same as j*N+i
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 52 of file SlitParser.c.

Variable Documentation

◆ AcpiHdrInfo

Definition at line 19 of file SlitParser.c.

◆ SlitParser

STATIC CONST ACPI_PARSER SlitParser[]
Initial value:
= {
PARSE_ACPI_HEADER (&AcpiHdrInfo),
{ L"Number of System Localities", 8, 36, L"0x%lx", NULL,
(VOID **)&SlitSystemLocalityCount,NULL, NULL }
}
#define PARSE_ACPI_HEADER(Info)
Definition: AcpiParser.h:501
#define NULL
Definition: Base.h:319

An ACPI_PARSER array describing the ACPI SLIT table.

Definition at line 24 of file SlitParser.c.

◆ SlitSystemLocalityCount

STATIC CONST UINT64* SlitSystemLocalityCount

Definition at line 18 of file SlitParser.c.