![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <assert.h>
#include <stdint.h>
#include <string.h>
#include <symbols.h>
#include <console/console.h>
#include <arch/mmu.h>
#include <arch/lib_helpers.h>
#include <arch/cache.h>
Go to the source code of this file.
Functions | |
static void | print_tag (int level, uint64_t tag) |
static uint64_t | get_block_attr (unsigned long tag) |
static uint64_t * | setup_new_table (uint64_t desc, size_t xlat_size) |
static uint64_t * | get_next_level_table (uint64_t *ptr, size_t xlat_size) |
static uint64_t | init_xlat_table (uint64_t base_addr, uint64_t size, uint64_t tag) |
static void | sanity_check (uint64_t addr, uint64_t size) |
static uint64_t | get_pte (void *addr) |
static void | assert_correct_ttb_mapping (void *addr) |
void | mmu_config_range (void *start, size_t size, uint64_t tag) |
void | mmu_init (void) |
void | mmu_save_context (struct mmu_context *mmu_context) |
void | mmu_restore_context (const struct mmu_context *mmu_context) |
void | mmu_enable (void) |
Variables | |
static uint64_t * | next_free_table = (void *)_ttb |
Definition at line 197 of file mmu.c.
References addr, assert, BLOCK_INDEX_MASK, BLOCK_INDEX_MEM_NORMAL, BLOCK_INDEX_SHIFT, BLOCK_NS, and get_pte().
Referenced by mmu_enable().
Definition at line 34 of file mmu.c.
References BLOCK_ACCESS, BLOCK_AP_RO, BLOCK_AP_RW, BLOCK_INDEX_MEM_DEV_NGNRNE, BLOCK_INDEX_MEM_NORMAL, BLOCK_INDEX_MEM_NORMAL_NC, BLOCK_INDEX_SHIFT, BLOCK_NS, BLOCK_SH_INNER_SHAREABLE, BLOCK_XN, MA_MEM, MA_MEM_NC, MA_NS, and MA_RO.
Referenced by init_xlat_table().
Definition at line 93 of file mmu.c.
References DESC_MASK, setup_new_table(), TABLE_DESC, and XLAT_ADDR_MASK.
Referenced by init_xlat_table().
Definition at line 176 of file mmu.c.
References addr, BITS_RESOLVED_PER_LVL, DESC_MASK, GRANULE_SIZE_SHIFT, L0_ADDR_SHIFT, TABLE_DESC, and XLAT_ADDR_MASK.
Referenced by assert_correct_ttb_mapping().
Definition at line 112 of file mmu.c.
References BLOCK_DESC, get_block_attr(), get_next_level_table(), IS_ALIGNED, L0_ADDR_MASK, L0_ADDR_SHIFT, L1_ADDR_MASK, L1_ADDR_SHIFT, L1_XLAT_SIZE, L2_ADDR_MASK, L2_ADDR_SHIFT, L2_XLAT_SIZE, L3_ADDR_MASK, L3_ADDR_SHIFT, L3_XLAT_SIZE, and PAGE_DESC.
Referenced by mmu_config_range().
Definition at line 210 of file mmu.c.
References BIOS_INFO, dsb, init_xlat_table(), isb, print_tag(), printk, sanity_check(), and tlbiall_el3().
Definition at line 293 of file mmu.c.
References assert_correct_ttb_mapping(), isb, SCTLR_C, SCTLR_I, and SCTLR_M.
Referenced by bootblock_mainboard_init(), decompressor_soc_init(), mtk_mmu_disable_l2c_sram(), mtk_mmu_init(), qclib_load_and_run(), qcs405_mmu_init(), sc7180_mmu_init(), sc7280_mmu_init(), soc_mmu_init(), and tegra210_mmu_init().
Definition at line 236 of file mmu.c.
References assert, GRANULE_SIZE, INVALID_DESC, L0_XLAT_SIZE, MAIR_ATTRIBUTES, setup_new_table(), TCR_IRGN0_NM_WBWAC, TCR_ORGN0_NM_WBWAC, TCR_PS_256TB, TCR_SH0_IS, TCR_TBI_USED, TCR_TG0_4KB, TCR_TOSZ, and UNUSED_DESC.
void mmu_restore_context | ( | const struct mmu_context * | mmu_context | ) |
Definition at line 276 of file mmu.c.
References assert, mmu_context::mair, mmu_context::tcr, and tlb_invalidate_all().
Referenced by qclib_load_and_run().
void mmu_save_context | ( | struct mmu_context * | mmu_context | ) |
Definition at line 262 of file mmu.c.
References assert, mmu_context::mair, and mmu_context::tcr.
Referenced by qclib_load_and_run().
Definition at line 166 of file mmu.c.
References addr, assert, BITS_PER_VA, GRANULE_SIZE, and GRANULE_SIZE_MASK.
Referenced by mmu_config_range().
Definition at line 59 of file mmu.c.
References BIOS_DEBUG, BITS_RESOLVED_PER_LVL, die(), GRANULE_SIZE, L3_XLAT_SIZE, memset(), next_free_table, PAGE_DESC, printk, UNUSED_DESC, and XLAT_ADDR_MASK.
Referenced by get_next_level_table(), and mmu_init().
Definition at line 16 of file mmu.c.
Referenced by setup_new_table().