Please keep xen-devel in Cc and avoid top-posting.

On Fri, Sep 16, 2022 at 02:35:17PM +0200, Adam Szewczyk wrote:
> After trying to configure previously disabled iwm0 interface first those
> errors appears:
> 
> > iwm0: fw chunk addr Ox404000 len 712 failed to load
> > iwm0: could not load firmware chunk 0 (error 35)
> > iwm0: failed to load init firmware
> >
> Then after second attempt or if config is set in /etc/hostname.iwm0  during
> boot system panic:
> 
> > panic: kernel diagnostic assertion "sc->task_refs.r_refs == 0" failed:
> > file "/usr/src/sys/dev/pci/if_iwm.c", line 10352
> > Stopped at db_enter+0x10: popq %rbp
> >        TID        PID        UID        PRFLAGS        PFLAGS
> > CPU        COMMAND
> > * 19554    71630            0                   0x3                    0
> >         0K               ifconfig
> > db_enter at db_enter+0x10
> > panic(ffffffff81f1e289) at panic 0xbf
> > assert(ffffffff81f8dd81,ffffffff81f8a6db, 2870,ffffffff81f39e88) at
> > assert+0x25
> > iwm_init(ffff800000211048) at iwm_init+0x2c4
> > iwm_ioctl(ffff800000211048, 80206910, ffff800014bc88c0) at iwm ioctl+0xf9
> > ifioctl(fffffd802900d8c0, 8020699dffff800014bc88c0,ffff800014b1f7a8) at
> > ifioctly+0x92b
> > soo_ioctl(fffffd8030f e0b40,80206990 ,ffff800014bc88c0,ffff800014b1f7a8)
> > at soo_ioctl+0x161
> > sys_ioctl(ffff800014b1f7a8,ffff800014bc8900,ffff800014bc8a20) at
> > sys_ioctl+0x2c
> > syscall(ffff800014bc8a90) at syscall+0x374
> > Xsyscal10 at Xsyscall+Ox128
> > end of kernel
> > end trace frame: Ox7f7fffc3330, count: 5
> > https://www.openbsd.org/ddb.html describes the minimum info required in
> > bug reports. Insufficient info makes it difficult to find and fix bugs.
> > ddb{0}>
> >
> 
> pcidump returns:
> 
> > Domain /dev/pci0:
> >  0:0:0: Intel 82441FX
> > 0x0000: Vendor ID: 8086, Product ID: 1237
> > 0x0004: Command: 0004, Status: 0000
> > 0x0008: Class: 06 Bridge, Subclass: 00 Host,
> > Interface: 00, Revision: 02
> > 0x000c: BIST: 00, Header Type: 00, Latency Timer: 00,
> > Cache Line Size: 00
> > 0x0010: BAR empty (00000000)
> > 0x0014: BAR empty (00000000)
> > 0x0018: BAR empty (00000000)
> > 0x001c: BAR empty (00000000)
> > 0x0020: BAR empty (00000000)
> > 0x0024: BAR empty (00000000)
> > 0x0028: Cardbus CIS: 00000000
> > 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100
> > 0x0030: Expansion ROM Base Address: 00000000
> > 0x0038: 00000000
> > 0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00
> >  0:1:0: Intel 82371SB ISA
> > 0x0000: Vendor ID: 8086, Product ID: 7000
> > 0x0004: Command: 0004, Status: 0200
> > 0x0008: Class: 06 Bridge, Subclass: 01 ISA,
> > Interface: 00, Revision: 00
> > 0x000c: BIST: 00, Header Type: 80, Latency Timer: 00,
> > Cache Line Size: 00
> > 0x0010: BAR empty (00000000)
> > 0x0014: BAR empty (00000000)
> > 0x0018: BAR empty (00000000)
> > 0x001c: BAR empty (00000000)
> > 0x0020: BAR empty (00000000)
> > 0x0024: BAR empty (00000000)
> > 0x0028: Cardbus CIS: 00000000
> > 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100
> > 0x0030: Expansion ROM Base Address: 00000000
> > 0x0038: 00000000
> > 0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00
> >  0:1:1: Intel 82371SB IDE
> > 0x0000: Vendor ID: 8086, Product ID: 7010
> > 0x0004: Command: 0005, Status: 0280
> > 0x0008: Class: 01 Mass Storage, Subclass: 01 IDE,
> > Interface: 80, Revision: 00
> > 0x000c: BIST: 00, Header Type: 00, Latency Timer: 00,
> > Cache Line Size: 00
> > 0x0010: BAR empty (00000000)
> > 0x0014: BAR empty (00000000)
> > 0x0018: BAR empty (00000000)
> > 0x001c: BAR empty (00000000)
> > 0x0020: BAR io addr: 0x0000c200/0x0010
> > 0x0024: BAR empty (00000000)
> > 0x0028: Cardbus CIS: 00000000
> > 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100
> > 0x0030: Expansion ROM Base Address: 00000000
> > 0x0038: 00000000
> > 0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00
> >  0:1:3: Intel 82371AB Power
> > 0x0000: Vendor ID: 8086, Product ID: 7113
> > 0x0004: Command: 0004, Status: 0280
> > 0x0008: Class: 06 Bridge, Subclass: 80 Miscellaneous,
> > Interface: 00, Revision: 03
> > 0x000c: BIST: 00, Header Type: 00, Latency Timer: 00,
> > Cache Line Size: 00
> > 0x0010: BAR empty (00000000)
> > 0x0014: BAR empty (00000000)
> > 0x0018: BAR empty (00000000)
> > 0x001c: BAR empty (00000000)
> > 0x0020: BAR empty (00000000)
> > 0x0024: BAR empty (00000000)
> > 0x0028: Cardbus CIS: 00000000
> > 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100
> > 0x0030: Expansion ROM Base Address: 00000000
> > 0x0038: 00000000
> > 0x003c: Interrupt Pin: 01 Line: 0a Min Gnt: 00 Max Lat: 00
> >  0:2:0: XenSource Platform Device
> > 0x0000: Vendor ID: 5853, Product ID: 0001
> > 0x0004: Command: 0007, Status: 0000
> > 0x0008: Class: ff (unknown), Subclass: 80 (unknown),
> > Interface: 00, Revision: 01
> > 0x000c: BIST: 00, Header Type: 00, Latency Timer: 00,
> > Cache Line Size: 00
> > 0x0010: BAR io addr: 0x0000c000/0x0100
> > 0x0014: BAR mem prefetchable 32bit addr: 0xf0000000/0x01000000
> > 0x0018: BAR empty (00000000)
> > 0x001c: BAR empty (00000000)
> > 0x0020: BAR empty (00000000)
> > 0x0024: BAR empty (00000000)
> > 0x0028: Cardbus CIS: 00000000
> > 0x002c: Subsystem Vendor ID: 5853 Product ID: 0001
> > 0x0030: Expansion ROM Base Address: 00000000
> > 0x0038: 00000000
> > 0x003c: Interrupt Pin: 01 Line: 0b Min Gnt: 00 Max Lat: 00
> >  0:3:0: Bochs VGA
> > 0x0000: Vendor ID: 1234, Product ID: 1111
> > 0x0004: Command: 0007, Status: 0000
> > 0x0008: Class: 03 Display, Subclass: 00 VGA,
> > Interface: 00, Revision: 02
> > 0x000c: BIST: 00, Header Type: 00, Latency Timer: 00,
> > Cache Line Size: 00
> > 0x0010: BAR mem prefetchable 32bit addr: 0xf1000000/0x01000000
> > 0x0014: BAR empty (00000000)
> > 0x0018: BAR mem 32bit addr: 0xf2018000/0x00001000
> > 0x001c: BAR empty (00000000)
> > 0x0020: BAR empty (00000000)
> > 0x0024: BAR empty (00000000)
> > 0x0028: Cardbus CIS: 00000000
> > 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100
> > 0x0030: Expansion ROM Base Address: f2000000
> > 0x0038: 00000000
> > 0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00
> >  0:4:0: Intel 82801DB USB
> > 0x0000: Vendor ID: 8086, Product ID: 24cd
> > 0x0004: Command: 0006, Status: 0000
> > 0x0008: Class: 0c Serial Bus, Subclass: 03 USB,
> > Interface: 20, Revision: 10
> > 0x000c: BIST: 00, Header Type: 00, Latency Timer: 00,
> > Cache Line Size: 00
> > 0x0010: BAR mem 32bit addr: 0xf2019000/0x00001000
> > 0x0014: BAR empty (00000000)
> > 0x0018: BAR empty (00000000)
> > 0x001c: BAR empty (00000000)
> > 0x0020: BAR empty (00000000)
> > 0x0024: BAR empty (00000000)
> > 0x0028: Cardbus CIS: 00000000
> > 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100
> > 0x0030: Expansion ROM Base Address: 00000000
> > 0x0038: 00000000
> > 0x003c: Interrupt Pin: 04 Line: 05 Min Gnt: 00 Max Lat: 00
> >  0:6:0: NEC xHCI
> > 0x0000: Vendor ID: 1033, Product ID: 0194
> > 0x0004: Command: 0006, Status: 0010
> > 0x0008: Class: 0c Serial Bus, Subclass: 03 USB,
> > Interface: 30, Revision: 03
> > 0x000c: BIST: 00, Header Type: 00, Latency Timer: 00,
> > Cache Line Size: 00
> > 0x0010: BAR mem 64bit addr: 0x00000000f2010000/0x00004000
> > 0x0018: BAR empty (00000000)
> > 0x001c: BAR empty (00000000)
> > 0x0020: BAR empty (00000000)
> > 0x0024: BAR empty (00000000)
> > 0x0028: Cardbus CIS: 00000000
> > 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100
> > 0x0030: Expansion ROM Base Address: 00000000
> > 0x0038: 00000000
> > 0x003c: Interrupt Pin: 01 Line: 0b Min Gnt: 00 Max Lat: 00
> > 0x0090: Capability 0x11: Extended Message Signalled Interrupts (MSI-X)
> > Enabled: no; table size 16 (BAR 0:12288)
> > 0x0070: Capability 0x05: Message Signalled Interrupts (MSI)
> > Enabled: yes
> >  0:7:0: Intel AC 9560
> > 0x0000: Vendor ID: 8086, Product ID: a370
> > 0x0004: Command: 0006, Status: 0010
> > 0x0008: Class: 02 Network, Subclass: 80 Miscellaneous,
> > Interface: 00, Revision: 10
> > 0x000c: BIST: 00, Header Type: 80, Latency Timer: 00,
> > Cache Line Size: 00
> > 0x0010: BAR mem 64bit addr: 0x00000000f2014000/0x00004000
> > 0x0018: BAR empty (00000000)
> > 0x001c: BAR empty (00000000)
> > 0x0020: BAR empty (00000000)
> > 0x0024: BAR empty (00000000)
> > 0x0028: Cardbus CIS: 00000000
> > 0x002c: Subsystem Vendor ID: 8086 Product ID: 0034
> > 0x0030: Expansion ROM Base Address: 00000000
> > 0x0038: 00000000

None of the BARs are at 0x404000 which seems to be where OpenBSD is
trying to load the firmware?

I would have to look at the code to figure out exactly what it is
trying to do here (and why it fails).

Can you also paste the output from `lspci -v`?

Just to compare with what is OpenBSD is reporting.

> > 0x003c: Interrupt Pin: 01 Line: 05 Min Gnt: 00 Max Lat: 00
> > 0x00c8: Capability 0x01: Power Management
> > State: D0
> > 0x00d0: Capability 0x05: Message Signalled Interrupts (MSI)
> > Enabled: no
> > 0x0040: Capability 0x10: PCI Express
> > Max Payload Size: 128 / 128 bytes
> > Max Read Request Size: 512 bytes
> >
> 
> As for realtek can You send me some guide for using xl console or some
> marks for xl dump to find those keys?

I'm not sure about QubesOS, but you have to execute:

# xl debug-keys 'Mi'
# xl dmesg

>From the control domain.  I'm adding Marek because he can likely
provide guidance about how to execute those commands from the control
domain.

Regards, Roger.

Reply via email to