x86, efi: Fix PCI ROM handing in EFI boot stub, in 32-bit mode

The 'Attributes' argument to pci->Attributes() function is 64-bit. So
when invoking in 32-bit mode it takes two registers, not just one.

This fixes memory corruption when booting via the 32-bit EFI boot stub.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: <stable@kernel.org>
Link: http://lkml.kernel.org/r/1358513837.2397.247.camel@shinybook.infradead.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Matt Fleming <matt.fleming@intel.com>

authored by David Woodhouse and committed by H. Peter Anvin b607e212 f791620f

+6 -1
+6 -1
arch/x86/boot/compressed/eboot.c
··· 295 295 if (!pci) 296 296 continue; 297 297 298 + #ifdef CONFIG_X86_64 298 299 status = efi_call_phys4(pci->attributes, pci, 299 300 EfiPciIoAttributeOperationGet, 0, 300 301 &attributes); 301 - 302 + #else 303 + status = efi_call_phys5(pci->attributes, pci, 304 + EfiPciIoAttributeOperationGet, 0, 0, 305 + &attributes); 306 + #endif 302 307 if (status != EFI_SUCCESS) 303 308 continue; 304 309