public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Chiang <achiang@hp.com>
To: Greg KH <greg@kroah.com>, Matt_Domsch@dell.com
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>,
	linux-pci@atrey.karlin.mff.cuni.cz,
	Kristen Carlson Accardi <kristen.c.accardi@intel.com>,
	gregkh@suse.de, lenb@kernel.org, matthew@wil.cx,
	rick.jones2@hp.com, linux-kernel@vger.kernel.org,
	pcihpd-discuss@lists.sourceforge.net, linux-acpi@vger.kernel.org
Subject: Re: [PATCH 0/5][RFC] Physical PCI slot objects
Date: Thu, 15 Nov 2007 13:20:43 -0700	[thread overview]
Message-ID: <20071115202043.GB25052@ldl.fc.hp.com> (raw)
In-Reply-To: <20071114220022.GB19850@kroah.com>

Hi Greg, Matt,

* Greg KH <greg@kroah.com>:
> On Wed, Nov 14, 2007 at 02:42:21PM -0700, Alex Chiang wrote:
> > * Greg KH <greg@kroah.com>:
> > > On Wed, Nov 14, 2007 at 10:37:08AM -0700, Bjorn Helgaas wrote:
> > > > 
> > > > So I agree that the firmware kit has a clever hack that works
> > > > on much existing x86 firmware, and it sounds like Tivoli
> > > > might even rely on it.  But I don't feel good about it, and
> > > > it could easily break when some BIOS writer needs to make
> > > > _SUN slightly more complicated.
> > > 
> > > Do you know of such BIOSes out there that do this?  Will the
> > > above scheme not work for the ia64 boxes that you know of that
> > > are out in the world today?
> > 
> > One last mail on this subject -- Bjorn has pointed out to me that
> > the Dell pe6800 and rez1850 both implement _SUN as control
> > methods today.
> 
> Does the firmware kit break on them?

I downloaded the firmware kit today and played with it. There is
a test called SUN.exe, which searches through the DSDT, looking
to verify that there are no duplicate _SUN values in the system.

The test breaks on my hp rx6600 (a currently shipping platform),
because _SUN is not a hard-coded value, but implemented as an AML
control method. From the various SSDT dumps:

Here's the _SUN for a slot:
	Method (_SUN, 0, Serialized)
	{
		Store (\SLOT.SUN, ^_UID)
		Local0
		Return (Local0)
	}

Here's the _SUN for a processor:
	Method (_SUN, 0, NotSerialized)
	{
		Store (\CPUL.SUN, ^CPID)
		Local0
		Return (Local0)
	}

So parse_SUN_name() from SUN.c is just plain broken. The test
"passes" because it doesn't find any duplicate values for _SUN,
but what's really going on is that it doesn't find *any* values
of _SUN, so of course there won't be duplicates. ;)

I looked at convincing this test to try and execute the method
using ExecuteAmlMethod() and/or execute_aml_method(), but of
course, that won't work on a modern kernel, as they depend on
/proc/acpi/hotkey/, which was removed (as Bjorn pointed out).

Matt, is there any chance you could see if the firmware kit works
or breaks on your PE6800? 

I downloaded the latest tarball:

  http://www.linuxfirmwarekit.org/download/firmwarekit-r3.tar.gz

And ran it in stand-alone mode. You do need to build the test
suite, but you don't need to run the entire thing -- just run the
SUN/SUN.exe that is generated. (If you get odd complaints about
not being able to find libstandalone.so, just stick it in
/usr/local/lib, modify /etc/ld.so.conf as necessary and run
ldconfig).

Please apply the following debug patch to see how many _SUN
objects the test is actually finding. On my machine, I don't find
any _SUN objects.

Thanks.

/ac

