Module Name: src
Committed By: phx
Date: Fri Mar 5 17:56:46 UTC 2010
Modified Files:
src/sys/arch/amigappc/amigappc: machdep.c
Log Message:
A1200 (BPPC) BAT init.
To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/amigappc/amigappc/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/amigappc/amigappc/machdep.c
diff -u src/sys/arch/amigappc/amigappc/machdep.c:1.41 src/sys/arch/amigappc/amigappc/machdep.c:1.42
--- src/sys/arch/amigappc/amigappc/machdep.c:1.41 Fri Feb 5 12:05:25 2010
+++ src/sys/arch/amigappc/amigappc/machdep.c Fri Mar 5 17:56:46 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.41 2010/02/05 12:05:25 phx Exp $ */
+/* $NetBSD: machdep.c,v 1.42 2010/03/05 17:56:46 phx Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.41 2010/02/05 12:05:25 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.42 2010/03/05 17:56:46 phx Exp $");
#include "opt_ddb.h"
#include "opt_ipkdb.h"
@@ -547,18 +547,30 @@
/*
* Initialize BAT tables.
+ * The CSPPC RAM (A3000/A4000) always starts at 0x08000000 and is
+ * up to 128MB big.
+ * The BPPC RAM (A1200) can be up to 256MB and may start at nearly
+ * any address between 0x40000000 and 0x80000000 depending on which
+ * RAM module of which size was inserted into which bank:
+ * The RAM module in bank 1 is located from 0x?8000000 downwards.
+ * The RAM module in bank 2 is located from 0x?8000000 upwards.
+ * Whether '?' is 4, 5, 6 or 7 probably depends on the size.
+ * So we have to use the 'startkernel' symbol for BAT-mapping
+ * our RAM.
*/
- if (!is_a1200()) {
+ if (is_a1200()) {
+ amigappc_batinit(0x00000000, BAT_BL_16M, BAT_I|BAT_G,
+ (startkernel & 0xf0000000), BAT_BL_256M, 0,
+ 0xfff00000, BAT_BL_512K, 0,
+ ~0);
+ } else {
/* A3000 or A4000 */
amigappc_batinit(0x00000000, BAT_BL_16M, BAT_I|BAT_G,
- 0x08000000, BAT_BL_128M, 0,
+ (startkernel & 0xf8000000), BAT_BL_128M, 0,
0xfff00000, BAT_BL_512K, 0,
0x40000000, BAT_BL_256M, BAT_I|BAT_G,
~0);
}
- else {
- panic("A1200 BPPC batinit?");
- }
/*
* Set up trap vectors and interrupt handler