I booted NetBSD 5.2 and noticed a small issue regarding the Merlin.
When set to Zorro II mode, this text appears during boot:
Code:
grfet0 at zbus0 pa 0x200000 man/pro 2117/3
grf6 at grfet0: width 640 height 480 colors 16
...
grfet: 2MB Merlin with Tseng ETW32 and BrookTree Bt482 DAC being used
grfet1 at zbus0 pa 0xe90000 man/pro 2117/4
However when the Merlin is set to Zorro III mode (2MB or 4MB RAM):
Code:
grfet0 at zbus0 pa 0x40000000 man/pro 2117/3
grf6 at grfet0: width 640 height 480 colors 16
...
grfet: 32MB Merlin with Tseng ETW32 and BrookTree Bt482 DAC being used
grfet1 at zbus0 pa 0xe90000 man/pro 2117/4
Notice the bogus "32MB" memory size shown.
Check the
NetBSD source, grf_et.c. Starting from line 513, code can set et_fbsize to some value. I'm assuming that whatever check it does, it never actually sets et_fbsize so that variable remains uninitialised.
Code:
case MERLIN:
vgaw(ba, GREG_SEGMENTSELECT2, 0x00);
if (((vgar(ba, GREG_FEATURE_CONTROL_R) & 12) |
(vgar(ba, GREG_STATUS0_R) & 0x60)) == 0x24) {
WCrt(ba, CRT_ID_VIDEO_CONFIG2, 0x07); /* 1Mx4 RAM */
et_fbsize = 0x400000; /* 4 MB */
}
else {
/* check for 1MB or 2MB board (crest) */
/* has there a 1MB Merlin ever been sold ??? */
volatile unsigned long *et_fbtestaddr;
et_fbtestaddr = (volatile unsigned long *)gp->g_fbkva;
*et_fbtestaddr = 0x0;
vgaw(ba, GREG_SEGMENTSELECT2, 0x11); /* 1MB offset */
*et_fbtestaddr = 0x12345678;
vgaw(ba, GREG_SEGMENTSELECT2, 0x00);
if (*et_fbtestaddr == 0x0)
et_fbsize = 0x200000; /* 2 MB */
else
et_fbsize = 0x100000; /* 1 MB */
}
/* ZorroII can map 2 MB max ... */
if (!iszthreepa(kvtop(__UNVOLATILE(gp->g_fbkva))) &&
et_fbsize == 0x400000)
et_fbsize = 0x200000;
etctype = ETW32;
etdtype = MERLINDAC;
break;
Could it be that the first if condition never matches due to emulated register bits not being correct?