Date: Sun, 13 Sep 2015 04:39:16 +0200 From: Marius Strobl <marius@alchemy.franken.de> To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Cc: Alexey Dokuchaev <danfe@FreeBSD.org>, "freebsd-sparc64@freebsd.org" <freebsd-sparc64@freebsd.org> Subject: Re: PCI range checking under qemu-system-sparc64 Message-ID: <20150913023916.GB7862@alchemy.franken.de> In-Reply-To: <55EC4C43.9050700@ilande.co.uk> References: <557DA6D5.4070800@FreeBSD.org> <557DCF54.7020606@ilande.co.uk> <A88F6A52-FA8A-4669-A2D6-23374F8E26BB@FreeBSD.org> <557DF887.20508@ilande.co.uk> <20150906110308.GA68829@FreeBSD.org> <55EC2E8D.4020803@ilande.co.uk> <20150906124859.GA14919@FreeBSD.org> <55EC3949.1020508@ilande.co.uk> <20150906134245.GA21410@FreeBSD.org> <55EC4C43.9050700@ilande.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Sep 06, 2015 at 03:22:59PM +0100, Mark Cave-Ayland wrote: > On 06/09/15 14:42, Alexey Dokuchaev wrote: > > > On Sun, Sep 06, 2015 at 02:02:01PM +0100, Mark Cave-Ayland wrote: > >> I wonder if the problem is just that suitable console drivers can't > >> be found? > >> > >>> ebus0: <su> addr 0x14000003f8-0x14000003ff irq 43 (no driver attached) > >>> ebus0: <kb_ps2> addr 0x1400000060-0x1400000067 (no driver attached) > >> > >> The QEMU hardware model is still a WIP and the serial port currently > >> uses a 16550A UART (su) device rather than ESCC found in real hardware, > >> while the keyboard is a simple PS2 keyboard. > >> > >> If you alter your kernel configuration to include building of the su and > >> ps2 driver modules, does this help with detection of the serial and > >> keyboard devices and if so, does boot progress any further at all? > > > > Hmm, I'm running GENERIC, so it looks like everything should be already > > there, no? At least by looking at ./conf/files.sparc64 I don't see what > > else ("device ???") should I add to it to get su/kb_ps2 support... > > I'm afraid I'm not really a BSD person, but a quick browse at the source > on github suggests you need these drivers: > > https://github.com/freebsd/freebsd/blob/master/sys/dev/uart/uart_bus_ebus.c > > https://github.com/freebsd/freebsd/blob/master/sys/dev/atkbdc/atkbdc_ebus.c > > It also looks like you'd need to hack atkbdc_ebus.c to allow "kb_ps2" as > a device name rather than just trying to match on "8042", although this > could potentially be fixed by renaming the device in OpenBIOS moving > forwards as long as it doesn't cause any regressions. > Simple renaming in OpenBIOS wouldn't be the right fix either and neither change would make things work. On real machines for PS/2 there's a "8042" node on the EBus and _beneath_ that "8042" node there's a "kb_ps2" as well as a "kdmouse" one. "8042" has _two_ _identical_ addresses assigned, which its children index via their "reg" properties. The interrupt also goes onto the "8042" node. See the example of a Sun AXe board below. *Please* emulate real machines with QEMU. This specifically also applies to ARM hardware. Marius Node 0xf008cf88: ebus interrupt-map: 00 00 00 14 00 38 03 f8 00 00 00 01 f0 08 a7 38 00 00 00 1c 00 00 00 14 00 30 00 60 00 00 00 01 f0 08 a7 38 00 00 00 29 00 00 00 14 00 30 00 60 00 00 00 02 f0 08 a7 38 00 00 00 2a 00 00 00 14 00 36 02 f8 00 00 00 01 f0 08 a7 38 00 00 00 1d 00 00 00 14 00 40 00 00 00 00 00 01 f0 08 a7 38 00 00 00 2b 00 00 00 14 00 34 02 78 00 00 00 01 f0 08 a7 38 00 00 00 22 00 00 00 14 00 72 40 00 00 00 00 01 f0 08 a7 38 00 00 00 25 00 00 00 14 00 30 00 2e 00 00 00 01 f0 08 a7 38 00 00 00 04 00 00 00 14 00 32 03 f0 00 00 00 01 f0 08 a7 38 00 00 00 27 00 00 00 14 00 20 00 00 00 00 00 01 f0 08 a7 38 00 00 00 23 00 00 00 14 00 20 00 00 00 00 00 02 f0 08 a7 38 00 00 00 24 00 00 00 14 00 60 00 00 00 00 00 01 f0 08 a7 38 00 00 00 28 00 00 00 14 00 60 00 00 00 00 00 02 f0 08 a7 38 00 00 00 1e 00 00 00 14 00 60 00 00 00 00 00 03 f0 08 a7 38 00 00 00 1f interrupt-map-mask: 00 00 00 1f 00 ff ff ff 00 00 00 03 #interrupt-cells: 00 00 00 01 ranges: 00 00 00 10 00 00 00 00 82 01 08 10 00 00 00 00 f0 00 00 00 01 00 00 00 00 00 00 14 00 00 00 00 82 01 08 14 00 00 00 00 f1 00 00 00 00 80 00 00 reg: 00 01 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82 01 08 10 00 00 00 00 f0 00 00 00 00 00 00 00 01 00 00 00 82 01 08 14 00 00 00 00 f1 00 00 00 00 00 00 00 00 80 00 00 #size-cells: 00 00 00 01 #address-cells: 00 00 00 02 name: 65 62 75 73 00 'ebus' max-latency: 00 00 00 19 min-grant: 00 00 00 0a class-code: 00 06 80 00 revision-id: 00 00 00 01 devsel-speed: 00 00 00 01 fast-back-to-back: device-id: 00 00 10 00 vendor-id: 00 00 10 8e <...> Node 0xf008fb5c: 8042 interrupts: 00 00 00 01 00 00 00 02 #size-cells: 00 00 00 00 #address-cells: 00 00 00 01 reg: 00 00 00 14 00 30 00 60 00 00 00 08 00 00 00 14 00 30 00 60 00 00 00 08 device_type: 38 30 34 32 00 '8042' name: 38 30 34 32 00 '8042' model: 49 4e 54 43 2c 38 30 63 34 32 00 'INTC,80c42' Node 0xf00909a4: kb_ps2 reg: 00 00 00 00 language: 65 6e 00 'en' compatible: 70 6e 70 50 4e 50 2c 33 30 33 00 'pnpPNP,303' port-b-ignore-cd: port-a-ignore-cd: keyboard: device_type: 73 65 72 69 61 6c 00 'serial' name: 6b 62 5f 70 73 32 00 'kb_ps2' Node 0xf009314c: kdmouse reg: 00 00 00 01 compatible: 70 6e 70 50 4e 50 2c 66 30 33 00 'pnpPNP,f03' port-b-ignore-cd: port-a-ignore-cd: mouse: device_type: 73 65 72 69 61 6c 00 'serial' name: 6b 64 6d 6f 75 73 65 00 'kdmouse'
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150913023916.GB7862>