![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
Go to the source code of this file.
Data Structures | |
struct | var_mtrr_context |
#define _ALIGN_UP_POW2 | ( | x | ) | ((x + _POW2_MASK(x)) & ~_POW2_MASK(x)) |
#define _POW2_MASK | ( | x | ) |
#define CACHE_ROM_BASE _FROM_4G_TOP(CACHE_ROM_SIZE) |
#define CACHE_ROM_SIZE CAR_CACHE_ROM_SIZE |
#define CAR_CACHE_ROM_SIZE OPTIMAL_CACHE_ROM_SIZE |
#define CAR_END (CONFIG_DCACHE_RAM_BASE + CONFIG_DCACHE_RAM_SIZE) |
#define MTRR_PHYS_MASK | ( | reg | ) | (MTRR_PHYS_BASE(reg) + 1) |
#define OPTIMAL_CACHE_ROM_BASE _FROM_4G_TOP(OPTIMAL_CACHE_ROM_SIZE) |
#define OPTIMAL_CACHE_ROM_SIZE _ALIGN_UP_POW2(CONFIG_ROM_SIZE) |
Definition at line 53 of file mtrrlib.c.
References get_var_mtrr_count(), MTRR_PHYS_BASE, MTRR_PHYS_MASK, and wrmsr().
Referenced by early_cache_setup().
asmlinkage void display_mtrrs | ( | void | ) |
Definition at line 186 of file debug.c.
References _display_mtrrs(), and CONFIG.
Referenced by bootblock_soc_init(), fsp_debug_after_memory_init(), fsp_debug_after_notify(), fsp_debug_after_silicon_init(), fsp_debug_before_memory_init(), fsp_debug_before_silicon_init(), fsp_notify_dummy(), and main().
Definition at line 54 of file mtrr.c.
References msr_struct::lo, MTRR_DEF_TYPE_EN, MTRR_DEF_TYPE_FIX_EN, MTRR_DEF_TYPE_MSR, rdmsr(), and wrmsr().
Definition at line 63 of file mtrr.c.
References CONFIG, msr_struct::lo, rdmsr(), SYSCFG_MSR, SYSCFG_MSR_MtrrFixDramModEn, and wrmsr().
Referenced by commit_fixed_mtrrs(), and save_bsp_msrs().
Definition at line 75 of file mtrr.c.
References CONFIG, msr_struct::lo, rdmsr(), SYSCFG_MSR, SYSCFG_MSR_MtrrFixDramModEn, and wrmsr().
Referenced by commit_fixed_mtrrs(), and save_bsp_msrs().
Definition at line 168 of file mtrr.h.
References x.
Referenced by fls64(), optimize_var_mtrr_hole(), and var_mtrr_set_with_cb().
Definition at line 156 of file mtrr.h.
References x.
Referenced by calc_var_mtrrs_with_hole(), enable_pci_mmconf(), fms64(), optimize_var_mtrr_hole(), and var_mtrr_set_with_cb().
int get_free_var_mtrr | ( | void | ) |
Definition at line 11 of file mtrrlib.c.
References get_var_mtrr_count(), msr_struct::lo, MTRR_PHYS_MASK, MTRR_PHYS_MASK_VALID, and rdmsr().
Referenced by fast_spi_enable_cache_range(), and platform_prog_run().
|
inlinestatic |
Definition at line 105 of file mtrr.h.
References msr_struct::lo, MTRR_CAP_MSR, MTRR_CAP_VCNT, and rdmsr().
Referenced by _display_mtrrs(), clear_all_var_mtrr(), detect_var_mtrrs(), get_free_var_mtrr(), intel_txt_prepare_bios_acm(), max_cache_used(), save_bsp_msrs(), set_range_uc(), and var_mtrr_context_init().
Definition at line 868 of file mtrr.c.
References BIOS_WARNING, calc_var_mtrrs(), commit_var_mtrrs(), cpu_phys_address_size(), get_physical_address_space(), memranges_each_entry, memranges_init_empty, memranges_insert(), memranges_teardown(), memset(), var_mtrr_solution::mtrr_default_type, MTRR_TYPE_UNCACHEABLE, MTRR_TYPE_WRCOMB, need_restore_mtrr(), NULL, prepare_var_mtrrs(), print_physical_address_space(), printk, range_entry_base(), range_entry_size(), range_entry_tag(), and type.
Referenced by mp_init_cpus().
Definition at line 863 of file mtrr.c.
References put_back_original_solution.
Referenced by mtrr_use_temp_range().
Definition at line 30 of file mtrrlib.c.
References base, BIOS_ERR, cpu_phys_address_size(), msr_struct::hi, IS_POWER_OF_2, KiB, msr_struct::lo, MTRR_PHYS_BASE, MTRR_PHYS_MASK, MTRR_PHYS_MASK_VALID, printk, type, and wrmsr().
Referenced by amd_initmmio(), fast_spi_enable_cache_range(), platform_prog_run(), and set_early_mtrrs().
asmlinkage void soc_enable_mtrrs | ( | void | ) |
Definition at line 69 of file mtrr.c.
References MTRR_DEF_TYPE_EN, MTRR_DEF_TYPE_MSR, soc_msr_read(), and soc_msr_write().
asmlinkage void* soc_set_mtrrs | ( | void * | top_of_stack | ) |
Definition at line 8 of file mtrr.c.
References MTRR_PHYS_BASE, and soc_msr_write().
|
inlinestatic |
Definition at line 130 of file mtrr.h.
References var_mtrr_context::used_var_mtrrs.
Referenced by set_mtrr().
void var_mtrr_context_init | ( | struct var_mtrr_context * | ctx, |
void * | arg | ||
) |
Definition at line 9 of file earlymtrr.c.
References var_mtrr_context::arg, arg, cpu_phys_address_size(), get_var_mtrr_count(), var_mtrr_context::max_var_mtrrs, var_mtrr_context::upper_mask, and var_mtrr_context::used_var_mtrrs.
Referenced by early_cache_setup(), and postcar_frame_prepare().
int var_mtrr_set | ( | struct var_mtrr_context * | ctx, |
uintptr_t | addr, | ||
size_t | size, | ||
int | type | ||
) |
Definition at line 71 of file earlymtrr.c.
References addr, set_mtrr(), type, and var_mtrr_set_with_cb().
Referenced by early_cache_setup().
int var_mtrr_set_with_cb | ( | struct var_mtrr_context * | ctx, |
uintptr_t | addr, | ||
size_t | size, | ||
int | type, | ||
void(*)(const struct var_mtrr_context *ctx, uintptr_t base_addr, size_t size, msr_t base, msr_t mask) | callback | ||
) |
Definition at line 17 of file earlymtrr.c.
References addr, base, BIOS_ERR, fls(), fms(), mask, var_mtrr_context::max_var_mtrrs, MTRR_PHYS_MASK_VALID, printk, type, var_mtrr_context::upper_mask, and var_mtrr_context::used_var_mtrrs.
Referenced by postcar_frame_add_mtrr(), and var_mtrr_set().
Definition at line 836 of file mtrr.c.
References BIOS_DEBUG, msr_struct::lo, MTRR_DEF_TYPE_EN, MTRR_DEF_TYPE_FIX_EN, MTRR_DEF_TYPE_MSR, post_code, printk, and rdmsr().
Referenced by post_cpus_init(), and pre_mp_init().
Definition at line 354 of file mtrr.c.
Referenced by _x86_setup_mtrrs().
Definition at line 348 of file mtrr.c.
References calc_fixed_mtrrs(), and commit_fixed_mtrrs().
Definition at line 815 of file mtrr.c.
References _x86_setup_mtrrs(), MIN_MTRRS, and total_mtrrs.
Definition at line 823 of file mtrr.c.
References _x86_setup_mtrrs(), and detect_var_mtrrs().
Referenced by pre_mp_init(), and wrapper_x86_setup_mtrrs().
Definition at line 830 of file mtrr.c.
References _x86_setup_mtrrs(), and detect_var_mtrrs().
Referenced by pre_mp_init().
Definition at line 786 of file mtrr.c.
References calc_var_mtrrs(), commit_var_mtrrs(), get_physical_address_space(), var_mtrr_solution::mtrr_default_type, mtrr_global_solution, NULL, and prepare_var_mtrrs().
Referenced by _x86_setup_mtrrs().