Skip to contentSkip to conversation

Update iBFT to 1.03

PATCH New Konrad Rzeszutek Wilk 8 participants 16 messages Apr 9, 2010 – May 27, 2010

Subsystems (2)
lore
Share & tools
lore

Konrad Rzeszutek Wilk

author maintainer
#0 lore raw

PATCH 1/1 Update iBFT to 1.03

This patch writen by Peter Jones and Mike Christie expands on the iBFT firmware driver to support v1.03 of the spec. The spec in question is available at:

ftp://ftp.software.ibm.com/systems/support/bladecenter/iscsi_boot_firmware_table_v1.03.pdf

Linux kernel has support for the iBFT 1.0 spec and this update to 1.03 adds three more things:
- There is now a ACPI table either called 'iBFT' or 'IBFT' that should be parsed.
- If running with UEFI, only look at the ACPI table.
- If not found within ACPI tables, fall back to the old mechanism of scanning memory for the signature.

It has been tested with gPXE and also a real hardware (Mike, did I get that right?)

author maintainer
#1 lore raw

PATCH 1/2 ibft: Update iBFT handling for v1.03 of the spec.

From: Peter Jones <[email protected]>

- Use struct acpi_table_ibft instead of struct ibft_table_header
- Don't do reserve_ibft_region() on UEFI machines (section 1.4.3.1)
- If ibft_addr isn't initialized when ibft_init() is called, check for ACPI-based tables.

Author: Peter Jones <[email protected]>

---
 drivers/firmware/iscsi_ibft.c      |   30 ++++++++++++++++++------------
 drivers/firmware/iscsi_ibft_find.c |   34 +++++++++++++++++++++++++++++-----
 include/linux/iscsi_ibft.h         |   12 ++----------
 3 files changed, 49 insertions(+), 27 deletions(-)
drivers/firmware/iscsi_ibft.c +18 -12
index ed2801c..b3ab24f 100644
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2007 Red Hat, Inc.
+ *  Copyright 2007-2010 Red Hat, Inc.
  *  by Peter Jones <[email protected]>
  *  Copyright 2008 IBM, Inc.
  *  by Konrad Rzeszutek <[email protected]>
@@ -19,6 +19,9 @@
  *
  * Changelog:
  *
+ *  06 Jan 2010 - Peter Jones <[email protected]>
+ *    New changelog entries are in the git log from now on.  Not here.
+ *
  *  14 Mar 2008 - Konrad Rzeszutek <[email protected]>
  *    Updated comments and copyrights. (v0.4.9)
  *
@@ -78,9 +81,10 @@
 #include <linux/stat.h>
 #include <linux/string.h>
 #include <linux/types.h>
+#include <linux/acpi.h>
 
-#define IBFT_ISCSI_VERSION "0.4.9"
-#define IBFT_ISCSI_DATE "2008-Mar-14"
+#define IBFT_ISCSI_VERSION "0.5.0"
+#define IBFT_ISCSI_DATE "2010-Feb-25"
 
 MODULE_AUTHOR("Peter Jones <[email protected]> and \
 Konrad Rzeszutek <[email protected]>");
