A few more soundcards arrived, but none of them worked. In fact, besides the video card and the SATA controller in legacy IDE mode, no other PCIe/PCI device would work (tried even some network and USB cards).
Even tried with the Voodoo4 in the expresscard slot, and the network card shoved into the MXM slot (videocard worked, network card didn't).
In device manager, all PCI/PCI bridges would be detected, if a new hardware was added, it would be detected, but as soon as a driver was installed, it would just throw an error 10, like this:
The attachment 1A.jpg is no longer available
Under XP/Linux, everything was fine. Spent quite a while investigating this, looking at BARs, MMIO windows, IRQs etc, and trying various things. Couldn't find anything wrong.
This was with 98 installed in APM mode, so I went the ACPI route (which I already knew was partially broken).
In ACPI mode, it would do this:
The attachment 1B.jpg is no longer available
and say that :
"This device is not working properly because the BIOS in your computer is reporting the resource for the device incorrectly (Code 9)".
No other PCIe/PCI device would be detected. Tried various things again, and ended up looking at how the PCI resources are exposed to the OS via ACPI. Tweaked that.. until I got 98 detecting PCI devices, but broke XP and Linux:
[ 0.141099] acpi PNP0A08:00: _OSC: OS now controls [PCIeHotplug PME AER PCIeCapability LTR DPC]
[ 0.141212] acpi PNP0A08:00: [Firmware Info]: MMCONFIG for domain 0000 [bus 00-3f] only partially covers this bridge
[ 0.171713] pci 0000:02:00.0: can't claim BAR 0 [mem 0xe0000000-0xe7ffffff]: no compatible bridge window
[ 0.171827] pci 0000:02:00.0: can't claim BAR 2 [io 0xf000-0xf0ff]: no compatible bridge window
[ 0.171947] pci 0000:00:19.0: can't claim BAR 2 [io 0xefe0-0xefff]: no compatible bridge window
[ 0.172048] pci 0000:00:1f.2: can't claim BAR 0 [io 0xefb8-0xefbf]: no compatible bridge window
[ 0.172163] pci 0000:00:1f.2: can't claim BAR 1 [io 0xefac-0xefaf]: no compatible bridge window
[ 0.172277] pci 0000:00:1f.2: can't claim BAR 2 [io 0xefb0-0xefb7]: no compatible bridge window
[ 0.172389] pci 0000:00:1f.2: can't claim BAR 3 [io 0xefa8-0xefab]: no compatible bridge window
[ 0.172498] pci 0000:00:1f.2: can't claim BAR 4 [io 0xefd0-0xefdf]: no compatible bridge window
[ 0.172609] pci 0000:00:1f.2: can't claim BAR 5 [io 0xefc0-0xefcf]: no compatible bridge window
[ 0.172720] pci 0000:00:1f.3: can't claim BAR 4 [io 0x0400-0x041f]: no compatible bridge window
[ 0.187668] pci 0000:00:01.0: BAR 13: no space for [io size 0x1000]
[ 0.187762] pci 0000:00:01.0: BAR 13: failed to assign [io size 0x1000]
[ 0.187854] pci 0000:00:19.0: BAR 2: no space for [io size 0x0020]
[ 0.187949] pci 0000:00:19.0: BAR 2: trying firmware assignment [io 0xefe0-0xefff]
[ 0.188064] pci 0000:00:19.0: BAR 2: assigned [io 0xefe0-0xefff]
[ 0.188161] pci 0000:00:1f.3: BAR 4: no space for [io size 0x0020]
[ 0.188255] pci 0000:00:1f.3: BAR 4: trying firmware assignment [io 0x0400-0x041f]
etc.
Then fixed it for other OS-es as well. TL;DR version:
-re-implemented the root-bridge resource set (MCRS) and made _CRS a method that simply returns it instead of doing run-time calculations (seems to work just fine with any OS/DRAM size).
-split the ISA/PCI I/O aperture into two WordIO descriptors
-dedicated IO (Decode16, 0x0CF8, 0x0CF8, 0x01, 0x08) descriptor
-replaced several regions with one 256 MB block at E000 0000h so large (>128 MB) BARs can be mapped cleanly under Linux
-kept a separate 128 MB prefetchable window at D800 0000h.
There was also the issue that SeaBIOS would load the VGA ROM right into one of those regions. That's also fixed now.
acpi PNP0A08:00: ignoring host bridge window [mem 0x000c8000-0x000cbfff window] (conflicts with Video ROM [mem 0x000c0000-0x000c9fff])
Now PCIe/PCI works under 98/XP/Linux with ACPI.
I had the SATA controller initialized in IDE Legacy mode (IRQ 14 and 15). This now caused an issue under 98 with ACPI (resource conflict for IRQ 15), and would not detect the ODD anymore. I changed the controller initialization from IDE Legacy to IDE Native mode. 98 would fail to boot, but using R. Loew's PTCHSATA fixed this. Currently, the 98 installation is pretty vanilla, only using PTCHSATA and PATCHMEM.
The USB controllers (the southbridge ones) now work under 98. Shutdown also works now from 98 (and it actually powers off the machine), but it needs a bit more work as after switching to IDE native and installing PTCHSATA, it throws an error at shutdown: "The volume that was removed had open files on it. Next time please check first to see if the volume can really be removed. Press any key to continue".
Also completely disabled from the BIOS the on board audio.
The attachment S1.png is no longer available
The attachment S2.png is no longer available