TianoCore EDK2 master
Loading...
Searching...
No Matches
CpuMmuLib.h File Reference

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI MemoryRegionMap (IN OUT UINTN *PageTable OPTIONAL, IN UINT64 PageWalkCfg, IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN UINT64 Attributes, IN UINT64 AttributeMask)
 

Detailed Description

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

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

Definition in file CpuMmuLib.h.

Function Documentation

◆ MemoryRegionMap()

EFI_STATUS EFIAPI MemoryRegionMap ( IN OUT UINTN *PageTable  OPTIONAL,
IN UINT64  PageWalkCfg,
IN EFI_PHYSICAL_ADDRESS  BaseAddress,
IN UINT64  Length,
IN UINT64  Attributes,
IN UINT64  AttributeMask 
)

Maps the memory region in the page table to the specified attributes.

Parameters
[in,out]PageTableThe pointer to the page table to update, or pointer to NULL if a new page table is to be created.
[in]PageWalkCfgThe page walk controller configure.
[in]BaseAddressThe base address of the memory region to set the Attributes.
[in]LengthThe length of the memory region to set the Attributes.
[in]AttributesThe bitmask of attributes to set, which refer to UEFI SPEC 7.2.3(EFI_BOOT_SERVICES.GetMemoryMap()).
[in]AttributeMaskMask of memory attributes to take into account.
Return values
EFI_SUCCESSThe Attributes was set successfully or Length is 0.
EFI_INVALID_PARAMETERPageTable is NULL.
EFI_UNSUPPORTED*PageTable is NULL.

Maps the memory region in the page table to the specified attributes.

Parameters
[in,out]PageTableThe pointer to the page table to update, or pointer to NULL if a new page table is to be created.
[in]PageWalkCfgThe page walk controller configure.
[in]BaseAddressThe base address of the memory region to set the Attributes.
[in]LengthThe length of the memory region to set the Attributes.
[in]AttributesThe bitmask of attributes to set, which refer to UEFI SPEC 7.2.3(EFI_BOOT_SERVICES.GetMemoryMap()).
[in]AttributeMaskMask of memory attributes to take into account.
Return values
EFI_SUCCESSThe Attributes was set successfully or Length is 0.
EFI_INVALID_PARAMETERPageTable is NULL, PageWalkCfg is invalid.
EFI_UNSUPPORTED*PageTable is NULL.

Definition at line 694 of file CpuMmu.c.