@Maijestro MartinW You can't remove the via-ac97 device as it is part of the VT8231 chip and is always emulated but if you don't load a driver for it then it should net generate interrutps. Actually the proper AmigaOs way to disable a driver is to copy it from Sys:Devs to Sys:Storage instead of renaming but both ways should work. The problem Maijestro referred to was before via-ac97 was emulated so without disabling the driver it hung because it got no reply from the non-existing device. But another problem existed that PCI interrupts were not connected to VT8231 so even other devices like network card did not work. Then I've implemented PCI interrupts to VT8231 which fixed the network card and implemented via-ac97 to get sound but that's independent of IRQ problems. The ptoblem with multiple devices freezing under MorphOS was only happening because level sensitive mode o PIC was not implemented in the old way MorphOS wanted to use it but that should not affect other guests that don't use that and we didn't see a problem with those before getting the gfx card in the picture. Maybe the occasional network related hang is the same but with a GPU generating more interrupts it happens sooner. Or there's something with interrupt handling but I don't know what and first I'd like to check with other guests and also on real hardware if lossible to make sure it's something with emulation end not a guest side issue.
There's also the patch that lowers the interrupt and raises again when an unserviced one is pending to generate an edge in case the OS did not notice or expects level sensitive interrupts that I've first posted as a work around for the MorphOS issue which could be tested if it helps with this issue. I've posted a link in post #787 it should be possible to Download mbox from that page and apply that to QEMU git master with git am -3 patch.mbox. It wasn't needed after the level sensitive mode was fixed in PIC emulation but maybe it could help with this issue ot at least should not make it worse so may worth a try just to see it' may be related to that part of the code.
Edit: There's a lot of things going on here so to avoid getting lost if you report some test result plase make sure to describe exactly what you tested, real hardware or emulated, what devices what settings or QEMU version and patches you've used so we know what the test shows exactly.
balaton wrote:@derfs At least we have something to start from but it's not clear what the network card IEQ would be shared with if you disabled the gfx card IRQ. Do you use USB or sound or just the network when it freezes? Does the same happen with Linux? Can you try to reproduce it wirh Linux too and see if that logs something. Maybe also check info pic output in QEMU monitor when it hangs.
I tried installing linux (the link you posted) however the network didnt work when trying to get updates/packages via online repositories during setup.
The following is for AmigaOS4.1 via QEMU Peg2
(qemu) info version
8.0.50v8.0.0-2316-gd145c0da22
(qemu)
Using the following QEMU command-line, and after removing the AOS sound and network drivers, the OS loads with no freezing.
(qemu) info network
rtl8139.0: index=0,type=nic,model=rtl8139,macaddr=52:54:00:12:34:56
\ net0: index=0,type=user,net=10.0.2.0,restrict=off
(qemu)
info pci (is the network card meant to have a BAR 6? seems strange)
(qemu) info pci
Bus 0, device 0, function 0:
Host bridge: PCI device 11ab:6460
PCI subsystem 1af4:1100
id ""
Bus 0, device 1, function 0:
Display controller: PCI device 1234:1111
PCI subsystem 1af4:1100
BAR0: 32 bit prefetchable memory at 0xffffffffffffffff [0x00fffffe].
BAR2: 32 bit memory at 0xffffffffffffffff [0x00000ffe].
id ""
Bus 0, device 2, function 0:
Ethernet controller: PCI device 10ec:8139
PCI subsystem 1af4:1100
IRQ 9, pin A
BAR0: I/O at 0xffffffffffffffff [0x00fe].
BAR1: 32 bit memory at 0xffffffffffffffff [0x000000fe].
BAR6: 32 bit memory at 0xffffffffffffffff [0x0003fffe].
id ""
Bus 0, device 12, function 0:
ISA bridge: PCI device 1106:8231
PCI subsystem 1af4:1100
id ""
Bus 0, device 12, function 1:
IDE controller: PCI device 1106:0571
PCI subsystem 1af4:1100
IRQ 14, pin A
BAR0: I/O at 0x1000 [0x1007].
BAR1: I/O at 0x100c [0x100f].
BAR2: I/O at 0x1010 [0x1017].
BAR3: I/O at 0x101c [0x101f].
BAR4: I/O at 0x1020 [0x102f].
id ""
Bus 0, device 12, function 2:
USB controller: PCI device 1106:3038
PCI subsystem 1af4:1100
IRQ 9, pin D
BAR4: I/O at 0x1040 [0x105f].
id ""
Bus 0, device 12, function 3:
USB controller: PCI device 1106:3038
PCI subsystem 1af4:1100
IRQ 9, pin D
BAR4: I/O at 0x1060 [0x107f].
id ""
Bus 0, device 12, function 4:
Bridge: PCI device 1106:8235
PCI subsystem 1af4:1100
id ""
Bus 0, device 12, function 5:
Audio controller: PCI device 1106:3058
PCI subsystem 1af4:1100
IRQ 9, pin C
BAR0: I/O at 0xffffffffffffffff [0x00fe].
BAR1: I/O at 0xffffffffffffffff [0x0002].
BAR2: I/O at 0xffffffffffffffff [0x0002].
id ""
Bus 0, device 12, function 6:
Class 1920: PCI device 1106:3068
PCI subsystem 1af4:1100
IRQ 9, pin C
id ""
Bus 0, device 0, function 0:
Host bridge: PCI device 11ab:6460
PCI subsystem 1af4:1100
id ""
Bus 0, device 1, function 0:
VGA controller: PCI device 1002:6811
PCI subsystem 1462:3050
IRQ 9, pin A
BAR0: 64 bit prefetchable memory at 0xc0000000 [0xcfffffff].
BAR2: 64 bit memory at 0xd0000000 [0xd003ffff].
BAR4: I/O at 0x1000 [0x10ff].
BAR6: 32 bit memory at 0xffffffffffffffff [0x0001fffe].
id ""
(qemu)
info pic
(qemu) info pic
Interrupt controller information not available for 7457_v1.2-powerpc-cpu.
pic1: irr=00 imr=2d isr=00 hprio=0 irq_base=08 rr_sel=1 elcr=00 fnm=0
pic0: irr=01 imr=f9 isr=00 hprio=0 irq_base=00 rr_sel=1 elcr=28 fnm=0
(qemu)
info qtree
(qemu) info qtree
bus: main-system-bus
type System
dev: ps2-mouse, id ""
gpio-out "" 1
dev: ps2-kbd, id ""
gpio-out "" 1
dev: mv64361-pcihost, id ""
index = 1 (0x1)
x-config-reg-migration-enabled = true
bypass-iommu = false
bus: pci.1
type PCI
dev: rtl8139, id ""
mac = "52:54:00:12:34:56"
netdev = "net0"
addr = 02.0
romfile = "efi-rtl8139.rom"
romsize = 262144 (0x40000)
rombar = 1 (0x1)
multifunction = false
x-pcie-lnksta-dllla = true
x-pcie-extcap-init = true
failover_pair_id = ""
acpi-index = 0 (0x0)
x-pcie-err-unc-mask = true
class Ethernet controller, addr 00:02.0, pci id 10ec:8139 (sub 1af4:1100)
bar 0: i/o at 0xffffffffffffffff [0xfe]
bar 1: mem at 0xffffffffffffffff [0xfe]
bar 6: mem at 0xffffffffffffffff [0x3fffe]
dev: bochs-display, id ""
vgamem = 16777216 (16 MiB)
edid = true
xres = 1280 (0x500)
yres = 800 (0x320)
xmax = 0 (0x0)
ymax = 0 (0x0)
refresh_rate = 0 (0x0)
addr = 01.0
romfile = ""
romsize = 4294967295 (0xffffffff)
rombar = 1 (0x1)
multifunction = false
x-pcie-lnksta-dllla = true
x-pcie-extcap-init = true
failover_pair_id = ""
acpi-index = 0 (0x0)
x-pcie-err-unc-mask = true
class Display controller, addr 00:01.0, pci id 1234:1111 (sub 1af4:1100)
bar 0: mem at 0xffffffffffffffff [0xfffffe]
bar 2: mem at 0xffffffffffffffff [0xffe]
dev: via-mc97, id ""
addr = 0c.6
romfile = ""
romsize = 4294967295 (0xffffffff)
rombar = 1 (0x1)
multifunction = false
x-pcie-lnksta-dllla = true
x-pcie-extcap-init = true
failover_pair_id = ""
acpi-index = 0 (0x0)
x-pcie-err-unc-mask = true
class Class 0780, addr 00:0c.6, pci id 1106:3068 (sub 1af4:1100)
dev: via-ac97, id ""
audiodev = "none"
addr = 0c.5
romfile = ""
romsize = 4294967295 (0xffffffff)
rombar = 1 (0x1)
multifunction = false
x-pcie-lnksta-dllla = true
x-pcie-extcap-init = true
failover_pair_id = ""
acpi-index = 0 (0x0)
x-pcie-err-unc-mask = true
class Audio controller, addr 00:0c.5, pci id 1106:3058 (sub 1af4:1100)
bar 0: i/o at 0xffffffffffffffff [0xfe]
bar 1: i/o at 0xffffffffffffffff [0x2]
bar 2: i/o at 0xffffffffffffffff [0x2]
dev: vt8231-pm, id ""
addr = 0c.4
romfile = ""
romsize = 4294967295 (0xffffffff)
rombar = 1 (0x1)
multifunction = false
x-pcie-lnksta-dllla = true
x-pcie-extcap-init = true
failover_pair_id = ""
acpi-index = 0 (0x0)
x-pcie-err-unc-mask = true
class Bridge, addr 00:0c.4, pci id 1106:8235 (sub 1af4:1100)
bus: i2c
type i2c-bus
dev: smbus-eeprom, id ""
address = 87 (0x57)
dev: vt82c686b-usb-uhci, id ""
bandwidth = 1280 (0x500)
maxframes = 128 (0x80)
addr = 0c.3
romfile = ""
romsize = 4294967295 (0xffffffff)
rombar = 1 (0x1)
multifunction = false
x-pcie-lnksta-dllla = true
x-pcie-extcap-init = true
failover_pair_id = ""
acpi-index = 0 (0x0)
x-pcie-err-unc-mask = true
class USB controller, addr 00:0c.3, pci id 1106:3038 (sub 1af4:1100)
bar 4: i/o at 0x1060 [0x107f]
bus: usb-bus.1
type usb-bus
dev: vt82c686b-usb-uhci, id ""
bandwidth = 1280 (0x500)
maxframes = 128 (0x80)
addr = 0c.2
romfile = ""
romsize = 4294967295 (0xffffffff)
rombar = 1 (0x1)
multifunction = false
x-pcie-lnksta-dllla = true
x-pcie-extcap-init = true
failover_pair_id = ""
acpi-index = 0 (0x0)
x-pcie-err-unc-mask = true
class USB controller, addr 00:0c.2, pci id 1106:3038 (sub 1af4:1100)
bar 4: i/o at 0x1040 [0x105f]
bus: usb-bus.0
type usb-bus
dev: via-ide, id ""
gpio-in "" 2
addr = 0c.1
romfile = ""
romsize = 4294967295 (0xffffffff)
rombar = 1 (0x1)
multifunction = false
x-pcie-lnksta-dllla = true
x-pcie-extcap-init = true
failover_pair_id = ""
acpi-index = 0 (0x0)
x-pcie-err-unc-mask = true
class IDE controller, addr 00:0c.1, pci id 1106:0571 (sub 1af4:1100)
bar 0: i/o at 0x1000 [0x1007]
bar 1: i/o at 0x100c [0x100f]
bar 2: i/o at 0x1010 [0x1017]
bar 3: i/o at 0x101c [0x101f]
bar 4: i/o at 0x1020 [0x102f]
bus: ide.1
type IDE
dev: ide-cd, id ""
drive = "ide1-cd0"
backend_defaults = "auto"
logical_block_size = 512 (512 B)
physical_block_size = 512 (512 B)
min_io_size = 0 (0 B)
opt_io_size = 0 (0 B)
discard_granularity = 512 (512 B)
write-cache = "auto"
share-rw = false
account-invalid = "auto"
account-failed = "auto"
rerror = "auto"
werror = "auto"
ver = "2.5+"
wwn = 0 (0x0)
serial = "QM00003"
model = ""
unit = 0 (0x0)
bus: ide.0
type IDE
dev: ide-hd, id ""
drive = "ide0-hd1"
backend_defaults = "auto"
logical_block_size = 512 (512 B)
physical_block_size = 512 (512 B)
min_io_size = 0 (0 B)
opt_io_size = 0 (0 B)
discard_granularity = 512 (512 B)
write-cache = "auto"
share-rw = false
account-invalid = "auto"
account-failed = "auto"
rerror = "auto"
werror = "auto"
ver = "2.5+"
wwn = 0 (0x0)
serial = "QM00002"
model = ""
cyls = 4063 (0xfdf)
heads = 16 (0x10)
secs = 63 (0x3f)
lcyls = 0 (0x0)
lheads = 0 (0x0)
lsecs = 0 (0x0)
bios-chs-trans = "lba"
rotation_rate = 0 (0x0)
unit = 1 (0x1)
dev: ide-hd, id ""
drive = "ide0-hd0"
backend_defaults = "auto"
logical_block_size = 512 (512 B)
physical_block_size = 512 (512 B)
min_io_size = 0 (0 B)
opt_io_size = 0 (0 B)
discard_granularity = 512 (512 B)
write-cache = "auto"
share-rw = false
account-invalid = "auto"
account-failed = "auto"
rerror = "auto"
werror = "auto"
ver = "2.5+"
wwn = 0 (0x0)
serial = "QM00001"
model = ""
cyls = 4161 (0x1041)
heads = 16 (0x10)
secs = 63 (0x3f)
lcyls = 0 (0x0)
lheads = 0 (0x0)
lsecs = 0 (0x0)
bios-chs-trans = "lba"
rotation_rate = 0 (0x0)
unit = 0 (0x0)
dev: vt8231-isa, id ""
gpio-in "pirq" 4
gpio-out "" 1
addr = 0c.0
romfile = ""
romsize = 4294967295 (0xffffffff)
rombar = 1 (0x1)
multifunction = true
x-pcie-lnksta-dllla = true
x-pcie-extcap-init = true
failover_pair_id = ""
acpi-index = 0 (0x0)
x-pcie-err-unc-mask = true
class ISA bridge, addr 00:0c.0, pci id 1106:8231 (sub 1af4:1100)
bus: isa.0
type ISA
dev: i8042, id ""
gpio-in "ps2-mouse-input-irq" 1
gpio-in "ps2-kbd-input-irq" 1
gpio-out "" 2
gpio-out "a20" 1
extended-state = true
kbd-throttle = false
kbd-irq = 1 (0x1)
mouse-irq = 12 (0xc)
dev: isa-fdc, id ""
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
unit = 0 (0x0)
drive = "floppy0"
backend_defaults = "auto"
logical_block_size = 512 (512 B)
physical_block_size = 512 (512 B)
min_io_size = 0 (0 B)
opt_io_size = 0 (0 B)
discard_granularity = 4294967295 (4 GiB)
write-cache = "auto"
share-rw = false
account-invalid = "auto"
account-failed = "auto"
drive-type = "288"
dev: isa-serial, id ""
index = 0 (0x0)
iobase = 760 (0x2f8)
irq = 4 (0x4)
dev: isa-parallel, id ""
index = 0 (0x0)
iobase = 888 (0x378)
irq = 7 (0x7)
chardev = "parallel0"
dev: vt8231-superio, id ""
dev: mc146818rtc, id ""
gpio-out "" 1
base_year = 0 (0x0)
iobase = 112 (0x70)
irq = 8 (0x8)
lost_tick_policy = "discard"
dev: i8257, id ""
base = 192 (0xc0)
page-base = 136 (0x88)
pageh-base = -1 (0xffffffffffffffff)
dshift = 1 (0x1)
dev: i8257, id ""
base = 0 (0x0)
page-base = 128 (0x80)
pageh-base = -1 (0xffffffffffffffff)
dshift = 0 (0x0)
dev: isa-pit, id ""
gpio-in "" 1
gpio-out "" 1
iobase = 64 (0x40)
dev: isa-i8259, id ""
gpio-in "" 8
gpio-out "" 1
iobase = 160 (0xa0)
elcr_addr = 1233 (0x4d1)
elcr_mask = 222 (0xde)
master = false
dev: isa-i8259, id ""
gpio-in "" 8
gpio-out "" 1
iobase = 32 (0x20)
elcr_addr = 1232 (0x4d0)
elcr_mask = 248 (0xf8)
master = true
dev: mv64361-pcibridge, id ""
addr = 00.0
romfile = ""
romsize = 4294967295 (0xffffffff)
rombar = 1 (0x1)
multifunction = false
x-pcie-lnksta-dllla = true
x-pcie-extcap-init = true
failover_pair_id = ""
acpi-index = 0 (0x0)
x-pcie-err-unc-mask = true
class Host bridge, addr 00:00.0, pci id 11ab:6460 (sub 1af4:1100)
dev: mv64361-pcihost, id ""
index = 0 (0x0)
x-config-reg-migration-enabled = true
bypass-iommu = false
bus: pci.0
type PCI
dev: vfio-pci, id ""
host = "0000:0b:00.0"
vf-token = "00000000-0000-0000-0000-000000000000"
sysfsdev = "/sys/bus/pci/devices/0000:0b:00.0"
x-pre-copy-dirty-page-tracking = "on"
display = "off"
xres = 0 (0x0)
yres = 0 (0x0)
x-intx-mmap-timeout-ms = 1100 (0x44c)
x-vga = true
x-req = true
x-igd-opregion = false
enable-migration = "auto"
x-no-mmap = false
x-balloon-allowed = false
x-no-kvm-intx = false
x-no-kvm-msi = false
x-no-kvm-msix = false
x-no-geforce-quirks = false
x-no-kvm-ioeventfd = false
x-no-vfio-ioeventfd = false
x-pci-vendor-id = 4098 (0x1002)
x-pci-device-id = 26641 (0x6811)
x-pci-sub-vendor-id = 4294967295 (0xffffffff)
x-pci-sub-device-id = 4294967295 (0xffffffff)
x-igd-gms = 0 (0x0)
x-nv-gpudirect-clique = 255 (0xff)
x-msix-relocation = "off"
addr = 01.0
romfile = ""
romsize = 4294967295 (0xffffffff)
rombar = 1 (0x1)
multifunction = true
x-pcie-lnksta-dllla = true
x-pcie-extcap-init = true
failover_pair_id = ""
acpi-index = 0 (0x0)
x-pcie-err-unc-mask = true
class VGA controller, addr 00:01.0, pci id 1002:6811 (sub 1462:3050)
bar 0: mem at 0xc0000000 [0xcfffffff]
bar 2: mem at 0xd0000000 [0xd003ffff]
bar 4: i/o at 0x1000 [0x10ff]
bar 6: mem at 0xffffffffffffffff [0x1fffe]
dev: mv64361-pcibridge, id ""
addr = 00.0
romfile = ""
romsize = 4294967295 (0xffffffff)
rombar = 1 (0x1)
multifunction = false
x-pcie-lnksta-dllla = true
x-pcie-extcap-init = true
failover_pair_id = ""
acpi-index = 0 (0x0)
x-pcie-err-unc-mask = true
class Host bridge, addr 00:00.0, pci id 11ab:6460 (sub 1af4:1100)
dev: mv64361, id ""
gpio-in "gpp" 32
gpio-out "sysbus-irq" 1
mmio ffffffffffffffff/0000000000010000
In Ranger, the VGA Controller (passthrough) and the Ethernet controller have the same interrupt line. The other devices differ in the Pin: value.
@derfs Were these values collected when it works or when it froze? Are you still have IRQ handler disabled for gfx so basically noting shuold use any interrupts now? If it works that way you can try enabling only two and see which combination causes problem. We know that anything involving network can freeze so you can test other combinations like usb+sound, gfx+sound, gfx+usb etc. to see if any combination is causing a freeze or it's related to one particluar driver.
After checking the docs looks like VT8231 has APIC which I don't think we emulate now but I don't know if it's used. I'd have to check if the regs are written, they are currently within the io range so likely could go unnoticed because of that. It does not help avoiding confusion that we have very similar acronyms in the same chip that handles PCI PIC APIC and ACPI so one has to be careful not to make typos.
@balaton Just to add a new one into the mix, I just recently had crashes related to storage device(s) with network and sound drivers disabled. It got worse and worse until in the end, OS4 could no longer read file systems and it froze.
I believe the errors I did get in the OS were interrupt related, but no logs or output or anything at the moment as I am still waiting for linux to install from DVD. I am still trying to see if this can be reproduced on linux, or if it behaves. Once I know that I will go back to OS4 and try to provide better feedback. Since I'm running from a self-built qemu from master i can try that patch too. As said, a lot of options to test now.
@derfs Were these values collected when it works or when it froze?
When it works Quote:
Are you still have IRQ handler disabled for gfx so basically noting shuold use any interrupts now?
I have disabled the gfx software using the interrupt in the OS via a tooltype. All interrupts are still there for each device. Quote:
If it works that way you can try enabling only two and see which combination causes problem. We know that anything involving network can freeze so you can test other combinations like usb+sound, gfx+sound, gfx+usb etc. to see if any combination is causing a freeze or it's related to one particluar driver.
I have not touched usb, so thats still going. The sound driver has been moved to Storage.
Everytime i enable the network driver the os freezes at the same point. Quote:
After checking the docs looks like VT8231 has APIC which I don't think we emulate now but I don't know if it's used. I'd have to check if the regs are written, they are currently within the io range so likely could go unnoticed because of that. It does not help avoiding confusion that we have very similar acronyms in the same chip that handles PCI PIC APIC and ACPI so one has to be careful not to make typos.
As the network card can be on bus.1 and the gfx card can be on bus.0 and still get the same interrupt seems strange.
Im assuming the PCI bus devices are tring to get unique IRQs assigned using VT8231, but if there is no APIC then it would muck that up?
I have disabled the gfx software using the interrupt in the OS via a tooltype. All interrupts are still there for each device.
Does that actually make any difference or what makes a difference is using network or not? Quote:
Everytime i enable the network driver the os freezes at the same point.
We already know that using the network d will freeze so that does not take us further. What do you mean by freeze at same point? Is that some identifiable point when it freezes related to some event happening or what? Also what I asked is to forget about the network for now and just remove -device rtl8139 and test other devices if they also cause a freeze together without the network to know it is related to the rtl8139 driver or not. Quote:
As the network card can be on bus.1 and the gfx card can be on bus.0 and still get the same interrupt seems strange.
Im assuming the PCI bus devices are tring to get unique IRQs assigned using VT8231, but if there is no APIC then it would muck that up?
If you check the Pegasos2 schematics you'll see that all INT lines from all PCI and AGP ports are connected together and the firmware programs the VT8231 to map all of these to IRQ9. We've checked that before and it's now emulated accordingly. I did not check APIC which I just realised might be needed when irq 25 was mentioned but I'm still not sure AmigaOS actually uses APIC but if it does that's not emulated currently. This could be verified by testing the same rtl8139 device with real hardware that I was also asking above. I'll check to see if anything accessses the APIC regs later when I'll have time but I'm not sure yet this would be the problem just some other thing to check.
Initially I could start up OK becuase the device driver was disabled in OS4 (moved to storage). I moved the driver back and did a soft reboot of AOS. All still OK. Now I go into sound prefs. I enable both the beep on error and the system startup wav file. I was able to press play on the beep sound several times without issue, but when I pressed play on the startup wav the sound did not play all the way to the end. At this point, my mouse could still move but as soon as I click the title bar of the sound prefs and try to move the window, I have a system freeze. (I have not changed the interrupt setting in my monitor tooltype as when I tried that yesterday GFX was very slow and laggy).
There is nothing of note in the debug output:
[bootmenu] No user input detected within wait loop
[bootmenu] Removed input handler
[bootmenu] PeekQualifier(): LMB is up, MMB is up, RMB is up
[bootmenu] Continuing normal boot sequence
[DOS] Starting DOS 54.112 -- Kernel debug level is 3
No CMI8738 found! :-(
CS4281 DRIVERINIT
No card present.
[VIA-AC97] Error: soft resume timed out!
No SOLO_ONE found! :-(
No SB128 found! :-(
No FM801 found! :-(
No Envy24 found! :-(
[Sound.c:532 ] Initialize() done.
This is all emulated, GPU passthrough: HD5450, Qemu Master from yesterday, no patches. I'm going to look into that now.
I was hoping that in the time it took for me to type all of that out and answer the door maybe the screen saver would have kicked in but it hasn't so I don't know if that means the system is totally frozen or it just hasn't reached the time for blanker yet.
I have also seen DSI errors from disk access as well but I haven't been able to capture any info on it yet.
I can confirm the same. I used the es1370 device (sb128 sound driver in AOS) and all was fine until i tried to play the test sound. I had set the debug output in sound prefs to full and got this up to the hard freeze.
Incidentally, I tried again to put my pssed-through device(s) onto the bus pci.0 and I was not able to. I don't get to workbench before the system freeze. But I think I'm right in saying you're using RadeonRX and I'm using RadeonHD so maybe there is an additional difference there. For now I can just live with needing to check my memory values if I add or remove a device. It's not really a big deal once you have the basic script done.
[EDIT] I also did not get anywhere with Linux. I got it installed to a virtual drive and I can boot to the command prompt. I can see from the boot messages that the graphical server is started but at no point do I get any output anywhere other than serial and if I login via serial and type "startx" I get told I don't have permission to do that. And I shouldn't need to anyway since a greeter should be running somewhere!
I don't have the memory bandwidth to dig into that today. Far too much of a heavy night last night for dealing with X-Window stuff
It's no north- or south bridge IRQ but the PowerPC CPU interrupt number. However, if I remember correctly, the AmigaOS HAL intentionally uses wrong numbers and adds an offset, to be able to distinguish external hardware and CPU interrupts just by the numbers, i.e. Interrupt 25 may be CPU external interrupt (vector 0x500) #9 and 30 is #14. OTOH I haven't had any access to the kernel sources since more than 15 years, and I only worked on the classic Amiga HAL parts of it (Zorro II/III, Zorro->PCI bridges, 60x CPUs, etc.), something might have changed, or even if not I may remember something wrong. In any case AmigaOS software, incl. drives, doesn't have low level access to something like interrupt lines or PIN numbers, only the kernel HAL does, for the AmigaOS drivers everything is just CPU interrupts.
All Amiga NG firmwares were at least changed by the AmigaOS kernel developers to make sure the AmigaOS kernel gets exactly what it needs from it, for some of them even most of the firmware was implemented by AmigaOS developers (IIRC ppcboot/u-boot didn't even have any GUI and all of that was implemented by the AmigaOS developers), the only exception is the Pegasos2 SmartFirmware, therefore it's to be expected that a lot doesn't work work on a Pegasos2, no matter if real hardware or emulation.
Incidentally, I tried again to put my pssed-through device(s) onto the bus pci.0 and I was not able to. I don't get to workbench before the system freeze. But I think I'm right in saying you're using RadeonRX and I'm using RadeonHD so maybe there is an additional difference there. For now I can just live with needing to check my memory values if I add or remove a device. It's not really a big deal once you have the basic script done.
Im using a Radeon HD - R9 270.
The difference i found was due to what was running at startup, as it was trying to use one of these devices and freezing straight away. I ran the script with just the sm501 to get a display, and then turned everything off, moved all network and sound devs files to storage, and then created the monitor file for the Radeon HD and set the interrupt tooltype to false.
Once i did that, the script with gfx card passthrough worked with no crashes.
OK so what we know now is that is should not be related to the network card driver as it happens with other devices sharing the interrupt so maybe it's just network and passed through gfx card happen to generate the most interrupts so the problem happens more often when these are used. Since it's not related to any driver we can exclude those end problem is likely in emulation or kernel level.
The handling of PCI interrupts was added in this series: https://patchew.org/QEMU/cover.1678188711.git.balaton@eik.bme.hu/ which is the final version that was accepted but this takes some shortcuts and only works with the setting everything sharing IRQ9. This is a simplified version of my original approach here: https://patchew.org/QEMU/cover.1678188711.git.balaton@eik.bme.hu/ that kept track of individual interrupts and may have worked better but people did not like the complexity and we got to the simpler version which still seemed to work in testing. Later an alternative approach was suggested here: https://patchew.org/QEMU/cover.1678105 ... 1.git.balaton@eik.bme.hu/ that returned to the original approach but relying on PCI addresses to identify sources rather than custom functions but it was too late in the release cycle to elaborate on that and nobody cared since.
The discussion and findings can be read at the above links and it also points to where and how this could be debugged further and what's the most likely place to fix it but I don't have time for it now so I'm posting it here in case somebody has time and wants to dig further into it. Since I don't have an easy way to reproduce it it eould also be a bit difficult for me to debug it now. I'd rather work on the boot loader first as that's something I at least have a clear path with and already made some progress with it so I'll finfish that first before trying to look at this which might take a few weeks so if anybody finds out something please let me know.
I'd like to add that even though this wasn't too far away I've already swapped out most of this from my brain so I'd have to reread the above and get back to it again too so not much better position to work on it than others (OK maybe I remember something about the devices emulation that I did before but other parts of QEMU I have to explore all the time too).
Running Qemu master + patch from mbox mentioned at #787.
I am able to bring up the OS with startup WAV enabled, networking enabled, all good. I was able to load AmiFTP, connect to my local NAS and download the latest SDK file which weighs in around 350MB. This would crash after the first screen update of the download previously. I was able to close out all of that and then run MACE Demo game with sound - the first time I've done that. Ignoring small performance issues that I'd probably chalk up to my poor choice of GPU, all good so far. The machine is still running in the background as I type this.
So, I don't know if that is the solution, but hopefully it gives a big clue as to what is going on.
I do still get a guru error when I start CodeBench. That's from a DSI Exception. I don't know if any of this is useful below. The difference now is that if i ignore the error I can close CodeBench and carry on.
Of course I need to continue to debug if I can but this is a good start. Interestingly I've still not been able to get any other OS to see the GPU yet. I'd be happier if Morph or Linux worked too.
Debug output from CodeBench crash:
kernel 54.30 (1.1.2021) Pegasos 2 release
Machine model: 5 (Pegasos II)
Dump of context at 0xEFD40000
Trap type: DSI exception
Machine State (raw): 0x0000D030
Machine State (verbose): [ExtInt on] [User] [IAT on] [DAT on]
Instruction pointer: in module dos.library.kmod+0x0001666C (0x01947B8C)
Crashed process: CodeBench Clock Process (0x65077090)
DSI verbose error description: Access not found in hash or BAT (page fault)
Access was a load operation
0: 00000000 5CAC3B20 6162002E 00000000 00000000 02014028 FFFFFFFF 00000000
8: 69355274 A58DC0E0 00000000 00000000 44842822 00000000 FFFFFFFF 65823DFC
16: 7FFFC798 69637038 00000000 20000000 5CAC3BB4 0000001D 65077090 6891617C
24: 6FF93180 44442848 6FFB7478 6FE3DBA0 6FEBA228 65077090 01966D94 00000000
CR: 84842822 XER: 20000000 CTR: FFFFFFF8 LR: 0194849C
DSISR: 40000000 DAR: A58DC0EC
Kernel command line: serial munnge debuglevel=3
Registers pointing to code:
r5 : native kernel module dos.library.kmod+0x006e2b08
r8 : module LOCALE:Languages/english-british.language at 0x69355274 (section 1 @ 0x250)
r16: module LIBS:locale.library at 0x7FFFC798 (section 0 @ 0x9774)
r23: module CodeBench at 0x6891617C (section 1 @ 0x158)
r30: native kernel module dos.library.kmod+0x00035874
ip : native kernel module dos.library.kmod+0x0001666c
lr : native kernel module dos.library.kmod+0x00016f7c
ctr: unknown (0xFFFFFFF8)
@MartinW Well at least we have a workaround. I'll wait for a few more people test it then I can try to submit it as a fix for 8.1 as the code freeze starts tomorrow so won't be able to rewrite this anyway until 8.1 is released. If this works I can think of a different fix or if the other approach would be better but if it does not cause noticable slow down then it could probably be good enough for now.
There are a lot of info on those links but if you're interested in QEMU internals then maybe an interesting read.
It doesn't seem to be completely fixed. I'm still getting a few guru's related to storage I think. But I'll need to dig into it. It really isn't unrealistic at this point that I could have things setup wrong in AOS as I'm no expert. In fact I'm decidedly new to it all.
Well, I'm sort of pleased to say that i don't think the DSI errors that I'm getting are anything to do with the rest of the hangs that we have previously been getting because I just got one while not running a passthrough GPU at all.
That makes this next question somewhat OT, but can anyone point me in the right direction on this error? There's probably not enough information here but you never know!
I'm at the point really of creating a completely new OS4 install and I need a bit of a dummies guide because I don't really know what file system I should be using or anything. On classic I just use PFS3AIO for everything and have never had a problem.
@MartinW I also think that the DSI errors are not related to the IRQ issue but there could well be multiple issues not just one, this is all rally new and still in development so nobody said it would be rock solid. But testing is reveals these problems so they can be fixed.
I'd like to see others who could reproduce the problem also check the patch for the IRQ issue and see if it helps. We still have a week or two to get bugfixes in QEMU 8.1.
For the DSI I don't think anybody could tell anything from that window which even does not show PPC regs but empty 68k emulator ones. If you see such a window always click write crash log on bottom right and post the whole log as @derfs did. Maybe also helps if you're running with debug kernel (just change kernel to kernel.debug in Kicklayout). A DSI is a Data Storage Interrupt exception which happens when something accesses unmapped memory like when dereferencing a wrong pointer. So the error that broke the pointer likely happened before this error so it may be a bit diffucult to find out where and likely needs some knowledge of the coda where this happens but more detailed info on that should be in the crash log so make sure to collect it for these crashes. (I don't remember if it asks for location or just puts it in RAM: but you should be able to find the log somewhere.)
Its really not that much you can see from general tab, all interesting stuff is in Disassembly, Memory Dump and Stack Trace. the GPR0- GPR031 are also interesting. you probably won’t get anything interesting the stack trace, as its likely the filesystem has not have any debug symbols.
(NutsAboutAmiga)
Basilisk II for AmigaOS4 AmigaInputAnywhere Excalibur and other tools and apps.
I did have a feeling I probably wasn't posting enough information there, sorry!
From what I can gather errors like those are not uncommon at all across every kind of machine from emulated to X5000 so I will not take too much notice for now.
And of course I understand that this is very "bleeding edge" so I totally accept there will be issues. No problems there. Honestly, if the net result of all of this is that it can't be made to fully work then, hey, we tried. But it's not looking like that will be the case.
I'll probably go quiet on the topic a bit now unless anyone wants anything specific from me. I need to do some more general stuff like get my setup tidied up. On that note, I may see if I can get my RX580 working but I have a feeling that will be problematic since it has 8GB of video ram but I'm going to see if I can somehow force the OS to see it as a smaller region. Not today though.
it pop up when something has gone really wrong, reading or writing outside of allocated memory, when you get this error in the filesystem, that’s probably a well tested part of the OS, you bet that something was over written or corrupted. Its probably due to your configuration, but as its in the filesystem, it can be due to some corrupt data on the disk as well, that causes code to do unexpected things, FastFileSystem is not the most error tolerant filesystems.
(NutsAboutAmiga)
Basilisk II for AmigaOS4 AmigaInputAnywhere Excalibur and other tools and apps.