Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/oea In ofwoea_initppc(), call oea_init() af...



details:   https://anonhg.NetBSD.org/src/rev/d003cd4b686e
branches:  trunk
changeset: 953122:d003cd4b686e
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Feb 27 01:22:18 2021 +0000

description:
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.

diffstat:

 sys/arch/powerpc/oea/ofwoea_machdep.c |  22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diffs (50 lines):

diff -r 720fa5826ce7 -r d003cd4b686e sys/arch/powerpc/oea/ofwoea_machdep.c
--- a/sys/arch/powerpc/oea/ofwoea_machdep.c     Sat Feb 27 01:16:52 2021 +0000
+++ b/sys/arch/powerpc/oea/ofwoea_machdep.c     Sat Feb 27 01:22:18 2021 +0000
@@ -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 @@
        }
 #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 @@
                        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);



Home | Main Index | Thread Index | Old Index