From: Konrad Rzeszutek Wilk <konrad@kernel.org>
To: linux-kernel@vger.kernel.org, gpxe-devel@etherboot.org
Cc: Konrad Rzeszutek Wilk <konrad@kernel.org>
Subject: [PATCH 2/2] ibft: For UEFI machines actually do scan ACPI for iBFT.
Date: Fri, 9 Apr 2010 14:21:28 +0000 [thread overview]
Message-ID: <1270822888-13192-3-git-send-email-konrad@kernel.org> (raw)
In-Reply-To: <1270822888-13192-1-git-send-email-konrad@kernel.org>
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.
Author: Konrad Rzeszutek Wilk <konrad@kernel.org>
Acked-by: Peter Jones <pjones@redhat.com>
Tested-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
---
drivers/firmware/iscsi_ibft_find.c | 31 +++++++++++++++++++------------
1 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/drivers/firmware/iscsi_ibft_find.c b/drivers/firmware/iscsi_ibft_find.c
index 8f4d157..0bc3fae 100644
--- a/drivers/firmware/iscsi_ibft_find.c
+++ b/drivers/firmware/iscsi_ibft_find.c
@@ -56,23 +56,12 @@ static int __init acpi_find_ibft(struct acpi_table_header *header)
}
#endif /* CONFIG_ACPI */
-/*
- * 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)
+static int __init find_ibft_mem_scan(void)
{
unsigned long pos;
unsigned int len = 0;
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) {
/* The table can't be inside the VGA BIOS reserved space,
* so skip that area */
@@ -91,6 +80,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
/*
* One spec says "IBFT", the other says "iBFT". We have to check
@@ -101,6 +101,13 @@ unsigned long __init find_ibft_region(unsigned long *sizep)
if (!ibft_addr)
acpi_table_parse("iBFT", acpi_find_ibft);
#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_mem_scan();
+
if (ibft_addr) {
*sizep = PAGE_ALIGN(ibft_addr->header.length);
return (u64)isa_virt_to_bus(ibft_addr);
--
1.7.0.4
next prev parent reply other threads:[~2010-04-09 14:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-09 14:21 [PATCH] Update iBFT to 1.03 Konrad Rzeszutek Wilk
2010-04-09 14:21 ` [PATCH 1/2] ibft: Update iBFT handling for v1.03 of the spec Konrad Rzeszutek Wilk
2010-04-21 21:26 ` Andrew Morton
2010-05-11 17:58 ` Konrad Rzeszutek Wilk
2010-05-12 5:26 ` Len Brown
2010-05-12 13:58 ` [LKML] " Konrad Rzeszutek Wilk
2010-05-12 14:09 ` Peter Jones
2010-05-12 14:12 ` [PATCH] Use IBFT_SIGN instead of open-coding the search string Peter Jones
2010-05-12 14:25 ` Peter Jones
2010-05-12 14:35 ` [PATCH] ibft: " Konrad Rzeszutek Wilk
2010-05-12 19:33 ` Andrew Morton
2010-05-12 23:53 ` H. Peter Anvin
2010-05-27 17:59 ` Konrad Rzeszutek Wilk
2010-04-09 14:21 ` Konrad Rzeszutek Wilk [this message]
2010-04-21 21:29 ` [PATCH 2/2] ibft: For UEFI machines actually do scan ACPI for iBFT Andrew Morton
2010-04-21 21:37 ` Mike Christie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1270822888-13192-3-git-send-email-konrad@kernel.org \
--to=konrad@kernel.org \
--cc=gpxe-devel@etherboot.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).