Changeset View
Changeset View
Standalone View
Standalone View
head/sys/powerpc/booke/booke_machdep.c
Show First 20 Lines • Show All 243 Lines • ▼ Show 20 Lines | case FSL_E5500: | ||||
SET_TRAP(SPR_IVOR7, int_fpu); | SET_TRAP(SPR_IVOR7, int_fpu); | ||||
} | } | ||||
} | } | ||||
static int | static int | ||||
booke_check_for_fdt(uint32_t arg1, vm_offset_t *dtbp) | booke_check_for_fdt(uint32_t arg1, vm_offset_t *dtbp) | ||||
{ | { | ||||
void *ptr; | void *ptr; | ||||
int fdt_size; | |||||
if (arg1 % 8 != 0) | if (arg1 % 8 != 0) | ||||
return (-1); | return (-1); | ||||
ptr = (void *)pmap_early_io_map(arg1, PAGE_SIZE); | ptr = (void *)pmap_early_io_map(arg1, PAGE_SIZE); | ||||
if (fdt_check_header(ptr) != 0) | if (fdt_check_header(ptr) != 0) | ||||
return (-1); | return (-1); | ||||
/* | |||||
* Read FDT total size from the header of FDT. | |||||
* This for sure hits within first page which is | |||||
* already mapped. | |||||
*/ | |||||
fdt_size = fdt_totalsize((void *)ptr); | |||||
/* | |||||
* Ok, arg1 points to FDT, so we need to map it in. | |||||
* First, unmap this page and then map FDT again with full size | |||||
*/ | |||||
pmap_early_io_unmap((vm_offset_t)ptr, PAGE_SIZE); | |||||
ptr = (void *)pmap_early_io_map(arg1, fdt_size); | |||||
*dtbp = (vm_offset_t)ptr; | *dtbp = (vm_offset_t)ptr; | ||||
return (0); | return (0); | ||||
} | } | ||||
uintptr_t | uintptr_t | ||||
booke_init(u_long arg1, u_long arg2) | booke_init(u_long arg1, u_long arg2) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines |