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

Go to the source code of this file.

Macros

#define DPREFIX   "sp800155evts: "
 

Functions

STATIC VOID PlatformIdRegisterSp800155 (IN CONST EFI_PEI_SERVICES **PeiServices, IN UINT8 *Evt, IN UINTN EvtSize)
 
BOOLEAN PlatformIdRegisterEvent (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST CHAR8 *Path)
 
VOID PlatformIdInitialization (IN CONST EFI_PEI_SERVICES **PeiServices)
 

Detailed Description

PlatformId Event HOB creation

Copyright (c) 2024, Google LLC. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file PlatformId.c.

Macro Definition Documentation

◆ DPREFIX

#define DPREFIX   "sp800155evts: "

Definition at line 21 of file PlatformId.c.

Function Documentation

◆ PlatformIdInitialization()

VOID PlatformIdInitialization ( IN CONST EFI_PEI_SERVICES **  PeiServices)

Reads opt/org.tianocode/sp800155evt/d from 0 to the first positive integer where the file does not exist and registers each file's contents in an EFI_HOB_GUID_TYPE with name gTcg800155PlatformIdEventHobGuid. These HOBs are used by a later driver to write to the event log as unmeasured events. These events inform the event log analyzer of firmware provenance and reference integrity manifests.

Definition at line 111 of file PlatformId.c.

◆ PlatformIdRegisterEvent()

BOOLEAN PlatformIdRegisterEvent ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST CHAR8 *  Path 
)

Reads the given path from the fw_cfg file and registers it as an EFI_HOB_GUID_EXTENSION HOB with gTcg800155PlatformIdEventHobGuid. Returns FALSE iff the file does not exist.

Definition at line 67 of file PlatformId.c.

◆ PlatformIdRegisterSp800155()

STATIC VOID PlatformIdRegisterSp800155 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN UINT8 *  Evt,
IN UINTN  EvtSize 
)

Creates an EFI_HOB_TYPE_GUID_EXTENSION HOB for a given SP800155 event. Associates the string data with gTcg800155PlatformIdEventHobGuid. Any unused bytes or out-of-bounds event sizes are considered corrupted and are discarded.

Definition at line 31 of file PlatformId.c.