TianoCore EDK2 master
Loading...
Searching...
No Matches
WsmtParser.c File Reference

Go to the source code of this file.

Functions

STATIC VOID EFIAPI ValidateWsmtProtectionFlag (IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
 
STATIC VOID EFIAPI ValidateReserved (IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
 
VOID EFIAPI DumpWsmtProtectionFlag (IN CONST CHAR16 *Format OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length)
 
VOID EFIAPI ParseAcpiWsmt (IN BOOLEAN Trace, IN UINT8 *Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision)
 

Variables

STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo
 
STATIC CONST ACPI_PARSER WsmtProtectionFlagParser []
 
STATIC CONST ACPI_PARSER WsmtParser []
 

Detailed Description

WSMT table parser

Copyright (c) 2024, Arm Limited. All rights reserved. Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent

Reference(s):
  • Windows SMM Security Mitigation Table spec, version 1.0

Definition in file WsmtParser.c.

Function Documentation

◆ DumpWsmtProtectionFlag()

VOID EFIAPI DumpWsmtProtectionFlag ( IN CONST CHAR16 *Format  OPTIONAL,
IN UINT8 *  Ptr,
IN UINT32  Length 
)

This function prints WSMT Protection flag. If no format string is specified the Format must be NULL.

Parameters
[in]FormatOptional format string for tracing the data.
[in]PtrPointer to the start of the buffer.

Definition at line 98 of file WsmtParser.c.

◆ ParseAcpiWsmt()

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

This function parses the ACPI WSMT table.

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 138 of file WsmtParser.c.

◆ ValidateReserved()

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

This function validates the reserved bits in the WSMT Protection flag.

Parameters
[in]PtrPointer to the start of the buffer.
[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 63 of file WsmtParser.c.

◆ ValidateWsmtProtectionFlag()

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

This function validates the WSMT Protection flag.

Parameters
[in]PtrPointer to the start of the buffer.
[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 30 of file WsmtParser.c.

Variable Documentation

◆ AcpiHdrInfo

Definition at line 16 of file WsmtParser.c.

◆ WsmtParser

STATIC CONST ACPI_PARSER WsmtParser[]
Initial value:
= {
PARSE_ACPI_HEADER (&AcpiHdrInfo),
}
#define PARSE_ACPI_HEADER(Info)
Definition: AcpiParser.h:501
#define NULL
Definition: Base.h:319
STATIC VOID EFIAPI ValidateWsmtProtectionFlag(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
Definition: WsmtParser.c:30
VOID EFIAPI DumpWsmtProtectionFlag(IN CONST CHAR16 *Format OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length)
Definition: WsmtParser.c:98

An ACPI_PARSER array describing the ACPI WSMT Table.

Definition at line 123 of file WsmtParser.c.

◆ WsmtProtectionFlagParser

STATIC CONST ACPI_PARSER WsmtProtectionFlagParser[]
Initial value:
= {
{ L"FIXED_COMM_BUFFERS ", 1, 0, L"0x%x", NULL, NULL, NULL, NULL },
{ L"COMM_BUFFER_NESTED_PTR_PROTECTION ", 1, 1, L"0x%x", NULL, NULL, NULL, NULL },
{ L"SYSTEM_RESOURCE_PROTECTION ", 1, 2, L"0x%x", NULL, NULL, NULL, NULL },
{ L"Reserved ", 29, 3, L"0x%x", NULL, NULL, ValidateReserved, NULL },
}
STATIC VOID EFIAPI ValidateReserved(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
Definition: WsmtParser.c:63

An ACPI_PARSER array describing the WSMT Protection flag .

Definition at line 82 of file WsmtParser.c.