Subject: 145B serial ports
To: None <port-mac68k@NetBSD.ORG>
From: Pascal Brisset <brisset@Email.ENST.Fr>
List: port-mac68k
Date: 09/24/1995 12:47:21
After playing with netbsd.GENERIC_42 (thanks for distributing it),
I am quite convinced that the adb/serial chips behave differently on
the Powerbook 145 and my 145B.

- The kernel still locks after printing 'adb: bus subsystem'
  so I patched it again (replaced $660E with $4E71 at offset $8A052)
  After this, everything runs fine on the LCD console.
  I get the login prompt; can't type anything in, of course.

- With serial console enabled, all kernel messages are displayed,
  then it locks before starting /etc/rc (see below), so I believe the
  tty code tries to initialize the serial ports improperly.

Here is some relevant info from the booter :

FLAGS = 0x800204d9
BOOTERVER = 108
MACOS_VIDEO = 0xfee08000
MACOS_SCC = 0x50f04000
MACHINEID = 0x36
MEMSIZE = 8
SERIALECHO = 0
SERIALCONSOLE = 1
PROCESSOR = 1
END_SYM = 0xe9705
ROMBASE = 0x40800000
TIMEDBRA = 0x1001
ADBDELAY = 0x30e
HWCFGFLAGS = 0xed00
HWCFGFLAG2 = 0x401f3f
HWCFGFLAG3 = 0x10932

and the result:

[ preserving 86381 bytes of netbsd symbol table ]
Bootstrapping NetBSD/mac68k.
Getting mapping from MMU.
System RAM: 8388608 bytes in 2048 pages.
     Low = 0x0, high = 0x800000
Non-system RAM (nubus, etc.):
     Log = 0xf9000000, Phys = 0xf9000000, Len = 0x5e00000 (98566144d)
     Log = 0xfee00000, Phys = 0xfee08000, Len = 0xffff0000 (4294901760d)
     Log = 0xfee10000, Phys = 0xfee10000, Len = 0x1f0000 (2031616d)
  no internal video at address 0 -- videoaddr is 0xfee08000.
Done.
Bootstrapping the pmap system.
Pmap bootstrapped.
Moving ROMBase from 0x40800000 to 0x1800000.
Video address 0xfee08000 -> 0x8608000.
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.

NetBSD 1.0A (GENERIC) #42: Fri Sep 22 18:32:55 PDT 1995
    root2@wormhole:/disk2/src/sys/arch/mac68k/compile/GENERIC
Apple Macintosh PowerBook 145  (68030)
real mem = 8388608
avail mem = 5410816
using 128 buffers containing 524288 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)
ite0 at mainbus0 (minimal console)
adb0 at mainbus0 (ADB event device)
ser0 at mainbus0 (serial console)ser1 at mainbus0nubus0 at mainbus0
ncrscsi0 at mainbus0
scsibus0 at ncrscsi0
ncrscsi0 targ 0 lun 0: <IBM, WDS280, S3E0> SCSI1 0/direct fixed
sd0 at scsibus0: 82MB, 1120 cyl, 4 head, 37 sec, 512 bytes/sec
ncr96scsi0 at mainbus0 not configured
asc0 at mainbus0 Apple sound chip.
fpu0 at mainbus0 (emulator)
floppy0 at mainbus0 not configured
Changing root device to sd0a.
PRAM time does not appear to have been read correctly.
PRAM: 0x83da4f80, macos_boottime: 0x3064e37e.
WARNING: no swap space found

Similarly, without serial console, an 'echo foo > /dev/tty00'
in /etc/rc will stop everything.

I'd be happy to contribute a solution to this (OK, who cares about
the 145B?), just tell me where to look in the MAC roms.

-- Pascal.