All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: "Moore, Robert" <robert.moore@intel.com>
Cc: "Koornstra, Reinoud" <koornstra@hp.com>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"Brown, Len" <len.brown@intel.com>,
	"Lin, Ming M" <ming.m.lin@intel.com>,
	"Zhao, Yakui" <yakui.zhao@intel.com>
Subject: Re: 2.6.28-rc7 acpi error messages
Date: Fri, 5 Dec 2008 16:37:52 +0000	[thread overview]
Message-ID: <20081205163752.GA26710@srcf.ucam.org> (raw)
In-Reply-To: <4911F71203A09E4D9981D27F9D8308580DD53D0B@orsmsx503.amr.corp.intel.com>

On Fri, Dec 05, 2008 at 08:32:11AM -0800, Moore, Robert wrote:
> So, it looks like there are two possible solutions for this machine:
> 
> 1) Use the RSDT instead of the XSDT and automatically get the "correct" FADT with no 64-bit register definitions.
> 
> 2) Use the XSDT as is done today, but use the 32-bit values instead of the 64-bit values in the extended FADT.

I think (2) is the correct answer here. If the 64-bit values use an 
address space other than system io, we probably want to use the 64-bit 
values, so we'll need to parse those addresses anyway. I've sent a patch 
that does this to linux-acpi last week - here's another copy.

commit acdf192e7427366b01fe37704fe95b205490dad2
Author: Matthew Garrett <mjg@redhat.com>
Date:   Mon Dec 1 10:54:05 2008 +0000

    Use 32-bit FADT values on X86
    
    The ACPI specification says that we should use the 64-bit address offsets
    contained within the FADT if they exist. However, Windows uses the legacy
    address. Various vendors have left incorrect values in the 64-bit field
    which then causes problems later. Since the vast majority of machines have
    never been tested with an OS that uses the 64-bit value by default, we should
    behave like Windows and ignore the spec by only using the 64-bit address if
    it contains something that can't be represented in the legacy field. Since
    system io space is only 16 bits on x86, this should be entirely safe.
    
    Signed-off-by: Matthew Garrett <mjg@redhat.com>

diff --git a/drivers/acpi/tables/tbfadt.c b/drivers/acpi/tables/tbfadt.c
index 2817158..89a3c82 100644
--- a/drivers/acpi/tables/tbfadt.c
+++ b/drivers/acpi/tables/tbfadt.c
@@ -320,9 +320,30 @@ static void acpi_tb_convert_fadt(void)
 		    ACPI_ADD_PTR(struct acpi_generic_address, &acpi_gbl_FADT,
 				 fadt_info_table[i].target);
 
-		/* Expand only if the X target is null */
-
-		if (!target->address) {
+		/*
+		 * The ACPI specification says that we should use the
+		 * 64-bit address offsets if they exists. However,
+		 * Windows uses the legacy address. Various vendors
+		 * have left incorrect values in the 64-bit field,
+		 * which then causes problems later. Since the vast
+		 * majority of machines have never been tested with an
+		 * OS that uses the 64-bit value by default, we should
+		 * behave like Windows and ignore the spec by only
+		 * using the 64-bit address if it contains something
+		 * that can't be represented in the legacy
+		 * field. Since system io space is only 16 bits on
+		 * x86, this should be entirely safe. We also extend
+		 * the 32-bit value into the 64-bit one if no 64-bit
+		 * address is provided.
+		 */
+
+		if (!target->address
+#ifdef CONFIG_X86
+		    || (target->space_id == ACPI_ADR_SPACE_SYSTEM_IO &&
+			*ACPI_ADD_PTR(u32, &acpi_gbl_FADT,
+				      fadt_info_table[i].source))
+#endif
+			) {
 			acpi_tb_init_generic_address(target,
 						     *ACPI_ADD_PTR(u8,
 								   &acpi_gbl_FADT,

-- 
Matthew Garrett | mjg59@srcf.ucam.org

  reply	other threads:[~2008-12-05 16:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-03 21:22 2.6.28-rc7 acpi error messages Koornstra, Reinoud
2008-12-03 22:43 ` Moore, Robert
2008-12-03 23:03   ` Matthew Garrett
2008-12-03 23:12     ` Moore, Robert
2008-12-03 23:35       ` Matthew Garrett
2008-12-04  1:22         ` Koornstra, Reinoud
2008-12-04  2:08         ` Zhao Yakui
2008-12-04 15:50         ` Moore, Robert
2008-12-04 19:03           ` Koornstra, Reinoud
2008-12-04 20:31             ` Moore, Robert
2008-12-04 21:08               ` Matthew Garrett
2008-12-04 22:49             ` Moore, Robert
2008-12-04 23:02               ` Matthew Garrett
2008-12-05 16:32               ` Moore, Robert
2008-12-05 16:37                 ` Matthew Garrett [this message]
2008-12-05 16:58                   ` Moore, Robert
2008-12-05 17:01                     ` Skywing
2008-12-05 17:21                     ` Matthew Garrett
2008-12-05 17:42                       ` Moore, Robert
2008-12-05 17:48                         ` Matthew Garrett
2008-12-05 17:57                         ` Koornstra, Reinoud
2008-12-05 19:55                     ` Koornstra, Reinoud
2008-12-03 23:06   ` Koornstra, Reinoud

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=20081205163752.GA26710@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=koornstra@hp.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=ming.m.lin@intel.com \
    --cc=robert.moore@intel.com \
    --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.