EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index
Typedefs | Functions | Variables

ArmPkg/Drivers/CpuDxe/Mmu.c File Reference

#include "CpuDxe.h"

Go to the source code of this file.

Typedefs

typedef UINT32 ARM_FIRST_LEVEL_DESCRIPTOR
typedef UINT32 ARM_PAGE_TABLE_ENTRY

Functions

EFI_STATUS SectionToGcdAttributes (IN UINT32 SectionAttributes, OUT UINT64 *GcdAttributes)
EFI_STATUS PageToGcdAttributes (IN UINT32 PageAttributes, OUT UINT64 *GcdAttributes)
EFI_STATUS SearchGcdMemorySpaces (IN EFI_GCD_MEMORY_SPACE_DESCRIPTOR *MemorySpaceMap, IN UINTN NumberOfDescriptors, IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, OUT UINTN *StartIndex, OUT UINTN *EndIndex)
EFI_STATUS SetGcdMemorySpaceAttributes (IN EFI_GCD_MEMORY_SPACE_DESCRIPTOR *MemorySpaceMap, IN UINTN NumberOfDescriptors, IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN UINT64 Attributes)
EFI_STATUS SyncCacheConfigPage (IN UINT32 SectionIndex, IN UINT32 FirstLevelDescriptor, IN UINTN NumberOfDescriptors, IN EFI_GCD_MEMORY_SPACE_DESCRIPTOR *MemorySpaceMap, IN OUT EFI_PHYSICAL_ADDRESS *NextRegionBase, IN OUT UINT64 *NextRegionLength, IN OUT UINT32 *NextSectionAttributes)
EFI_STATUS SyncCacheConfig (IN EFI_CPU_ARCH_PROTOCOL *CpuProtocol)
EFI_STATUS UpdatePageEntries (IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN UINT64 Attributes, IN EFI_PHYSICAL_ADDRESS VirtualMask)
EFI_STATUS UpdateSectionEntries (IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN UINT64 Attributes, IN EFI_PHYSICAL_ADDRESS VirtualMask)
EFI_STATUS ConvertSectionToPages (IN EFI_PHYSICAL_ADDRESS BaseAddress)
EFI_STATUS SetMemoryAttributes (IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN UINT64 Attributes, IN EFI_PHYSICAL_ADDRESS VirtualMask)
EFI_STATUS EFIAPI CpuSetMemoryAttributes (IN EFI_CPU_ARCH_PROTOCOL *This, IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN UINT64 Attributes)
EFI_STATUS EFIAPI CpuConvertPagesToUncachedVirtualAddress (IN VIRTUAL_UNCACHED_PAGES_PROTOCOL *This, IN EFI_PHYSICAL_ADDRESS Address, IN UINTN Length, IN EFI_PHYSICAL_ADDRESS VirtualMask, OUT UINT64 *Attributes OPTIONAL)
EFI_STATUS EFIAPI CpuReconvertPages (IN VIRTUAL_UNCACHED_PAGES_PROTOCOL *This, IN EFI_PHYSICAL_ADDRESS Address, IN UINTN Length, IN EFI_PHYSICAL_ADDRESS VirtualMask, IN UINT64 Attributes)

Variables

VIRTUAL_UNCACHED_PAGES_PROTOCOL gVirtualUncachedPages

Typedef Documentation

Definition at line 20 of file Mmu.c.

Definition at line 23 of file Mmu.c.


Function Documentation

EFI_STATUS ConvertSectionToPages ( IN EFI_PHYSICAL_ADDRESS  BaseAddress)

Definition at line 745 of file Mmu.c.

EFI_STATUS EFIAPI CpuConvertPagesToUncachedVirtualAddress ( IN VIRTUAL_UNCACHED_PAGES_PROTOCOL This,
IN EFI_PHYSICAL_ADDRESS  Address,
IN UINTN  Length,
IN EFI_PHYSICAL_ADDRESS  VirtualMask,
OUT UINT64 *Attributes  OPTIONAL 
)

Definition at line 887 of file Mmu.c.

EFI_STATUS EFIAPI CpuReconvertPages ( IN VIRTUAL_UNCACHED_PAGES_PROTOCOL This,
IN EFI_PHYSICAL_ADDRESS  Address,
IN UINTN  Length,
IN EFI_PHYSICAL_ADDRESS  VirtualMask,
IN UINT64  Attributes 
)

Definition at line 924 of file Mmu.c.

EFI_STATUS EFIAPI CpuSetMemoryAttributes ( IN EFI_CPU_ARCH_PROTOCOL This,
IN EFI_PHYSICAL_ADDRESS  BaseAddress,
IN UINT64  Length,
IN UINT64  Attributes 
)

This function modifies the attributes for the memory region specified by BaseAddress and Length from their current attributes to the attributes specified by Attributes.

