TianoCore EDK2 master
|
#include "PrmAcpiTable.h"
#include <Guid/ZeroGuid.h>
#include <IndustryStandard/Acpi.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PrmContextBufferLib.h>
#include <Library/PrmModuleDiscoveryLib.h>
#include <Library/PrmPeCoffLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiLib.h>
#include <Protocol/AcpiTable.h>
#include <Protocol/PrmConfig.h>
#include <PrmContextBuffer.h>
#include <PrmMmio.h>
Go to the source code of this file.
Macros | |
#define | _DBGMSGID_ "[PRMLOADER]" |
Functions | |
EFI_STATUS | ProcessPrmModules (OUT PRM_ACPI_DESCRIPTION_TABLE **PrmAcpiDescriptionTable) |
EFI_STATUS | PublishPrmAcpiTable (IN PRM_ACPI_DESCRIPTION_TABLE *PrmAcpiDescriptionTable) |
VOID EFIAPI | PrmLoaderEndOfDxeNotification (IN EFI_EVENT Event, IN VOID *Context) |
EFI_STATUS EFIAPI | PrmLoaderEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
UINTN | mPrmHandlerCount |
UINTN | mPrmModuleCount |
This file contains the implementation for a Platform Runtime Mechanism (PRM) loader driver.
Copyright (c) 2020, Intel Corporation. All rights reserved.
Copyright (c) Microsoft Corporation SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file PrmLoaderDxe.c.
#define _DBGMSGID_ "[PRMLOADER]" |
Definition at line 31 of file PrmLoaderDxe.c.
The PRM Loader END_OF_DXE protocol notification event handler.
All PRM Modules that are eligible for dispatch should have been loaded the DXE Dispatcher at the time of this function invocation.
The main responsibilities of the PRM Loader are executed from this function which include 3 phases: 1.) Disover PRM Modules - Find all PRM modules loaded during DXE dispatch and insert a PRM Module Context entry into a linked list to be handed off to phase 2. 2.) Process PRM Modules - Build a GUID to PRM handler mapping for each module that is described in the PRM ACPI table so the OS can resolve a PRM Handler GUID to the corresponding PRM Handler physical address. 3.) Publish PRM ACPI Table - Publish the PRM ACPI table with the information gathered in the phase 2.
[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 311 of file PrmLoaderDxe.c.
EFI_STATUS EFIAPI PrmLoaderEntryPoint | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
The entry point for this module.
ImageHandle | The firmware allocated handle for the EFI image. |
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 349 of file PrmLoaderDxe.c.
EFI_STATUS ProcessPrmModules | ( | OUT PRM_ACPI_DESCRIPTION_TABLE ** | PrmAcpiDescriptionTable | ) |
Processes a list of PRM context entries to build a PRM ACPI table.
The ACPI table buffer is allocated and the table structure is built inside this function.
[out] | PrmAcpiDescriptionTable | A pointer to a pointer to a buffer that is allocated within this function and will contain the PRM ACPI table. In case of an error in this function, PrmAcpiDescriptorTable will be NULL. |
EFI_SUCCESS | All PRM Modules were processed to construct the PRM ACPI table successfully. |
EFI_INVALID_PARAMETER | THe parameter PrmAcpiDescriptionTable is NULL. |
EFI_OUT_OF_RESOURCES | Insufficient memory resources to allocate the PRM ACPI table boot services memory data buffer. |
Definition at line 52 of file PrmLoaderDxe.c.
EFI_STATUS PublishPrmAcpiTable | ( | IN PRM_ACPI_DESCRIPTION_TABLE * | PrmAcpiDescriptionTable | ) |
Publishes the PRM ACPI table (PRMT).
[in] | PrmAcpiDescriptionTable | A pointer to a buffer with a completely populated and valid PRM ACPI description table. |
EFI_SUCCESS | The PRM ACPI was installed successfully. |
EFI_INVALID_PARAMETER | THe parameter PrmAcpiDescriptionTable is NULL or the table signature in the table provided is invalid. |
EFI_NOT_FOUND | The protocol gEfiAcpiTableProtocolGuid could not be found. |
EFI_OUT_OF_RESOURCES | Insufficient memory resources to allocate the PRM ACPI table buffer. |
Definition at line 257 of file PrmLoaderDxe.c.
UINTN mPrmHandlerCount |
Definition at line 33 of file PrmLoaderDxe.c.
UINTN mPrmModuleCount |
Definition at line 34 of file PrmLoaderDxe.c.