RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Macros | Functions | Variables
mmu-setup.c File Reference

AArch64 MMU configuration. More...

#include <bsp/aarch64-mmu.h>
#include <bsp/fatal.h>
#include <bsp/linker-symbols.h>
#include <bsp/start.h>
#include <rtems/score/aarch64-system-registers.h>
#include <rtems/score/assert.h>

Macros

#define MMU_MAX_SUBTABLE_PAGE_BITS   ( 3 * MMU_BITS_PER_LEVEL + MMU_PAGE_BITS )
 

Functions

BSP_START_TEXT_SECTION rtems_status_code aarch64_mmu_set_translation_table_entries (aarch64_mmu_control *control, const aarch64_mmu_config_entry *config)
 Sets the MMU translation table entries associated with the memory region.
 
BSP_START_TEXT_SECTION void aarch64_mmu_setup_translation_table (aarch64_mmu_control *control, const aarch64_mmu_config_entry *config_table, size_t config_count)
 Sets up the MMU translation table.
 

Variables

aarch64_mmu_control aarch64_mmu_instance
 This object is used to maintain the MMU translation tables.
 

Detailed Description

AArch64 MMU configuration.

Function Documentation

◆ aarch64_mmu_set_translation_table_entries()

BSP_START_TEXT_SECTION rtems_status_code aarch64_mmu_set_translation_table_entries ( aarch64_mmu_control control,
const aarch64_mmu_config_entry config 
)

Sets the MMU translation table entries associated with the memory region.

Parameters
[in,out]controlis a reference to the MMU control state.
[in]configis the configuration entry with the memory region and region attributes.
Return values
RTEMS_SUCCESSFULThe requested operation was successful.
RTEMS_INVALID_ADDRESSThe begin address of the memory region cannot be mapped by the MMU.
RTEMS_INVALID_SIZEThe end address of the memory region cannot be mapped by the MMU.
RTEMS_TOO_MANYThere was no page table entry available to perform the mapping.

◆ aarch64_mmu_setup_translation_table()

BSP_START_TEXT_SECTION void aarch64_mmu_setup_translation_table ( aarch64_mmu_control control,
const aarch64_mmu_config_entry config_table,
size_t  config_count 
)

Sets up the MMU translation table.

The memory regions of the configuration table are mapped by the MMU. If a mapping is infeasible, then the BSP fatal error AARCH64_FATAL_MMU_CANNOT_MAP_BLOCK will be issued.

Parameters
[in,out]controlis a reference to the MMU control state.
[in]config_tableis the configuration table with memory regions and region attributes.
config_countis the count of configuration table entries.

Variable Documentation

◆ aarch64_mmu_instance

aarch64_mmu_control aarch64_mmu_instance
Initial value:
= {
.ttb = (uint64_t *) bsp_translation_table_base,
.used_page_tables = 1
}

This object is used to maintain the MMU translation tables.