Get rid of PCI register size map

This commit is contained in:
2025-11-29 00:08:31 +01:00
parent a52dc89f9f
commit 436f29bec9
5 changed files with 53 additions and 61 deletions

View File

@@ -158,14 +158,13 @@ void pci_qemu_pci_serial_init(void) {
return;
}
uint32_t bar0 = pci_read(dev, PCI_BAR0);
uint32_t bar0 = pci_read32(dev, PCI_BAR0);
LOG("pci", "QEMU_PCI_SERIAL bar0=0x%x\n", bar0);
uint16_t iobase = bar0 & 0xFFFFFFFC;
LOG("pci", "QEMU_PCI_SERIAL iobase=0x%x\n", iobase);
QEMU_PCI_SERIAL_DEV._magic = QEMU_PCI_SERIAL_MAGIC;
QEMU_PCI_SERIAL_DEV.iobase = iobase;
QEMU_PCI_SERIAL_DEV.lockstate = -1;