diff --git a/SUN/SUN.c b/SUN/SUN.c
index 90264a7..3b21b9c 100644
--- a/SUN/SUN.c
+++ b/SUN/SUN.c
@@ -260,6 +260,7 @@ static void parse_SUN_name(gpointer data, gpointer user_data)
 int main(int argc, char **argv)
 {
 
+	int i;
 	start_test("SUN", "SUN duplicate test", 
 	"This makes sure that each SUN (Slot Unique Number) that is "
 	"called in the DSDT through the Name() method is unique, no "
@@ -281,6 +282,11 @@ int main(int argc, char **argv)
 		
 	/* List SUN duplicates (if any) */
 	do_SUN_check();
+
+ 	while(SUN_list[i].line_num) { 
+		printf("## found SUN: %s\n", SUN_list[i].SUN_hexnum);
+		i++;
+	}
 	
 	finish_test("SUN");
 	return EXIT_SUCCESS;


  reply	other threads:[~2007-11-15 20:29 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-13  0:08 [PATCH 0/5][RFC] Physical PCI slot objects Alex Chiang
2007-11-13  0:12 ` [PATCH 1/5] Remove path attribute from sgi_hotplug Alex Chiang
2007-11-13  0:13 ` [PATCH 2/5] Construct one fakephp slot per pci slot Alex Chiang
2007-11-13 19:48   ` Linas Vepstas
2007-11-13 19:52     ` Matthew Wilcox
2007-11-14 12:39   ` [Pcihpd-discuss] " Rolf Eike Beer
2007-11-14 14:17     ` Alex Chiang
2007-11-14 14:49       ` Rolf Eike Beer
2007-11-14 15:01         ` Alex Chiang
2007-11-13  0:14 ` [PATCH 3/5, RFC] Introduce pci_slot Alex Chiang
2007-11-13 19:56   ` Linas Vepstas
2007-11-13 20:03     ` Matthew Wilcox
2007-11-13  0:17 ` [PATCH 4/5, RFC] ACPI PCI slot detection driver Alex Chiang
2007-11-13  0:18   ` [PATCH 5/5] Add pci_slot_add_hotplug() interface Alex Chiang
2007-11-13 17:01 ` [PATCH 0/5][RFC] Physical PCI slot objects Greg KH
2007-11-13 18:33   ` Matthew Wilcox
2007-11-13 18:51     ` Greg KH
2007-11-13 20:11       ` Matthew Wilcox
2007-11-13 20:19         ` Greg KH
2007-11-13 23:08         ` Gary Hade
2007-11-14  1:37           ` Alex Chiang
2007-11-15  0:40             ` Gary Hade
2007-11-15 17:36               ` Alex Chiang
2007-11-15 23:38                 ` Gary Hade
2007-11-14 14:42           ` Alex Chiang
2007-11-14 18:13             ` Gary Hade
2007-11-14 18:36               ` Alex Chiang
2007-11-13 20:36       ` Alex Chiang
2007-11-13 21:30         ` Greg KH
2007-11-13 22:01           ` Bjorn Helgaas
2007-11-13 22:16             ` Greg KH
2007-11-13 21:15       ` Matt Domsch
2007-11-13 21:31         ` Alex Chiang
2007-11-13 21:36           ` Greg KH
2007-11-13 23:14             ` Alex Chiang
2007-11-13 21:32         ` Greg KH
2007-11-13 20:21   ` Alex Chiang
2007-11-13 20:26     ` Greg KH
2007-11-13 22:51       ` Rick Jones
2007-11-13 22:56         ` Greg KH
2007-11-13 23:04           ` Matthew Wilcox
2007-11-13 23:07             ` Greg KH
2007-11-14  6:00               ` Scott Murray
2007-11-13 23:33             ` Kristen Carlson Accardi
2007-11-14  0:10               ` Matthew Wilcox
2007-11-14  9:55                 ` Kenji Kaneshige
2007-11-14 18:38                   ` Kristen Carlson Accardi
2007-11-13 22:59       ` Kristen Carlson Accardi
2007-11-14 17:37         ` Bjorn Helgaas
2007-11-14 17:53           ` Greg KH
2007-11-14 19:53             ` Alex Chiang
2007-11-14 21:24             ` Alex Chiang
2007-11-14 21:42             ` Alex Chiang
2007-11-14 22:00               ` Greg KH
2007-11-15 20:20                 ` Alex Chiang [this message]
2007-11-14 17:44       ` Matthew Garrett
2007-11-14 17:51         ` Greg KH
2007-11-14 18:03           ` Matthew Garrett
2007-11-13 20:24   ` Linas Vepstas
2007-11-13 20:59     ` Alex Chiang
2007-11-13 21:41       ` Linas Vepstas
2007-11-13 21:58         ` Matthew Wilcox
2007-11-14  1:07   ` Andi Kleen
2007-11-14 14:17     ` Matthew Wilcox
2007-11-14 14:35       ` Andi Kleen
2007-11-14 15:00         ` Matthew Wilcox
2007-11-14 15:08           ` Andi Kleen
2007-11-14 15:12             ` Matthew Wilcox
2007-11-14 15:20             ` Alex Chiang
2007-11-14 11:43 ` Kenji Kaneshige

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=20071115202043.GB25052@ldl.fc.hp.com \
    --to=achiang@hp.com \
    --cc=Matt_Domsch@dell.com \
    --cc=bjorn.helgaas@hp.com \
    --cc=greg@kroah.com \
    --cc=gregkh@suse.de \
    --cc=kristen.c.accardi@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=matthew@wil.cx \
    --cc=pcihpd-discuss@lists.sourceforge.net \
    --cc=rick.jones2@hp.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