Get rid of PCI register size map
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -4,10 +4,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#define QEMU_PCI_SERIAL_MAGIC 0x1234
|
||||
|
||||
typedef struct {
|
||||
uint32_t _magic;
|
||||
uint16_t iobase;
|
||||
int lockstate;
|
||||
} QemuPciSerialDev;
|
||||
|
||||
Reference in New Issue
Block a user