All of lore.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: Zhao Yakui <yakui.zhao@intel.com>
Cc: linux-acpi@vger.kernel.org
Subject: Re: [PATCH] ACPI:introduce boot option acpi=rsdt_forced
Date: Thu, 23 Aug 2007 16:11:43 -0400	[thread overview]
Message-ID: <200708231611.43229.lenb@kernel.org> (raw)
In-Reply-To: <1187603293.3894.11.camel@yakui_zhao.sh.intel.com>

This is a good debug patch.
But I'd rather not bother upstream with it,
unless there is another case besides bugzilla 8630
that needs it.  For Linux should be fixed to handle
the failure in 8630 automatically w/o need for user-intervention.

thanks,
-Len

On Monday 20 August 2007 05:48, Zhao Yakui wrote:
> Subject: ACPI: introduce boot option acpi=rsdt_forced
> From: Zhao Yakui  <yakui.zhao@intel.com>
> 
> Maybe XSDT has NULL entry address. When it is found that
> XSDT has NULL entry address, the promote info is given to user
> (XSDT has NULL entry address, please try to boot with "acpi=rsdt_forced").
> The system had better be booted with acpi=rsdt_forced option
> 
> http://bugzilla.kernel.org/show_bug.cgi?id=8630
> 
> Signed-off-by: Zhao Yakui  <yakui.zhao@intel.com>
> 
> ---
>  Documentation/kernel-parameters.txt |    1 +
>  arch/i386/kernel/acpi/boot.c        |    4 ++++
>  drivers/acpi/tables/tbutils.c       |   13 ++++++++++---
>  include/acpi/acglobal.h             |    2 ++
>  4 files changed, 17 insertions(+), 3 deletions(-)
> 
> Index: linux-2.6.23-rc3/Documentation/kernel-parameters.txt
> ===================================================================
> --- linux-2.6.23-rc3.orig/Documentation/kernel-parameters.txt
> +++ linux-2.6.23-rc3/Documentation/kernel-parameters.txt
> @@ -132,6 +132,7 @@ and is between 256 and 4096 characters. 
>  			ht -- run only enough ACPI to enable Hyper Threading
>  			strict -- Be less tolerant of platforms that are not
>  				strictly ACPI specification compliant.
> +			rsdt_forced -- force to use RSDT table
>  
>  			See also Documentation/pm.txt, pci=noacpi
>  
> Index: linux-2.6.23-rc3/arch/i386/kernel/acpi/boot.c
> ===================================================================
> --- linux-2.6.23-rc3.orig/arch/i386/kernel/acpi/boot.c
> +++ linux-2.6.23-rc3/arch/i386/kernel/acpi/boot.c
> @@ -1248,6 +1248,10 @@ static int __init parse_acpi(char *arg)
>  	/* "acpi=noirq" disables ACPI interrupt routing */
>  	else if (strcmp(arg, "noirq") == 0) {
>  		acpi_noirq_set();
> +	}
> +	/* "acpi=rsdt_forced" force to use RSDT */
> +	else if (strcmp(arg, "rsdt_forced") == 0) {
> +		rsdt_forced = 1;
>  	} else {
>  		/* Core will printk when we return error. */
>  		return -EINVAL;
> Index: linux-2.6.23-rc3/drivers/acpi/tables/tbutils.c
> ===================================================================
> --- linux-2.6.23-rc3.orig/drivers/acpi/tables/tbutils.c
> +++ linux-2.6.23-rc3/drivers/acpi/tables/tbutils.c
> @@ -47,6 +47,7 @@
>  #define _COMPONENT          ACPI_TABLES
>  ACPI_MODULE_NAME("tbutils")
>  
> +u32 rsdt_forced ;
>  /* Local prototypes */
>  static acpi_physical_address
>  acpi_tb_get_root_table_entry(u8 * table_entry,
> @@ -341,6 +342,7 @@ acpi_tb_parse_root_table(acpi_physical_a
>  	u32 table_count;
>  	struct acpi_table_header *table;
>  	acpi_physical_address address;
> +	acpi_physical_address entry_address;
>  	u32 length;
>  	u8 *table_entry;
>  	acpi_status status;
> @@ -361,7 +363,8 @@ acpi_tb_parse_root_table(acpi_physical_a
>  
>  	/* Differentiate between RSDT and XSDT root tables */
>  
> -	if (rsdp->revision > 1 && rsdp->xsdt_physical_address) {
> +	if (rsdp->revision > 1 && rsdp->xsdt_physical_address
> +		&& !rsdt_forced) {
>  		/*
>  		 * Root table is an XSDT (64-bit physical addresses). We must use the
>  		 * XSDT if the revision is > 1 and the XSDT pointer is present, as per
> @@ -455,11 +458,15 @@ acpi_tb_parse_root_table(acpi_physical_a
>  		acpi_gbl_root_table_list.tables[acpi_gbl_root_table_list.count].
>  		    address =
>  		    acpi_tb_get_root_table_entry(table_entry, table_entry_size);
> -
> +		entry_address =
> +		    acpi_tb_get_root_table_entry(table_entry, table_entry_size);
> +		if (!entry_address && table_entry_size == sizeof(u64) ) {
> +			ACPI_WARNING((AE_INFO, "XSDT has NULL entry. "
> +			"Please try to boot with \"acpi=rsdt_forced\""));
> +		}
>  		table_entry += table_entry_size;
>  		acpi_gbl_root_table_list.count++;
>  	}
> -
>  	/*
>  	 * It is not possible to map more than one entry in some environments,
>  	 * so unmap the root table here before mapping other tables
> Index: linux-2.6.23-rc3/include/acpi/acglobal.h
> ===================================================================
> --- linux-2.6.23-rc3.orig/include/acpi/acglobal.h
> +++ linux-2.6.23-rc3/include/acpi/acglobal.h
> @@ -117,6 +117,8 @@ extern u32 acpi_dbg_layer;
>  
>  extern u32 acpi_gbl_nesting_level;
>  
> +extern u32 rsdt_forced;
> +
>  /* Event counters */
>  
>  ACPI_EXTERN u32 acpi_gpe_count;
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

      reply	other threads:[~2007-08-23 20:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-20  9:48 [PATCH] ACPI:introduce boot option acpi=rsdt_forced Zhao Yakui
2007-08-23 20:11 ` Len Brown [this message]

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=200708231611.43229.lenb@kernel.org \
    --to=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=yakui.zhao@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.