@@ -238,7 +242,7 @@ static const char *ibft_initiator_properties[] =
  */
 
 struct ibft_kobject {
-	struct ibft_table_header *header;
+	struct acpi_table_ibft *header;
 	union {
 		struct ibft_initiator *initiator;
 		struct ibft_nic *nic;
@@ -536,12 +540,13 @@ static int __init ibft_check_device(void)
 	u8 *pos;
 	u8 csum = 0;
 
-	len = ibft_addr->length;
+	len = ibft_addr->header.length;
 
 	/* Sanity checking of iBFT. */
-	if (ibft_addr->revision != 1) {
+	if (ibft_addr->header.revision != 1) {
 		printk(KERN_ERR "iBFT module supports only revision 1, " \
-				"while this is %d.\n", ibft_addr->revision);
+				"while this is %d.\n",
+				ibft_addr->header.revision);
 		return -ENOENT;
 	}
 	for (pos = (u8 *)ibft_addr; pos < (u8 *)ibft_addr + len; pos++)
@@ -558,7 +563,7 @@ static int __init ibft_check_device(void)
 /*
  * Helper function for ibft_register_kobjects.
  */
-static int __init ibft_create_kobject(struct ibft_table_header *header,
+static int __init ibft_create_kobject(struct acpi_table_ibft *header,
 				       struct ibft_hdr *hdr,
 				       struct list_head *list)
 {
@@ -596,7 +601,7 @@ static int __init ibft_create_kobject(struct ibft_table_header *header,
 	default:
 		printk(KERN_ERR "iBFT has unknown structure type (%d). " \
 				"Report this bug to %.6s!\n", hdr->id,
-				header->oem_id);
+				header->header.oem_id);
 		rc = 1;
 		break;
 	}
@@ -649,7 +654,7 @@ out_invalid_struct:
  * found add them on the passed-in list. We do not support the other
  * fields at this point, so they are skipped.
  */
-static int __init ibft_register_kobjects(struct ibft_table_header *header,
+static int __init ibft_register_kobjects(struct acpi_table_ibft *header,
 					  struct list_head *list)
 {
 	struct ibft_control *control = NULL;
@@ -660,7 +665,7 @@ static int __init ibft_register_kobjects(struct ibft_table_header *header,
 
 	control = (void *)header + sizeof(*header);
 	end = (void *)control + control->hdr.length;
-	eot_offset = (void *)header + header->length - (void *)control;
+	eot_offset = (void *)header + header->header.length - (void *)control;
 	rc = ibft_verify_hdr("control", (struct ibft_hdr *)control, id_control,
 			     sizeof(*control));
 
@@ -672,7 +677,8 @@ static int __init ibft_register_kobjects(struct ibft_table_header *header,
 	}
 	for (ptr = &control->initiator_off; ptr < end; ptr += sizeof(u16)) {
 		offset = *(u16 *)ptr;
-		if (offset && offset < header->length && offset < eot_offset) {
+		if (offset && offset < header->header.length &&
+						offset < eot_offset) {
 			rc = ibft_create_kobject(header,
 						 (void *)header + offset,
 						 list);
drivers/firmware/iscsi_ibft_find.c +29 -5
index d6470ef..8f4d157 100644
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2007 Red Hat, Inc.
+ *  Copyright 2007-2010 Red Hat, Inc.
  *  by Peter Jones <[email protected]>
  *  Copyright 2007 IBM, Inc.
  *  by Konrad Rzeszutek <[email protected]>
@@ -22,6 +22,7 @@
 #include <linux/blkdev.h>
 #include <linux/ctype.h>
 #include <linux/device.h>
+#include <linux/efi.h>
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/limits.h>
@@ -30,13 +31,14 @@
 #include <linux/stat.h>
 #include <linux/string.h>
 #include <linux/types.h>
+#include <linux/acpi.h>
 
 #include <asm/mmzone.h>
 
 /*
  * Physical location of iSCSI Boot Format Table.
  */
-struct ibft_table_header *ibft_addr;
+struct acpi_table_ibft *ibft_addr;
 EXPORT_SYMBOL_GPL(ibft_addr);
 
 #define IBFT_SIGN "iBFT"
@@ -46,6 +48,13 @@ EXPORT_SYMBOL_GPL(ibft_addr);
 #define VGA_MEM 0xA0000 /* VGA buffer */
 #define VGA_SIZE 0x20000 /* 128kB */
 
+#ifdef CONFIG_ACPI
+static int __init acpi_find_ibft(struct acpi_table_header *header)
+{
+	ibft_addr = (struct acpi_table_ibft *)header;
+	return 0;
+}
+#endif /* CONFIG_ACPI */
 
 /*
  * Routine used to find the iSCSI Boot Format Table. The logical
@@ -59,6 +68,11 @@ unsigned long __init find_ibft_region(unsigned long *sizep)
 
 	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 */
@@ -72,14 +86,24 @@ unsigned long __init find_ibft_region(unsigned long *sizep)
 			/* if the length of the table extends past 1M,
 			 * the table cannot be valid. */
 			if (pos + len <= (IBFT_END-1)) {
-				ibft_addr = (struct ibft_table_header *)virt;
+				ibft_addr = (struct acpi_table_ibft *)virt;
 				break;
 			}
 		}
 	}
+#ifdef CONFIG_ACPI
+	/*
+	 * One spec says "IBFT", the other says "iBFT". We have to check
+	 * for both.
+	 */
+	if (!ibft_addr)
+		acpi_table_parse(ACPI_SIG_IBFT, acpi_find_ibft);
+	if (!ibft_addr)
+		acpi_table_parse("iBFT", acpi_find_ibft);
+#endif /* CONFIG_ACPI */
 	if (ibft_addr) {
-		*sizep = PAGE_ALIGN(len);
-		return pos;
+		*sizep = PAGE_ALIGN(ibft_addr->header.length);
+		return (u64)isa_virt_to_bus(ibft_addr);
 	}
 
 	*sizep = 0;
include/linux/iscsi_ibft.h +2 -10
index d2e4042..8ba7e5b 100644
@@ -21,21 +21,13 @@
 #ifndef ISCSI_IBFT_H
 #define ISCSI_IBFT_H
 
-struct ibft_table_header {
-	char signature[4];
-	u32 length;
-	u8 revision;
-	u8 checksum;
-	char oem_id[6];
-	char oem_table_id[8];
-	char reserved[24];
-} __attribute__((__packed__));
+#include <acpi/acpi.h>
 
 /*
  * Logical location of iSCSI Boot Format Table.
  * If the value is NULL there is no iBFT on the machine.
  */
-extern struct ibft_table_header *ibft_addr;
+extern struct acpi_table_ibft *ibft_addr;
 
 /*
  * Routine used to find and reserve the iSCSI Boot Format Table. The
Signature · 1 line
1.7.0.4
#2 lore raw

Re: [PATCH 1/2] ibft: Update iBFT handling for v1.03 of the spec.

Quoted 10 lines · On Fri, 9 Apr 2010 14:21:27 +0000 Konrad Rzeszutek Wilk <[email protected]>…

From: Peter Jones <[email protected]>

- Use struct acpi_table_ibft instead of struct ibft_table_header
- Don't do reserve_ibft_region() on UEFI machines (section 1.4.3.1)
- If ibft_addr isn't initialized when ibft_init() is called, check for ACPI-based tables.

Author: Peter Jones <[email protected]>

This should have Peter's Signed-off-by:, please.

drivers/firmware/iscsi_ibft_find.c EXPORT_SYMBOL_GPL(ibft_addr); · line 54

Quoted 7 lines

...

drivers/firmware/iscsi_ibft_find.c +4 -0
+#ifdef CONFIG_ACPI
+static int __init acpi_find_ibft(struct acpi_table_header *header)
+{
+	ibft_addr = (struct acpi_table_ibft *)header;

container_of() would be better here. And maybe elsewhere, too.

Quoted 3 lines
drivers/firmware/iscsi_ibft_find.c +3 -0
+	return 0;
+}
+#endif /* CONFIG_ACPI */
#3 lore raw

Re: [PATCH 1/2] ibft: Update iBFT handling for v1.03 of the spec.

Quoted 5 lines
Quoted 2 lines

This should have Peter's Signed-off-by:, please.

Done.

Quoted 8 lines

drivers/firmware/iscsi_ibft_find.c EXPORT_SYMBOL_GPL(ibft_addr); · line 54

Quoted 6 lines

...

drivers/firmware/iscsi_ibft_find.c +4 -0
+#ifdef CONFIG_ACPI
+static int __init acpi_find_ibft(struct acpi_table_header *header)
+{
+	ibft_addr = (struct acpi_table_ibft *)header;

container_of() would be better here. And maybe elsewhere, too.

Actually there is no need for that. We are just casting it, not getting any internal member.

#4 lore raw

Re: [PATCH 1/2] ibft: Update iBFT handling for v1.03 of the spec.

In reply to Konrad Rzeszutek Wilk
Quoted 2 lines

#define IBFT_SIGN "iBFT"

...

drivers/firmware/iscsi_ibft_find.c unsigned long __init find_ibft_region(unsigned long *sizep) · line 98

Quoted 5 lines
drivers/firmware/iscsi_ibft_find.c +5 -0
+#ifdef CONFIG_ACPI
+	/*
+	 * One spec says "IBFT", the other says "iBFT". We have to check
+	 * for both.
+	 */

Really?
Which one do you see in the field?
any reason to #define "iBFT" above and not use it below?

drivers/firmware/iscsi_ibft_find.c unsigned long __init find_ibft_region(unsigned long *sizep) · line 103

Quoted 5 lines
drivers/firmware/iscsi_ibft_find.c +5 -0
+	if (!ibft_addr)
+		acpi_table_parse(ACPI_SIG_IBFT, acpi_find_ibft);
+	if (!ibft_addr)
+		acpi_table_parse("iBFT", acpi_find_ibft);
+#endif /* CONFIG_ACPI */

Len Brown, Intel Open Source Technology Center

#5 lore raw

Re: [LKML] Re: [PATCH 1/2] ibft: Update iBFT handling for v1.03 of the spec.

Quoted 11 lines · Len Brown
Quoted 2 lines

#define IBFT_SIGN "iBFT"

...

drivers/firmware/iscsi_ibft_find.c unsigned long __init find_ibft_region(unsigned long *sizep) · line 98

Quoted 5 lines
drivers/firmware/iscsi_ibft_find.c +5 -0
+#ifdef CONFIG_ACPI
+	/*
+	 * One spec says "IBFT", the other says "iBFT". We have to check
+	 * for both.
+	 */

Really?
Which one do you see in the field?

The one machine I do remember seeing this in the ACPI tables was the IBM HS20, but I can't remember which one it was. Mike, Peter - any recollection? Don't know about about Intel ones.

For cases where there was no ACPI, the 'iBFT' was definitly the string I saw.

Quoted 6 lines

any reason to #define "iBFT" above and not use it below?

drivers/firmware/iscsi_ibft_find.c unsigned long __init find_ibft_region(unsigned long *sizep) · line 102

Quoted 4 lines
drivers/firmware/iscsi_ibft_find.c +4 -0
+	if (!ibft_addr)
+		acpi_table_parse(ACPI_SIG_IBFT, acpi_find_ibft);
+	if (!ibft_addr)
+		acpi_table_parse("iBFT", acpi_find_ibft);

Could definitly use the IBFT_SIGN here.

Thanks for taking a look!

maintainer
#6 lore raw

Re: [PATCH 1/2] ibft: Update iBFT handling for v1.03 of the spec.

In reply to Len Brown
Quoted 11 lines · Len Brown
Quoted 2 lines

#define IBFT_SIGN "iBFT"

...

drivers/firmware/iscsi_ibft_find.c unsigned long __init find_ibft_region(unsigned long *sizep) · line 98

Quoted 5 lines
drivers/firmware/iscsi_ibft_find.c +5 -0
+#ifdef CONFIG_ACPI
+	/*
+	 * One spec says "IBFT", the other says "iBFT". We have to check
+	 * for both.
+	 */

Really?
Which one do you see in the field?

Well, we haven't seen any ACPI-based hardware yet AFAIK - but I'm supposed to have some soon. So it's too early to tell which one is actually going to be the more common case, or if this is really a non-issue.

Quoted 1 line

any reason to #define "iBFT" above and not use it below?

Nope, that's just an error. I'll send a patch.

Quoted 8 lines

drivers/firmware/iscsi_ibft_find.c unsigned long __init find_ibft_region(unsigned long *sizep) · line 103

Quoted 6 lines
drivers/firmware/iscsi_ibft_find.c +5 -0
+	if (!ibft_addr)
+		acpi_table_parse(ACPI_SIG_IBFT, acpi_find_ibft);
+	if (!ibft_addr)
+		acpi_table_parse("iBFT", acpi_find_ibft);
+#endif /* CONFIG_ACPI */

Len Brown, Intel Open Source Technology Center

Signature · 4 lines
        Peter

Obviously, a major malfunction has occurred.
		-- Steve Nesbitt, voice of Mission Control, January 28, 1986
maintainer
#7 lore raw

PATCH 1/1 Use IBFT_SIGN instead of open-coding the search string.

We define IBFT_SIGN to "iBFT"; may as well use it.

---
 drivers/firmware/iscsi_ibft_find.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/firmware/iscsi_ibft_find.c +1 -1
index 82a7a15..2192456 100644
@@ -100,7 +100,7 @@ unsigned long __init find_ibft_region(unsigned long *sizep)
 	if (!ibft_addr)
 		acpi_table_parse(ACPI_SIG_IBFT, acpi_find_ibft);
 	if (!ibft_addr)
-		acpi_table_parse("iBFT", acpi_find_ibft);
+		acpi_table_parse(IBFT_SIGN, acpi_find_ibft);
 #endif /* CONFIG_ACPI */
 
 	/* iBFT 1.03 section 1.4.3.1 mandates that UEFI machines will
Signature · 1 line
1.7.0.1
maintainer
#8 lore raw

PATCH 1/1 Use IBFT_SIGN instead of open-coding the search string.

In reply to Peter Jones

We define IBFT_SIGN to "iBFT"; may as well use it.

---
 drivers/firmware/iscsi_ibft_find.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/firmware/iscsi_ibft_find.c +1 -1
index 82a7a15..2192456 100644
@@ -100,7 +100,7 @@ unsigned long __init find_ibft_region(unsigned long *sizep)
 	if (!ibft_addr)
 		acpi_table_parse(ACPI_SIG_IBFT, acpi_find_ibft);
 	if (!ibft_addr)
-		acpi_table_parse("iBFT", acpi_find_ibft);
+		acpi_table_parse(IBFT_SIGN, acpi_find_ibft);
 #endif /* CONFIG_ACPI */
 
 	/* iBFT 1.03 section 1.4.3.1 mandates that UEFI machines will
Signature · 1 line
1.7.0.1
author maintainer
#9 lore raw

Re: [PATCH] ibft: Use IBFT_SIGN instead of open-coding the search string.

Andrew,

Please also consider this patch with the others I've sent. I've put this (and the other ones) on:

git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft-2.6.git dev.ibft

Quoted 3 lines · On Wednesday 12 May 2010 10:25:08 Peter Jones wrote:

We define IBFT_SIGN to "iBFT"; may as well use it.

Quoted 17 lines
---
 drivers/firmware/iscsi_ibft_find.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/drivers/firmware/iscsi_ibft_find.c index 82a7a15..2192456 100644

drivers/firmware/iscsi_ibft_find.c +1 -1
@@ -100,7 +100,7 @@ unsigned long __init find_ibft_region(unsigned long
 *sizep) if (!ibft_addr)
 		acpi_table_parse(ACPI_SIG_IBFT, acpi_find_ibft);
 	if (!ibft_addr)
-		acpi_table_parse("iBFT", acpi_find_ibft);
+		acpi_table_parse(IBFT_SIGN, acpi_find_ibft);
 #endif /* CONFIG_ACPI */
 
 	/* iBFT 1.03 section 1.4.3.1 mandates that UEFI machines will
#10 lore raw

Re: [PATCH] ibft: Use IBFT_SIGN instead of open-coding the search string.

Quoted 4 lines · On Wed, 12 May 2010 10:35:32 -0400 Konrad Rzeszutek Wilk <[email protected]>…

Please also consider this patch with the others I've sent. I've put this (and the other ones) on:

git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft-2.6.git dev.ibft

Well, you're the maintainer and you have a git tree and I cannot tell the difference between an IBFT and a bar of soap. So I suggest that you ask Stephen to permanently include your git tree in linux-next and send Linus a pull request in the 2.6.35-rc1 merge window like so many other people do?

#11 lore raw

Re: [PATCH] ibft: Use IBFT_SIGN instead of open-coding the search string.

Quoted 6 lines · Andrew Morton
Quoted 3 lines · On Wed, 12 May 2010 10:35:32 -0400 Konrad Rzeszutek Wilk <[email protected]>…

Please also consider this patch with the others I've sent. I've put this (and the other ones) on:

Quoted 8 lines
Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft-2.6.git dev.ibft

Well, you're the maintainer and you have a git tree and I cannot tell the difference between an IBFT and a bar of soap. So I suggest that you ask Stephen to permanently include your git tree in linux-next and send Linus a pull request in the 2.6.35-rc1 merge window like so many other people do?

Either that or send it via Len Brown, since iBFT really is an ACPI extension.

-hpa

#12 lore raw

Re: [PATCH] ibft: Use IBFT_SIGN instead of open-coding the search string.

In reply to Peter Jones
Quoted 2 lines · On Wednesday 12 May 2010 10:25:08 Peter Jones wrote:

We define IBFT_SIGN to "iBFT"; may as well use it.

Len,

Were you OK with this patch? I was thinking to send to Linus a git-pull for this (and the other patches referenced in this patchset).

Quoted 18 lines
---
 drivers/firmware/iscsi_ibft_find.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/drivers/firmware/iscsi_ibft_find.c index 82a7a15..2192456 100644

drivers/firmware/iscsi_ibft_find.c +1 -1
@@ -100,7 +100,7 @@ unsigned long __init find_ibft_region(unsigned long
 *sizep) if (!ibft_addr)
 		acpi_table_parse(ACPI_SIG_IBFT, acpi_find_ibft);
 	if (!ibft_addr)
-		acpi_table_parse("iBFT", acpi_find_ibft);
+		acpi_table_parse(IBFT_SIGN, acpi_find_ibft);
 #endif /* CONFIG_ACPI */
 
 	/* iBFT 1.03 section 1.4.3.1 mandates that UEFI machines will
author maintainer
#13 lore raw

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

In reply to Konrad Rzeszutek Wilk

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 <[email protected]>

---
 drivers/firmware/iscsi_ibft_find.c |   31 +++++++++++++++++++------------
 1 files changed, 19 insertions(+), 12 deletions(-)
drivers/firmware/iscsi_ibft_find.c +19 -12
index 8f4d157..0bc3fae 100644
@@ -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);
Signature · 1 line
1.7.0.4
#14 lore raw

Re: [PATCH 2/2] ibft: For UEFI machines actually do scan ACPI for iBFT.

Quoted 6 lines · On Fri, 9 Apr 2010 14:21:28 +0000 Konrad Rzeszutek Wilk <[email protected]>…

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 <[email protected]>

The Author: line is unneeded and inappropriate here. That's what the
From: line does.

Quoted 3 lines

Your covering email indicates that Mike and Peter wrote the patches, but neither of the patches have their signoffs. Can we please sort all this out?

Quoted 9 lines
---
 drivers/firmware/iscsi_ibft_find.c |   31 +++++++++++++++++++------------
 1 files changed, 19 insertions(+), 12 deletions(-)
drivers/firmware/iscsi_ibft_find.c +0 -0
index 8f4d157..0bc3fae 100644

drivers/firmware/iscsi_ibft_find.c static int __init acpi_find_ibft(struct acpi_table_header *header) · line 59

Quoted 9 lines
drivers/firmware/iscsi_ibft_find.c +1 -5
@@ -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)

The name seems weird. find_foo_scan(). So we're trying to find a scan for a foo.

Quoted 18 lines
drivers/firmware/iscsi_ibft_find.c +0 -7
 {
 	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 */
 
...
#15 lore raw

Re: [PATCH 2/2] ibft: For UEFI machines actually do scan ACPI for iBFT.

Quoted 13 lines · Andrew Morton
Quoted 6 lines · On Fri, 9 Apr 2010 14:21:28 +0000 Konrad Rzeszutek Wilk<[email protected]>…

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<[email protected]>

The Author: line is unneeded and inappropriate here. That's what the
From: line does.

Quoted 8 lines
Quoted 3 lines

Your covering email indicates that Mike and Peter wrote the patches, but neither of the patches have their signoffs. Can we please sort all this out?

I did a small fix to ibft-update-ibft-handling-for-v103-of-the-spec.patch to get it to compile. It looks like that patch has a "Reviewed-by: Mike Christie <[email protected]>". Feel free to change that to a Signed-off-by: Mike Christie <[email protected]> if needed.

I did not do any changes to ibft-for-uefi-machines-actually-do-scan-acpi-for-ibft.patch.

I tested both patches.