On Thu, Apr 16, 2020 at 05:06:25AM +0900, rgc wrote: > disabling scca probably will not work ... console uses this device > > for the zs.c crash i usually edit zscninit > > --- dev/zs.c 3 Sep 2019 04:48:00 -0000 1.30 > +++ dev/zs.c 15 Apr 2020 09:50:22 -0000 > @@ -1019,7 +1019,7 @@ zscninit(struct consdev *cp) > int escc, escc_ch, obio; > unsigned int zs_offset, zs_size; > int ch = 0; > - u_int32_t reg[5]; > + u_int32_t reg[10]; > char name[16]; > > if ((escc_ch = OF_instance_to_package(stdin)) == -1) > > i am probably masking a bug somewhere ... since the qemu firmware and the > eeprom > dump of my PowerBook G4 matches so i don"t know why zs.c crashes on qemu. > with that hack you can compile with PROPOLICE (default GENERIC)
Thanks, I investigated this and it's enough to drive me insane. It could be that I'm lacking the intelligence. It seems to me that OpenBSD does some assumptions inside OF_getprop() that is called from zs.c line 1035. In particular with offsets to property names. I compared the firmware from QEMU with my G5 and there is a difference which I'm now compiling a patch for. Since I'm also doing a backup at the same time it may take longer than usual. Here is what I'm seeing in QEMU: 0 > cd /aliases ok 0 > cd sccb ok 0 > .properties name "ch-b" device_type "serial" compatible "chrp,es3" reg 00013000 00000001 00013010 00000001 00013040 00000001 00008600 00000100 00008700 00000100 interrupts -- 18 : 00 00 00 24 00 00 00 01 00 00 00 06 00 00 00 00 00 00 00 07 00 00 00 00 slot-names 0 interrupt-parent fff66674 ok And what I'm seeing in my Apple G5 is different. There is a "built-in" property between the compatible and the reg property. I'm trying to insert this property in the QEMU with a patch like said above. If you want to follow this on your hardware the commands are a little different I photographed it on my ipod but it would mean I turn on my access point to upload it so I'll just list the commands. dev /aliases dev sccb .properties There you'll see the difference. I'll report back if my patch works. Best Regards, -peter > conf/GENERIC with zs.c hack and "-M mac99,via=pmu-adb" and "-nodefaults" on > ports > qemu (4.2) > > 0 > ok > 0 > boot Trying cd:,\\:tbxi... > >> switching to new context: > >> OpenBSD/macppc BOOT 1.8 > boot> > cannot open /pci@f2000000/mac-io@c/ata-3@21000/cdrom@0:/etc/random.seed: No > such file or directory > booting /pci@f2000000/mac-io@c/ata-3@21000/cdrom@0:/6.7/macppc/bsd.rd: > 9250252+483640 [394462+108+363984+376265]=0x100114 > string [/cdrom@0:/6.7/macppc/bsd.rd] not found > Warning: boot device unrecognized: > /pci@f2000000/mac-io@c/ata-3@21000/cdrom@0:/6.7/macppc/bsd.rd > [ using 1135396 bytes of bsd ELF symbol table ] > Copyright (c) 1982, 1986, 1989, 1991, 1993 > The Regents of the University of California. All rights reserved. > Copyright (c) 1995-2020 OpenBSD. All rights reserved. https://www.OpenBSD.org > > OpenBSD 6.7-beta (GENERIC) #4: Wed Apr 15 18:50:40 JST 2020 > r...@apbg4.my.domain:/usr/src/sys/arch/macppc/compile/GENERIC > real mem = 134217728 (128MB) > avail mem = 104701952 (99MB) > mpath0 at root > scsibus0 at mpath0: 256 targets > mainbus0 at root: model PowerMac3,1 > cpu0 at mainbus0: 7400 (Revision 0x209): 900 MHz: L2 cache not enabled > mem0 at mainbus0 > mpcpcibr0 at mainbus0 pci: uni-north > pci0 at mpcpcibr0 bus 0 > macobio0 at pci0 dev 12 function 0 "Apple Keylargo" rev 0x00 > macgpio0 at macobio0 offset 0x50 > macgpio1 at macgpio0 offset 0x9: irq 47 > pgs0 at macgpio0: irq 55 > adb0 at macobio0 offset 0x16000: irq 25, via-pmu, 2 targets > apm0 at adb0: battery flags 0x91, 0% charged > akbd0 at adb0 addr 2: extended keyboard > wskbd0 at akbd0 mux 1 > ams0 at adb0 addr 3: Mouse Systems A3 mouse, 1-button, 100 dpi > wsmouse0 at ams0 mux 0 > zs0 at macobio0 offset 0x13000: irq 37,36 > zstty0 at zs0 channel 0: console > zstty1 at zs0 channel 1 > "escc-legacy" at macobio0 offset 0x12000 not configured > wdc0 at macobio0 offset 0x20000 irq 13: DMA > wd0 at wdc0 channel 0 drive 0: <QEMU HARDDISK> > wd0: 16-sector PIO, LBA48, 8192MB, 16777216 sectors > wd0(wdc0:0:0): using BIOS timings, DMA mode 2 > wdc1 at macobio0 offset 0x21000 irq 14: DMA > atapiscsi0 at wdc1 channel 0 drive 0 > scsibus1 at atapiscsi0: 2 targets > cd0 at scsibus1 targ 0 lun 0: <QEMU, QEMU DVD-ROM, 2.5+> removable > cd0(wdc1:0:0): using BIOS timings, DMA mode 2 > openpic0 at macobio0 offset 0x40000: version 0x0 feature 3f0002 LE > memc0 at mainbus0: uni-n rev 0x7 > vscsi0 at root > scsibus2 at vscsi0: 256 targets > softraid0 at root > scsibus3 at softraid0: 256 targets > bootpath: /pci@f2000000/mac-io@c/ata-3@21000/cdrom@0:/6.7/macppc/bsd.rd > root device: wd0 > swap device (default wd0b): > root on wd0a swap on wd0b dump on wd0b > WARNING: / was not properly unmounted > Automatic boot in progress: starting file system checks. > /dev/wd0a (29c62cbdfdfa90c9.a): 1734 files, 25569 used, 521478 free (174 > frags, 65163 blocks, 0.0% fragmentation) > /dev/wd0a (29c62cbdfdfa90c9.a): MARKING FILE SYSTEM CLEAN > /dev/wd0e (29c62cbdfdfa90c9.e): 1 files, 1 used, 1030526 free (14 frags, > 128814 blocks, 0.0% fragmentation) > /dev/wd0e (29c62cbdfdfa90c9.e): MARKING FILE SYSTEM CLEAN > /dev/wd0d (29c62cbdfdfa90c9.d): FREE BLK COUNT(S) WRONG IN SUPERBLK (SALVAGED) > /dev/wd0d (29c62cbdfdfa90c9.d): SUMMARY INFORMATION BAD (SALVAGED) > /dev/wd0d (29c62cbdfdfa90c9.d): BLK(S) MISSING IN BIT MAPS (SALVAGED) > /dev/wd0d (29c62cbdfdfa90c9.d): 25379 files, 421954 used, 1124661 free (6013 > frags, 139831 blocks, 0.4% fragmentation) > /dev/wd0d (29c62cbdfdfa90c9.d): MARKING FILE SYSTEM CLEAN > pf enabled > starting network > reordering libraries: done. > openssl: generating isakmpd/iked RSA keys... done. > ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519 > starting early daemons: syslogd pflogd ntpd. > starting RPC daemons:. > savecore: no core dump > checking quotas: done. > clearing /tmp > kern.securelevel: 0 -> 1 > creating runtime link editor directory cache. > preserving editor files. > running rc.sysmerge > starting network daemons: smtpd sndiod. > running rc.firsttime > Path to firmware: http://firmware.openbsd.org/firmware/snapshots/ > No devices found which need firmware files to be downloaded. > Path to firmware: http://firmware.openbsd.org/firmware/snapshots/ > No devices found which need firmware files to be downloaded. > starting local daemons: cron. > Wed Apr 15 19:56:53 JST 2020 > > OpenBSD/macppc (emu.my.domain) (ttya) > > login: root > Password: > OpenBSD 6.7-beta (GENERIC) #4: Wed Apr 15 18:50:40 JST 2020 > > Welcome to OpenBSD: The proactively secure Unix-like operating system. > > Please use the sendbug(1) utility to report bugs in the system. > Before reporting a bug, please try to reproduce it with the latest > version of the code. With bug reports, please try to ensure that > enough information to reproduce the problem is enclosed, and if a > known fix for it exists, include that as well. > > You have mail. > emu# ifconfig -a > lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 32768 > index 2 priority 0 llprio 3 > groups: lo > inet6 ::1 prefixlen 128 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 > inet 127.0.0.1 netmask 0xff000000 > enc0: flags=0<> > index 1 priority 0 llprio 3 > groups: enc > status: active > pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33168 > index 3 priority 0 llprio 3 > groups: pflog > emu# >