diff options
| -rw-r--r-- | arch/x86/boot/compressed/eboot.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index e57665b4ba1c..e98522ea6f09 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c | |||
| @@ -114,18 +114,12 @@ __setup_efi_pci(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom) | |||
| 114 | struct pci_setup_rom *rom = NULL; | 114 | struct pci_setup_rom *rom = NULL; |
| 115 | efi_status_t status; | 115 | efi_status_t status; |
| 116 | unsigned long size; | 116 | unsigned long size; |
| 117 | uint64_t attributes, romsize; | 117 | uint64_t romsize; |
| 118 | void *romimage; | 118 | void *romimage; |
| 119 | 119 | ||
| 120 | status = efi_call_proto(efi_pci_io_protocol, attributes, pci, | ||
| 121 | EfiPciIoAttributeOperationGet, 0ULL, | ||
| 122 | &attributes); | ||
| 123 | if (status != EFI_SUCCESS) | ||
| 124 | return status; | ||
| 125 | |||
| 126 | /* | 120 | /* |
| 127 | * Some firmware images contain EFI function pointers at the place where the | 121 | * Some firmware images contain EFI function pointers at the place where |
| 128 | * romimage and romsize fields are supposed to be. Typically the EFI | 122 | * the romimage and romsize fields are supposed to be. Typically the EFI |
| 129 | * code is mapped at high addresses, translating to an unrealistically | 123 | * code is mapped at high addresses, translating to an unrealistically |
| 130 | * large romsize. The UEFI spec limits the size of option ROMs to 16 | 124 | * large romsize. The UEFI spec limits the size of option ROMs to 16 |
| 131 | * MiB so we reject any ROMs over 16 MiB in size to catch this. | 125 | * MiB so we reject any ROMs over 16 MiB in size to catch this. |
