Switch lpc initarm() to use struct arm_boot_params and therefore fix
EA3250 kernel build. Approved by: gonzo
This commit is contained in:
parent
ddb2537be4
commit
9b9bddf7c8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=239307
@ -296,7 +296,7 @@ physmap_init(void)
|
||||
}
|
||||
|
||||
void *
|
||||
initarm(void *mdp, void *unused __unused)
|
||||
initarm(struct arm_boot_params *abp)
|
||||
{
|
||||
struct pv_addr kernel_l1pt;
|
||||
struct pv_addr dpcpu;
|
||||
@ -306,41 +306,15 @@ initarm(void *mdp, void *unused __unused)
|
||||
u_int l1pagetable;
|
||||
int i = 0, j = 0;
|
||||
|
||||
kmdp = NULL;
|
||||
lastaddr = 0;
|
||||
lastaddr = parse_boot_param(abp);
|
||||
memsize = 0;
|
||||
dtbp = (vm_offset_t)NULL;
|
||||
|
||||
set_cpufuncs();
|
||||
|
||||
/*
|
||||
* Mask metadata pointer: it is supposed to be on page boundary. If
|
||||
* the first argument (mdp) doesn't point to a valid address the
|
||||
* bootloader must have passed us something else than the metadata
|
||||
* ptr... In this case we want to fall back to some built-in settings.
|
||||
*/
|
||||
mdp = (void *)((uint32_t)mdp & ~PAGE_MASK);
|
||||
|
||||
/* Parse metadata and fetch parameters */
|
||||
if (mdp != NULL) {
|
||||
preload_metadata = mdp;
|
||||
kmdp = preload_search_by_type("elf kernel");
|
||||
if (kmdp != NULL) {
|
||||
boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int);
|
||||
kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *);
|
||||
dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t);
|
||||
lastaddr = MD_FETCH(kmdp, MODINFOMD_KERNEND,
|
||||
vm_offset_t);
|
||||
#ifdef DDB
|
||||
ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t);
|
||||
ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t);
|
||||
#endif
|
||||
}
|
||||
|
||||
} else {
|
||||
/* Fall back to hardcoded metadata. */
|
||||
lastaddr = fake_preload_metadata();
|
||||
}
|
||||
kmdp = preload_search_by_type("elf kernel");
|
||||
if (kmdp != NULL)
|
||||
dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t);
|
||||
else
|
||||
dtbp = (vm_offset_t)NULL;
|
||||
|
||||
#if defined(FDT_DTB_STATIC)
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user