Skip to contentSkip to conversation

]

PATCH In review Len Brown 7 participants 10 messages Aug 9, 2004 – Aug 16, 2004 2 messages not in the archive ACPI

lore
Share & tools
lore

Len Brown

author
#0 lore raw

PATCH 1/1 ]

This looks handy.
comments?

thanks,
-Len

--
andy grover email: [email protected]

Hi Andy
enclosed is a patch for kernel 2.6.7 to include a custom dsdt into osl.c It comes handy if you want to patch your dsdt, like i did for my DELL inspiron 5100.
Can you put it to the dsdt-part of your acpi-page?
Greetings
Ulf

--
Dipl.-Ing Ulf Dambacher
Paul Dambacher GERTUS Werkzeugfabrik GmbH&Co.KG
Zeppelinstr. 17
79331 Teningen - Nimburg
Tel: +49 7663 912 448
Fax: +49 7663 912 445 [email protected]

drivers/acpi/Kconfig renamed from drivers/acpi/Kconfig.orig +17 -0
@@ -204,6 +204,23 @@
 	  If you have a legacy free Toshiba laptop (such as the Libretto L1
 	  series), say Y.
 
+config ACPI_CUSTOM_TABLE
+	bool "Include Custom ACPI Table"
+	depends on X86
+	depends on ACPI_INTERPRETER
+	default ""
+	help
+	  Thist option is to load a custom acpi dsdt table, e.g. for buggy acpi 
+	  implementations like on DELL inspiron 5100
+
+config ACPI_CUSTOM_TABLE_FILE
+	string "Custom ACPI Table file to include"
+	depends on ACPI_CUSTOM_TABLE
+	default ""
+	help
+	  please enter the full path name to the file wich includes the AmlCode delclaration
+
+
 config ACPI_DEBUG
 	bool "Debug Statements"
 	depends on ACPI_INTERPRETER
drivers/acpi/osl.c renamed from drivers/acpi/osl.c.orig +10 -0
@@ -55,6 +55,9 @@
     void		    *context;
 };
 
+#ifdef CONFIG_ACPI_CUSTOM_TABLE
+#include CONFIG_ACPI_CUSTOM_TABLE_FILE
+#endif
 
 #ifdef ENABLE_DEBUGGER
 #include <linux/kdb.h>
@@ -235,7 +238,14 @@
 	if (!existing_table || !new_table)
 		return AE_BAD_PARAMETER;
 
+#ifdef CONFIG_ACPI_CUSTOM_TABLE
+	if (strncmp(existing_table->signature, "DSDT", 4) == 0)
+		*new_table = (struct acpi_table_header*)AmlCode;
+	else
+		*new_table = NULL;
+#else
 	*new_table = NULL;
+#endif
 	return AE_OK;
 }
 
#1 lore raw

Thus wrote Len Brown:

Quoted 2 lines

This looks handy.
comments?

I guess the DSDT-in-initrd patch is more flexible, specifying the DSDT at compile time is clearly not something distro maintainers would love to do :)
Best regards,

Signature · 9 lines
Karol 'sziwan' Kozimor
sziwan-DETuoxkZsSqrDJvtcaxF/[email protected]


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com

A message that is not in the archive (sent off-list or not yet received): 20040809174935.GA20719-DETuoxkZsSqrDJvtcaxF/[email protected]

#3 lore raw
Quoted 7 lines · Karol Kozimor

Thus wrote Len Brown:

Quoted 2 lines

This looks handy.
comments?

I guess the DSDT-in-initrd patch is more flexible, specifying the DSDT at compile time is clearly not something distro maintainers would love to do :)

However, I'd dislike needing to use an initrd. Maybe _both_ options would be best? Or even three choices, with initramfs being the third...

Dominik

-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285

#4 lore raw
In reply to Len Brown
Quoted 2 lines · On 09 Aug 2004 12:59:16 -0400, Len Brown <len.brown <at> intel.com> wrote:

This looks handy.
comments?

You should take the patch of Michael Blumenstein for initrd support:

http://gaugusch.at/kernel.shtml

http://gaugusch.at/acpi-dsdt-initrd-patches/acpi-dsdt-initrd-patch-v0.4-2.6.7.patch

