[SeaBIOS] [PATCH] virtio: add struct vp_device
kevin at koconnor.net
Thu Jun 25 15:10:39 CEST 2015
On Thu, Jun 25, 2015 at 10:17:21AM +0200, Gerd Hoffmann wrote:
> For virtio 1.0 support we will need more state than just the (legacy
> mode) ioaddr for each virtio-pci device. Prepare for that by adding
> a new struct for it. For now it carries the ioaddr only.
It sounds like this patch is in preparation for some other patches.
It would help to see those other patches as well.
> -u16 vp_init_simple(u16 bdf)
> +struct vp_device *vp_init_simple(u16 bdf)
> - u16 ioaddr = pci_config_readl(bdf, PCI_BASE_ADDRESS_0) &
> + struct vp_device *vp = malloc_low(sizeof(*vp));
This moves the ioaddr from "fseg" memory to "low" memory. Is the
ioaddr something that is going to change during runtime in the future,
or is this change because some other state in 'vp_device' requires
read/write support at runtime?
More information about the SeaBIOS