Parameters:
ThisThe EFI_CPU_ARCH_PROTOCOL instance.
BaseAddressThe physical address that is the start address of a memory region.
LengthThe size in bytes of the memory region.
AttributesThe bit mask of attributes to set for the memory region.
Return values:
EFI_SUCCESSThe attributes were set for the memory region.
EFI_ACCESS_DENIEDThe attributes for the memory resource range specified by BaseAddress and Length cannot be modified.
EFI_INVALID_PARAMETERLength is zero.
EFI_OUT_OF_RESOURCESThere are not enough system resources to modify the attributes of the memory resource range.
EFI_UNSUPPORTEDThe processor does not support one or more bytes of the memory resource range specified by BaseAddress and Length. The bit mask of attributes is not support for the memory resource range specified by BaseAddress and Length.

Definition at line 862 of file Mmu.c.

EFI_STATUS PageToGcdAttributes ( IN UINT32  PageAttributes,
OUT UINT64 GcdAttributes 
)

Definition at line 90 of file Mmu.c.

EFI_STATUS SearchGcdMemorySpaces ( IN EFI_GCD_MEMORY_SPACE_DESCRIPTOR MemorySpaceMap,
IN UINTN  NumberOfDescriptors,
IN EFI_PHYSICAL_ADDRESS  BaseAddress,
IN UINT64  Length,
OUT UINTN StartIndex,
OUT UINTN EndIndex 
)

Searches memory descriptors covered by given memory range.

This function searches into the Gcd Memory Space for descriptors (from StartIndex to EndIndex) that contains the memory range specified by BaseAddress and Length.

Parameters:
MemorySpaceMapGcd Memory Space Map as array.
NumberOfDescriptorsNumber of descriptors in map.
BaseAddressBaseAddress for the requested range.
LengthLength for the requested range.
StartIndexStart index into the Gcd Memory Space Map.
EndIndexEnd index into the Gcd Memory Space Map.
Return values:
EFI_SUCCESSSearch successfully.
EFI_NOT_FOUNDThe requested descriptors does not exist.

Definition at line 172 of file Mmu.c.

EFI_STATUS SectionToGcdAttributes ( IN UINT32  SectionAttributes,
OUT UINT64 GcdAttributes 
)

Definition at line 26 of file Mmu.c.

EFI_STATUS SetGcdMemorySpaceAttributes ( IN EFI_GCD_MEMORY_SPACE_DESCRIPTOR MemorySpaceMap,
IN UINTN  NumberOfDescriptors,
IN EFI_PHYSICAL_ADDRESS  BaseAddress,
IN UINT64  Length,
IN UINT64  Attributes 
)

Sets the attributes for a specified range in Gcd Memory Space Map.

This function sets the attributes for a specified range in Gcd Memory Space Map.

Parameters:
MemorySpaceMapGcd Memory Space Map as array
NumberOfDescriptorsNumber of descriptors in map
BaseAddressBaseAddress for the range
LengthLength for the range
AttributesAttributes to set
Return values:
EFI_SUCCESSMemory attributes set successfully
EFI_NOT_FOUNDThe specified range does not exist in Gcd Memory Space

Definition at line 217 of file Mmu.c.

EFI_STATUS SetMemoryAttributes ( IN EFI_PHYSICAL_ADDRESS  BaseAddress,
IN UINT64  Length,
IN UINT64  Attributes,
IN EFI_PHYSICAL_ADDRESS  VirtualMask 
)

Definition at line 806 of file Mmu.c.

EFI_STATUS SyncCacheConfig ( IN EFI_CPU_ARCH_PROTOCOL CpuProtocol)

Definition at line 357 of file Mmu.c.

EFI_STATUS SyncCacheConfigPage ( IN UINT32  SectionIndex,
IN UINT32  FirstLevelDescriptor,
IN UINTN  NumberOfDescriptors,
IN EFI_GCD_MEMORY_SPACE_DESCRIPTOR MemorySpaceMap,
IN OUT EFI_PHYSICAL_ADDRESS NextRegionBase,
IN OUT UINT64 NextRegionLength,
IN OUT UINT32 NextSectionAttributes 
)

Definition at line 281 of file Mmu.c.

EFI_STATUS UpdatePageEntries ( IN EFI_PHYSICAL_ADDRESS  BaseAddress,
IN UINT64  Length,
IN UINT64  Attributes,
IN EFI_PHYSICAL_ADDRESS  VirtualMask 
)

Definition at line 466 of file Mmu.c.

EFI_STATUS UpdateSectionEntries ( IN EFI_PHYSICAL_ADDRESS  BaseAddress,
IN UINT64  Length,
IN UINT64  Attributes,
IN EFI_PHYSICAL_ADDRESS  VirtualMask 
)

Definition at line 618 of file Mmu.c.


Variable Documentation

Initial value:

Definition at line 951 of file Mmu.c.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines