OvmfPkg: Introduce Tcg2PhysicalPresencePlatformLib
Put the PPI configuration retriveal into an own library. That will allow to reuse the code in the UefipayloadPkg, where the firmware provides the ACPI tables, like QEMU does on OvmfPkg. However one major difference is that the PPI interface in UefiPayloadPkg is not backed by a MMIO device, but resides in DRAM and is shared with ACPI code. Add an additional parameter to provide the location of the PPI and test if the memory region has the correct attributes. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
This commit is contained in:
committed by
Tim Crawford
parent
25af751320
commit
bdb15bf9ba
29
OvmfPkg/Include/Library/Tcg2PhysicalPresencePlatformLib.h
Normal file
29
OvmfPkg/Include/Library/Tcg2PhysicalPresencePlatformLib.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/** @file
|
||||
Returns the platform specific Physical Presence configuration.
|
||||
|
||||
Copyright (C) 2020 9elements GmbH
|
||||
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
**/
|
||||
|
||||
#ifndef __TCG2_PHYSICAL_PRESENCE_PLATFORM_LIB_H__
|
||||
#define __TCG2_PHYSICAL_PRESENCE_PLATFORM_LIB_H__
|
||||
|
||||
#include <IndustryStandard/QemuTpm.h>
|
||||
|
||||
/**
|
||||
Reads the platform specific Physical Presence configuration.
|
||||
|
||||
@param[out] The Config structure to read to.
|
||||
@param[out] The PPIinMMIO is True when the PPI is in MMIO memory space
|
||||
|
||||
@retval EFI_SUCCESS Operation completed successfully.
|
||||
@retval EFI_PROTOCOL_ERROR Invalid fw_cfg entry size.
|
||||
**/
|
||||
EFI_STATUS
|
||||
TpmPPIPlatformReadConfig (
|
||||
OUT QEMU_FWCFG_TPM_CONFIG *Config,
|
||||
OUT BOOLEAN *PPIinMMIO
|
||||
);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user