Subject: Some LC575 and Quadra 840 stuff (long)
To: None <port-mac68k@NetBSD.ORG>
From: Nigel Pearson <nigel@ind.tansu.com.au>
List: port-mac68k
Date: 10/30/1996 16:46:15
	Sorry this will be a bit long and vague. A lot of this stuff Bob
Nestor and I have been conversing about, but I thought that it was time
to seek others' wisdom also.


* Quadra 840av history (which Bob already knows about):

	After obtaining Booter 1.9.4 (didn't work with earlier ones), I had
	some success with booting one of Bob's old 1.1 kernels on my Q840.
	Here is the guts of the serial echo:
...
Moving ROMBase from 0x40800000 to 0x980000.
Video address 0x50100700 -> 0xb80700.
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
 
NetBSD 1.2_BETA (LC550) #74: Sun Aug 25 16:01:48 CDT 1996
    root@pluto:/usr/src/sys/arch/mac68k/compile/LC550
Apple Macintosh Quadra 840AV  (68040)
real mem = 33554432
avail mem = 29851648
using 204 buffers containing 835584 bytes of memory
mrg: kernel has no ROM vectors for this machine!
adb: no ROM ADB driver in this kernel for this machine
mainbus0 (root)
obio0 at mainbus0
adb0 at obio0 (ADB event device)
asc0 at obio0 Apple sound chip.
ite0 at obio0 (minimal console)
zsc0 at obio0 chip type 0
zstty0 at zsc0 channel 0
zstty1 at zsc0 channel 1 (console)
fpu0 at obio0 (mc68040)
nubus0 at mainbus0
ARGH!!  No boot device????Only supports DISK device for booting.
Changing root device to a.
panic: cannot mount root
Stopped at      _Debugger+0x6:  unlk    a6
db> 

	Note that, as the machine starts executing the kernel image,
	there is a blast of noise from the Quadra's speaker.


	Bob suspected that the Video address 0x50100700 is bogus,
	and that a memory clash was over-writing the ROM vectors.
	So, I ran some experiments with different screen sizes and depths.

1,8,16bit  512x384...Moving ROMBase from 0x40800000 to 0x99f000.
Video address 0x50100800 -> 0xb9f800.

24bit 512x384...Moving ROMBase from 0x40800000 to 0x93f000.
Video address 0x50100600 -> 0xb3f600.

1,8bit 640x480...Moving ROMBase from 0x40800000 to 0x987000.
Video address 0x50100800 -> 0xb87800.
16bit 640x480...Moving ROMBase from 0x40800000 to 0x969000.
Video address 0x50100600 -> 0xb69600.

1,8bit 768x576...Moving ROMBase from 0x40800000 to 0x98a000.
Video address 0x50100700 -> 0xb8a700.
16bit 768x576...Moving ROMBase from 0x40800000 to 0x915000.
Video address 0x50100e00 -> 0xb15e00.

1,8bit 800x600...Moving ROMBase from 0x40800000 to 0x985000.
Video address 0x50100700 -> 0xb85700.
16bit 800x600...Moving ROMBase from 0x40800000 to 0x90b000.
Video address 0x50100e00 -> 0xb0be00.

1,8bit 832x624...Moving ROMBase from 0x40800000 to 0x980000.
Video address 0x50100700 -> 0xb80700.
16bit 832x624...Moving ROMBase from 0x40800000 to 0x901000.
Video address 0x50100e00 -> 0xb01e00.

1bit 1024x768...Moving ROMBase from 0x40800000 to 0x99f000.
Video address 0x50100100 -> 0xb9f100.
16bit 1024x768...Moving ROMBase from 0x40800000 to 0x927000.
Video address 0x50100600 -> 0xb27600.

	Because this particular machine has VRAM which is shared between
	main monitor and video I/O systems (and possibly DSP), I am
	inclined to accept that some addresses could move around a lot.

	The Developer Notes for the 660av and 840av conveniently don't
	list many absolute addresses, except that the NuBus address range
	is $6000 0000 to $FFFF FFFF, and the following happens on startup:
...the MCA maps the ROM code to the lower end of RAM address space, starting
at address $0000 0000. When the main processor is reset, it sets the program
counter to the 32-bit address found at $0000 0004, which transfers execution
to the actual system software entry point in the space $4000 0000 to
$4FFF FFFF. After this first access, ROM is no longer mapped to the bottom
of RAM space

-------	Does anyone know what sort of MacOs code fragment I need to run
	to poke around at the Video base addresses?


* 1.2 on Q840

	When I tried booting with a 1.2 generic kernel, the machine freezes
	before outputting anything to the serial port. It doesn't touch
	the screen, and generally does nothing until Command-Shift-Power
	restarts it.


* 1.1 or 1.2 on LC575

	On my machine, which has a CS (Comms Slot) ethernet card, none
	of the kernels I have tried do anything (same as 1.2 on 840).
	I haven't been able to remove the card yet (wife's computer)

	The Developer Notes for the LC575 are actually quite helpful.
	Video stuff:
The MEMCjr IC ... includes
* control and timing signals for the ROM, RAM and VRAM
* control logic for system bus arbitration
* a frame buffer controller for the video display
The MEMCjr IC is similar to the MEMC IC used in the Macintosh Centris 610
and 650.
Note: The frame buffer controller in the MEMC and MEMCjr ICs is compatible
with the DAFB IC in the Macintosh Quadra 700, 900 and 950 computers.
...
The VRAM occupies dedicated address space starting at $F900 0000

	VIA stuff:
The PrimeTime IC combines functions performed by several ICs in previous
Macintosh designs. The PrimeTime IC includes
* data bus buffers for the internal I/O bus
* a SWIM II floppy disk controller
* interface adapters VIA1 and VIA2
* address decoding for I/O devices
* sound control logic and buffers
The PrimeTime IC provides the data bus features of the MC68030 that the
MC68040 does not provide. Those features are byte steering, which allows
8-bit and 16-bit devices to be connected to a fixed byte lane, and dynamic
bus sizing, which allows software to read and write longwords to 8-bit and
16-bit devices. Thos features allow the computer to work with existing I/O
software designed for the MC68030.


* MkLinux DR2

	I ftp'd the files mklinux-1.0DR2.{linux.src,mklibs,osfmk,tools}.tgz
	in the hope that there would be some driver code for my machine.
		(I read somewhere that there was little difference
		 between the 660 and 6100, 840 and 8100 machines)

-------	Does anyone know if I am barking up the wrong tree here?

-- 
| Nigel Pearson, Telstra IND, Sydney  |"In this city I confess              |
| Email:  nigel@ind.tansu.com.au      | god is mammon, more is less         |
| Office: 9206 3468    Fax: 9281 1301 | off like lemmings at the gun        |
| Mobile: 014 611 322  Home: 579 3293 | I know better, still I run" S.Taylor|