summaryrefslogtreecommitdiffstats
path: root/sys/boot/sparc64/loader/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/boot/sparc64/loader/main.c')
-rw-r--r--sys/boot/sparc64/loader/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/boot/sparc64/loader/main.c b/sys/boot/sparc64/loader/main.c
index b3e7908..97f566c 100644
--- a/sys/boot/sparc64/loader/main.c
+++ b/sys/boot/sparc64/loader/main.c
@@ -811,15 +811,15 @@ main(int (*openfirm)(void *))
archsw.arch_autoload = sparc64_autoload;
archsw.arch_maphint = sparc64_maphint;
+ if (init_heap() == (vm_offset_t)-1)
+ OF_exit();
+ setheap((void *)heapva, (void *)(heapva + HEAPSZ));
+
/*
* Probe for a console.
*/
cons_probe();
- if (init_heap() == (vm_offset_t)-1)
- panic("%s: can't claim heap", __func__);
- setheap((void *)heapva, (void *)(heapva + HEAPSZ));
-
if ((root = OF_peer(0)) == -1)
panic("%s: can't get root phandle", __func__);
OF_getprop(root, "compatible", compatible, sizeof(compatible));
OpenPOWER on IntegriCloud