Subject: Re: 'sys/arch/mac68k/mac68k/machdep.c' fails without zs(4)
To: Gene ENonymous <yancm@sdf.lonestar.org>
From: Ed Schouten <ed@il.fontys.nl>
List: port-mac68k
Date: 12/15/2004 14:54:17
--wLAMOaPNJ0fu1fTG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Gene ENonymous <yancm@sdf.lonestar.org> wrote:
> Also macrom.c in my situation (my first try at a patch file attached
> below). I'm kinda new to kernel compiling, but I was having the same issue
> (more or less) on a Centris 650, 40M RAM, 68040 (with f/p support).
> I got the same error there, but also in macrom.c
>=20
> I assume the conditional compile check proposed by Ed was the right one to
> use (since I saw no naysays I assumed it mustn't be horrible).
I guess so, because it is used on more places in the source.
I looked at the patch, good job, but you missed a small spot ;) Here is the
final patch (I hope).
Yours,
--=20
_________________=20
/ Ed Schouten \
\ ed@il.fontys.nl /
-----------------=20
\ ,__,
\ (oo)____
(__) )\
||--|| *
--=20
machdep.c | 14 ++++++++++++++
macrom.c | 4 ++++
2 files changed, 18 insertions(+)
--- machdep.c.orig Wed Dec 15 14:47:36 2004
+++ machdep.c Wed Dec 15 14:48:52 2004
@@ -2302,14 +2302,18 @@
Via1Base =3D (volatile u_char *)base;
=20
/* The following two may be overridden. */
+#if NZSC > 0
sccA =3D (volatile u_char *)base + 0xc000;
+#endif
SCSIBase =3D base + 0xf000;
=20
switch (current_mac_model->machineid) {
case MACH_MACQ900:
case MACH_MACQ950:
mac68k_machine.scsi96_2 =3D 1;
+#if NZSC > 0
sccA =3D (volatile u_char *)base + 0xc020;
+#endif
iop_init(0); /* For console */
break;
case MACH_MACQ700:
@@ -2326,7 +2330,9 @@
* Quadra-type machines.
*/
Via1Base =3D (volatile u_char *)base;
+#if NZSC > 0
sccA =3D (volatile u_char *)base + 0xc020;
+#endif
SCSIBase =3D base + 0x10000;
break;
case MACH_CLASSP580:
@@ -2335,12 +2341,16 @@
* the two different Quadra classes.
*/
Via1Base =3D (volatile u_char *) base;
+#if NZSC > 0
sccA =3D (volatile u_char *) base + 0xc020;
+#endif
SCSIBase =3D base;
break;
case MACH_CLASSAV:
Via1Base =3D (volatile u_char *)base;
+#if NZSC > 0
sccA =3D (volatile u_char *)base + 0x4000;
+#endif
SCSIBase =3D base + 0x18000;
PSCBase =3D (volatile u_char *)base + 0x31000;
break;
@@ -2352,7 +2362,9 @@
case MACH_CLASSIIvx:
case MACH_CLASSLC:
Via1Base =3D (volatile u_char *)base;
+#if NZSC > 0
sccA =3D (volatile u_char *) base + 0x4000;
+#endif
SCSIBase =3D base;
break;
case MACH_CLASSIIfx:
@@ -2362,7 +2374,9 @@
* the Serial Switch control panel before booting).
*/
Via1Base =3D (volatile u_char *)base;
+#if NZSC > 0
sccA =3D (volatile u_char *)base + 0x4020;
+#endif
SCSIBase =3D base;
iop_init(0); /* For console */
break;
--- macrom.c.orig Wed Dec 15 14:47:44 2004
+++ macrom.c Wed Dec 15 14:49:18 2004
@@ -797,7 +797,9 @@
}
=20
extern unsigned long IOBase;
+#if NZSC > 0
extern volatile u_char *sccA;
+#endif
=20
/* initialize Mac ROM Glue */
void
@@ -952,7 +954,9 @@
jADBOp =3D (void (*)(void))mrg_OStraps[0x7c];
=20
mrg_VIA2 =3D (caddr_t)(Via1Base + VIA2 * 0x2000); /* see via.h */
+#if NZSC > 0
SCCRd =3D (caddr_t)sccA; /* ser.c ; we run before serinit */
+#endif
=20
jDTInstall =3D (caddr_t)mrg_DTInstall;
=20
--wLAMOaPNJ0fu1fTG
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)
iD8DBQFBwEIJyx16ydahrz4RApQ6AJ4v6tg2BFOLISOfRiJVN8CXDGx+OACbBn3H
aFiRH7ly9Iyoa25BtVlLxfA=
=AMay
-----END PGP SIGNATURE-----
--wLAMOaPNJ0fu1fTG--