diff options
Diffstat (limited to 'arch/x86/boot/compressed/eboot.c')
-rw-r--r-- | arch/x86/boot/compressed/eboot.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index b1942e222768..f8fa41190c35 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c | |||
@@ -256,10 +256,10 @@ static efi_status_t setup_efi_pci(struct boot_params *params) | |||
256 | int i; | 256 | int i; |
257 | struct setup_data *data; | 257 | struct setup_data *data; |
258 | 258 | ||
259 | data = (struct setup_data *)params->hdr.setup_data; | 259 | data = (struct setup_data *)(unsigned long)params->hdr.setup_data; |
260 | 260 | ||
261 | while (data && data->next) | 261 | while (data && data->next) |
262 | data = (struct setup_data *)data->next; | 262 | data = (struct setup_data *)(unsigned long)data->next; |
263 | 263 | ||
264 | status = efi_call_phys5(sys_table->boottime->locate_handle, | 264 | status = efi_call_phys5(sys_table->boottime->locate_handle, |
265 | EFI_LOCATE_BY_PROTOCOL, &pci_proto, | 265 | EFI_LOCATE_BY_PROTOCOL, &pci_proto, |
@@ -295,16 +295,18 @@ static efi_status_t setup_efi_pci(struct boot_params *params) | |||
295 | if (!pci) | 295 | if (!pci) |
296 | continue; | 296 | continue; |
297 | 297 | ||
298 | #ifdef CONFIG_X86_64 | ||
298 | status = efi_call_phys4(pci->attributes, pci, | 299 | status = efi_call_phys4(pci->attributes, pci, |
299 | EfiPciIoAttributeOperationGet, 0, | 300 | EfiPciIoAttributeOperationGet, 0, |
300 | &attributes); | 301 | &attributes); |
301 | 302 | #else | |
303 | status = efi_call_phys5(pci->attributes, pci, | ||
304 | EfiPciIoAttributeOperationGet, 0, 0, | ||
305 | &attributes); | ||
306 | #endif | ||
302 | if (status != EFI_SUCCESS) | 307 | if (status != EFI_SUCCESS) |
303 | continue; | 308 | continue; |
304 | 309 | ||
305 | if (!attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM) | ||
306 | continue; | ||
307 | |||
308 | if (!pci->romimage || !pci->romsize) | 310 | if (!pci->romimage || !pci->romsize) |
309 | continue; | 311 | continue; |
310 | 312 | ||
@@ -345,9 +347,9 @@ static efi_status_t setup_efi_pci(struct boot_params *params) | |||
345 | memcpy(rom->romdata, pci->romimage, pci->romsize); | 347 | memcpy(rom->romdata, pci->romimage, pci->romsize); |
346 | 348 | ||
347 | if (data) | 349 | if (data) |
348 | data->next = (uint64_t)rom; | 350 | data->next = (unsigned long)rom; |
349 | else | 351 | else |
350 | params->hdr.setup_data = (uint64_t)rom; | 352 | params->hdr.setup_data = (unsigned long)rom; |
351 | 353 | ||
352 | data = (struct setup_data *)rom; | 354 | data = (struct setup_data *)rom; |
353 | 355 | ||
@@ -432,10 +434,9 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto, | |||
432 | * Once we've found a GOP supporting ConOut, | 434 | * Once we've found a GOP supporting ConOut, |
433 | * don't bother looking any further. | 435 | * don't bother looking any further. |
434 | */ | 436 | */ |
437 | first_gop = gop; | ||
435 | if (conout_found) | 438 | if (conout_found) |
436 | break; | 439 | break; |
437 | |||
438 | first_gop = gop; | ||
439 | } | 440 | } |
440 | } | 441 | } |
441 | 442 | ||