]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceCommon.h
MdeModulePkg: FirmwarePerformanceDataTable: Added StandaloneMm support
[mirror_edk2.git] / MdeModulePkg / Universal / Acpi / FirmwarePerformanceDataTableSmm / FirmwarePerformanceCommon.h
1 /** @file
2 This module collects performance data for SMM driver boot records and S3 Suspend Performance Record.
3
4 This module registers report status code listener to collect performance data
5 for SMM driver boot records and S3 Suspend Performance Record.
6
7 Caution: This module requires additional review when modified.
8 This driver will have external input - communicate buffer in SMM mode.
9 This external input must be validated carefully to avoid security issue like
10 buffer overflow, integer overflow.
11
12 FpdtSmiHandler() will receive untrusted input and do basic validation.
13
14 Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
15 Copyright (c), Microsoft Corporation.
16 SPDX-License-Identifier: BSD-2-Clause-Patent
17
18 **/
19
20 #ifndef _FW_PERF_COMMON_H_
21 #define _FW_PERF_COMMON_H_
22
23 /**
24 This function is an abstraction layer for implementation specific Mm buffer validation routine.
25
26 @param Buffer The buffer start address to be checked.
27 @param Length The buffer length to be checked.
28
29 @retval TRUE This buffer is valid per processor architecture and not overlap with SMRAM.
30 @retval FALSE This buffer is not valid per processor architecture or overlap with SMRAM.
31 **/
32 BOOLEAN
33 IsBufferOutsideMmValid (
34 IN EFI_PHYSICAL_ADDRESS Buffer,
35 IN UINT64 Length
36 );
37
38 /**
39 The module Entry Point of the Firmware Performance Data Table MM driver.
40
41 @retval EFI_SUCCESS The entry point is executed successfully.
42 @retval Other Some error occurs when executing this entry point.
43
44 **/
45 EFI_STATUS
46 FirmwarePerformanceCommonEntryPoint (
47 VOID
48 );
49
50 #endif // _FW_PERF_COMMON_H_