Changeset View
Changeset View
Standalone View
Standalone View
head/sys/powerpc/powerpc/machdep.c
Show First 20 Lines • Show All 254 Lines • ▼ Show 20 Lines | #endif | ||||
/* | /* | ||||
* If the metadata pointer cookie is not set to the magic value, | * If the metadata pointer cookie is not set to the magic value, | ||||
* the number in mdp should be treated as nonsense. | * the number in mdp should be treated as nonsense. | ||||
*/ | */ | ||||
if (mdp_cookie != 0xfb5d104d) | if (mdp_cookie != 0xfb5d104d) | ||||
mdp = NULL; | mdp = NULL; | ||||
#if !defined(BOOKE) | |||||
/* | |||||
* On BOOKE the BSS is already cleared and some variables | |||||
* initialized. Do not wipe them out. | |||||
*/ | |||||
bzero(__sbss_start, __sbss_end - __sbss_start); | |||||
bzero(__bss_start, _end - __bss_start); | |||||
#endif | |||||
#ifdef AIM | #ifdef AIM | ||||
/* | /* | ||||
* If running from an FDT, make sure we are in real mode to avoid | * If running from an FDT, make sure we are in real mode to avoid | ||||
* tromping on firmware page tables. Everything in the kernel assumes | * tromping on firmware page tables. Everything in the kernel assumes | ||||
* 1:1 mappings out of firmware, so this won't break anything not | * 1:1 mappings out of firmware, so this won't break anything not | ||||
* already broken. This doesn't work if there is live OF, since OF | * already broken. This doesn't work if there is live OF, since OF | ||||
* may internally use non-1:1 mappings. | * may internally use non-1:1 mappings. | ||||
*/ | */ | ||||
Show All 17 Lines | if (kmdp != NULL) { | ||||
MODINFOMD_KERNEND, vm_offset_t)); | MODINFOMD_KERNEND, vm_offset_t)); | ||||
#ifdef DDB | #ifdef DDB | ||||
ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t); | ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t); | ||||
ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t); | ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t); | ||||
db_fetch_ksymtab(ksym_start, ksym_end); | db_fetch_ksymtab(ksym_start, ksym_end); | ||||
#endif | #endif | ||||
} | } | ||||
} else { | } else { | ||||
#if !defined(BOOKE) | |||||
/* | |||||
* On BOOKE the BSS is already cleared and some variables | |||||
* initialized. Do not wipe them out. | |||||
*/ | |||||
bzero(__sbss_start, __sbss_end - __sbss_start); | |||||
bzero(__bss_start, _end - __bss_start); | |||||
#endif | |||||
init_static_kenv(init_kenv, sizeof(init_kenv)); | init_static_kenv(init_kenv, sizeof(init_kenv)); | ||||
ofw_bootargs = true; | ofw_bootargs = true; | ||||
} | } | ||||
/* Store boot environment state */ | /* Store boot environment state */ | ||||
OF_initial_setup((void *)fdt, NULL, (int (*)(void *))ofentry); | OF_initial_setup((void *)fdt, NULL, (int (*)(void *))ofentry); | ||||
/* | /* | ||||
* Init params/tunables that can be overridden by the loader | * Init params/tunables that can be overridden by the loader | ||||
▲ Show 20 Lines • Show All 247 Lines • Show Last 20 Lines |