Commit 1303a35b authored by Konrad Rzeszutek Wilk's avatar Konrad Rzeszutek Wilk

ibft: For UEFI machines actually do scan ACPI for iBFT.

For machines with IBFT 1.03 do scan the ACPI table for 'iBFT'
or for 'IBFT'. If the machine is in UEFI mode, only do the ACPI
table scan. For all other machines (pre IBFT 1.03) do
a memory scan if not found in the ACPI tables.
Signed-off-by: default avatarPeter Jones <pjones@redhat.com>
Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad@kernel.org>
Tested-by: default avatarMike Christie <michaelc@cs.wisc.edu>
parent 4e639fdf
...@@ -57,23 +57,12 @@ static int __init acpi_find_ibft(struct acpi_table_header *header) ...@@ -57,23 +57,12 @@ static int __init acpi_find_ibft(struct acpi_table_header *header)
} }
#endif /* CONFIG_ACPI */ #endif /* CONFIG_ACPI */
/* static int __init find_ibft_in_mem(void)
* Routine used to find the iSCSI Boot Format Table. The logical
* kernel address is set in the ibft_addr global variable.
*/
unsigned long __init find_ibft_region(unsigned long *sizep)
{ {
unsigned long pos; unsigned long pos;
unsigned int len = 0; unsigned int len = 0;
void *virt; void *virt;
ibft_addr = NULL;
/* iBFT 1.03 section 1.4.3.1 mandates that UEFI machines will
* only use ACPI for this */
if (efi_enabled)
return 0;
for (pos = IBFT_START; pos < IBFT_END; pos += 16) { for (pos = IBFT_START; pos < IBFT_END; pos += 16) {
/* The table can't be inside the VGA BIOS reserved space, /* The table can't be inside the VGA BIOS reserved space,
* so skip that area */ * so skip that area */
...@@ -92,6 +81,17 @@ unsigned long __init find_ibft_region(unsigned long *sizep) ...@@ -92,6 +81,17 @@ unsigned long __init find_ibft_region(unsigned long *sizep)
} }
} }
} }
return len;
}
/*
* Routine used to find the iSCSI Boot Format Table. The logical
* kernel address is set in the ibft_addr global variable.
*/
unsigned long __init find_ibft_region(unsigned long *sizep)
{
ibft_addr = NULL;
#ifdef CONFIG_ACPI #ifdef CONFIG_ACPI
/* /*
* One spec says "IBFT", the other says "iBFT". We have to check * One spec says "IBFT", the other says "iBFT". We have to check
...@@ -102,6 +102,13 @@ unsigned long __init find_ibft_region(unsigned long *sizep) ...@@ -102,6 +102,13 @@ unsigned long __init find_ibft_region(unsigned long *sizep)
if (!ibft_addr) if (!ibft_addr)
acpi_table_parse("iBFT", acpi_find_ibft); acpi_table_parse("iBFT", acpi_find_ibft);
#endif /* CONFIG_ACPI */ #endif /* CONFIG_ACPI */
/* iBFT 1.03 section 1.4.3.1 mandates that UEFI machines will
* only use ACPI for this */
if (!ibft_addr && !efi_enabled)
find_ibft_in_mem();
if (ibft_addr) { if (ibft_addr) {
*sizep = PAGE_ALIGN(ibft_addr->header.length); *sizep = PAGE_ALIGN(ibft_addr->header.length);
return (u64)isa_virt_to_bus(ibft_addr); return (u64)isa_virt_to_bus(ibft_addr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment