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

Go to the source code of this file.

Functions

STATIC EFI_STATUS SendMemoryPermissionRequest (IN OUT ARM_SVC_ARGS *SvcArgs, OUT INT32 *RetVal)
 
STATIC EFI_STATUS GetMemoryPermissions (IN EFI_PHYSICAL_ADDRESS BaseAddress, OUT UINT32 *MemoryAttributes)
 
STATIC EFI_STATUS RequestMemoryPermissionChange (IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN UINT32 Permissions)
 
EFI_STATUS ArmSetMemoryRegionNoExec (IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length)
 
EFI_STATUS ArmClearMemoryRegionNoExec (IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length)
 
EFI_STATUS ArmSetMemoryRegionReadOnly (IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length)
 
EFI_STATUS ArmClearMemoryRegionReadOnly (IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length)
 

Detailed Description

File managing the MMU for ARMv8 architecture in S-EL0

Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.
Copyright (c) 2021, Linaro Limited SPDX-License-Identifier: BSD-2-Clause-Patent

Reference(s):

Definition in file ArmMmuStandaloneMmLib.c.

Function Documentation

◆ ArmClearMemoryRegionNoExec()

EFI_STATUS ArmClearMemoryRegionNoExec ( IN EFI_PHYSICAL_ADDRESS  BaseAddress,
IN UINT64  Length 
)

Definition at line 264 of file ArmMmuStandaloneMmLib.c.

◆ ArmClearMemoryRegionReadOnly()

EFI_STATUS ArmClearMemoryRegionReadOnly ( IN EFI_PHYSICAL_ADDRESS  BaseAddress,
IN UINT64  Length 
)

Definition at line 310 of file ArmMmuStandaloneMmLib.c.

◆ ArmSetMemoryRegionNoExec()

EFI_STATUS ArmSetMemoryRegionNoExec ( IN EFI_PHYSICAL_ADDRESS  BaseAddress,
IN UINT64  Length 
)

Definition at line 241 of file ArmMmuStandaloneMmLib.c.

◆ ArmSetMemoryRegionReadOnly()

EFI_STATUS ArmSetMemoryRegionReadOnly ( IN EFI_PHYSICAL_ADDRESS  BaseAddress,
IN UINT64  Length 
)

Definition at line 287 of file ArmMmuStandaloneMmLib.c.

◆ GetMemoryPermissions()

STATIC EFI_STATUS GetMemoryPermissions ( IN EFI_PHYSICAL_ADDRESS  BaseAddress,
OUT UINT32 *  MemoryAttributes 
)

Request the permission attributes of a memory region from S-EL0.

Parameters
[in]BaseAddressBase address for the memory region.
[out]MemoryAttributesPointer to return the memory attributes.
Return values
EFI_SUCCESSRequest successfull.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_READYCallee is busy or not in a state to handle this request.
EFI_UNSUPPORTEDThis function is not implemented by the callee.
EFI_ABORTEDMessage target ran into an unexpected error and has aborted.
EFI_ACCESS_DENIEDAccess denied.
EFI_OUT_OF_RESOURCESOut of memory to perform operation.

Definition at line 150 of file ArmMmuStandaloneMmLib.c.

◆ RequestMemoryPermissionChange()

STATIC EFI_STATUS RequestMemoryPermissionChange ( IN EFI_PHYSICAL_ADDRESS  BaseAddress,
IN UINT64  Length,
IN UINT32  Permissions 
)

Set the permission attributes of a memory region from S-EL0.

Parameters
[in]BaseAddressBase address for the memory region.
[in]LengthLength of the memory region.
[in]PermissionsMemory access controls attributes.
Return values
EFI_SUCCESSRequest successfull.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_READYCallee is busy or not in a state to handle this request.
EFI_UNSUPPORTEDThis function is not implemented by the callee.
EFI_ABORTEDMessage target ran into an unexpected error and has aborted.
EFI_ACCESS_DENIEDAccess denied.
EFI_OUT_OF_RESOURCESOut of memory to perform operation.

Definition at line 209 of file ArmMmuStandaloneMmLib.c.

◆ SendMemoryPermissionRequest()

STATIC EFI_STATUS SendMemoryPermissionRequest ( IN OUT ARM_SVC_ARGS SvcArgs,
OUT INT32 *  RetVal 
)

Send memory permission request to target.

Parameters
[in,out]SvcArgsPointer to SVC arguments to send. On return it contains the response parameters.
[out]RetValPointer to return the response value.
Return values
EFI_SUCCESSRequest successfull.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_READYCallee is busy or not in a state to handle this request.
EFI_UNSUPPORTEDThis function is not implemented by the callee.
EFI_ABORTEDMessage target ran into an unexpected error and has aborted.
EFI_ACCESS_DENIEDAccess denied.
EFI_OUT_OF_RESOURCESOut of memory to perform operation.

Definition at line 47 of file ArmMmuStandaloneMmLib.c.