diff options
author | marcel <marcel@FreeBSD.org> | 2012-04-13 04:21:54 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2012-04-13 04:21:54 +0000 |
commit | 53feefc8b5af43b0af6f45501f9d0bbfa01b3f94 (patch) | |
tree | 640fc3826840967c440869cc69687ec48f96dc39 /sys/sparc64/sparc64/machdep.c | |
parent | 946cece1922b5f4a85546490cba60703dd83d059 (diff) | |
parent | 4b63f702b77fee250d25c5caf39cd7a770789f07 (diff) | |
download | FreeBSD-src-53feefc8b5af43b0af6f45501f9d0bbfa01b3f94.zip FreeBSD-src-53feefc8b5af43b0af6f45501f9d0bbfa01b3f94.tar.gz |
Sync with head@234197
Ok'd by: ed
Diffstat (limited to 'sys/sparc64/sparc64/machdep.c')
-rw-r--r-- | sys/sparc64/sparc64/machdep.c | 42 |
1 files changed, 14 insertions, 28 deletions
diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c index 21f4590..85cc66c 100644 --- a/sys/sparc64/sparc64/machdep.c +++ b/sys/sparc64/sparc64/machdep.c @@ -88,7 +88,6 @@ __FBSDID("$FreeBSD$"); #include <machine/bus.h> #include <machine/cache.h> -#include <machine/clock.h> #include <machine/cmt.h> #include <machine/cpu.h> #include <machine/fireplane.h> @@ -376,7 +375,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec) /* * Parse metadata if present and fetch parameters. Must be before the - * console is inited so cninit gets the right value of boothowto. + * console is inited so cninit() gets the right value of boothowto. */ if (mdp != NULL) { preload_metadata = mdp; @@ -421,30 +420,19 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec) root = OF_peer(0); pc->pc_node = find_bsp(root, pc->pc_mid, cpu_impl); if (pc->pc_node == 0) - OF_exit(); + OF_panic("%s: cannot find boot CPU node", __func__); if (OF_getprop(pc->pc_node, "clock-frequency", &pc->pc_clock, sizeof(pc->pc_clock)) <= 0) - OF_exit(); - - /* - * Provide a DELAY() that works before PCPU_REG is set. We can't - * set PCPU_REG without also taking over the trap table or the - * firmware will overwrite it. Unfortunately, it's way to early - * to also take over the trap table at this point. - */ - clock_boot = pc->pc_clock; - delay_func = delay_boot; + OF_panic("%s: cannot determine boot CPU clock", __func__); /* * Panic if there is no metadata. Most likely the kernel was booted * directly, instead of through loader(8). */ if (mdp == NULL || kmdp == NULL || end == 0 || - kernel_tlb_slots == 0 || kernel_tlbs == NULL) { - OF_printf("sparc64_init: missing loader metadata.\n" - "This probably means you are not using loader(8).\n"); - OF_exit(); - } + kernel_tlb_slots == 0 || kernel_tlbs == NULL) + OF_panic("%s: missing loader metadata.\nThis probably means " + "you are not using loader(8).", __func__); /* * Work around the broken loader behavior of not demapping no @@ -454,7 +442,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec) for (va = KERNBASE + (kernel_tlb_slots - 1) * PAGE_SIZE_4M; va >= roundup2(end, PAGE_SIZE_4M); va -= PAGE_SIZE_4M) { if (bootverbose) - printf("demapping unused kernel TLB slot " + OF_printf("demapping unused kernel TLB slot " "(va %#lx - %#lx)\n", va, va + PAGE_SIZE_4M - 1); stxa(TLB_DEMAP_VA(va) | TLB_DEMAP_PRIMARY | TLB_DEMAP_PAGE, ASI_DMMU_DEMAP, 0); @@ -471,18 +459,16 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec) * to the t16s. */ if (OF_getprop(pc->pc_node, "#dtlb-entries", &dtlb_slots, - sizeof(dtlb_slots)) == -1) { - OF_printf("sparc64_init: cannot determine number of dTLB slots"); - OF_exit(); - } + sizeof(dtlb_slots)) == -1) + OF_panic("%s: cannot determine number of dTLB slots", + __func__); if (OF_getprop(pc->pc_node, "#itlb-entries", &itlb_slots, - sizeof(itlb_slots)) == -1) { - OF_printf("sparc64_init: cannot determine number of iTLB slots"); - OF_exit(); - } + sizeof(itlb_slots)) == -1) + OF_panic("%s: cannot determine number of iTLB slots", + __func__); /* - * Initialize and enable the caches. Note that his may include + * Initialize and enable the caches. Note that this may include * applying workarounds. */ cache_init(pc); |