Unit PlatformARMv7L

From Ultibo.org
Jump to: navigation, search

Return to Unit Reference


Description


Ultibo Platform Interface unit for ARMv7 LPAE

This unit extends the Platform ARMv7 unit to provide support for implementations using the Large Physical Address Extensions (LPAE) to access greater than 4GB of memory in 32-bit environments.

The LPAE defines a new page table descriptor format along with new memory region attributes and memory attribute indirection registers (MAIR0/1) as well as extending the TTBR0, TTBR1 and TTBCR registers with additional information.

The LPAE extensions allow addressing of up to 40 bits of physical address space (1TB) by mapping it into the 32-bit virtual address space.

For 64-bit environments the Platform ARMv8 unit provides the equivalent functionality as LPAE is not required and the processor can address up to 48 bits of address space directly. All functionality not directly related to LPAE is provided from the Platform ARMv7 unit.

Constants



[Expand]
ARMV7L page table level ARMV7L_PAGE_TABLE_*


[Expand]
ARMV7L page tables shift ARMV7L_PAGE_TABLES_*


[Expand]
ARMV7L CP15 C2 memory attribute indirection registers 0 and 1 ARMV7L_CP15_C2_MAIR*_ATTR*_*


[Expand]
ARMV7L CP15 C2 memory attribute indirection register values ARMV7L_CP15_C2_MAIR*


[Expand]
ARMV7L CP15 C2 translation table base control ARMV7L_CP15_C2_TTBCR_*


[Expand]
ARMV7L CP15 C2 translation table base registers 0 and 1 ARMV7L_CP15_C2_TTBR_*


[Expand]
ARMV7L hardware page table descriptor ARMV7L_*_BASE_MASK


[Expand]
ARMV7L hardware descriptor type ARMV7L_DESCRIPTOR_TYPE_*


[Expand]
ARMV7L hardware descriptor type output ARMV7L_DESCRIPTOR_*_OUTPUT_*


[Expand]
ARMV7L long-descriptor table, block and page descriptor ARMV7L_DESCRIPTOR_ATTRIBUTE_*


[Expand]
ARMV7L descriptor cache value ARMV7L_DESCRIPTOR_CACHE_*


Type definitions


None defined

Public variables


None defined

Function declarations



Initialization functions

[Expand]
procedure ARMv7LInit;
Description: To be documented


ARMv7L platform functions

[Expand]
procedure ARMv7LMMUInit;
Description: To be documented


[Expand]
procedure ARMv7LPageTableInit;
Description: Initialize the Hardware Page Tables before enabling the MMU


[Expand]
procedure ARMv7LPageTableGetEntry(Address:PtrUInt; var Entry:TPageTableEntry);
Description: Get and Decode the entry in the Page Table that corresponds to the supplied virtual address


[Expand]
function ARMv7LPageTableSetEntry(const Entry:TPageTableEntry):LongWord;
Description: Encode and Set an entry in the Page Table that corresponds to the supplied virtual address


ARMv7L helper functions

[Expand]
procedure ARMv7LStartMMU;
Description: To be documented


[Expand]
function ARMv7LGetPageTableLevel1(Address:PtrUInt):UInt64;
Description: Get the descriptor for a Level 1 Page Table (1GB)


[Expand]
function ARMv7LSetPageTableLevel1(Address,TableAddress:PtrUInt; Flags:UInt64):Boolean;
Description: Set the descriptor for a Level 1 Page Table (1GB)


[Expand]
function ARMv7LGetPageTableLevel2(Address:PtrUInt):UInt64;
Description: Get the descriptor for a Level 2 Page Table (2MB)


[Expand]
function ARMv7LSetPageTableLevel2(Address,TableAddress:PtrUInt; Flags:UInt64):Boolean;
Description: Set the descriptor for a Level 2 Page Table (2MB)


[Expand]
function ARMv7LGetPageTablePage(Address:PtrUInt):UInt64;
Description: Get the descriptor for a Page Table Page (4KB)


[Expand]
function ARMv7LSetPageTablePage(Address:PtrUInt; PhysicalRange:LongWord; PhysicalAddress:PtrUInt; Flags:UInt64):Boolean;
Description: Set the descriptor for a Page Table Page (4KB)


[Expand]
function ARMv7LGetPageTableSection(Address:PtrUInt):UInt64;
Description: Get the descriptor for a Page Table Section (2MB)


[Expand]
function ARMv7LSetPageTableSection(Address:PtrUInt; PhysicalRange:LongWord; PhysicalAddress:PtrUInt; Flags:UInt64):Boolean;
Description: Set the descriptor for a Page Table Section (2MB)


[Expand]
function ARMv7LGetPageTableLargeSection(Address:PtrUInt):UInt64;
Description: Get the descriptor for a Page Table Large Section (1GB)


[Expand]
function ARMv7LSetPageTableLargeSection(Address:PtrUInt; PhysicalRange:LongWord; PhysicalAddress:PtrUInt; Flags:UInt64):Boolean;
Description: Set the descriptor for a Page Table Large Section (1GB)


Return to Unit Reference