[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86/EFI: simplify PCI option ROM retrieval


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Wed, 06 Feb 2013 10:00:10 +0000
  • Delivery-date: Wed, 06 Feb 2013 10:00:21 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1359976226 -3600
# Node ID ff77e84ddfdcd5ab93078d9ee6af7b6c60577408
# Parent  de6160ccaf9db30b186153ff6b89652ff86ee476
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@xxxxxxxx>
---


diff -r de6160ccaf9d -r ff77e84ddfdc xen/arch/x86/efi/runtime.c
--- a/xen/arch/x86/efi/runtime.c        Mon Feb 04 12:08:15 2013 +0100
+++ b/xen/arch/x86/efi/runtime.c        Mon Feb 04 12:10:26 2013 +0100
@@ -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;
     }
diff -r de6160ccaf9d -r ff77e84ddfdc xen/include/public/platform.h
--- a/xen/include/public/platform.h     Mon Feb 04 12:08:15 2013 +0100
+++ b/xen/include/public/platform.h     Mon Feb 04 12:10:26 2013 +0100
@@ -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 */
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.