diff options
author | Jan Beulich <jbeulich@suse.com> | 2013-02-04 12:10:26 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-02-04 12:10:26 +0100 |
commit | 40785b88faf43e9589142172a43191251a692542 (patch) | |
tree | a503f6fb22e804c273a313129505856d3c084ef1 /xen/arch/x86/efi | |
parent | f438b1c5452b7358f6b521b2949864823772364e (diff) | |
download | xen-40785b88faf43e9589142172a43191251a692542.tar.gz xen-40785b88faf43e9589142172a43191251a692542.tar.bz2 xen-40785b88faf43e9589142172a43191251a692542.zip |
x86/EFI: simplify PCI option ROM 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@suse.com>
Diffstat (limited to 'xen/arch/x86/efi')
-rw-r--r-- | xen/arch/x86/efi/runtime.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/xen/arch/x86/efi/runtime.c b/xen/arch/x86/efi/runtime.c index c5b03bfe2c..73aa15eb9a 100644 --- 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 xenpf_efi_info *info) 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; } |