[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] x86/EFI: simplify PCI option retrieval
While putting together the kernel side of this I realized that c/s 26397:d9c7b82aa7b1 went a little too far in requiring a buffer for the option ROM contents - all that is really needed is handing Dom0 physical address and size of the data block. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> --- a/xen/arch/x86/efi/runtime.c +++ b/xen/arch/x86/efi/runtime.c @@ -189,16 +189,9 @@ int efi_get_info(uint32_t idx, union xen info->pci_rom.vendor == ent->vendor && info->pci_rom.devid == ent->devid ) { - int rc = 0; - - if ( info->pci_rom.size < ent->size ) - rc = -ENOSPC; - else if ( copy_to_guest(info->pci_rom.data, - ent->data, ent->size) ) - rc = -EFAULT; + info->pci_rom.address = __pa(ent->data); info->pci_rom.size = ent->size; - - return rc; + return 0; } return -ESRCH; } --- a/xen/include/public/platform.h +++ b/xen/include/public/platform.h @@ -274,9 +274,9 @@ struct xenpf_firmware_info { uint8_t devfn; uint16_t vendor; uint16_t devid; - /* IN/OUT variables */ + /* OUT variables */ + uint64_t address; xen_ulong_t size; - XEN_GUEST_HANDLE(void) data; } pci_rom; } efi_info; /* XEN_FW_EFI_INFO */ Attachment:
x86-EFI-PCI-ROMs-adjust.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |