Bug 3774
Summary: | RFE: ability to override SSDT | ||
---|---|---|---|
Product: | ACPI | Reporter: | Len Brown (lenb) |
Component: | Config-Tables | Assignee: | Len Brown (lenb) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | acpi-bugzilla, trenn |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.9 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Attachments: |
ssdt_override-acpi-2.6.patch
ssdt_override-acpica.patch ssdt_override-acpi-2.6.patch updated version after review kernel 2.4.29-pre1 with cpufreq and applying override DSDT and SSDT second patch for kernel 2.4 Extention to implement DSDT or SSDT override (also multiple ones) via initramfs. 2.6.22 patch adding "acpi_no_auto_ssdt" bootparam |
Description
Len Brown
2004-11-19 07:16:42 UTC
Created attachment 4136 [details]
ssdt_override-acpi-2.6.patch
Created attachment 4137 [details]
ssdt_override-acpica.patch
need to make the ssdt and dsdt be static/global to different c files. Created attachment 4236 [details]
ssdt_override-acpi-2.6.patch updated version after review
Hi, after read bug 3507. I am prepared to override the DSDT, putting the stuff found in the SSDT directly into the DSDT. In this case, have I to apply the patch ssdt_override-acpica.patch ? Or should try, only override SSDT patching drivers/acpi/osl.c for SSDT (http://bugme.osdl.org/show_bug.cgi?id=3507#c41) and apply ssdt_override-acpica.patch ? thanks, You need to apply attachment 4137 [details] and attachment 4236 [details] in this bug. Then tell the kernel where is your ssdt.hex with make menuconfig. Created attachment 4314 [details]
kernel 2.4.29-pre1 with cpufreq and applying override DSDT and SSDT
still have this warning message
acpi_processor-0899 [27] acpi_processor_get_per: Unsupported address space
[127] (control_register)
Created attachment 4315 [details]
second patch for kernel 2.4
Note : there is no need include files
just:
edit DSDT.hex and replace AmlCode to AmlCode2
cp DSDT.hex /usr/src/linux-2.4.29-pre1/drivers/acpi/tables/acpi_dsdt.c
cp SSDT.hex /usr/src/linux-2.4.29-pre1/drivers/acpi/tables/acpi_ssdt.c
>acpi_processor-0899 [27] acpi_processor_get_per: Unsupported address space
>[127] (control_register)
This appears the MSR based CPU frequency issue. I wonder if 2.4 supports it.
Please try 2.6
Attachment 4315 [details] is suboptimal because a system might have multiple SSDTs.
Zhu: I tried patch http://bugme.osdl.org/attachment.cgi?id=4236&action=view on 2.6.11.X and it did not work for me. I grepped osl.o for SSDT and it matched. However the bad code in the BIOS SSDT still caused errors. Is it possible that in lower functions the DSDT code is replaced (only one is possible?) and the SSDT functions are added (mulitple SSDTs possible?) I also wonder why the status is fixed, but I couldn't override my SSDT with 2.6.12-rc5 kernel. What is the policy to set a bug resolved fixed? Thanks. DSDT and SSDT can be overwritten at the same time with the patch (select an AmlCode file for each in menuconfig). If you have multiple SSDTs, you must merge them into a single AmlCode file. If you choose to overwrite SSDT, ACPI will not use any SSDT in the BIOS, only uses the one you provided. Strange, I was sure the SSDT was not overridden -> will double check. Could you also comment on committed code to mm or vanilla, please? Is this patch somewhere mainstream? I thought Len is closing the bugs when he submitted code to vanilla/mm? Can I generally assume to find closed bugzilla code at some specially place? E.g. in this case it might not go mainline, but help developers and can be found at some special place? For discarded code the bug should be closed won't fix or invalid? The problem with this approach is that systems may have multiple SSDT. Also DSDT may explicitly Load the SSDT. If > 1 SSDT, then an SSDT override is not practical, and consolidating the code into the DSDT is necessary in a DSDT override. If explicitly Loaded SSDT, the DSDT must also be changed to add the desired SSDT code and to remove the explicit Load. So in either case, a DSDT override is both necessary and sufficient, and having the capability to override the SSDT is not going to help. ie. what we need is the ability to augment and override the DSDT (which we already have), and the ability to disable automatically loading SSDT(s) which are specified in the RSDT. what is the status of this bug ? There are patches from HP on linux-acpi mail list to skip loading of SSDTs in case the DSDT gets overwritten. So, in case you create custom DSDT, and the patch is applied, you will need to push all SSDTs into it. What's the status of this bug? Do we still plan to add this function? IMO, overriding SSDTs is a good idea for some buggy bios. But it's not easy to make it work, especially for the dynamical SSDTs, Overriding the static SSDTs only doesn't make sense. Any ideas? :) Subject: Re: RFE: ability to override SSDT bugme-daemon@bugzilla.kernel.org wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=3774 > > > > > > ------- Comment #17 from rui.zhang@intel.com 2007-07-09 02:32 ------- > What's the status of this bug? > Do we still plan to add this function? > IMO, overriding SSDTs is a good idea for some buggy bios. > But it's not easy to make it work, especially for the dynamical SSDTs, > Overriding the static SSDTs only doesn't make sense. > Any ideas? :) > > > It was decided that if someone wanted to have a custom SSDT, it's easier to embed it into DSDT and be done. Namespace will bark on duplicate names, but work. Regards, Alex. That sounds nice. So which status should we change this bug to? Reject it as WILL_NOT_FIX? Created attachment 11992 [details]
Extention to implement DSDT or SSDT override (also multiple ones) via initramfs.
Yes, I know Len does not like this one. Anyway, it might get convenient for Intel people for debug purposes.
Created attachment 12032 [details] 2.6.22 patch adding "acpi_no_auto_ssdt" bootparam see patch header for description. also, updated the docs like so: Developing ACPI for Linux - July 13, 2007 ------------------------------------------ Len Brown <lenb@kernel.org> (Intel Open Source Technology Center) This is how you can be most effective improving Linux ACPI support. Latest version of this file --------------------------- http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/README.ACPI ... How to Build a custom DSDT into the kernel ------------------------------------------ Get original DSDT: # cp /proc/acpi/dsdt DSDT or # acpidump > acpidump.out $ acpixtract DSDT acpidump > DSDT Disassemble it $ iasl -d DSDT Make your changes: $ vi DSDT.dsl Build it: $ iasl -tc DSDT.dsl Put it where the kernel build can include it: $ cp DSDT.hex $SRC/include/ Add this to the kernel .config: CONFIG_STANDALONE=n CONFIG_ACPI_CUSTOM_DSDT=y CONFIG_ACPI_CUSTOM_DSDT_FILE="DSDT.hex" Make the kernel and off you go! You should see in dmesg: Table [DSDT] replaced by host OS Note that with CONFIG_ACPI_DEBUG=y then ASL stores to the special object "Debug" will come out in the dmesg. eg Store("hello world!", Debug) Store(Local0, Debug) [ACPI Debug] String: [0x0C] "hello world!" [ACPI Debug] Integer: 0x00000042 As of linux-2.6.23, "acpi_no_auto_ssdt" if available to prevent Linux from automatically loading all the SSDTs listed in the RSDT/XSDT. So with this option, the SSDTs can be included in the DSDT override to effectively create a DSDT+SSDT override. patch in comment #21 applied to acpi-test patch in comment #21 shipped in Linux-2.6.23-rc3 closed. |