diff options
author | andrew <andrew@FreeBSD.org> | 2012-09-22 22:41:38 +0000 |
---|---|---|
committer | andrew <andrew@FreeBSD.org> | 2012-09-22 22:41:38 +0000 |
commit | 32eb506f225e2b85e47ea826ddccfaf600657810 (patch) | |
tree | 80ef4f90009db9525d5d1ae87fe67e96ca55131e | |
parent | ec17dd03e0b43e9e9f9b96fc7e6ed1072b7a9154 (diff) | |
download | FreeBSD-src-32eb506f225e2b85e47ea826ddccfaf600657810.zip FreeBSD-src-32eb506f225e2b85e47ea826ddccfaf600657810.tar.gz |
Reduce the diff between the FDT implementations of initarm.
This only touches whitespace and comments.
-rw-r--r-- | sys/arm/broadcom/bcm2835/bcm2835_machdep.c | 6 | ||||
-rw-r--r-- | sys/arm/lpc/lpc_machdep.c | 8 | ||||
-rw-r--r-- | sys/arm/mv/mv_machdep.c | 12 | ||||
-rw-r--r-- | sys/arm/tegra/tegra2_machdep.c | 7 | ||||
-rw-r--r-- | sys/arm/ti/ti_machdep.c | 12 |
5 files changed, 25 insertions, 20 deletions
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_machdep.c b/sys/arm/broadcom/bcm2835/bcm2835_machdep.c index 9887ff1..bc98849 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_machdep.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_machdep.c @@ -304,6 +304,9 @@ initarm(struct arm_boot_params *abp) memsize = 0; set_cpufuncs(); + /* + * Find the dtb passed in by the boot loader. + */ kmdp = preload_search_by_type("elf kernel"); if (kmdp != NULL) dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t); @@ -460,9 +463,7 @@ initarm(struct arm_boot_params *abp) cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)) | DOMAIN_CLIENT); - pmap_pa = kernel_l1pt.pv_pa; - setttb(kernel_l1pt.pv_pa); cpu_tlb_flushID(); cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)); @@ -517,7 +518,6 @@ initarm(struct arm_boot_params *abp) init_proc0(kernelstack.pv_va); arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); - arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0])); pmap_bootstrap(freemempos, pmap_bootstrap_lastaddr, &kernel_l1pt); msgbufp = (void *)msgbufpv.pv_va; diff --git a/sys/arm/lpc/lpc_machdep.c b/sys/arm/lpc/lpc_machdep.c index 869baf8..6efc3cf 100644 --- a/sys/arm/lpc/lpc_machdep.c +++ b/sys/arm/lpc/lpc_machdep.c @@ -306,7 +306,7 @@ initarm(struct arm_boot_params *abp) set_cpufuncs(); kmdp = preload_search_by_type("elf kernel"); - if (kmdp != NULL) + if (kmdp != NULL) dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t); else dtbp = (vm_offset_t)NULL; @@ -318,7 +318,6 @@ initarm(struct arm_boot_params *abp) */ if (dtbp == (vm_offset_t)NULL) dtbp = (vm_offset_t)&fdt_static_dtb; - #endif if (OF_install(OFW_FDT, 0) == FALSE) @@ -427,7 +426,7 @@ initarm(struct arm_boot_params *abp) &kernel_pt_table[i]); pmap_curmaxkvaddr = l2_start + (l2size - 1) * L1_S_SIZE; - + /* Map kernel code and data */ pmap_map_chunk(l1pagetable, KERNVIRTADDR, KERNPHYSADDR, (((uint32_t)(lastaddr) - KERNVIRTADDR) + PAGE_MASK) & ~PAGE_MASK, @@ -480,7 +479,7 @@ initarm(struct arm_boot_params *abp) #endif cninit(); - + physmem = memsize / PAGE_SIZE; debugf("initarm: console initialized\n"); @@ -547,6 +546,7 @@ initarm(struct arm_boot_params *abp) /* Do basic tuning, hz etc */ init_param2(physmem); kdb_init(); + return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - sizeof(struct pcb))); } diff --git a/sys/arm/mv/mv_machdep.c b/sys/arm/mv/mv_machdep.c index 737868a..80d841b 100644 --- a/sys/arm/mv/mv_machdep.c +++ b/sys/arm/mv/mv_machdep.c @@ -301,19 +301,18 @@ initarm(struct arm_boot_params *abp) u_int l1pagetable; int i = 0, j = 0, err_devmap = 0; - lastaddr = parse_boot_param(abp); + lastaddr = parse_boot_param(abp); memsize = 0; set_cpufuncs(); /* * Find the dtb passed in by the boot loader. */ - kmdp = preload_search_by_type("elf kernel"); - if (kmdp != NULL) + 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) /* @@ -429,7 +428,7 @@ initarm(struct arm_boot_params *abp) &kernel_pt_table[i]); pmap_curmaxkvaddr = l2_start + (l2size - 1) * L1_S_SIZE; - + /* Map kernel code and data */ pmap_map_chunk(l1pagetable, KERNVIRTADDR, KERNPHYSADDR, (((uint32_t)(lastaddr) - KERNVIRTADDR) + PAGE_MASK) & ~PAGE_MASK, @@ -493,7 +492,7 @@ initarm(struct arm_boot_params *abp) if (err_devmap != 0) printf("WARNING: could not fully configure devmap, error=%d\n", - err_devmap); + err_devmap); /* * Re-initialise decode windows @@ -554,6 +553,7 @@ initarm(struct arm_boot_params *abp) /* Do basic tuning, hz etc */ init_param2(physmem); kdb_init(); + return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - sizeof(struct pcb))); } diff --git a/sys/arm/tegra/tegra2_machdep.c b/sys/arm/tegra/tegra2_machdep.c index 07616f0..9977c09 100644 --- a/sys/arm/tegra/tegra2_machdep.c +++ b/sys/arm/tegra/tegra2_machdep.c @@ -344,6 +344,9 @@ initarm(struct arm_boot_params *abp) memsize = 0; set_cpufuncs(); + /* + * Find the dtb passed in by the boot loader. + */ kmdp = preload_search_by_type("elf kernel"); if (kmdp != NULL) dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t); @@ -520,7 +523,7 @@ initarm(struct arm_boot_params *abp) if (err_devmap != 0) printf("WARNING: could not fully configure devmap, error=%d\n", - err_devmap); + err_devmap); /* * Pages were allocated during the secondary bootstrap for the @@ -553,8 +556,8 @@ initarm(struct arm_boot_params *abp) undefined_init(); init_proc0(kernelstack.pv_va); - arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); + arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0])); pmap_bootstrap(freemempos, pmap_bootstrap_lastaddr, &kernel_l1pt); msgbufp = (void *)msgbufpv.pv_va; diff --git a/sys/arm/ti/ti_machdep.c b/sys/arm/ti/ti_machdep.c index a11342a..07a69df 100644 --- a/sys/arm/ti/ti_machdep.c +++ b/sys/arm/ti/ti_machdep.c @@ -305,13 +305,15 @@ initarm(struct arm_boot_params *abp) memsize = 0; set_cpufuncs(); - + /* + * Find the dtb passed in by the boot loader. + */ 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) /* * In case the device tree blob was not retrieved (from metadata) try @@ -423,7 +425,7 @@ initarm(struct arm_boot_params *abp) &kernel_pt_table[i]); pmap_curmaxkvaddr = l2_start + (l2size - 1) * L1_S_SIZE; - + /* Map kernel code and data */ pmap_map_chunk(l1pagetable, KERNVIRTADDR, KERNPHYSADDR, (((uint32_t)(lastaddr) - KERNVIRTADDR) + PAGE_MASK) & ~PAGE_MASK, @@ -480,7 +482,7 @@ initarm(struct arm_boot_params *abp) if (err_devmap != 0) printf("WARNING: could not fully configure devmap, error=%d\n", - err_devmap); + err_devmap); /* * Pages were allocated during the secondary bootstrap for the @@ -513,8 +515,8 @@ initarm(struct arm_boot_params *abp) undefined_init(); init_proc0(kernelstack.pv_va); - arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); + arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0])); pmap_bootstrap(freemempos, pmap_bootstrap_lastaddr, &kernel_l1pt); msgbufp = (void *)msgbufpv.pv_va; |