Re: PCI range checking under qemu-system-sparc64

Marius Strobl <[email protected]>
Newsgroups gmane.os.freebsd.devel.sparc
Message-ID <[email protected]>
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'
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-sparc64
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.