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

Go to the source code of this file.

Macros

#define ID_MMFR0_SHARELVL_SHIFT   12
 
#define ID_MMFR0_SHARELVL_MASK   0xf
 
#define ID_MMFR0_SHARELVL_ONE   0
 
#define ID_MMFR0_SHARELVL_TWO   1
 
#define ID_MMFR0_INNERSHR_SHIFT   28
 
#define ID_MMFR0_INNERSHR_MASK   0xf
 
#define ID_MMFR0_OUTERSHR_SHIFT   8
 
#define ID_MMFR0_OUTERSHR_MASK   0xf
 
#define ID_MMFR0_SHR_IMP_UNCACHED   0
 
#define ID_MMFR0_SHR_IMP_HW_COHERENT   1
 
#define ID_MMFR0_SHR_IGNORED   0xf
 

Functions

UINTN EFIAPI ArmReadIdMmfr0 (VOID)
 
BOOLEAN EFIAPI ArmHasMpExtensions (VOID)
 
STATIC BOOLEAN PreferNonshareableMemory (VOID)
 
STATIC VOID PopulateLevel2PageTable (IN UINT32 *SectionEntry, IN UINT32 PhysicalBase, IN UINT32 RemainLength, IN ARM_MEMORY_REGION_ATTRIBUTES Attributes)
 
STATIC VOID FillTranslationTable (IN UINT32 *TranslationTable, IN ARM_MEMORY_REGION_DESCRIPTOR *MemoryRegion)
 
RETURN_STATUS EFIAPI ArmConfigureMmu (IN ARM_MEMORY_REGION_DESCRIPTOR *MemoryTable, OUT VOID **TranslationTableBase OPTIONAL, OUT UINTN *TranslationTableSize OPTIONAL)
 

Detailed Description

File managing the MMU for ARMv7 architecture

Copyright (c) 2011-2016, ARM Limited. All rights reserved.

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

Definition in file ArmMmuLibCore.c.

Macro Definition Documentation

◆ ID_MMFR0_INNERSHR_MASK

#define ID_MMFR0_INNERSHR_MASK   0xf

Definition at line 26 of file ArmMmuLibCore.c.

◆ ID_MMFR0_INNERSHR_SHIFT

#define ID_MMFR0_INNERSHR_SHIFT   28

Definition at line 25 of file ArmMmuLibCore.c.

◆ ID_MMFR0_OUTERSHR_MASK

#define ID_MMFR0_OUTERSHR_MASK   0xf

Definition at line 28 of file ArmMmuLibCore.c.

◆ ID_MMFR0_OUTERSHR_SHIFT

#define ID_MMFR0_OUTERSHR_SHIFT   8

Definition at line 27 of file ArmMmuLibCore.c.

◆ ID_MMFR0_SHARELVL_MASK

#define ID_MMFR0_SHARELVL_MASK   0xf

Definition at line 21 of file ArmMmuLibCore.c.

◆ ID_MMFR0_SHARELVL_ONE

#define ID_MMFR0_SHARELVL_ONE   0

Definition at line 22 of file ArmMmuLibCore.c.

◆ ID_MMFR0_SHARELVL_SHIFT

#define ID_MMFR0_SHARELVL_SHIFT   12

Definition at line 20 of file ArmMmuLibCore.c.

◆ ID_MMFR0_SHARELVL_TWO

#define ID_MMFR0_SHARELVL_TWO   1

Definition at line 23 of file ArmMmuLibCore.c.

◆ ID_MMFR0_SHR_IGNORED

#define ID_MMFR0_SHR_IGNORED   0xf

Definition at line 32 of file ArmMmuLibCore.c.

◆ ID_MMFR0_SHR_IMP_HW_COHERENT

#define ID_MMFR0_SHR_IMP_HW_COHERENT   1

Definition at line 31 of file ArmMmuLibCore.c.

◆ ID_MMFR0_SHR_IMP_UNCACHED

#define ID_MMFR0_SHR_IMP_UNCACHED   0

Definition at line 30 of file ArmMmuLibCore.c.

Function Documentation

◆ ArmConfigureMmu()

RETURN_STATUS EFIAPI ArmConfigureMmu ( IN ARM_MEMORY_REGION_DESCRIPTOR MemoryTable,
OUT VOID **TranslationTableBase  OPTIONAL,
OUT UINTN *TranslationTableSize  OPTIONAL 
)

Definition at line 334 of file ArmMmuLibCore.c.

◆ FillTranslationTable()

STATIC VOID FillTranslationTable ( IN UINT32 *  TranslationTable,
IN ARM_MEMORY_REGION_DESCRIPTOR MemoryRegion 
)

Definition at line 221 of file ArmMmuLibCore.c.

◆ PopulateLevel2PageTable()

STATIC VOID PopulateLevel2PageTable ( IN UINT32 *  SectionEntry,
IN UINT32  PhysicalBase,
IN UINT32  RemainLength,
IN ARM_MEMORY_REGION_ATTRIBUTES  Attributes 
)

Definition at line 85 of file ArmMmuLibCore.c.

◆ PreferNonshareableMemory()

STATIC BOOLEAN PreferNonshareableMemory ( VOID  )

Definition at line 48 of file ArmMmuLibCore.c.