void __init cpu_cache_init(void) { if (cpu_has_3k_cache) { extern void __weak r3k_cache_init(void); r3k_cache_init(); return; } if (cpu_has_6k_cache) { extern void __weak r6k_cache_init(void); r6k_cache_init(); return; } if (cpu_has_4k_cache) { extern void __weak r4k_cache_init(void); r4k_cache_init(); return; } if (cpu_has_8k_cache) { extern void __weak r8k_cache_init(void); r8k_cache_init(); return; } if (cpu_has_tx39_cache) { extern void __weak tx39_cache_init(void); tx39_cache_init(); return; } panic(cache_panic); }
/** * Called plainly from assembler code * * @note The C environment isn't initialized yet */ void __bare_init main_entry(void *fdt, u32 fdt_size) { unsigned long malloc_start, malloc_end; /* clear the BSS first */ memset(__bss_start, 0x00, __bss_stop - __bss_start); cpu_probe(); if (cpu_has_4k_cache) { extern void r4k_cache_init(void); r4k_cache_init(); } trap_init(); malloc_end = _stext; if (MALLOC_SIZE > 0) malloc_start = malloc_end - MALLOC_SIZE; else malloc_start = malloc_end - SZ_8M; pr_debug("initializing malloc pool at 0x%08lx (size 0x%08lx)\n", malloc_start, malloc_end - malloc_start); mem_malloc_init((void *)malloc_start, (void *)_stext - 1); mips_stack_top = malloc_start; glob_fdt = fdt; glob_fdt_size = fdt_size; start_barebox(); }
/** * Called plainly from assembler code * * @note The C environment isn't initialized yet */ void main_entry(void) { /* clear the BSS first */ memset(__bss_start, 0x00, __bss_stop - __bss_start); cpu_probe(); if (cpu_has_4k_cache) { extern void r4k_cache_init(void); r4k_cache_init(); } trap_init(); start_barebox(); }
void __devinit cpu_cache_init(void) { if (cpu_has_3k_cache) { extern void __weak r3k_cache_init(void); r3k_cache_init(); } if (cpu_has_6k_cache) { extern void __weak r6k_cache_init(void); r6k_cache_init(); } if (cpu_has_4k_cache) { extern void __weak r4k_cache_init(void); r4k_cache_init(); } if (cpu_has_8k_cache) { extern void __weak r8k_cache_init(void); r8k_cache_init(); } if (cpu_has_tx39_cache) { extern void __weak tx39_cache_init(void); tx39_cache_init(); } if (cpu_has_camelot_cache) { extern void __weak camelot_cache_init(void); camelot_cache_init(); } if (cpu_has_octeon_cache) { extern void __weak octeon_cache_init(void); octeon_cache_init(); } setup_protection_map(); }