mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Call cpu_setup() immediately after the page tables are installed. This
enables data cache and other chip-specific features. It was previously done via an early SYSINIT, but it was being done after pmap and vm setup, and those setups need to use mutexes. On some modern ARM platforms, the ldrex/strex instructions that implement mutexes require the data cache to be enabled. A nice side effect of enabling caching earlier is that it eliminates the multi-second pause that used to happen early in boot while physical memory and pmap and vm were being set up. On boards with 1 GB or more of ram this pause was very noticible, sometimes 5-6 seconds. PR: arm/183740
This commit is contained in:
parent
20f50dd696
commit
db87bba4c7
1 changed files with 6 additions and 1 deletions
|
|
@ -361,7 +361,6 @@ cpu_startup(void *dummy)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
cpu_setup("");
|
||||
identify_arm_cpu();
|
||||
|
||||
printf("real memory = %ju (%ju MB)\n", (uintmax_t)ptoa(physmem),
|
||||
|
|
@ -1430,6 +1429,12 @@ initarm(struct arm_boot_params *abp)
|
|||
cpu_tlb_flushID();
|
||||
cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2));
|
||||
|
||||
/*
|
||||
* Now that proper page tables are installed, call cpu_setup() to enable
|
||||
* instruction and data caches and other chip-specific features.
|
||||
*/
|
||||
cpu_setup("");
|
||||
|
||||
/*
|
||||
* Only after the SOC registers block is mapped we can perform device
|
||||
* tree fixups, as they may attempt to read parameters from hardware.
|
||||
|
|
|
|||
Loading…
Reference in a new issue