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>
30 lines
781 B
C
30 lines
781 B
C
/** @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
|