TianoCore EDK2 master
|
#include <PiDxe.h>
#include <Protocol/Smbios.h>
#include <IndustryStandard/SmBios.h>
#include <IndustryStandard/UefiTcgPlatform.h>
#include <Guid/EventGroup.h>
#include <Guid/SmBios.h>
#include <Library/DebugLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/UefiLib.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/PcdLib.h>
#include <Library/TpmMeasurementLib.h>
Go to the source code of this file.
Data Structures | |
struct | SMBIOS_FILTER_TABLE |
struct | SMBIOS_FILTER_STRUCT |
struct | SMBIOS_HANDOFF_TABLE_POINTERS2 |
Macros | |
#define | FIELD_SIZE_OF(TYPE, Field) ((UINTN)sizeof(((TYPE *)0)->Field)) |
#define | SMBIOS_FILTER_TABLE_FLAG_IS_STRING BIT0 |
#define | SMBIOS_HANDOFF_TABLE_DESC "SmbiosTable" |
#define | COLUME_SIZE (16 * 2) |
Functions | |
VOID | InternalDumpData (IN UINT8 *Data, IN UINTN Size) |
VOID | InternalDumpHex (IN UINT8 *Data, IN UINTN Size) |
SMBIOS_FILTER_STRUCT * | GetFilterStructByType (IN UINT8 Type) |
CHAR8 * | GetSmbiosStringById (IN EFI_SMBIOS_TABLE_HEADER *Head, IN SMBIOS_TABLE_STRING StringId, OUT UINTN *StringLen) |
VOID | FilterSmbiosEntry (IN OUT VOID *TableEntry, IN UINTN TableEntrySize) |
UINTN | GetSmbiosStructureSize (IN EFI_SMBIOS_TABLE_HEADER *Head, OUT UINTN *NumberOfStrings) |
UINTN | GetSmbiosTableLength (IN VOID *TableAddress, IN UINTN TableMaximumSize) |
VOID | FilterSmbiosTable (IN OUT VOID *TableAddress, IN UINTN TableLength) |
VOID EFIAPI | MeasureSmbiosTable (IN EFI_EVENT Event, IN VOID *Context) |
EFI_STATUS EFIAPI | SmbiosMeasurementDriverEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
This driver measures SMBIOS table to TPM.
Copyright (c) 2015 - 2022, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file SmbiosMeasurementDxe.c.
#define FIELD_SIZE_OF | ( | TYPE, | |
Field | |||
) | ((UINTN)sizeof(((TYPE *)0)->Field)) |
Definition at line 26 of file SmbiosMeasurementDxe.c.
#define SMBIOS_FILTER_TABLE_FLAG_IS_STRING BIT0 |
Definition at line 34 of file SmbiosMeasurementDxe.c.
#define SMBIOS_HANDOFF_TABLE_DESC "SmbiosTable" |
Definition at line 115 of file SmbiosMeasurementDxe.c.
This function update SMBIOS table based on policy.
TableEntry | SMBIOS table |
TableEntrySize | SMBIOS table size |
Definition at line 278 of file SmbiosMeasurementDxe.c.
This function updatess full SMBIOS table length.
TableAddress | SMBIOS table based address |
TableLength | SMBIOS table length |
Definition at line 450 of file SmbiosMeasurementDxe.c.
SMBIOS_FILTER_STRUCT * GetFilterStructByType | ( | IN UINT8 | Type | ) |
This function get filter structure by SMBIOS type.
Type | SMBIOS type |
Definition at line 189 of file SmbiosMeasurementDxe.c.
CHAR8 * GetSmbiosStringById | ( | IN EFI_SMBIOS_TABLE_HEADER * | Head, |
IN SMBIOS_TABLE_STRING | StringId, | ||
OUT UINTN * | StringLen | ||
) |
This function get SMBIOS string in SMBIOS table.
Head | SMBIOS table head |
StringId | SMBIOS string ID |
StringLen | length of SMBIOS string |
Definition at line 215 of file SmbiosMeasurementDxe.c.
UINTN GetSmbiosStructureSize | ( | IN EFI_SMBIOS_TABLE_HEADER * | Head, |
OUT UINTN * | NumberOfStrings | ||
) |
Get the full size of SMBIOS structure including optional strings that follow the formatted structure.
Head | Pointer to the beginning of SMBIOS structure. |
NumberOfStrings | The returned number of optional strings that follow the formatted structure. |
Definition at line 349 of file SmbiosMeasurementDxe.c.
This function returns full SMBIOS table length.
TableAddress | SMBIOS table based address |
TableMaximumSize | Maximum size of SMBIOS table |
Definition at line 413 of file SmbiosMeasurementDxe.c.
This function dump raw data.
Data | raw data |
Size | raw data size |
Definition at line 134 of file SmbiosMeasurementDxe.c.
This function dump raw data with colume format.
Data | raw data |
Size | raw data size |
Definition at line 155 of file SmbiosMeasurementDxe.c.
Measure SMBIOS with EV_EFI_HANDOFF_TABLES to PCR[1].
[in] | Event | Event whose notification function is being invoked. |
[in] | Context | Pointer to the notification function's context. |
Definition at line 482 of file SmbiosMeasurementDxe.c.
EFI_STATUS EFIAPI SmbiosMeasurementDriverEntryPoint | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Driver to produce Smbios measurement.
ImageHandle | Module's image handle |
SystemTable | Pointer of EFI_SYSTEM_TABLE |
Definition at line 657 of file SmbiosMeasurementDxe.c.
UINTN mMaxLen |
Definition at line 111 of file SmbiosMeasurementDxe.c.
EFI_SMBIOS_PROTOCOL* mSmbios |
Definition at line 110 of file SmbiosMeasurementDxe.c.
SMBIOS_FILTER_STRUCT mSmbiosFilterStandardTableBlackList[] |
Definition at line 93 of file SmbiosMeasurementDxe.c.
SMBIOS_FILTER_TABLE mSmbiosFilterType17BlackList[] |
Definition at line 71 of file SmbiosMeasurementDxe.c.
SMBIOS_FILTER_TABLE mSmbiosFilterType1BlackList[] |
Definition at line 45 of file SmbiosMeasurementDxe.c.
SMBIOS_FILTER_TABLE mSmbiosFilterType22BlackList[] |
Definition at line 76 of file SmbiosMeasurementDxe.c.
SMBIOS_FILTER_TABLE mSmbiosFilterType23BlackList[] |
Definition at line 81 of file SmbiosMeasurementDxe.c.
SMBIOS_FILTER_TABLE mSmbiosFilterType27BlackList[] |
Definition at line 84 of file SmbiosMeasurementDxe.c.
SMBIOS_FILTER_TABLE mSmbiosFilterType2BlackList[] |
Definition at line 50 of file SmbiosMeasurementDxe.c.
SMBIOS_FILTER_TABLE mSmbiosFilterType39BlackList[] |
Definition at line 87 of file SmbiosMeasurementDxe.c.
SMBIOS_FILTER_TABLE mSmbiosFilterType3BlackList[] |
Definition at line 54 of file SmbiosMeasurementDxe.c.
SMBIOS_FILTER_TABLE mSmbiosFilterType4BlackList[] |
Definition at line 58 of file SmbiosMeasurementDxe.c.