On Mon, Jul 20, 2020 at 8:38 AM Taylor R Campbell <riastr...@netbsd.org> wrote:
> >
> > I am planning to submit PR once I will retest the driver with the latest
> > images. Actually, it may not be amd64 specific after all. Crash happens
> > during boot on match function, likely newer graphics are unsupported and
> > triggers some kassert?
>
> Can't say without the specific kassert (and ideally stack trace too).
> I don't see anything obvious in viadrm_match that would be
> problematic.

After a bit more investigation, yes, it is kassert (kernel diagnostic
assertion "viadrm_pci_ids[i].subvendor == PCI_ANY_ID" ), doesn't
matter amd64/i386. The cause seems pretty obvious: viadrv_PCI_IDS
doesn't include some chrome graphics like 0x7122 from VX900 or 0x122
from VX800, thus subvendor value is 0 by default, PCI_ANY_ID is 1 on
the other hand, if I am not mistaken. Adding 0x7122 to the list allows
viadrmums to attach and boot, but with some errors in the logs.

Crash log:
[   1.2755067] vga0 at pci0 dev 1 function 0: VIA Technologies VX900
Graphics [Chrome9 HD] (rev. 0x00)
[   1.2755067] wsdisplay0 at vga0 kbdmux 1
[   1.2755067] wsmux1: connecting to wsdisplay0
[   1.2755067] panic: kernel diagnostic assertion
"viadrm_pci_ids[i].subvendor == PCI_ANY_ID" failed: file
"/home/andriusv/workspace/netbsd-src/sys/e
[   1.2755067] cpu0: Begin traceback...
[   1.2755067] vpanic() at netbsd:vpanic+0x152
[   1.2755067] __x86_indirect_thunk_rax() at
netbsd:__x86_indirect_thunk_rax
[   1.2755067] viadrm_lookup.isra.0() at
netbsd:viadrm_lookup.isra.0+0xf0
[   1.2755067] viadrm_match() at netbsd:viadrm_match+0x1e
[   1.2755067] mapply() at netbsd:mapply+0x3f
[   1.2755067] config_search_loc() at netbsd:config_search_loc+0xfd
[   1.2755067] config_found_sm_loc() at
netbsd:config_found_sm_loc+0x2b
[   1.2755067] config_attach_loc() at netbsd:config_attach_loc+0x182
[   1.2755067] pci_probe_device() at netbsd:pci_probe_device+0x574
[   1.2755067] pci_enumerate_bus() at netbsd:pci_enumerate_bus+0x1b7
[   1.2755067] pcirescan() at netbsd:pcirescan+0x4e
[   1.2755067] pciattach() at netbsd:pciattach+0x186
[   1.2755067] config_attach_loc() at netbsd:config_attach_loc+0x182
[   1.2755067] mp_pci_scan() at netbsd:mp_pci_scan+0xa4
[   1.2755067] amd64_mainbus_attach() at
netbsd:amd64_mainbus_attach+0x237
[   1.2755067] mainbus_attach() at netbsd:mainbus_attach+0x83
[   1.2755067] config_attach_loc() at netbsd:config_attach_loc+0x182
[   1.2755067] cpu_configure() at netbsd:cpu_configure+0x38
[   1.2755067] main() at netbsd:main+0x2ec
[   1.2755067] cpu0: End traceback...
[   1.2755067] fatal breakpoint trap in supervisor mode
[   1.2755067] trap type 1 code 0 rip 0xffffffff80221a25 cs 0x8 rflags
0x202 cr2 0 ilevel 0x8 rsp 0xffffffff81d028b0
[   1.2755067] curlwp 0xffffffff8188d740 pid 0.0 lowest kstack
0xffffffff81cfd2c0
Stopped in pid 0.0 (system) at  netbsd:breakpoint+0x5:  leave
breakpoint() at netbsd:breakpoint+0x5
vpanic() at netbsd:vpanic+0x152
__x86_indirect_thunk_rax() at netbsd:__x86_indirect_thunk_rax
viadrm_lookup.isra.0() at netbsd:viadrm_lookup.isra.0+0xf0
viadrm_match() at netbsd:viadrm_match+0x1e
mapply() at netbsd:mapply+0x3f
config_search_loc() at netbsd:config_search_loc+0xfd
config_found_sm_loc() at netbsd:config_found_sm_loc+0x2b
config_attach_loc() at netbsd:config_attach_loc+0x182
pci_probe_device() at netbsd:pci_probe_device+0x574
pci_enumerate_bus() at netbsd:pci_enumerate_bus+0x1b7
pcirescan() at netbsd:pcirescan+0x4e
pciattach() at netbsd:pciattach+0x186
config_attach_loc() at netbsd:config_attach_loc+0x182
mp_pci_scan() at netbsd:mp_pci_scan+0xa4
amd64_mainbus_attach() at netbsd:amd64_mainbus_attach+0x237
mainbus_attach() at netbsd:mainbus_attach+0x83
config_attach_loc() at netbsd:config_attach_loc+0x182
cpu_configure() at netbsd:cpu_configure+0x38
main() at netbsd:main+0x2ec
ds          28c0
es          2870
fs          28b0
gs          10
rdi         8
rsi         0
rbp         ffffffff81d028b0
rbx         104
rdx         1
rcx         8
rax         1
r8          104
r9          0
r10         ffffffffffff
r11         0
r12         ffffffff81348170    ostype+0xa90
r13         ffffffff81d028f8
r14         ffffffff81d02b7c
r15         0
rip         ffffffff80221a25    breakpoint+0x5
cs          8
rflags      202
rsp         ffffffff81d028b0
ss          10
netbsd:breakpoint+0x5:  leave

Reply via email to