2 TCG2 Standalone MM driver that updates TPM2 items in ACPI table and registers
3 SMI2 callback functions for Tcg2 physical presence, ClearMemory, and
4 sample for dTPM StartMethod.
6 Caution: This module requires additional review when modified.
7 This driver will have external input - variable and ACPINvs data in SMM mode.
8 This external input must be validated carefully to avoid security issue.
10 PhysicalPresenceCallback() and MemoryClearCallback() will receive untrusted input and do some check.
12 Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
13 Copyright (c) Microsoft Corporation.
14 SPDX-License-Identifier: BSD-2-Clause-Patent
19 #include <Library/StandaloneMmMemLib.h>
22 Notify the system that the SMM variable driver is ready.
33 This function is an abstraction layer for implementation specific Mm buffer validation routine.
35 @param Buffer The buffer start address to be checked.
36 @param Length The buffer length to be checked.
38 @retval TRUE This buffer is valid per processor architecture and not overlap with SMRAM.
39 @retval FALSE This buffer is not valid per processor architecture or overlap with SMRAM.
42 IsBufferOutsideMmValid (
43 IN EFI_PHYSICAL_ADDRESS Buffer
,
47 return MmIsBufferOutsideMmValid (Buffer
, Length
);
51 The driver's entry point.
53 It install callbacks for TPM physical presence and MemoryClear, and locate
54 SMM variable to be used in the callback function.
56 @param[in] ImageHandle The firmware allocated handle for the EFI image.
57 @param[in] SystemTable A pointer to the EFI System Table.
59 @retval EFI_SUCCESS The entry point is executed successfully.
60 @retval Others Some error occurs when executing this entry point.
65 InitializeTcgStandaloneMm (
66 IN EFI_HANDLE ImageHandle
,
67 IN EFI_MM_SYSTEM_TABLE
*SystemTable
70 return InitializeTcgCommon ();