TianoCore EDK2 master
|
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/DxeServicesTableLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/UefiLib.h>
#include <PiDxe.h>
#include <PrmContextBuffer.h>
#include <PrmDataBuffer.h>
#include <PrmMmio.h>
#include <Protocol/PrmConfig.h>
Go to the source code of this file.
Macros | |
#define | _DBGMSGID_ "[PRMCONFIG]" |
Functions | |
VOID | ConvertRuntimeMemoryRangeAddresses (IN PRM_RUNTIME_MMIO_RANGES *RuntimeMmioRanges) |
VOID | SetRuntimeMemoryRangeAttributes (IN PRM_RUNTIME_MMIO_RANGES *RuntimeMmioRanges) |
VOID | StoreVirtualMemoryAddressChangePointers (VOID) |
EFI_STATUS | ValidatePrmDataBuffer (IN CONST PRM_DATA_BUFFER *PrmDataBuffer) |
EFI_STATUS | ValidatePrmContextBuffer (IN CONST PRM_CONTEXT_BUFFER *PrmContextBuffer) |
VOID EFIAPI | PrmConfigVirtualAddressChangeEvent (IN EFI_EVENT Event, IN VOID *Context) |
VOID EFIAPI | PrmConfigEndOfDxeNotification (IN EFI_EVENT Event, IN VOID *Context) |
EFI_STATUS EFIAPI | PrmConfigEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
STATIC UINTN | mMaxRuntimeMmioRangeCount |
GLOBAL_REMOVE_IF_UNREFERENCED STATIC PRM_RUNTIME_MMIO_RANGES ** | mRuntimeMmioRanges |
This file contains the implementation for a Platform Runtime Mechanism (PRM) configuration driver.
Copyright (c) Microsoft Corporation Copyright (c) 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file PrmConfigDxe.c.
#define _DBGMSGID_ "[PRMCONFIG]" |
Definition at line 26 of file PrmConfigDxe.c.
VOID ConvertRuntimeMemoryRangeAddresses | ( | IN PRM_RUNTIME_MMIO_RANGES * | RuntimeMmioRanges | ) |
Converts the runtime memory range physical addresses to virtual addresses.
[in] | RuntimeMmioRanges | A pointer to a PRM_RUNTIME_MMIO_RANGES buffer. |
Definition at line 39 of file PrmConfigDxe.c.
The PRM Config END_OF_DXE protocol notification event handler.
Finds all of the PRM_CONFIG_PROTOCOL instances installed at end of DXE and marks all PRM_RUNTIME_MMIO_RANGE entries as EFI_MEMORY_RUNTIME.
[in] | Event | Event whose notification function is being invoked. |
[in] | Context | The pointer to the notification function's context, which is implementation-dependent. |
Definition at line 382 of file PrmConfigDxe.c.
EFI_STATUS EFIAPI PrmConfigEntryPoint | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
The entry point for this module.
[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. |
Others | An error occurred when executing this entry point. |
Definition at line 478 of file PrmConfigDxe.c.
Notification function of EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE.
This is notification function converts any registered PRM_RUNTIME_MMIO_RANGE addresses to a virtual address.
[in] | Event | Event whose notification function is being invoked. |
[in] | Context | Pointer to the notification function's context. |
Definition at line 354 of file PrmConfigDxe.c.
VOID SetRuntimeMemoryRangeAttributes | ( | IN PRM_RUNTIME_MMIO_RANGES * | RuntimeMmioRanges | ) |
Sets the runtime memory range attributes.
The EFI_MEMORY_RUNTIME attribute is set for each PRM_RUNTIME_MMIO_RANGE present in the buffer provided.
[in] | RuntimeMmioRanges | A pointer to a PRM_RUNTIME_MMIO_RANGES buffer. |
Definition at line 65 of file PrmConfigDxe.c.
VOID StoreVirtualMemoryAddressChangePointers | ( | VOID | ) |
Stores pointers or pointer to resources that should be converted in the virtual address change event.
Definition at line 186 of file PrmConfigDxe.c.
EFI_STATUS ValidatePrmContextBuffer | ( | IN CONST PRM_CONTEXT_BUFFER * | PrmContextBuffer | ) |
Validates a PRM context buffer.
Verifies the buffer header signature is valid and the GUID is set to a non-zero value.
[in] | PrmContextBuffer | A pointer to the context buffer for this PRM handler. |
EFI_SUCCESS | The context buffer was validated successfully. |
EFI_INVALID_PARAMETER | The pointer given for ContextBuffer is NULL. |
EFI_NOT_FOUND | The proper value for a field was not found. |
Definition at line 310 of file PrmConfigDxe.c.
EFI_STATUS ValidatePrmDataBuffer | ( | IN CONST PRM_DATA_BUFFER * | PrmDataBuffer | ) |
Validates a data buffer for a PRM module.
Verifies the buffer header signature is valid and the length meets the minimum size.
[in] | PrmDataBuffer | A pointer to the data buffer for this PRM module. |
EFI_SUCCESS | The data buffer was validated successfully. |
EFI_INVALID_PARAMETER | The pointer given for PrmDataBuffer is NULL. |
EFI_NOT_FOUND | The data buffer signature is not valid. |
EFI_BUFFER_TOO_SMALL | The buffer size is too small. |
Definition at line 276 of file PrmConfigDxe.c.
Definition at line 28 of file PrmConfigDxe.c.
GLOBAL_REMOVE_IF_UNREFERENCED STATIC PRM_RUNTIME_MMIO_RANGES** mRuntimeMmioRanges |
Definition at line 30 of file PrmConfigDxe.c.