Merge tag 'efi-for-3.8' into x86/efi
authorH. Peter Anvin <hpa@linux.intel.com>
Wed, 30 Jan 2013 22:43:05 +0000 (14:43 -0800)
committerH. Peter Anvin <hpa@linux.intel.com>
Wed, 30 Jan 2013 22:43:05 +0000 (14:43 -0800)
Various urgent EFI fixes and some warning cleanups for v3.8

  * EFI boot stub fix for Macbook Pro's from Maarten Lankhorst
  * Fix an oops in efivarfs from Lingzhu Xiang
  * 32-bit warning cleanups from Jan Beulich
  * Patch to Boot on >512GB RAM systems from Nathan Zimmer
  * Set efi.runtime_version correctly
  * efivarfs updates

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
1  2 
arch/x86/boot/compressed/eboot.c

@@@ -256,10 -256,10 +256,10 @@@ static efi_status_t setup_efi_pci(struc
        int i;
        struct setup_data *data;
  
-       data = (struct setup_data *)params->hdr.setup_data;
+       data = (struct setup_data *)(unsigned long)params->hdr.setup_data;
  
        while (data && data->next)
-               data = (struct setup_data *)data->next;
+               data = (struct setup_data *)(unsigned long)data->next;
  
        status = efi_call_phys5(sys_table->boottime->locate_handle,
                                EFI_LOCATE_BY_PROTOCOL, &pci_proto,
                if (!pci)
                        continue;
  
 +#ifdef CONFIG_X86_64
                status = efi_call_phys4(pci->attributes, pci,
                                        EfiPciIoAttributeOperationGet, 0,
                                        &attributes);
 -
 +#else
 +              status = efi_call_phys5(pci->attributes, pci,
 +                                      EfiPciIoAttributeOperationGet, 0, 0,
 +                                      &attributes);
 +#endif
                if (status != EFI_SUCCESS)
                        continue;
  
-               if (!(attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM))
-                       continue;
                if (!pci->romimage || !pci->romsize)
                        continue;
  
                memcpy(rom->romdata, pci->romimage, pci->romsize);
  
                if (data)
-                       data->next = (uint64_t)rom;
+                       data->next = (unsigned long)rom;
                else
-                       params->hdr.setup_data = (uint64_t)rom;
+                       params->hdr.setup_data = (unsigned long)rom;
  
                data = (struct setup_data *)rom;
  
@@@ -437,9 -429,10 +434,9 @@@ static efi_status_t setup_gop(struct sc
                         * Once we've found a GOP supporting ConOut,
                         * don't bother looking any further.
                         */
 +                      first_gop = gop;
                        if (conout_found)
                                break;
 -
 -                      first_gop = gop;
                }
        }