clang build kernel information

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

clang build kernel information

rgcinjp
ppc@

taking a step back and make something out of this effort.

i am unsure of other developers efforts about moving macpcc to full
base-clang ... so i hope i am not duplicating / wasting my efforts.

short-term goals: are to determine if ofwboot/kernel will work w/
base-clang out of the box.

long-term goals: submit patches that will make macppc working properly
with base-clang on actual machines (G3/G4 laptops in my case).

to achieve these goals i will try to ignore the assembly output of
clang and gcc ... since i am not knowledgeable with the inner workings
of the compilers. make notes though.

use the packaged base-clang (-release or -snapshots)

do no harm, that is assume the code works and don't hack around things
i don't know. thus as an initial investigation, i will limit myself to
tweaking only the build environment. find options that will work with
the current source code and base-clang.
 
i will run a GENERIC kernel. base will only be rebuilt as needed. so
in my investigations it will be clang-kernel + gcc-userland
applications.

iBook G3 runs 6.6-release, sys.tar.gz gives me the kernel source. iBook
G4 runs 6.6-current, i'm tracking CVS for this one. when everything
seems right, there is a Powerbook G4 tracking -current that can also
be used in testing.



short term results:

1 unmodified ofwboot and the kernel code does compile with base-clang
the build environment need to be adjusted. no linker errors. binaries
are created with the base-clang + binutils (ld) chain.

2 clang compiled ofwboot works on actual machine it can load and boot
the kernel

3 clang compiled kernel boots ... up to a certain point ... tested on
all 3 machines i have.

i did take a peek at the generated asm ... base-clang generates a
messy set of assembly code.

arch/macppc/macppc/openfirm.c OF_getnodebyname()

i took a peek bec the part where i usually hang is in the OF_ code,
openfirmware client interface code. it get's used much during device
probing and initialization and doesn't get used after that.  based on
reading the code ... it is the realm where real-mode mem intermingle
with virtual memory ... but very early in the boot i tend to assume
physmem == virtmem

in the end, i decided to just change the optimization settings.  get
-snapshot kernel and decompile. create clang-kernel with modified
COPTS, decompile. compare and find COPTS settings that create least
difference.

4 so tweaking the build environment ... led me to "-Oz" ... the
disassembly somewhat closely matches the code generated by base-gcc
-O2 is the default optimization settings.

