TianoCore EDK2 master
|
#include <Uefi.h>
#include <Library/BaseLib.h>
#include <Library/CacheMaintenanceLib.h>
#include <Library/CpuMmuLib.h>
#include <Library/DebugLib.h>
#include <Register/LoongArch64/Csr.h>
#include <Register/LoongArch64/Cpucfg.h>
Go to the source code of this file.
Macros | |
#define | DEFAULT_BIT_WIDTH_PER_LEVEL (EFI_PAGE_SHIFT - 3) |
Functions | |
STATIC UINT8 | DecidePageWalkConfiguration (IN OUT UINT64 *PageWalkCfg OPTIONAL, IN UINT8 BitWidth) |
EFI_STATUS EFIAPI | ConfigureMemoryManagementUnit (IN EFI_MEMORY_DESCRIPTOR *MemoryTable) |
CPU Memory Map Unit Initialization library instance.
Copyright (c) 2024 Loongson Technology Corporation Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file CpuMmuInit.c.
#define DEFAULT_BIT_WIDTH_PER_LEVEL (EFI_PAGE_SHIFT - 3) |
Definition at line 30 of file CpuMmuInit.c.
EFI_STATUS EFIAPI ConfigureMemoryManagementUnit | ( | IN EFI_MEMORY_DESCRIPTOR * | MemoryTable | ) |
Create a page table and initialize the memory management unit(MMU).
[in] | MemoryTable | A pointer to a memory ragion table. |
EFI_SUCCESS | Configure MMU successfully. EFI_INVALID_PARAMETER MemoryTable is NULL. EFI_UNSUPPORTED MemoryRegionMap failed or out of memory space or size not aligned or MaxLivel out of bound. |
Definition at line 121 of file CpuMmuInit.c.
Decided page walker width, level.
[in,out] | PageWalkCfg | Page walker value instance. |
[in] | BitWidt | The bit width what you want, 0 is means use the default bit width. |
PageTableLevelNum | The max page table level. |
Definition at line 42 of file CpuMmuInit.c.