-/* $OpenBSD: grf_iv.c,v 1.14 1997/03/30 22:44:03 briggs Exp $ */
+/* $OpenBSD: grf_iv.c,v 1.15 1997/04/21 00:58:14 briggs Exp $ */
/* $NetBSD: grf_iv.c,v 1.17 1997/02/20 00:23:27 scottr Exp $ */
/*
found = 1;
switch (current_mac_model->class) {
- case MACH_CLASSQ:
- case MACH_CLASSQ2:
+ case MACH_CLASSQ:
+ case MACH_CLASSQ2:
- /* Assume DAFB for all of these */
+ /*
+ * Assume DAFB for all of these, unless we can't
+ * access the memory.
+ */
if (bus_space_map(oa->oa_tag, QUADRA_DAFB_BASE, 0x1000,
0, &bsh)) {
panic("failed to map space for DAFB regs.\n");
}
+ if (bus_probe(oa->oa_tag, bsh, 0x1C, 4) == 0) {
+ bus_space_unmap(oa->oa_tag, bsh, 0x1000);
+ found = 0;
+ goto nodafb;
+ }
+
sense = (bus_space_read_4(oa->oa_tag, bsh, 0x1C) & 7);
if (sense == 0)
break;
default:
+nodafb:
if (mac68k_vidlog == 0) {
found = 0;
}