mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad@darnok.org>
To: Yinghai Lu <yinghai.lu@oracle.com>
Cc: Peter Jones <pjones@redhat.com>,
	Konrad Rzeszutek Wilk <konrad@kernel.org>,
	Ingo Molnar <mingo@elte.hu>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH -v2] ibft: Fix finding IBFT ACPI table on UEFI
Date: Thu, 8 Dec 2011 15:08:08 -0400	[thread overview]
Message-ID: <20111208190808.GA25433@andromeda.dapyr.net> (raw)
In-Reply-To: <4EE0EB51.5010900@oracle.com>

On Thu, Dec 08, 2011 at 08:52:33AM -0800, Yinghai Lu wrote:
> 
> Found one system with UEFI/iBFT, Kernel does not detect the iBFT during
                                   ^^^^^ - lowercase 'kernel' please.
> iscsi_ibft module loading.

I get this when compiling it:

Setup is 16588 bytes (padded to 16896 bytes).
System is 6277 kB
CRC 7fe65506
Kernel: arch/x86/boot/bzImage is ready  (#2)
ERROR: "find_ibft_region" [drivers/firmware/iscsi_ibft.ko] undefined!

This is on i386 x86 build when doing 'make allmodconfig'.

> 
> the root cause: for x86, We have calling of find_ibft_region() much early.
                          ^^ - You only need to uppercase it if you
start a sentence - which is not what you are doing. So please make it
lowercase.
> in setup_arch() before ACPI is enabled.

This is what I changed the git description to:

 Root cause: on x86 (UEFI), we are calling find_ibft_region() much
 earlier - specifically in setup_arch() before ACPI is enabled.

> 
> Try to call find_ibft_region() second time in ibft_init().
> 
> At that time ACPI iBFT already get permanent mapped with ioremap.
> So isa_virt_to_bus will get wrong phys from right virt address.
> We could just skip that phys address printing.
> 
> For legacy one, print the found address early.
> 
> -v2: update comments and description according to Konrad.
> 
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> 
> ---
>  drivers/firmware/iscsi_ibft.c      |   14 ++++++++++++--
>  drivers/firmware/iscsi_ibft_find.c |    1 +
>  2 files changed, 13 insertions(+), 2 deletions(-)
> 
> Index: linux-2.6/drivers/firmware/iscsi_ibft.c
> ===================================================================
> --- linux-2.6.orig/drivers/firmware/iscsi_ibft.c
> +++ linux-2.6/drivers/firmware/iscsi_ibft.c
> @@ -753,9 +753,19 @@ static int __init ibft_init(void)
>  {
>  	int rc = 0;
>  
> +	/*
> +	   Retry as on UEFI systems the setup_arch()/find_ibft_region()
> +	   is called before ACPI tables are parsed so we never
> +	   get the data.
> +	*/
> +	if (!ibft_addr) {
> +		unsigned long size = 0;
> +
> +		find_ibft_region(&size);
> +	}
> +
>  	if (ibft_addr) {
> -		printk(KERN_INFO "iBFT detected at 0x%llx.\n",
> -		       (u64)isa_virt_to_bus(ibft_addr));
> +		pr_info("iBFT detected.\n");
>  
>  		rc = ibft_check_device();
>  		if (rc)
> Index: linux-2.6/drivers/firmware/iscsi_ibft_find.c
> ===================================================================
> --- linux-2.6.orig/drivers/firmware/iscsi_ibft_find.c
> +++ linux-2.6/drivers/firmware/iscsi_ibft_find.c
> @@ -94,6 +94,7 @@ static int __init find_ibft_in_mem(void)
>  				 * the table cannot be valid. */
>  				if (pos + len <= (IBFT_END-1)) {
>  					ibft_addr = (struct acpi_table_ibft *)virt;
> +					pr_info("iBFT found at 0x%lx.\n", pos);
>  					goto done;
>  				}
>  			}
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2011-12-08 19:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-08  8:22 [PATCH] ibft: Fix finding ibft with ACPI tables Yinghai Lu
2011-12-08 14:29 ` Konrad Rzeszutek Wilk
2011-12-08 15:01   ` Peter Jones
2011-12-08 16:51   ` Yinghai Lu
2011-12-08 16:52   ` [PATCH -v2] ibft: Fix finding IBFT ACPI table on UEFI Yinghai Lu
2011-12-08 19:08     ` Konrad Rzeszutek Wilk [this message]
2011-12-08 21:16       ` Yinghai Lu
2011-12-08 21:17       ` [PATCH -v3] " Yinghai Lu
2011-12-12 17:17         ` Konrad Rzeszutek Wilk
2011-12-12 20:39           ` Yinghai Lu

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=20111208190808.GA25433@andromeda.dapyr.net \
    --to=konrad@darnok.org \
    --cc=akpm@linux-foundation.org \
    --cc=konrad@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=pjones@redhat.com \
    --cc=yinghai.lu@oracle.com \
    /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

Powered by JetHome