Subject: LC475 (Q605, ...) Booting [Long]
To: 'port-mac68k@NetBSD.ORG' <port-mac68k@NetBSD.ORG>
From: Mikael Forselius <mikaelf@olando.se>
List: port-mac68k
Date: 09/18/1996 17:44:12
Target Machine: FPU-less LC475.
Changes applies to Quadra class machines.
To get the LC475 through the boot process (no scsi though)
you'll need to change a couple of things which are not
correct in the July distribution from eskimo/puma - which I
guess is the "official" Mac distribution. Since the LC475
carries a universal ROM, some of these changes applies to
the other Macs in this class (C/Q605 etc.).
START CHANGES:
*** Net/MacBSD Booter 1.9.b3 ***
+---------------------------------------------------
| Internal Video
You'll need to get the physical address of the screen and
send this address to the kernel (MACOS_VIDEO/VIDEO_ADDR).
At least for the LC475, which have no true slots, the screen
address as seen by thePort->baseAddr or the _GetMainDevice()
pixmap is not the physical screen address. The address
you'll find (0x5xxxxxxx) is mapped through the '040 MMU to
the real address (0xF9001000).
Currently two approaches exists in the Booter code
but none of these handles a mapped video address, and for
the '40 there is no code in the kernel which handles the
mapping. To get the correct address you need to hardcode it
or get it through _GetPhysical(). If you don't send the true
physical address to the kernel, you'll lose the screen after
~20 instructions into the kernel code (locore.s) where the
'40 MMU is disabled.
+---------------------------------------------------
| '40
The '040 caches are not disabled correctly, for the
kernel copying, we can run into trouble if we don't disable
them before doing the copy.
In the ufs_test.c file there is small assembly routine which
disables the caches for '30 machines. This routine could be
changed to use the universal traps/glue code from Apple.
So instead of the assembly lines, the following could
(or should) be used:
TurnCachesOff()
// Flush & disable caches ('20,'30, '40 compliant)
FlushInstructionCache();
FlushDataCache();
SwapInstructionCache(false);
SwapDataCache(false);
*** Kernel GENERIC_67 ***
+---------------------------------------------------
| ROM vectors (machdep.c)
Some of the ROM vectors are not correct for the C/Q605
LC475 machines. These are the correct vector addresses.
ADBBase+130: 0x408B2F94
jClkNoMem: 0x408B3BF8
ADBReInit_JTBL: 0x408A8080
RomResourceListHead: 0x4087EB90
Note: The jClkNoMem address for these machines doesn't
really exist - it points to a JMP (A5) instruction. I'm
not sure if we should set the address to 0 (zero) or
try to use this address. According to Apple's ROM
listings the address IS valid and IS for jClkNoMem.
+---------------------------------------------------
| '040 (locore.s)
Same as above for the '40. The cache handling in the
3rd and 4th instruction applies to the '30. Not a real
problem but should be corrected anyway.
END CHANGES
If you apply these changes to your code, you should be
able to boot until the point where the scsi disks are
searched (the kernel will not find any). The fpu
emulation in the generic kernel seems to work, at least
the kernel reports that fpu emulation is found.
I have not (yet) tried these patches this with Steve Allens
miniroot located at ftp.eskimo.com.
*** Blurbs.
I'm pretty new to NetBSD and I haven't got a clue where the
reports are filed or to whom we should send our
reports and observations.
Currently I have no working NetBSD environment so the
kernel changes were done with the help of the source files
and TMON. I patched the kernel binaries directly, changing
the ROM vectors, since I'm not able to recompile the kernel.
I would like to know if anyone knows anything about the
state of the scsi drivers for quadra class machines?
Is there any work done with this or must I do it by myself?
//Mikael
+--------------------------------------------------+
| Mikael Forselius, Mac developer |
| mikaelf@olando.se |
+--------------------------------------------------+