TianoCore EDK2 master
Loading...
Searching...
No Matches
DxeResetSystemAcpiGed.c File Reference

Go to the source code of this file.

Functions

STATIC EFI_STATUS SetMemoryAttributesRunTime (UINTN Address)
 
STATIC EFI_STATUS GetPowerManagerByParseAcpiInfo (VOID)
 
STATIC VOID ResetSystemLibAddressChangeEvent (IN EFI_EVENT Event, IN VOID *Context)
 
STATIC VOID AcpiNotificationEvent (IN EFI_EVENT Event, IN VOID *Context)
 
EFI_STATUS EFIAPI ResetSystemLibConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Detailed Description

Dxe ResetSystem library implementation.

Copyright (c) 2024 Loongson Technology Corporation Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file DxeResetSystemAcpiGed.c.

Function Documentation

◆ AcpiNotificationEvent()

STATIC VOID AcpiNotificationEvent ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Notification function of ACPI Table change.

This is a notification function registered on ACPI Table change event. It saves the Century address stored in ACPI FADT table.

Parameters
EventEvent whose notification function is being invoked.
ContextPointer to the notification function's context.

Definition at line 187 of file DxeResetSystemAcpiGed.c.

◆ GetPowerManagerByParseAcpiInfo()

STATIC EFI_STATUS GetPowerManagerByParseAcpiInfo ( VOID  )

Find the power manager related info from ACPI table

Return values
RETURN_SUCCESSSuccessfully find out all the required information.
RETURN_NOT_FOUNDFailed to find the required info.

Definition at line 98 of file DxeResetSystemAcpiGed.c.

◆ ResetSystemLibAddressChangeEvent()

STATIC VOID ResetSystemLibAddressChangeEvent ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

This is a notification function registered on EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event. It converts a pointer to a new virtual address.

Parameters
[in]EventEvent whose notification function is being invoked.
[in]ContextPointer to the notification function's context

Definition at line 166 of file DxeResetSystemAcpiGed.c.

◆ ResetSystemLibConstructor()

EFI_STATUS EFIAPI ResetSystemLibConstructor ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

The constructor function to Register ACPI Table change event and Address Change Event.

Return values
EFI_SUCCESSThe constructor always returns RETURN_SUCCESS.

Definition at line 232 of file DxeResetSystemAcpiGed.c.

◆ SetMemoryAttributesRunTime()

STATIC EFI_STATUS SetMemoryAttributesRunTime ( UINTN  Address)

Modifies the attributes to Runtime type for a page size memory region.

Parameters
BaseAddressSpecified start address
Return values
EFI_SUCCESSThe attributes were set for the memory region.
EFI_INVALID_PARAMETERLength is zero.
EFI_UNSUPPORTEDThe processor does not support one or more bytes of the memory resource range specified by BaseAddress and Length.
EFI_UNSUPPORTEDThe bit mask of attributes is not support for the memory resource range specified by BaseAddress and Length.
EFI_ACCESS_DEFINEDThe attributes for the memory resource range specified by BaseAddress and Length cannot be modified.
EFI_OUT_OF_RESOURCESThere are not enough system resources to modify the attributes of the memory resource range.
EFI_NOT_AVAILABLE_YETThe attributes cannot be set because CPU architectural protocol is not available yet.

Definition at line 38 of file DxeResetSystemAcpiGed.c.