TianoCore EDK2 master
|
#include <Guid/ZeroGuid.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/HiiLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PcdLib.h>
#include <Library/PrmContextBufferLib.h>
#include <Library/PrmModuleDiscoveryLib.h>
#include <Library/PrmPeCoffLib.h>
#include <Library/ShellLib.h>
#include <Library/TimerLib.h>
#include <Library/UefiApplicationEntryPoint.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiHiiServicesLib.h>
#include <Library/UefiLib.h>
#include "PrmInfo.h"
Go to the source code of this file.
Functions | |
VOID EFIAPI | FreeList (IN LIST_ENTRY *ListHead) |
PRM_HANDLER_CONTEXT_LIST_ENTRY * | CreateNewPrmHandlerListEntry (VOID) |
VOID | PrintMmioRuntimeRangeInfo (IN PRM_RUNTIME_MMIO_RANGES *RuntimeMmioRanges) |
VOID | GatherPrmHandlerInfo (IN BOOLEAN PrintInformation) |
EFI_STATUS | PopulateContextBuffer (IN PRM_DATA_BUFFER *StaticDataBuffer OPTIONAL, IN EFI_GUID *HandlerGuid, IN PRM_CONTEXT_BUFFER *ContextBuffer) |
VOID | PrintExecutionTime (IN UINT64 TimeInNanoSec) |
EFI_STATUS | ExecutePrmHandlerByGuid (IN EFI_GUID *HandlerGuid) |
EFI_STATUS | ParseParameterList (VOID) |
EFI_STATUS EFIAPI | UefiMain (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
GLOBAL_REMOVE_IF_UNREFERENCED EFI_STRING_ID | mStringPrmInfoHelpTokenId = STRING_TOKEN (STR_PRMINFO_HELP) |
UINT8 | PrmInfoStrings [] |
STATIC UINTN | mPrmHandlerCount |
STATIC UINTN | mPrmModuleCount |
STATIC EFI_HII_HANDLE | mPrmInfoHiiHandle |
STATIC LIST_ENTRY | mPrmHandlerList |
STATIC CONST SHELL_PARAM_ITEM | mParamList [] |
Prints information about the PRM configuration loaded by the system firmware.
This application also provides some additional testing features for PRM configuration. For example, the application can be used to selectively invoke PRM handlers in the UEFI shell environment to provide a quick testing path of the PRM infrastructure on the firmware and the PRM module implementation.
This can also be useful to prepare a PRM enabled firmware and PRM modules prior to formal OS support to test the PRM code.
Copyright (C) Microsoft Corporation. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file PrmInfo.c.
PRM_HANDLER_CONTEXT_LIST_ENTRY * CreateNewPrmHandlerListEntry | ( | VOID | ) |
EFI_STATUS ExecutePrmHandlerByGuid | ( | IN EFI_GUID * | HandlerGuid | ) |
Executes the PRM handler with the provided GUID.
[in] | HandlerGuid | A pointer to the GUID of the PRM handler to execute. A zero GUID indicates that all PRM handlers present should be executed. |
EFI_SUCCESS | The PRM handler(s) were executed. |
EFI_INVALID_PARAMETER | The HandlerGuid actual argument is NULL. |
EFI_NOT_FOUND | The PRM handler could not be found. |
VOID EFIAPI FreeList | ( | IN LIST_ENTRY * | ListHead | ) |
VOID GatherPrmHandlerInfo | ( | IN BOOLEAN | PrintInformation | ) |
Gathers the PRM handler (and by extension module) information discovered on this system.
This function must be called to build up the discovered context for other functions in the application. The function will optionally print results as determed by the value of the PrintInformation parameter.
[in] | PrintInformation | Indicates whether to print information as discovered in the function. |
EFI_STATUS ParseParameterList | ( | VOID | ) |
Parses the application parameter list and performs the appropriate operations based on the results.
EFI_SUCCESS | The parameter list was parsed successfully. |
EFI_INVALID_PARAMETER | An invalid parameter was given to the application. |
EFI_LOAD_ERROR | An error occurred loading the application. |
EFI_STATUS PopulateContextBuffer | ( | IN PRM_DATA_BUFFER *StaticDataBuffer | OPTIONAL, |
IN EFI_GUID * | HandlerGuid, | ||
IN PRM_CONTEXT_BUFFER * | ContextBuffer | ||
) |
Populates the given context buffer so it can be passed to a PRM handler.
[in] | StaticDataBuffer | A pointer to the static data buffer that will be referenced in the context buffer that is populated. This is an optional pointer that, if not provided, by passing NULL will be ignored. |
[in] | HandlerGuid | A pointer to the GUID of the PRM handler. |
[in] | ContextBuffer | A pointer to a caller allocated ContextBuffer structure that will be populated by this function. |
EFI_SUCCESS | The given ContextBuffer was populated successfully. |
EFI_INVALID_PARAMETER | The HandlerGuid or ContextBuffer actual argument is NULL. |
VOID PrintExecutionTime | ( | IN UINT64 | TimeInNanoSec | ) |
VOID PrintMmioRuntimeRangeInfo | ( | IN PRM_RUNTIME_MMIO_RANGES * | RuntimeMmioRanges | ) |
EFI_STATUS EFIAPI UefiMain | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Entry point of this UEFI application.
[in] | ImageHandle | The firmware allocated handle for the EFI image. |
[in] | SystemTable | A pointer to the EFI System Table. |
EFI_SUCCESS | The entry point is executed successfully. |
other | Some error occurs when executing this entry point. |
STATIC CONST SHELL_PARAM_ITEM mParamList[] |
STATIC LIST_ENTRY mPrmHandlerList |
STATIC EFI_HII_HANDLE mPrmInfoHiiHandle |
GLOBAL_REMOVE_IF_UNREFERENCED EFI_STRING_ID mStringPrmInfoHelpTokenId = STRING_TOKEN (STR_PRMINFO_HELP) |