qtest and pci mmio?
Hi,
Trying to add something real to the new ehci test. Having trouble accessing the ehci mmio registers. uhci io registers are working fine. Current patch attached, which just does a register dump to stderr. uhci looks sane. ehci shouldn't be all zeros. Anyone has a clue?
thanks,
Gerd
Quoted 1 line
From
a4cc34ec95c50f43d328e1a453712b011df9ad00Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <[email protected]>
Date: Wed, 7 May 2014 16:39:11 +0200
Subject: [PATCH] [wip] ehci/uhci test
--- tests/Makefile | 4 ++- tests/usb-hcd-ehci-test.c | 79 ++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 78 insertions(+), 5 deletions(-)
tests/Makefile +3 -1
@@ -152,6 +152,8 @@ gcov-files-i386-y += hw/pci-bridge/ioh3420.c check-qtest-i386-y += tests/usb-hcd-ehci-test$(EXESUF) gcov-files-i386-y += hw/usb/hcd-ehci.c gcov-files-i386-y += hw/usb/hcd-uhci.c +gcov-files-i386-y += hw/usb/dev-hid.c +gcov-files-i386-y += hw/usb/dev-storage.c check-qtest-x86_64-y = $(check-qtest-i386-y) gcov-files-i386-y += i386-softmmu/hw/timer/mc146818rtc.c gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y))
@@ -307,7 +309,7 @@ tests/ac97-test$(EXESUF): tests/ac97-test.o tests/es1370-test$(EXESUF): tests/es1370-test.o tests/intel-hda-test$(EXESUF): tests/intel-hda-test.o tests/ioh3420-test$(EXESUF): tests/ioh3420-test.o -tests/usb-hcd-ehci-test$(EXESUF): tests/usb-hcd-ehci-test.o +tests/usb-hcd-ehci-test$(EXESUF): tests/usb-hcd-ehci-test.o $(libqos-pc-obj-y) tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_helper.o # QTest rules
tests/usb-hcd-ehci-test.c +75 -4
101 lines not on this page · raw message
Signature · 1 line
1.8.3.1
Il 07/05/2014 18:06, Gerd Hoffmann ha scritto:
Quoted 10 lines
Hi,
Trying to add something real to the new ehci test. Having trouble accessing the ehci mmio registers. uhci io registers are working fine. Current patch attached, which just does a register dump to stderr. uhci looks sane. ehci shouldn't be all zeros. Anyone has a clue?
thanks,
Gerd
tests/libqos/pci.c +1 -1
@@ -103,7 +103,7 @@ void qpci_config_writew(QPCIDevice *dev, uint8_t offset, uint16_t value)void qpci_config_writel (QPCIDevice *dev,uint8_t offset,uint32_t value) { - dev->bus->config_writew (dev->bus, dev->devfn, offset, value); + dev->bus->config_writel (dev->bus, dev->devfn, offset, value); }
This should help. :)
Re. how to find it, I modified the -qtest-log option to use /dev/tty instead of /dev/null (there was a patch to add a QTEST_LOG environment variable...), and the BAR sizing looked a bit suspicious:
[R +0.023561] outl 0xcf8 0x8000ef10
[S +0.023567] OK
[R +0.023584] outw 0xcfc 0xffff
[S +0.024013] OK
[R +0.024036] outl 0xcf8 0x8000ef10
[S +0.024043] OK
[R +0.024061] inl 0xcfc
[S +0.024068] OK 0xf000
[R +0.024086] outl 0xcf8 0x8000ef10
[S +0.024093] OK
[R +0.024110] outw 0xcfc 0x0
[S +0.024519] OK
Paolo