···746746 ibft_cleanup();747747}748748749749+#ifdef CONFIG_ACPI750750+static const struct {751751+ char *sign;752752+} ibft_signs[] = {753753+ /*754754+ * One spec says "IBFT", the other says "iBFT". We have to check755755+ * for both.756756+ */757757+ { ACPI_SIG_IBFT },758758+ { "iBFT" },759759+};760760+761761+static void __init acpi_find_ibft_region(void)762762+{763763+ int i;764764+ struct acpi_table_header *table = NULL;765765+766766+ if (acpi_disabled)767767+ return;768768+769769+ for (i = 0; i < ARRAY_SIZE(ibft_signs) && !ibft_addr; i++) {770770+ acpi_get_table(ibft_signs[i].sign, 0, &table);771771+ ibft_addr = (struct acpi_table_ibft *)table;772772+ }773773+}774774+#else775775+static void __init acpi_find_ibft_region(void)776776+{777777+}778778+#endif779779+749780/*750781 * ibft_init() - creates sysfs tree entries for the iBFT data.751782 */···784753{785754 int rc = 0;786755756756+ /*757757+ As on UEFI systems the setup_arch()/find_ibft_region()758758+ is called before ACPI tables are parsed and it only does759759+ legacy finding.760760+ */761761+ if (!ibft_addr)762762+ acpi_find_ibft_region();763763+787764 if (ibft_addr) {788788- printk(KERN_INFO "iBFT detected at 0x%llx.\n",789789- (u64)isa_virt_to_bus(ibft_addr));765765+ pr_info("iBFT detected.\n");790766791767 rc = ibft_check_device();792768 if (rc)
+2-24
drivers/firmware/iscsi_ibft_find.c
···4545static const struct {4646 char *sign;4747} ibft_signs[] = {4848-#ifdef CONFIG_ACPI4949- /*5050- * One spec says "IBFT", the other says "iBFT". We have to check5151- * for both.5252- */5353- { ACPI_SIG_IBFT },5454-#endif5548 { "iBFT" },5649 { "BIFT" }, /* Broadcom iSCSI Offload */5750};···5461#define IBFT_END 0x100000 /* 1MB */5562#define VGA_MEM 0xA0000 /* VGA buffer */5663#define VGA_SIZE 0x20000 /* 128kB */5757-5858-#ifdef CONFIG_ACPI5959-static int __init acpi_find_ibft(struct acpi_table_header *header)6060-{6161- ibft_addr = (struct acpi_table_ibft *)header;6262- return 0;6363-}6464-#endif /* CONFIG_ACPI */65646665static int __init find_ibft_in_mem(void)6766{···7994 * the table cannot be valid. */8095 if (pos + len <= (IBFT_END-1)) {8196 ibft_addr = (struct acpi_table_ibft *)virt;9797+ pr_info("iBFT found at 0x%lx.\n", pos);8298 goto done;8399 }84100 }···94108 */95109unsigned long __init find_ibft_region(unsigned long *sizep)96110{9797-#ifdef CONFIG_ACPI9898- int i;9999-#endif100111 ibft_addr = NULL;101101-102102-#ifdef CONFIG_ACPI103103- for (i = 0; i < ARRAY_SIZE(ibft_signs) && !ibft_addr; i++)104104- acpi_table_parse(ibft_signs[i].sign, acpi_find_ibft);105105-#endif /* CONFIG_ACPI */106112107113 /* iBFT 1.03 section 1.4.3.1 mandates that UEFI machines will108114 * only use ACPI for this */109115110110- if (!ibft_addr && !efi_enabled)116116+ if (!efi_enabled)111117 find_ibft_in_mem();112118113119 if (ibft_addr) {