TianoCore EDK2 master
|
#include <PiMm.h>
#include <Protocol/MmReportStatusCodeHandler.h>
#include <Guid/FirmwarePerformance.h>
#include <Library/MmServicesTableLib.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/TimerLib.h>
#include <Library/LockBoxLib.h>
#include <Library/PcdLib.h>
#include <Library/BaseMemoryLib.h>
#include "FirmwarePerformanceCommon.h"
Go to the source code of this file.
Functions | |
EFI_STATUS EFIAPI | FpdtStatusCodeListenerMm (IN EFI_STATUS_CODE_TYPE CodeType, IN EFI_STATUS_CODE_VALUE Value, IN UINT32 Instance, IN EFI_GUID *CallerId, IN EFI_STATUS_CODE_DATA *Data) |
EFI_STATUS | FirmwarePerformanceCommonEntryPoint (VOID) |
Variables | |
EFI_MM_RSC_HANDLER_PROTOCOL * | mRscHandlerProtocol = NULL |
UINT64 | mSuspendStartTime = 0 |
BOOLEAN | mS3SuspendLockBoxSaved = FALSE |
This module collects performance data for MM driver boot records and S3 Suspend Performance Record.
This module registers report status code listener to collect performance data for MM driver boot records and S3 Suspend Performance Record.
Caution: This module requires additional review when modified. This driver will have external input - communicate buffer in MM mode. This external input must be validated carefully to avoid security issue like buffer overflow, integer overflow.
FpdtSmiHandler() will receive untrusted input and do basic validation.
Copyright (c) 2011 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file FirmwarePerformanceCommon.c.
EFI_STATUS FirmwarePerformanceCommonEntryPoint | ( | VOID | ) |
The module Entry Point of the Firmware Performance Data Table MM driver.
EFI_SUCCESS | The entry point is executed successfully. |
Other | Some error occurs when executing this entry point. |
Definition at line 141 of file FirmwarePerformanceCommon.c.
EFI_STATUS EFIAPI FpdtStatusCodeListenerMm | ( | IN EFI_STATUS_CODE_TYPE | CodeType, |
IN EFI_STATUS_CODE_VALUE | Value, | ||
IN UINT32 | Instance, | ||
IN EFI_GUID * | CallerId, | ||
IN EFI_STATUS_CODE_DATA * | Data | ||
) |
Report status code listener for MM. This is used to record the performance data for S3 Suspend Start and S3 Suspend End in FPDT.
[in] | CodeType | Indicates the type of status code being reported. |
[in] | Value | Describes the current status of a hardware or software entity. This included information about the class and subclass that is used to classify the entity as well as an operation. |
[in] | Instance | The enumeration of a hardware or software entity within the system. Valid instance numbers start with 1. |
[in] | CallerId | This optional parameter may be used to identify the caller. This parameter allows the status code driver to apply different rules to different callers. |
[in] | Data | This optional parameter may be used to pass additional data. |
EFI_SUCCESS | Status code is what we expected. |
EFI_UNSUPPORTED | Status code not supported. |
Definition at line 59 of file FirmwarePerformanceCommon.c.
EFI_MM_RSC_HANDLER_PROTOCOL* mRscHandlerProtocol = NULL |
Definition at line 34 of file FirmwarePerformanceCommon.c.
BOOLEAN mS3SuspendLockBoxSaved = FALSE |
Definition at line 36 of file FirmwarePerformanceCommon.c.
UINT64 mSuspendStartTime = 0 |
Definition at line 35 of file FirmwarePerformanceCommon.c.