I use it and I can confirm that it works :)

Stefan

-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com

A message that is not in the archive (sent off-list or not yet received): e7963922040809112873fd7be4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

author
#6 lore raw
Quoted 5 lines · Stefan Schweizer
Quoted 2 lines · On 09 Aug 2004 12:59:16 -0400, Len Brown <len.brown <at> intel.com> wrote:

This looks handy.
comments?

Quoted 7 lines

You should take the patch of Michael Blumenstein for initrd support:

http://gaugusch.at/kernel.shtml

http://gaugusch.at/acpi-dsdt-initrd-patches/acpi-dsdt-initrd-patch-v0.4-2.6.7.patch

I use it and I can confirm that it works :)

Yes, the dsdt-in-initrd patch works.
Yes, it is perfect for the unfortunate but determined soul who administers a variety of broken machines where they all run the same kernel and require a different DSDT -- I really do feel sorry for that person and look forward to the day they find non-broken hardware.

But DSDT overrides are for developers, not end-users, not customers. Nobody can support the OEM's firmware, or a modified version of it except the OEM themselves. If a developer happens to fix an OEM's firmware and sends the OEM the fix, that happy situation is purely between the end-user and the OEM. Distros should absolutely never be in the business of supporting hardware running modified firmware.

I think that one major Distro pulled the dsdt-in-initrd patch, and I think it was a mistake for them to do so -- they can't support it.

That said, it is useful for developers to be able to override the DSDT. There are two methods -- re-build kernel or re-build kernel and also modify the initrd.

Kernel re-build is (I think) simple enought. I think the patch at hand takes it from simple to trivial.