-O2 kernel does not boot as mentioned in my other ramblings the kernel
either hangs in a zscinit() stack smash or no log is displayed after
the "screen" is initialized (after trying to get the "backlight" node
using OF_getnodebyname(). kernel is noticeably larger than base-gcc
compiled version.

-Os openfirm.o is very similar to -O2 kernel. the OF_child/
OF_peer/OF_parent calls are inlined in OF_getnodebyname ... i don't
know the correct term for it. doesn't boot. i get a trap 300 very
early.

-Oz creates a good-ish kernel, openfirm.o is very similar to base-gcc
generated code. the calls to OF_child/OF_peer/OF_parent are explicit
jumps to the said functions.


good-ish kernel ... the kernel to boots and probes devices. but at a
certain point ... it slows down to a crawl .. a slug.

it get's slow after initializing gem ... slow USB enumeration ...
with DEBUG it show it was also at this point that

arch/macppc/macppc/clock.c cpu_initclocks()
 
was invoked. and it is slow from here on. rootdisk gets mounted. i
get a login prompt.

'time sleep 1' takes ages. painfully slow. 'date' after rebooting the
test kernel is way way off. from the looks of things it never
advanced.

i'm assuming a setting didn't stick ... or something.

so that is where i'am at right now ...

- rgc


[ using 1293176 bytes of bsd ELF symbol table ]
console out [ATY,Bee_A] console in [keyboard], using ADB
using parent ATY,BeeParent:: memaddr 98000000, size 8000000 : consaddr 9c008000 : ioaddr 90020000, size 20000: width 1024 linebytes 1024 height 768 depth 8
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2019 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 6.6 (GENERIC) #604: Sat Oct 12 13:10:27 MDT 2019
    [hidden email]:/usr/src/sys/arch/macppc/compile/GENERIC
real mem = 402653184 (384MB)
avail mem = 372981760 (355MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root: model PowerBook4,3
cpu0 at mainbus0: 750FX (Revision 0x112): 700 MHz: 512KB L2 cache
mem0 at mainbus0
spdmem0 at mem0: no EEPROM found
spdmem1 at mem0: 256MB SDRAM non-parity PC133CL3
memc0 at mainbus0: uni-n rev 0xc0
kiic0 at memc0 offset 0xf8001000
iic0 at kiic0
admtmp0 at iic0 addr 0xac
mpcpcibr0 at mainbus0 pci: uni-north
pci0 at mpcpcibr0 bus 0
pchb0 at pci0 dev 11 function 0 "Apple Pangea AGP" rev 0x00
agp at pchb0 not configured
radeondrm0 at pci0 dev 16 function 0 "ATI Radeon Mobility M7" rev 0x00
drm0 at radeondrm0
radeondrm0: irq 48
mpcpcibr1 at mainbus0 pci: uni-north
pci1 at mpcpcibr1 bus 0
macobio0 at pci1 dev 23 function 0 "Apple Pangea Macio" rev 0x00
openpic0 at macobio0 offset 0x40000: version 0x4614 feature 3f0302 LE
macgpio0 at macobio0 offset 0x50
macgpio1 at macgpio0 offset 0x9: irq 47
"programmer-switch" at macgpio0 offset 0x11 not configured
"firewire-linkon" at macgpio0 offset 0x5b not configured
"cpu-vcore-select" at macgpio0 offset 0x6b not configured
"extint-gpio4" at macgpio0 offset 0x5c not configured
"gpio9" at macgpio0 offset 0x73 not configured
"extint-gpio12" at macgpio0 offset 0x64 not configured
"escc-legacy" at macobio0 offset 0x12000 not configured
zs0 at macobio0 offset 0x13000: irq 22,23
zstty0 at zs0 channel 0
zstty1 at zs0 channel 1
snapper0 at macobio0 offset 0x10000: irq 30,1,2
"timer" at macobio0 offset 0x15000 not configured
adb0 at macobio0 offset 0x16000: irq 25, via-pmu, 3 targets
apm0 at adb0: battery flags 0x5, 98% charged
piic0 at adb0
iic1 at piic0
akbd0 at adb0 addr 2: PowerBook G3 keyboard (Japanese layout)
wskbd0 at akbd0: console keyboard
ams0 at adb0 addr 3: EMP trackpad <tpad> 2-button, 400 dpi
wsmouse0 at ams0 mux 0
abtn0 at adb0 addr 7: brightness/volume/eject buttons
"battery" at macobio0 offset 0x0 not configured
"backlight" at macobio0 offset 0xf300 not configured
kiic1 at macobio0 offset 0x18000
iic2 at kiic1
wdc0 at macobio0 offset 0x1f000 irq 19: DMA
wd0 at wdc0 channel 0 drive 0: <SUNEAST SSD SE800 mSATA 256GB>
wd0: 16-sector PIO, LBA48, 244198MB, 500118192 sectors
atapiscsi0 at wdc0 channel 0 drive 1
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <LG, CD-ROM CRN-8245B, AHTA> removable
wd0(wdc0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2
cd0(wdc0:0:1): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2
audio0 at snapper0
ohci0 at pci1 dev 24 function 0 "Apple Pangea USB" rev 0x00: irq 27, version 1.0
ohci1 at pci1 dev 25 function 0 "Apple Pangea USB" rev 0x00: irq 28, version 1.0
usb0 at ohci0: USB revision 1.0
uhub0 at usb0 configuration 1 interface 0 "Apple OHCI root hub" rev 1.00/1.00 addr 1
usb1 at ohci1: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "Apple OHCI root hub" rev 1.00/1.00 addr 1
mpcpcibr2 at mainbus0 pci: uni-north
pci2 at mpcpcibr2 bus 0
"Apple Pangea FireWire" rev 0x00 at pci2 dev 14 function 0 not configured
gem0 at pci2 dev 15 function 0 "Apple Pangea GMAC" rev 0x00: irq 41, address 00:03:93:c7:d1:20
bmtphy0 at gem0 phy 0: BCM5221 100baseTX PHY, rev. 4
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
bootpath: /pci@f2000000/mac-io@17/ata-4@1f000/disk@0:/bsd
root on wd0a (1a3833755fe31710.a) swap on wd0b dump on wd0b
WARNING: / was not properly unmounted
initializing kernel modesetting (RV200 0x1002:0x4C57 0x1002:0x4C57 0x00).
[drm] *ERROR* Unable to locate a BIOS ROM
radeondrm0: 1024x768, 16bpp
wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using wskbd0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
ugen0 at uhub1 port 2 "HCF USB V.90 Data/Fax Modem Apple internal modem" rev 1.10/1.00 addr 2
umass0 at uhub1 port 1 configuration 1 interface 0 "Verbatim STORE N GO" rev 2.00/1.00 addr 3
umass0: using SCSI over Bulk-Only
scsibus4 at umass0: 2 targets, initiator 0
sd0 at scsibus4 targ 1 lun 0: <Verbatim, STORE N GO, 5.00> removable serial.18a503076B61B2C00142
sd0: 7389MB, 512 bytes/sector, 15133248 sectors
syncing disks...
[ using 1273868 bytes of bsd ELF symbol table ]
console out [ATY,Bee_A] console in [keyboard], using ADB
using parent ATY,BeeParent:: memaddr 98000000, size 8000000 : consaddr 9c008000 : ioaddr 90020000, size 20000: width 1024 linebytes 1024 height 768 depth 8
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2019 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 6.6 (GENERIC) #0: Thu Feb 27 21:41:24 JST 2020
    [hidden email]:/home/rgc/u/s/sys/arch/macppc/compile/GENERIC
real mem = 402653184 (384MB)
avail mem = 373534720 (356MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root: model PowerBook4,3
cpu0 at mainbus0: 750FX (Revision 0x112): 700 MHz: 512KB L2 cache
mem0 at mainbus0
spdmem0 at mem0: no EEPROM found
spdmem1 at mem0: 256MB SDRAM non-parity PC133CL3
memc0 at mainbus0: uni-n rev 0xc0
kiic0 at memc0 offset 0xf8001000
iic0 at kiic0
admtmp0 at iic0 addr 0xac
mpcpcibr0 at mainbus0 pci: uni-north
pci0 at mpcpcibr0 bus 0
pchb0 at pci0 dev 11 function 0 "Apple Pangea AGP" rev 0x00
agp at pchb0 not configured
radeondrm0 at pci0 dev 16 function 0 "ATI Radeon Mobility M7" rev 0x00
drm0 at radeondrm0
radeondrm0: irq 48
mpcpcibr1 at mainbus0 pci: uni-north
pci1 at mpcpcibr1 bus 0
macobio0 at pci1 dev 23 function 0 "Apple Pangea Macio" rev 0x00
openpic0 at macobio0 offset 0x40000: version 0x4614 feature 3f0302 LE
macgpio0 at macobio0 offset 0x50
macgpio1 at macgpio0 offset 0x9: irq 47
"programmer-switch" at macgpio0 offset 0x11 not configured
"firewire-linkon" at macgpio0 offset 0x5b not configured
"cpu-vcore-select" at macgpio0 offset 0x6b not configured
"extint-gpio4" at macgpio0 offset 0x5c not configured
"gpio9" at macgpio0 offset 0x73 not configured
"extint-gpio12" at macgpio0 offset 0x64 not configured
"escc-legacy" at macobio0 offset 0x12000 not configured
zs0 at macobio0 offset 0x13000: irq 22,23
zstty0 at zs0 channel 0
zstty1 at zs0 channel 1
snapper0 at macobio0 offset 0x10000: irq 30,1,2
"timer" at macobio0 offset 0x15000 not configured
adb0 at macobio0 offset 0x16000: irq 25, via-pmu, 3 targets
apm0 at adb0: battery flags 0x5, 97% charged
piic0 at adb0
iic1 at piic0
akbd0 at adb0 addr 2: PowerBook G3 keyboard (Japanese layout)
wskbd0 at akbd0: console keyboard
ams0 at adb0 addr 3: EMP trackpad <tpad> 2-button, 400 dpi
wsmouse0 at ams0 mux 0
abtn0 at adb0 addr 7: brightness/volume/eject buttons
"battery" at macobio0 offset 0x0 not configured
"backlight" at macobio0 offset 0xf300 not configured
kiic1 at macobio0 offset 0x18000
iic2 at kiic1
wdc0 at macobio0 offset 0x1f000 irq 19: DMA
wd0 at wdc0 channel 0 drive 0: <SUNEAST SSD SE800 mSATA 256GB>
wd0: 16-sector PIO, LBA48, 244198MB, 500118192 sectors
atapiscsi0 at wdc0 channel 0 drive 1
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <LG, CD-ROM CRN-8245B, AHTA> removable
wd0(wdc0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2
cd0(wdc0:0:1): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2
audio0 at snapper0
ohci0 at pci1 dev 24 function 0 "Apple Pangea USB" rev 0x00: irq 27, version 1.0
ohci1 at pci1 dev 25 function 0 "Apple Pangea USB" rev 0x00: irq 28, version 1.0
usb0 at ohci0: USB revision 1.0
uhub0 at usb0 configuration 1 interface 0 "Apple OHCI root hub" rev 1.00/1.00 addr 1
usb1 at ohci1: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "Apple OHCI root hub" rev 1.00/1.00 addr 1
mpcpcibr2 at mainbus0 pci: uni-north
pci2 at mpcpcibr2 bus 0
"Apple Pangea FireWire" rev 0x00 at pci2 dev 14 function 0 not configured
gem0 at pci2 dev 15 function 0 "Apple Pangea GMAC" rev 0x00: irq 41, address 00:03:93:c7:d1:20
bmtphy0 at gem0 phy 0: BCM5221 100baseTX PHY, rev. 4
umass0 at uhub1 port 1 configuration 1 interface 0 "Verbatim STORE N GO" rev 2.00/1.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd0 at scsibus2 targ 1 lun 0: <Verbatim, STORE N GO, 5.00> removable serial.18a503076B61B2C00142
sd0: 7389MB, 512 bytes/sector, 15133248 sectors
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
bootpath: /pci@f2000000/mac-io@17/ata-4@1f000/disk@0:/tbsd
root on wd0a (1a3833755fe31710.a) swap on wd0b dump on wd0b
initializing kernel modesetting (RV200 0x1002:0x4C57 0x1002:0x4C57 0x00).
[drm] *ERROR* Unable to locate a BIOS ROM
radeondrm0: 1024x768, 16bpp
wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using wskbd0
wsdisplay0: screen 1-5 added (std, vt100 emulation)

Reply | Threaded
Open this post in threaded view
|

Re: clang build kernel information

George Koehler-2
On Sun, 1 Mar 2020 09:23:45 +0900
rgc <[hidden email]> wrote:

> 'time sleep 1' takes ages. painfully slow. 'date' after rebooting the
> test kernel is way way off. from the looks of things it never
> advanced.

ppc_mftb() in /sys/arch/powerpc/include/cpu.h is broken with clang.

My one macppc machine, the iMac G3, has hardware trouble, so I turned
it off.  My amd64 desktop has ports-clang (from pkg_add clang), which
includes the PowerPC backend, so I can copy ppc_mftb() into a file and
generate PowerPC assembly code.

$ alias pang='/usr/local/bin/clang -target ppc-openbsd'
$ cat exam.c
typedef unsigned long long u_int64_t;
typedef unsigned long u_long;

static __inline u_int64_t
ppc_mftb(void)
{
        u_long scratch;
        u_int64_t tb;

        __asm volatile ("1: mftbu %0; mftb %0+1; mftbu %1;"
            " cmpw 0,%0,%1; bne 1b" : "=r"(tb), "=r"(scratch));
        return tb;
}

u_int64_t
f(void)
{
        u_int64_t tb = ppc_mftb();
        return (tb >> 32) | (tb << 32);
}
$ pang -S -O2 exam.c

My function f() swaps the words in the time base, should return the
upper word (mftbu) in %r4 and the lower word in %r3.  The generated
code "exam.s" fails to set %r3; the inline __asm turned into,

.Ltmp1:
        mfspr 4, 269
        mfspr 5, 268
        mfspr 5, 269
        cmpw    4, 5
        bne     0, .Ltmp1

which is wrong because the lower word "mfspr %r5, 268" is lost when
the upper word "mfspr %r5, 269" clobbers %r5.  (The code loops until
the upper words in %r4 and %r5 are equal.)  If your clang kernel lost
the lower word of the time base, then time might stop.

I suspect that "mftb %0+1" fails because clang doesn't always choose
register %0+1 to hold the lower word of "=r"(tb).

This might work:

static __inline u_int64_t
ppc_mftb(void)
{
        u_long high, low, scratch;

        __asm volatile ("1: mftbu %0; mftb %1; mftbu %2;"
            " cmpw 0,%0,%2; bne 1b" : "=r"(high), "=r"(low), "=r"(scratch));
        return ((u_int64_t)high << 32) | low;
}

Reply | Threaded
Open this post in threaded view
|

Re: clang build kernel information

rgcinjp
On Sun, Mar 01, 2020 at 09:50:38PM -0500, George Koehler wrote:
> On Sun, 1 Mar 2020 09:23:45 +0900
> rgc <[hidden email]> wrote:
>
> > 'time sleep 1' takes ages. painfully slow. 'date' after rebooting the
> > test kernel is way way off. from the looks of things it never
> > advanced.
>
> ppc_mftb() in /sys/arch/powerpc/include/cpu.h is broken with clang.
>

thank you for the expert opinion! it is very much appreciated.
the clang-built kernel runs much much better now.
BUT there is some weirdness that i noticed.

(macppc/macppc/clock.c)
ppc_mftb() as emited by base-clang before your patch:

-O2 opt no patch
ppc_mftb():
obj/powerpc/cpu.h:339
 3b8:   7f 6d 42 a6     mfspr   r27,269
 3bc:   7f 8c 42 a6     mfspr   r28,268
 3c0:   7c 6d 42 a6     mfspr   r3,269
 3c4:   7c 1b 18 00     cmpw    r27,r3
 3c8:   40 82 ff f0     bne+    3b8 <decr_intr+0x48>


-Oz opt no patch
ppc_mftb():
obj/powerpc/cpu.h:339
 364:   7f 4d 42 a6     mfspr   r26,269
 368:   7f 6c 42 a6     mfspr   r27,268
 36c:   7c 6d 42 a6     mfspr   r3,269
 370:   7c 1a 18 00     cmpw    r26,r3
 374:   40 82 ff f0     bne+    364 <decr_intr+0x48>


-Oz (with your patch)
 5b0:   7c 6d 42 a6     mfspr   r3,269
 5b4:   7c 8c 42 a6     mfspr   r4,268
 5b8:   7c ad 42 a6     mfspr   r5,269
 5bc:   7c 03 28 00     cmpw    r3,r5
 5c0:   40 82 ff f0     bne+    5b0 <ppc_mftb+0xc>


i guess ppc_mftb() was incorrect for the wrong reasons??

i can duplicate the clobbering on a cross-compile (amd64 host, -O2) too.
this the output of a native base-clang (-O2) compile for the exam.c you
included previously.

.Ltmp1:
        mfspr 4, 269
        mfspr 5, 268
        mfspr 5, 269
        cmpw    4, 5
        bne     0, .Ltmp1


clang weirdness. and maybe something out of my knowledge.

- rgc

PS hope the G3 can be repaired ~

Reply | Threaded
Open this post in threaded view
|

Re: clang build kernel information

rgcinjp
In reply to this post by rgcinjp
On Sun, Mar 01, 2020 at 09:23:45AM +0900, rgc wrote:
> so that is where i'am at right now ...
>

ppc@

attached is series of dmesg for my iBook G3

GENERIC #604 is 6.6-release

GENERIC #2 is self-compiled kernel using clang (-Oz and ppc_mftb()
patch from kernigh@)

GENERIC #0 is 6.6-stable. compiled under GENERIC #2 as a stress test.


since then i've compiled another kernel via clang to check the steps
i have. this kernel is now building base. which could take several
days ... unless ober_ sticks it's head, then i need to baby sit the
build (hopefully this does not occur in -current).


[ using 1291284 bytes of bsd ELF symbol table ]
console out [ATY,Bee_A] console in [keyboard], using ADB
using parent ATY,BeeParent:: memaddr 98000000, size 8000000 : consaddr 9c008000 : ioaddr 90020000, size 20000: width 1024 linebytes 1024 height 768 depth 8
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2019 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 6.6 (GENERIC) #604: Sat Oct 12 13:10:27 MDT 2019
    [hidden email]:/usr/src/sys/arch/macppc/compile/GENERIC
real mem = 402653184 (384MB)
avail mem = 372977664 (355MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root: model PowerBook4,3
cpu0 at mainbus0: 750FX (Revision 0x112): 700 MHz: 512KB L2 cache
mem0 at mainbus0
spdmem0 at mem0: no EEPROM found
spdmem1 at mem0: 256MB SDRAM non-parity PC133CL3
memc0 at mainbus0: uni-n rev 0xc0
kiic0 at memc0 offset 0xf8001000
iic0 at kiic0
admtmp0 at iic0 addr 0xac
mpcpcibr0 at mainbus0 pci: uni-north
pci0 at mpcpcibr0 bus 0
pchb0 at pci0 dev 11 function 0 "Apple Pangea AGP" rev 0x00
agp at pchb0 not configured
radeondrm0 at pci0 dev 16 function 0 "ATI Radeon Mobility M7" rev 0x00
drm0 at radeondrm0
radeondrm0: irq 48
mpcpcibr1 at mainbus0 pci: uni-north
pci1 at mpcpcibr1 bus 0
macobio0 at pci1 dev 23 function 0 "Apple Pangea Macio" rev 0x00
openpic0 at macobio0 offset 0x40000: version 0x4614 feature 3f0302 LE
macgpio0 at macobio0 offset 0x50
macgpio1 at macgpio0 offset 0x9: irq 47
"programmer-switch" at macgpio0 offset 0x11 not configured
"firewire-linkon" at macgpio0 offset 0x5b not configured
"cpu-vcore-select" at macgpio0 offset 0x6b not configured
"extint-gpio4" at macgpio0 offset 0x5c not configured
"gpio9" at macgpio0 offset 0x73 not configured
"extint-gpio12" at macgpio0 offset 0x64 not configured
"escc-legacy" at macobio0 offset 0x12000 not configured
zs0 at macobio0 offset 0x13000: irq 22,23
zstty0 at zs0 channel 0
zstty1 at zs0 channel 1
snapper0 at macobio0 offset 0x10000: irq 30,1,2
"timer" at macobio0 offset 0x15000 not configured
adb0 at macobio0 offset 0x16000: irq 25, via-pmu, 3 targets
apm0 at adb0: battery flags 0x5, 98% charged
piic0 at adb0
iic1 at piic0
akbd0 at adb0 addr 2: PowerBook G3 keyboard (Japanese layout)
wskbd0 at akbd0: console keyboard
ams0 at adb0 addr 3: EMP trackpad <tpad> 2-button, 400 dpi
wsmouse0 at ams0 mux 0
abtn0 at adb0 addr 7: brightness/volume/eject buttons
"battery" at macobio0 offset 0x0 not configured
"backlight" at macobio0 offset 0xf300 not configured
kiic1 at macobio0 offset 0x18000
iic2 at kiic1
wdc0 at macobio0 offset 0x1f000 irq 19: DMA
wd0 at wdc0 channel 0 drive 0: <SUNEAST SSD SE800 mSATA 256GB>
wd0: 16-sector PIO, LBA48, 244198MB, 500118192 sectors
atapiscsi0 at wdc0 channel 0 drive 1
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <LG, CD-ROM CRN-8245B, AHTA> removable
wd0(wdc0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2
cd0(wdc0:0:1): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2
audio0 at snapper0
ohci0 at pci1 dev 24 function 0 "Apple Pangea USB" rev 0x00: irq 27, version 1.0
ohci1 at pci1 dev 25 function 0 "Apple Pangea USB" rev 0x00: irq 28, version 1.0
usb0 at ohci0: USB revision 1.0
uhub0 at usb0 configuration 1 interface 0 "Apple OHCI root hub" rev 1.00/1.00 addr 1
usb1 at ohci1: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "Apple OHCI root hub" rev 1.00/1.00 addr 1
mpcpcibr2 at mainbus0 pci: uni-north
pci2 at mpcpcibr2 bus 0
"Apple Pangea FireWire" rev 0x00 at pci2 dev 14 function 0 not configured
gem0 at pci2 dev 15 function 0 "Apple Pangea GMAC" rev 0x00: irq 41, address 00:03:93:c7:d1:20
bmtphy0 at gem0 phy 0: BCM5221 100baseTX PHY, rev. 4
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
bootpath: /pci@f2000000/mac-io@17/ata-4@1f000/disk@0:/bsd
root on wd0a (1a3833755fe31710.a) swap on wd0b dump on wd0b
initializing kernel modesetting (RV200 0x1002:0x4C57 0x1002:0x4C57 0x00).
[drm] *ERROR* Unable to locate a BIOS ROM
radeondrm0: 1024x768, 16bpp
wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using wskbd0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
ugen0 at uhub1 port 2 "HCF USB V.90 Data/Fax Modem Apple internal modem" rev 1.10/1.00 addr 2
syncing disks...


[ using 1271684 bytes of bsd ELF symbol table ]
console out [ATY,Bee_A] console in [keyboard], using ADB
using parent ATY,BeeParent:: memaddr 98000000, size 8000000 : consaddr 9c008000 : ioaddr 90020000, size 20000: width 1024 linebytes 1024 height 768 depth 8
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2019 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 6.6 (GENERIC) #2: Mon Mar  2 20:26:15 JST 2020
    [hidden email]:/home/rgc/u/s/sys/arch/macppc/compile/GENERIC
real mem = 402653184 (384MB)
avail mem = 373542912 (356MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root: model PowerBook4,3
cpu0 at mainbus0: 750FX (Revision 0x112): 700 MHz: 512KB L2 cache
mem0 at mainbus0
spdmem0 at mem0: no EEPROM found
spdmem1 at mem0: 256MB SDRAM non-parity PC133CL3
memc0 at mainbus0: uni-n rev 0xc0
kiic0 at memc0 offset 0xf8001000
iic0 at kiic0
admtmp0 at iic0 addr 0xac
mpcpcibr0 at mainbus0 pci: uni-north
pci0 at mpcpcibr0 bus 0
pchb0 at pci0 dev 11 function 0 "Apple Pangea AGP" rev 0x00
agp at pchb0 not configured
radeondrm0 at pci0 dev 16 function 0 "ATI Radeon Mobility M7" rev 0x00
drm0 at radeondrm0
radeondrm0: irq 48
mpcpcibr1 at mainbus0 pci: uni-north
pci1 at mpcpcibr1 bus 0
macobio0 at pci1 dev 23 function 0 "Apple Pangea Macio" rev 0x00
openpic0 at macobio0 offset 0x40000: version 0x4614 feature 3f0302 LE
macgpio0 at macobio0 offset 0x50
macgpio1 at macgpio0 offset 0x9: irq 47
"programmer-switch" at macgpio0 offset 0x11 not configured
"firewire-linkon" at macgpio0 offset 0x5b not configured
"cpu-vcore-select" at macgpio0 offset 0x6b not configured
"extint-gpio4" at macgpio0 offset 0x5c not configured
"gpio9" at macgpio0 offset 0x73 not configured
"extint-gpio12" at macgpio0 offset 0x64 not configured
"escc-legacy" at macobio0 offset 0x12000 not configured
zs0 at macobio0 offset 0x13000: irq 22,23
zstty0 at zs0 channel 0
zstty1 at zs0 channel 1
snapper0 at macobio0 offset 0x10000: irq 30,1,2
"timer" at macobio0 offset 0x15000 not configured
adb0 at macobio0 offset 0x16000: irq 25, via-pmu, 3 targets
apm0 at adb0: battery flags 0x5, 97% charged
piic0 at adb0
iic1 at piic0
akbd0 at adb0 addr 2: PowerBook G3 keyboard (Japanese layout)
wskbd0 at akbd0: console keyboard
ams0 at adb0 addr 3: EMP trackpad <tpad> 2-button, 400 dpi
wsmouse0 at ams0 mux 0
abtn0 at adb0 addr 7: brightness/volume/eject buttons
"battery" at macobio0 offset 0x0 not configured
"backlight" at macobio0 offset 0xf300 not configured
kiic1 at macobio0 offset 0x18000
iic2 at kiic1
wdc0 at macobio0 offset 0x1f000 irq 19: DMA
wd0 at wdc0 channel 0 drive 0: <SUNEAST SSD SE800 mSATA 256GB>
wd0: 16-sector PIO, LBA48, 244198MB, 500118192 sectors
atapiscsi0 at wdc0 channel 0 drive 1
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <LG, CD-ROM CRN-8245B, AHTA> removable
wd0(wdc0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2
cd0(wdc0:0:1): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2
audio0 at snapper0
ohci0 at pci1 dev 24 function 0 "Apple Pangea USB" rev 0x00: irq 27, version 1.0
ohci1 at pci1 dev 25 function 0 "Apple Pangea USB" rev 0x00: irq 28, version 1.0
usb0 at ohci0: USB revision 1.0
uhub0 at usb0 configuration 1 interface 0 "Apple OHCI root hub" rev 1.00/1.00 addr 1
usb1 at ohci1: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "Apple OHCI root hub" rev 1.00/1.00 addr 1
mpcpcibr2 at mainbus0 pci: uni-north
pci2 at mpcpcibr2 bus 0
"Apple Pangea FireWire" rev 0x00 at pci2 dev 14 function 0 not configured
gem0 at pci2 dev 15 function 0 "Apple Pangea GMAC" rev 0x00: irq 41, address 00:03:93:c7:d1:20
bmtphy0 at gem0 phy 0: BCM5221 100baseTX PHY, rev. 4
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
bootpath: /pci@f2000000/mac-io@17/ata-4@1f000/disk@0:/tbsd
root on wd0a (1a3833755fe31710.a) swap on wd0b dump on wd0b
initializing kernel modesetting (RV200 0x1002:0x4C57 0x1002:0x4C57 0x00).
[drm] *ERROR* Unable to locate a BIOS ROM
radeondrm0: 1024x768, 16bpp
wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using wskbd0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
ugen0 at uhub1 port 2 "HCF USB V.90 Data/Fax Modem Apple internal modem" rev 1.10/1.00 addr 2



[ using 1272508 bytes of bsd ELF symbol table ]
console out [ATY,Bee_A] console in [keyboard], using ADB
using parent ATY,BeeParent:: memaddr 98000000, size 8000000 : consaddr 9c008000 : ioaddr 90020000, size 20000: width 1024 linebytes 1024 height 768 depth 8
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2019 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 6.6-stable (GENERIC) #0: Tue Mar  3 21:29:37 JST 2020
    [hidden email]:/home/rgc/u/src/sys/arch/macppc/compile/GENERIC
real mem = 402653184 (384MB)
avail mem = 373534720 (356MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root: model PowerBook4,3
cpu0 at mainbus0: 750FX (Revision 0x112): 700 MHz: 512KB L2 cache
mem0 at mainbus0
spdmem0 at mem0: no EEPROM found
spdmem1 at mem0: 256MB SDRAM non-parity PC133CL3
memc0 at mainbus0: uni-n rev 0xc0
kiic0 at memc0 offset 0xf8001000
iic0 at kiic0
admtmp0 at iic0 addr 0xac
mpcpcibr0 at mainbus0 pci: uni-north
pci0 at mpcpcibr0 bus 0
pchb0 at pci0 dev 11 function 0 "Apple Pangea AGP" rev 0x00
agp at pchb0 not configured
radeondrm0 at pci0 dev 16 function 0 "ATI Radeon Mobility M7" rev 0x00
drm0 at radeondrm0
radeondrm0: irq 48
mpcpcibr1 at mainbus0 pci: uni-north
pci1 at mpcpcibr1 bus 0
macobio0 at pci1 dev 23 function 0 "Apple Pangea Macio" rev 0x00
openpic0 at macobio0 offset 0x40000: version 0x4614 feature 3f0302 LE
macgpio0 at macobio0 offset 0x50
macgpio1 at macgpio0 offset 0x9: irq 47
"programmer-switch" at macgpio0 offset 0x11 not configured
"firewire-linkon" at macgpio0 offset 0x5b not configured
"cpu-vcore-select" at macgpio0 offset 0x6b not configured
"extint-gpio4" at macgpio0 offset 0x5c not configured
"gpio9" at macgpio0 offset 0x73 not configured
"extint-gpio12" at macgpio0 offset 0x64 not configured
"escc-legacy" at macobio0 offset 0x12000 not configured
zs0 at macobio0 offset 0x13000: irq 22,23
zstty0 at zs0 channel 0
zstty1 at zs0 channel 1
snapper0 at macobio0 offset 0x10000: irq 30,1,2
"timer" at macobio0 offset 0x15000 not configured
adb0 at macobio0 offset 0x16000: irq 25, via-pmu, 3 targets
apm0 at adb0: battery flags 0x5, 95% charged
piic0 at adb0
iic1 at piic0
akbd0 at adb0 addr 2: PowerBook G3 keyboard (Japanese layout)
wskbd0 at akbd0: console keyboard
ams0 at adb0 addr 3: EMP trackpad <tpad> 2-button, 400 dpi
wsmouse0 at ams0 mux 0
abtn0 at adb0 addr 7: brightness/volume/eject buttons
"battery" at macobio0 offset 0x0 not configured
"backlight" at macobio0 offset 0xf300 not configured
kiic1 at macobio0 offset 0x18000
iic2 at kiic1
wdc0 at macobio0 offset 0x1f000 irq 19: DMA
wd0 at wdc0 channel 0 drive 0: <SUNEAST SSD SE800 mSATA 256GB>
wd0: 16-sector PIO, LBA48, 244198MB, 500118192 sectors
atapiscsi0 at wdc0 channel 0 drive 1
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <LG, CD-ROM CRN-8245B, AHTA> removable
wd0(wdc0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2
cd0(wdc0:0:1): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2
audio0 at snapper0
ohci0 at pci1 dev 24 function 0 "Apple Pangea USB" rev 0x00: irq 27, version 1.0
ohci1 at pci1 dev 25 function 0 "Apple Pangea USB" rev 0x00: irq 28, version 1.0
usb0 at ohci0: USB revision 1.0
uhub0 at usb0 configuration 1 interface 0 "Apple OHCI root hub" rev 1.00/1.00 addr 1
usb1 at ohci1: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "Apple OHCI root hub" rev 1.00/1.00 addr 1
mpcpcibr2 at mainbus0 pci: uni-north
pci2 at mpcpcibr2 bus 0
"Apple Pangea FireWire" rev 0x00 at pci2 dev 14 function 0 not configured
gem0 at pci2 dev 15 function 0 "Apple Pangea GMAC" rev 0x00: irq 41, address 00:03:93:c7:d1:20
bmtphy0 at gem0 phy 0: BCM5221 100baseTX PHY, rev. 4
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
bootpath: /pci@f2000000/mac-io@17/ata-4@1f000/disk@0:/bsd
root on wd0a (1a3833755fe31710.a) swap on wd0b dump on wd0b
initializing kernel modesetting (RV200 0x1002:0x4C57 0x1002:0x4C57 0x00).
[drm] *ERROR* Unable to locate a BIOS ROM
radeondrm0: 1024x768, 16bpp
wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using wskbd0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
ugen0 at uhub1 port 2 "HCF USB V.90 Data/Fax Modem Apple internal modem" rev 1.10/1.00 addr 2