Module Name:    src
Committed By:   macallan
Date:           Thu Apr  1 22:02:20 UTC 2021

Modified Files:
        src/sys/arch/powerpc/oea: ofwoea_machdep.c

Log Message:
avoid mapping 0xfffff000 - my beige G3 DSIs on it
with this my the machine boots again
tested on a variety of G4 and G5 models with no problems


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 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.59 src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.60
--- src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.59	Fri Mar  5 18:10:06 2021
+++ src/sys/arch/powerpc/oea/ofwoea_machdep.c	Thu Apr  1 22:02:20 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ofwoea_machdep.c,v 1.59 2021/03/05 18:10:06 thorpej Exp $ */
+/* $NetBSD: ofwoea_machdep.c,v 1.60 2021/04/01 22:02:20 macallan 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.59 2021/03/05 18:10:06 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.60 2021/04/01 22:02:20 macallan Exp $");
 
 #include "ksyms.h"
 #include "wsdisplay.h"
@@ -378,6 +378,14 @@ restore_ofmap(void)
 		if (va < 0xf0000000)	/* XXX */
 			continue;
 
+		/*
+		 * XXX
+		 * my beige G3 throws a DSI trap if we try to map the last page
+		 * of the firmware ROM
+		 */
+		if (pa == 0xffc00000 && size == 0x400000)
+			size = 0x3ff000;
+
 		while (size > 0) {
 			pmap_enter(&ofw_pmap, va, pa, VM_PROT_ALL,
 			    VM_PROT_ALL|PMAP_WIRED);

Reply via email to