Module Name: src Committed By: thorpej Date: Sat Feb 27 01:22:18 UTC 2021
Modified Files: src/sys/arch/powerpc/oea: ofwoea_machdep.c Log Message: In ofwoea_initppc(), call oea_init() after getting the bootpath, etc. Also, add a comment explaining why it's actually necessary to clear PSL_IP after installing the kernel's exception vectors. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/arch/powerpc/oea/ofwoea_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/powerpc/oea/ofwoea_machdep.c diff -u src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.54 src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.55 --- src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.54 Wed Feb 24 16:53:00 2021 +++ src/sys/arch/powerpc/oea/ofwoea_machdep.c Sat Feb 27 01:22:18 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ofwoea_machdep.c,v 1.54 2021/02/24 16:53:00 thorpej Exp $ */ +/* $NetBSD: ofwoea_machdep.c,v 1.55 2021/02/27 01:22:18 thorpej Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.54 2021/02/24 16:53:00 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.55 2021/02/27 01:22:18 thorpej Exp $"); #include "ksyms.h" #include "wsdisplay.h" @@ -215,15 +215,6 @@ ofwoea_initppc(u_int startkernel, u_int } #endif - oea_init(pic_ext_intr); - -/* - * XXX - * we need to do this here instead of earlier on in ofwinit() for some reason - * At least some versions of Apple OF 2.0.1 hang if we do this earlier - */ - ofwmsr &= ~PSL_IP; - /* Parse the args string */ if (args) { strcpy(bootpath, args); @@ -243,6 +234,15 @@ ofwoea_initppc(u_int startkernel, u_int bootpath[len] = 0; } + oea_init(pic_ext_intr); + + /* + * Now that we've installed our own exception vectors, + * ensure that exceptions that happen while running + * firmware code fall into ours. + */ + ofwmsr &= ~PSL_IP; + uvm_md_init(); pmap_bootstrap(startkernel, endkernel);