On Fri, 16 Sep 2016 13:01:46 +0200
Gerd Hoffmann <[email protected]> wrote:
> virtio-pci calls pci_enable_{io,mem}bar with the bar number,
> but the functions expect the bar base register offset.
>
> Reported-by: Igor Mammedov <[email protected]>
> Signed-off-by: Gerd Hoffmann <[email protected]>
Fixes issue for me
Tested-by: Igor Mammedov <[email protected]>
> ---
> src/hw/virtio-pci.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/hw/virtio-pci.c b/src/hw/virtio-pci.c
> index 8efc826..e5c2c33 100644
> --- a/src/hw/virtio-pci.c
> +++ b/src/hw/virtio-pci.c
> @@ -449,7 +449,7 @@ void vp_init_simple(struct vp_device *vp, struct
> pci_device *pci)
> switch (vp_cap->mode) {
> case VP_ACCESS_IO:
> {
> - u32 addr = pci_enable_iobar(pci, vp_cap->bar);
> + u32 addr = pci_enable_iobar(pci, base);
> if (!addr)
> return;
> vp_cap->ioaddr = addr + offset;
> @@ -458,7 +458,7 @@ void vp_init_simple(struct vp_device *vp, struct
> pci_device *pci)
> }
> case VP_ACCESS_MMIO:
> {
> - void *addr = pci_enable_membar(pci, vp_cap->bar);
> + void *addr = pci_enable_membar(pci, base);
> if (!addr)
> return;
> vp_cap->memaddr = addr + offset;
_______________________________________________
SeaBIOS mailing list
[email protected]
https://www.coreboot.org/mailman/listinfo/seabios