Kernel re-build + initrd update I dislike because it depends on the existence of an initrd (not everybody uses has an initrd, I haven't used an initrd in over a year), and worse, it depends on the format of the initrd, which we don't control.

Anyway, I hope that my position, and the reason I haven't pulled the perfectly functional and useful dsdt-in-initrd patch before is clear.

Any comments on the patch at hand?

thanks,
-Len

-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285

#7 lore raw
Quoted 5 lines

Yes, the dsdt-in-initrd patch works.
Yes, it is perfect for the unfortunate but determined soul who administers a variety of broken machines where they all run the same kernel and require a different DSDT -- I really do feel sorry for that person and look forward to the day they find non-broken hardware.

I only use it on one machine and if I want to change the dsdt I dont want to recompile my kernel.

Quoted 7 lines

But DSDT overrides are for developers, not end-users, not customers. Nobody can support the OEM's firmware, or a modified version of it except the OEM themselves. If a developer happens to fix an OEM's firmware and sends the OEM the fix, that happy situation is purely between the end-user and the OEM. Distros should absolutely never be in the business of supporting hardware running modified firmware.

Right, distros should not support it, but people who know what they do should have the ability to do it easy and w/o recompiling the kernel.

Quoted 2 lines

I think that one major Distro pulled the dsdt-in-initrd patch, and I think it was a mistake for them to do so -- they can't support it.

They do not need to support it - if people use it, its on their own risk.

Quoted 3 lines

That said, it is useful for developers to be able to override the DSDT. There are two methods -- re-build kernel or re-build kernel and also modify the initrd.

the difference is I can do the second one without looking into the howto, because i know where my initrd is - in fact it is the DSDT.aml. For the first method I would need to know the place where to copy the dsdt - and always recompile/recopy/reinstall the kernel for minimal changes.

Quoted 8 lines

Kernel re-build is (I think) simple enought. I think the patch at hand takes it from simple to trivial.

Kernel re-build + initrd update I dislike because it depends on the existence of an initrd (not everybody uses has an initrd, I haven't used an initrd in over a year), and worse, it depends on the format of the initrd, which we don't control.

Initramfs would be the solution here - why not use it as additional method?

Quoted 3 lines

Anyway, I hope that my position, and the reason I haven't pulled the perfectly functional and useful dsdt-in-initrd patch before is clear.

Can you not just provide all possibilities, so that the user, sorry the "developer", can decide himself how he wants to override his initrd?

-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285

#8 lore raw
In reply to Len Brown

Thus wrote Len Brown:

Quoted 1 line

Any comments on the patch at hand?

The patch is pretty straightforward, though I'd guess the help text could be more general (I mean, there are dozens of systems that require overrides), if you really need my $0.02.
Best regards,

Signature · 9 lines
Karol 'sziwan' Kozimor
sziwan-DETuoxkZsSqrDJvtcaxF/[email protected]


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
#9 lore raw
In reply to Len Brown

On Mon, 2004-08-09 at 15:41, Len Brown wrote:
<snip>

Quoted 4 lines

Kernel re-build + initrd update I dislike because it depends on the existence of an initrd (not everybody uses has an initrd, I haven't used an initrd in over a year), and worse, it depends on the format of the initrd, which we don't control.

</snip>

Just a quick comment on this, the DSDT-initrd patch doesn't require an initrd per se, i.e. using mkinitrd to create one, just the initrd option in the kernel. It allows you to specify the compiled DSDT file as the initrd itself making it very easy to change DSDTs without recompiling the kernel - just compile the DSDT and tell the boot-loader where to find it with the initrd option. It also has the ability to detect the DSDT when it's inserted into an actual initrd but that functionality is pretty secondary and simply makes the patch usable for those poor people still using an initrd for some reason. I do agree that it's definitely most useful for developers but I think having it as an option in the main line may be handy for many "advanced users" as well.

-Herman

-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285

#10 lore raw
In reply to Len Brown
Quoted 2 lines · Len Brown

I think that one major Distro pulled the dsdt-in-initrd patch, and I think it was a mistake for them to do so -- they can't support it.

Of course we (SUSE) probably cannot support machines with custom DSDT - but we neither can support the ones with a broken DSDT that just won't work. But we can give even less support for self-compiled kernels, so the dog bites its tail.
The DSDT-initrd-Patch at least gives me the possibility to tell a user "If you are really desperate, you can try to fix your DSDT and override it by doing this...".

Quoted 3 lines

That said, it is useful for developers to be able to override the DSDT. There are two methods -- re-build kernel or re-build kernel and also modify the initrd.

With SUSE it is just "ACPI_DSDT=/boot/my/dsdt/file" in a config file and "mkinitrd" afterwards.

Signature · 9 lines
Stefan Seyfried



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
#11 lore raw
In reply to Len Brown

Hi!

Quoted 2 lines

This looks handy.
comments?

It certainly makes life better for developers.

Pavel

Quoted 53 lines
drivers/acpi/Kconfig renamed from drivers/acpi/Kconfig.orig +17 -0
@@ -204,6 +204,23 @@
 	  If you have a legacy free Toshiba laptop (such as the Libretto L1
 	  series), say Y.
 
+config ACPI_CUSTOM_TABLE
+	bool "Include Custom ACPI Table"
+	depends on X86
+	depends on ACPI_INTERPRETER
+	default ""
+	help
+	  Thist option is to load a custom acpi dsdt table, e.g. for buggy acpi 
+	  implementations like on DELL inspiron 5100
+
+config ACPI_CUSTOM_TABLE_FILE
+	string "Custom ACPI Table file to include"
+	depends on ACPI_CUSTOM_TABLE
+	default ""
+	help
+	  please enter the full path name to the file wich includes the AmlCode delclaration
+
+
 config ACPI_DEBUG
 	bool "Debug Statements"
 	depends on ACPI_INTERPRETER
drivers/acpi/osl.c renamed from drivers/acpi/osl.c.orig +10 -0
@@ -55,6 +55,9 @@
     void		    *context;
 };
 
+#ifdef CONFIG_ACPI_CUSTOM_TABLE
+#include CONFIG_ACPI_CUSTOM_TABLE_FILE
+#endif
 
 #ifdef ENABLE_DEBUGGER
 #include <linux/kdb.h>
@@ -235,7 +238,14 @@
 	if (!existing_table || !new_table)
 		return AE_BAD_PARAMETER;
 
+#ifdef CONFIG_ACPI_CUSTOM_TABLE
+	if (strncmp(existing_table->signature, "DSDT", 4) == 0)
+		*new_table = (struct acpi_table_header*)AmlCode;
+	else
+		*new_table = NULL;
+#else
 	*new_table = NULL;
+#endif
 	return AE_OK;
 }
 
Signature · 9 lines
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285