|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Unreviewed How To and FAQ POST HERE: Tips and solutions for SUSE Linux from the community. (Please do not post questions) |
![]() |
|
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Introduction
With SuSE 9.3, I bought a new Sager NP4750 64-bit laptop and found that my DSDT was broken. The results of my getting that fixed are presented in: Howto Fix Your Buggy DSDT @ Howto Fix Your Buggy DSDT. - Page 14 - openSUSE Forums. Although there is presented dsdt fixes through 10.3, that howto is terribly outdated. However, that howto still contains valuable DSDT code fixes buried throughout the thread. HOWTO: Fix Common ACPI Problems (DSDT, ECDT, etc.) @ Gentoo Forums :: View topic - HOWTO: Fix Common ACPI Problems (DSDT, ECDT, etc.) is an excellent reference with links to more references. Re: [PATCH 1/3] The basics of DSDT from initramfs (format corrected) provides updated information now relevant to openSUSE 11.0. What follows is the process to update that howto to openSUSE 11.0 RC1. Where the theory changes, I will point that out. I will get this up so the members can use it, and, I will come back and put it into a Wiki format when it is fleshed out. Consider this a work-in-progress for now. See any acpi errors or warnings in dmesg? Does your system hang when shutting down? Can't suspend to RAM or disk? Computer won't wakeup? Battery functions not working? Losing an IRQ? Can't get wireless to work even though you are following exact directions? You probably have a buggy DSDT. Let's fix it! What is a DSDT? “DSDT stands for Differentiated System Description Table. It is a part of the ACPI specification and it supplies configuration information about a base system. The DSDT comprises a system description table header, followed by a definition block. The definition block is encoded using ACPI Machine Language (AML), and unlike other definition blocks on the system, the DSDT definition block can not be unloaded, as it provides the basic ACPI namespace scope that all other dynamic definition blocks can later add onto.” REF: Advanced Configuration and Power Interface - Wikipedia, the free encyclopedia and “6. DSDT: Differentiated System Description Table Thanks to Erich writing this section. You might need to override the DSDT when certain features like battery status are incorrectly reported (usually causing error messages to syslog). DELL laptops usually need this kind of override. Fixed DSDT for many systems are available on the DSDT page, along with a patch that tells the kernel to ignore the BIOS-supplied table but use the compiled-in fixed DSDT. Basically you need to copy the fixed table into your kernel source with a special filename (or modifying the filename in the patch supplied at the DSDT page) This override is quite easy: instead of loading the DSDT table from bios, the kernel uses the compiled-in DSDT table. That's all.” Ref: http://tldp.org/HOWTO/ACPI-HOWTO/dsdt.html Note: While “ This override is quite easy” may be true, it is not intuitive and the some of the process and code has changed with openSUSE 11.0 RC1 – especially the last part, reading it into the kernel. Note: Please review post #1 of the old howto @ Howto Fix Your Buggy DSDT. - Page 14 - openSUSE Forums to get an overview. Also, please scan through the code fixes for something that may apply to your DSDT should you have a DSDT problem. Laptops “Errors are often caused by vendors +testing their hardware only with Windows or because there is code which is +executed only on a specific OS with a specific version and Linux hasn't been +considered during the development.” Ref: Re: [PATCH 1/3] The basics of DSDT from initramfs (format corrected) Note: The above is especially true of laptops, See: Search results - openSUSE and note that all the indicated DSDT problems are with laptops. Section 1: Fixing the DSDT Is your DSDT broken? 1st, and most important, is go to your OEM; get the latest BIOS; and install it. It may contain a fixed DSDT for you or at least turn on some missing functions. Also: “+Before you run away from customising your DSDT, you should note that already +corrected tables are available for a fair amount of computers on this web-page: +Linux/ACPI - DSDT: Overview . Be careful though, to work correctly a DSDT has to +match closely the hardware, including the amount of RAM, the frequency of the +processor and the PCI cards present! “ from Re: [PATCH 1/3] The basics of DSDT from initramfs (format corrected) Having done that, now, take a look at "dmesg" & see if you have any acpi errors, warnings, dropped IRQs, or just things that acpi didn't accomplish. "dmesg | grep -2i acpi" will simplify looking @ acpi lines, but I recommend looking at the full dmesg output. In a terminal, type “dmesg” or "dmesg | grep -2i acpi" and see if you have any errors, warnings or other problems as above. (Note: I am building this howto using my desktop. I only had one insignificant warning; we will fix that then proceed to my laptop in the next section to follow.) How to fix Your buggy DSDT. Get the DSDT. Get the DSDT (written for openSUSE 11.0 RC1 file structure). Note: openSUSE 11.0 provides all the tools that we will need -- no need to go looking for intel/ibm files named in the readings. The DSDT resides in /proc/acpi/dsdt and the file will be locked. So, as root,: "cat /proc/acpi/dsdt > /home/yourname/dsdt.dat" My code looks like: Code:
jim@linux-3obf:~> su Password: linux-3obf:/home/jim # cat /proc/acpi/dsdt > /home/jim/dsdt.dat inux-3obf: The “iasl” tools reside in /usr/sbin. So, cd /usr/sbin "./iasl -d /home/yourname/dsdt.dat" This will create a file called dsdt.dsl, which contains the disassembled DSDT. My code looks like: Code:
jim@linux-3obf:~> su Password: linux-3obf:/home/jim # cd /usr/bin linux-3obf:/usr/bin # ./iasl -d /home/jim/dsdt.dat Intel ACPI Component Architecture AML Disassembler version 20080213 [May 30 2008] Copyright (C) 2000 - 2008 Intel Corporation Supports ACPI Specification Revision 3.0a Loading Acpi table from file /home/jim/dsdt.dat Acpi table [DSDT] successfully installed and loaded Pass 1 parse of [DSDT] Pass 2 parse of [DSDT] Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions) ..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... Parsing completed Disassembly completed, written to "/home/jim/dsdt.dsl" Open Kwrite; open /home/yourname/dsdt.dsl; click on view and select line numbers. The acpi numbered errors and warning from dmesg should show up with the same number line here -- but it won't show the errors. Find your errors & warnings. Recompile the DSDT. Note, Here we have the 1st deviation from the old howto. Code:
linux-3obf:/usr/bin # ./iasl -tc /home/jim/dsdt.dsl Intel ACPI Component Architecture ASL Optimizing Compiler version 20080213 [May 30 2008] Copyright (C) 2000 - 2008 Intel Corporation Supports ACPI Specification Revision 3.0a Error 4067 - Could not open file "/home/jim//home/jim/dsdt.aml" (No such file or directory) linux-3obf:/usr/bin # cd /home/jim If you do the above, delete dsdt.src & dsdt.hex > to trash So, let's do it the way it worked for me. Start over: Find your errors & warnings. Recompiling the DSDT finds our errors & warnings In Filemanager Superuser Mode, copy ./iasl from /usr/bin to /home/yourname. Code:
jim@linux-3obf:~> cd /home/jim jim@linux-3obf:~> ./iasl -tc dsdt.dsl Intel ACPI Component Architecture ASL Optimizing Compiler version 20080213 [May 30 2008] Copyright (C) 2000 - 2008 Intel Corporation Supports ACPI Specification Revision 3.0a dsdt.dsl 349: Method (\_WAK, 1, NotSerialized) Warning 1079 - ^ Reserved method must return a value (_WAK) ASL Input: dsdt.dsl - 7014 lines, 220284 bytes, 2648 keywords AML Output: /home/jim/dsdt.aml - 23785 bytes 938 named objects 1710 executable opcodes Compilation complete. 0 Errors, 1 Warnings, 0 Remarks, 779 Optimizations jim@linux-3obf:~> The DSDT.aml is our goal for this section. Continued in the next post.
__________________
nForce5, AMD 5600+; HP dv9700z, AMD "Puma"; both openSUSE 11.1 x86-64 Last edited by snakedriver; 16-Jun-2008 at 15:56. |
|
||||
|
Let's fix that warning.
Let's right click on dsdt.dsl and open with Kwrite; also select show line numbers. From the error listed above we see the line is 349; scroll down to that remembering that the error was “Reserved method must return a value (_WAK)”. Here is mine (yours may well be different): Code:
From dsdt.dsl line #349
Method (\_WAK, 1, NotSerialized)
{
SALD (0x00)
Store (0xFF, DBG1)
Store (0x00, SFLG)
If (LEqual (RTCW, 0x00))
{
Notify (\_SB.PWRB, 0x02)
}
Notify (\_SB.PCI0.USB0, 0x00)
If (LGreaterEqual (OSFL, 0x01))
{
Store (0x00, \_SB.PCI0.SMB0.SMPM)
} <--does not return a value after this bracket
}
This one is right out of the spec: Code:
****Method (_WAK, 1, NotSerialized)
****{
********Store (\_SB.PCI0.LPCB.H_EC.ACEX, \ACPS)
********If (\ACPS)
********{
************\_SB.PHS (0x95)
********}
********Else
********{
************\_SB.PHS (0x94)
********}
********If (LEqual (Arg0, 0x03))
********{
************\_SB.PHS (0x8A)
************If (LEqual (OSYS, 0x07CE))
************{
****************Notify (\_SB.PWRB, 0x02)
************}
********}
****Return(Package(0x02){0x00, 0x00}) ← Ah Ha, looks like I need this added to mine.
****}
Code:
From dsdt.dsl line #349
Method (\_WAK, 1, NotSerialized)
{
SALD (0x00)
Store (0xFF, DBG1)
Store (0x00, SFLG)
If (LEqual (RTCW, 0x00))
{
Notify (\_SB.PWRB, 0x02)
}
Notify (\_SB.PCI0.USB0, 0x00)
If (LGreaterEqual (OSFL, 0x01))
{
Store (0x00, \_SB.PCI0.SMB0.SMPM)
}
Return(Package(0x02){0x00, 0x00}) ←I added this line and it needs to be aligned with the brackets
}
Now let's try compiling dsdt.dsl again with our fixes: Code:
jim@linux-3obf:~> ./iasl -tc dsdt.dsl Intel ACPI Component Architecture ASL Optimizing Compiler version 20080213 [May 30 2008] Copyright (C) 2000 - 2008 Intel Corporation Supports ACPI Specification Revision 3.0a ASL Input: dsdt.dsl - 7015 lines, 220322 bytes, 2649 keywords AML Output: /home/jim/dsdt.aml - 23791 bytes 938 named objects 1711 executable opcodes Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 781 Optimizations jim@linux-3obf:~> Note that the process also wrote dsdt.hex and dsdt.aml to /home/yourname. Rename dsdt.aml to DSDT.aml. DSDT.aml was our goal in this step; what next? Well to use it, we have to add it to an initramfs so that the kernel can read the table at the very beginning of the boot. That process is a major change with openSUSE 11.0 from what was in the previous howto. Section 2: Getting the kernel to use your fixed DSDT. Re: [PATCH 1/3] The basics of DSDT from initramfs (format corrected) presents the process and script that we will be using. It is but one of a series of a mailing-list shown at the bottom of the page. Credit goes to those developers shown there. Thank you all Devs. Fortunately for us, that script can be found @ /usr/src/linux/Documentation/acpi on our machines. So, let's try it: Code:
jim@linux-3obf:~> su Password: linux-3obf:/usr/src/linux/Documentation/acpi # sh initramfs-add-dsdt.sh initramfs-add-dsdt.sh: too few arguments Usage: initramfs-add-dsdt.sh initrd-name.img DSDT-to-add.aml Adds a DSDT file to an initrd (in initramfs format) initrd-name.img: filename of the initrd in initramfs format DSDT-to-add.aml: filename of the DSDT file to add Code:
jim@linux-3obf:~> su Password: linux-3obf:/usr/src/linux/Documentation/acpi # cd /usr/src/linux/Documentation/acpi linux-3obf:/usr/src/linux/Documentation/acpi # sh initramfs-add-dsdt.sh /boot/initrd-2.6.25.5-1.1-default /home/jim/DSDT.aml linux-3obf:/usr/src/linux/Documentation/acpi # initrd-name.img: filename of the initrd in initramfs format = /boot/initrd-2.6.25.5-1.1-default DSDT-to-add.aml: filename of the DSDT file to add = /home/jim/DSDT.aml Because we just modified the initrd, I will not do another “mkinitrd” as that will overwrite the workaround I just did. Now let's reboot and hope we guessed right. Reboot How will we know we have success? The dmesg message "Looking for DSDT in initramfs..." will tell you if the DSDT was found or not. and, Quote:
So, I look at my “dmesg” I got: Quote:
Yea, the process worked! Notes: This process was done on my desktop; my laptop will prove more interesting which is up next.
__________________
nForce5, AMD 5600+; HP dv9700z, AMD "Puma"; both openSUSE 11.1 x86-64 Last edited by snakedriver; 21-Jun-2008 at 08:06. |
|
||||
|
Section 3. Fixing the DSDT on a HP DV9700z x86-64 laptop
Before we begin, here is the initial DSDT part of "dmesg" out of the box so we can have something to compare to when we are done Code:
ACPI: Checking initramfs for custom DSDT Parsing all Control Methods: Table [DSDT](id 0001) - 459 Objects with 44 Devices 135 Methods 12 Regions Parsing all Control Methods: Table [SSDT](id 0002) - 2 Objects with 0 Devices 0 Methods 0 Regions tbxface-0598 [00] tb_load_namespace : ACPI Tables successfully acquired evxfevnt-0091 [00] enable : Transition to ACPI mode successful Using local APIC timer interrupts. Get the DSDT. Code:
jim@linux-bp92:~> su Password: linux-bp92:/home/jim # cat /proc/acpi/dsdt > /home/jim/dsdt.dat Code:
linux-bp92:/home/jim # cd /usr/sbin linux-bp92:/usr/sbin # ./iasl -d /home/jim/dsdt.dat bash: ./iasl: No such file or directory linux-bp92:/usr/sbin # cd /usr/bin linux-bp92:/usr/bin # ./iasl -d /home/jim/dsdt.dat Intel ACPI Component Architecture AML Disassembler version 20080213 [Jun 6 2008] Copyright (C) 2000 - 2008 Intel Corporation Supports ACPI Specification Revision 3.0a Loading Acpi table from file /home/jim/dsdt.dat Acpi table [DSDT] successfully installed and loaded Pass 1 parse of [DSDT] Pass 2 parse of [DSDT] Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions) ...................................................................................................................................................................................................................................................................... Parsing completed Disassembly completed, written to "/home/jim/dsdt.dsl" Code:
linux-bp92:/usr/bin # cd /home/jim linux-bp92:/home/jim # ./iasl -tc dsdt.dsl Intel ACPI Component Architecture ASL Optimizing Compiler version 20080213 [Jun 6 2008] Copyright (C) 2000 - 2008 Intel Corporation Supports ACPI Specification Revision 3.0a dsdt.dsl 238: Method (\_WAK, 1, NotSerialized) Warning 1079 - ^ Reserved method must return a value (_WAK) dsdt.dsl 3001: Field (RAM, AnyAcc, Lock, Preserve) Error 4074 - ^ Host Operation Region requires ByteAcc access dsdt.dsl 3896: Method (_PSR, 0, NotSerialized) Warning 1086 - ^ Not all control paths return a value (_PSR) dsdt.dsl 3896: Method (_PSR, 0, NotSerialized) Warning 1079 - ^ Reserved method must return a value (_PSR) ASL Input: dsdt.dsl - 4011 lines, 143918 bytes, 1481 keywords Compilation complete. 1 Errors, 3 Warnings, 0 Remarks, 553 Optimizations linux-bp92:/home/jim # 1st. Method (\_WAK, 1, NotSerialized) That was presented above and I won't repeat it here; same fix. 2nd dsdt.dsl 3001: Field (RAM, AnyAcc, Lock, Preserve) Error 4074 - ^ Host Operation Region requires ByteAcc access Change: Code:
})
OperationRegion (RAM, EmbeddedControl, 0x00, 0xFF)
Field (RAM, AnyAcc, Lock, Preserve)
{
Code:
})
OperationRegion (RAM, EmbeddedControl, 0x00, 0xFF)
Field (RAM, ByteAcc, Lock, Preserve)
{
dsdt.dsl 3896: Method (_PSR, 0, NotSerialized) Warning 1079 - ^ Reserved method must return a value (_PSR) Code:
})
Method (_PSR, 0, NotSerialized)
{
If (\_SB.PCI0.PIB.EC.ECOK)
{
Return (\_SB.PCI0.PIB.EC.ADP)
}
}
From: ACPIspec20.pdf Quote:
I then went to Google Linux and searched for: "_PSR, 0, NotSerialized" _PSR, 0, NotSerialized - Google Search paying attention only to "AML Disassembler version" and machines close to my model. I finally gained enough confidence to try the following solution: Code:
Method (_PSR, 0, NotSerialized)
{
If (\_SB.PCI0.PIB.EC.ECOK)
{
Return (0x01)
}
Else
{
Return (0x00)
}
}
Re-Compile the DSDT Code:
linux-bp92:/home/jim # ./iasl -tc dsdt.dsl Intel ACPI Component Architecture ASL Optimizing Compiler version 20080213 [Jun 6 2008] Copyright (C) 2000 - 2008 Intel Corporation Supports ACPI Specification Revision 3.0a ASL Input: dsdt.dsl - 4013 lines, 143942 bytes, 1482 keywords AML Output: /home/jim/dsdt.aml - 13963 bytes 489 named objects 993 executable opcodes Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 554 Optimizations linux-bp92:/home/jim # Rename dsdt.aml to DSDT.aml for the next step. Getting the kernel to use your fixed DSDT Code:
jim@linux-bp92:~> su Password: linux-bp92:/home/jim # cd /usr/src/linux/Documentation/acpi linux-bp92:/usr/src/linux/Documentation/acpi # sh initramfs-add-dsdt.sh /boot/initrd-2.6.25.5-1.1-default /home/jim/DSDT.aml Code:
ACPI: Checking initramfs for custom DSDT ACPI: Found DSDT in DSDT.aml. ACPI: Override [DSDT-PTL_ACPI], this is unsafe: tainting kernel ACPI: Table DSDT replaced by host OS ACPI: DSDT 00000000, 368B (r1 VIA PTL_ACPI 6040000 INTL 20080213) ACPI: DSDT override uses original SSDTs unless "acpi_no_auto_ssdt"Parsing all Control Methods: Table [DSDT](id 0001) - 458 Objects with 44 Devices 134 Methods 12 Regions Parsing all Control Methods: Table [SSDT](id 0002) - 2 Objects with 0 Devices 0 Methods 0 Regions tbxface-0598 [00] tb_load_namespace : ACPI Tables successfully acquired evxfevnt-0091 [00] enable : Transition to ACPI mode successful Using local APIC timer interrupts. Yea, the process worked! 0 Errors, 0 Warnings, 0 Remarks, 554 Optimizations = worth the effort. And, the laptop boots well and when AC is plugged in, it so reports it in powernow & battery icons, Have fun ![]() Note This is still a work-in-progress as I'm still editing it for correctness.
__________________
nForce5, AMD 5600+; HP dv9700z, AMD "Puma"; both openSUSE 11.1 x86-64 Last edited by snakedriver; 07-Dec-2008 at 05:51. |
|
|||||||
|
Section 4. Fixing the DSDT on a new HP dv9700z
Part 1. I have a new HP dv9700z + 2.6 GhZ AMD "Puma" laptop running both Vista 64-bit and openSUSE 11.0 x86-64. With both OSes everything seems to work out of the box, do I need to fix my DSDT? A look @ dmesg shows: ACPI: DSDT BFFE42C4, 9504 (r1 NVIDIA MCP65 6040000 MSFT 3000000) "MSFT 3000000" says it is compiled using the MS compiler -- which is reason enough. But: "dmesg | grep -2i acpi" and "find" "error" shows: Quote:
and "dmesg" has" 444 ACPI Exception (thermal-0366): AE_BAD_DATA, No critical threshold [20070126] ***and*** Read this: ACPI OSI disaster on latest HP laptops - critical temperature shutdowns at ACPI OSI disaster on latest HP laptops - critical temperature shutdowns | Linux | Kernel (The full thread is @ http://lkml.org/lkml/2008/7/24/286-- I recommend reading that through to the end to arrive at the same conclusion I will make later.) Quote:
Back to the Vista bug: In Howto Fix Your Buggy DSDT. - Page 14 - openSUSE Forums, I recommended trying various kernel boot parameters: Quote:
However, while that kernel parameter appears valid according to: http://redsymbol.net/linux_boot_parameters/: Quote:
Quote:
Out of the box, with the stock BIOS/DSDT where it's set up for VistaSP1, my /proc/acpi/thermal_zone is not populated and neither is "fan" -- although my fan is running thank the good Lord. With both acpi_osi="Microsoft Windows NT" and acpi_osi="Linux", I get: Code:
jim@linux-wwgh:~> cat /proc/acpi/thermal_zone/THRM/trip_points critical (S5): 95 C passive: 88 C: tc1=2 tc2=3 tsp=100 devices=CPU0 jim@linux-wwgh:~> cat /proc/acpi/thermal_zone/THRM/temperature temperature: 40 C "fan" is again not populated I also get this difference in "dmesg(s)": Quote:
I have added the kernel parameter acpi_osi="Microsoft Windows NT" to the kernel line in my Grub menu.lst. Why acpi_osi="Microsoft Windows NT" and not acpi_osi="Linux"? Answers: 1, The reference the shown above, LKML: Thomas Renninger: ACPI OSI disaster on latest HP laptops - critical temperature shutdowns, indicates that current running kernel has been patched to account for this kernel parameter. 2. My dv9700z laptop seems to run cooler over a longer period of time with acpi_osi="Microsoft Windows NT" than with acpi_osi="Linux. Note: In the next part, I will discuss the code fixes to date to my DSDT. Addendum: Code:
echo -n "95:90:88:80:65" > /proc/acpi/thermal_zone/THRM/trip_points does not work; producing: Quote:
It's good enough though; I'll leave it alone for now
__________________
nForce5, AMD 5600+; HP dv9700z, AMD "Puma"; both openSUSE 11.1 x86-64 Last edited by snakedriver; 10-Aug-2008 at 10:49. |
|
||||
|
Section 4. Fixing the DSDT on a new HP dv9700z
Part 2. Still talking about my new HP dv9700z + 2.6 GhZ AMD "Puma" laptop running both Vista 64-bit and openSUSE 11.0 x86-64. In this part, I will be addressing this set of errors: "dmesg | grep -2i acpi" and "find" "error" shows: Quote:
I had a reference, but can't seem to find it just now. It was surely a google/linux search for " Method execution failed [\_SB_.PCI0.LPC0.PMIO._CRS]"; anyway, I resolved it to searching for "PMI0" and then looking in my dsdt.dsl for the same (using the search feature). Edit: Try Ref: Gmane -- Mail To News And Back Again BTW, I got my dsdt.dsl as presented before. Original: Code:
Device (PMIO)
{
Name (_HID, EisaId ("PNP0C02"))
Name (_UID, 0x03)
Method (_CRS, 0, NotSerialized)
{
Name (IODM, ResourceTemplate ()
{
IO (Decode16,
0x0000, // Range Minimum
0x0000, // Range Maximum
0x00, // Alignment
0x00, // Length
)
})
Name (IORT, ResourceTemplate ()
{
IO (Decode16,
0x0000, // Range Minimum
0x0000, // Range Maximum
0x01, // Alignment
0x80, // Length
_Y02)
IO (Decode16,
0x0000, // Range Minimum
0x0000, // Range Maximum
0x01, // Alignment
0x80, // Length
_Y03)
IO (Decode16,
0x0000, // Range Minimum
0x0000, // Range Maximum
0x01, // Alignment
0x80, // Length
_Y04)
IO (Decode16,
0x0000, // Range Minimum
0x0000, // Range Maximum
0x01, // Alignment
0x80, // Length
_Y05)
IO (Decode16,
0x0000, // Range Minimum
0x0000, // Range Maximum
0x01, // Alignment
0x80, // Length
_Y06)
IO (Decode16,
0x0000, // Range Minimum
0x0000, // Range Maximum
0x01, // Alignment
0x80, // Length
_Y07)
IO (Decode16,
0x0000, // Range Minimum
0x0000, // Range Maximum
0x01, // Alignment
0x40, // Length
)
})
CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y02._MIN, I1MN)
CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y02._MAX, I1MX)
CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y03._MIN, I2MN)
CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y03._MAX, I2MX)
CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y04._MIN, I3MN)
CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y04._MAX, I3MX)
CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y05._MIN, I4MN)
CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y05._MAX, I4MX)
CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y06._MIN, I5MN)
CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y06._MAX, I5MX)
CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y07._MIN, I6MN)
CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y07._MAX, I6MX)
CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y09._MIN, I9MN)
CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y09._MAX, I9MX)
And (\_SB.PCI0.SMB0.PMBR, 0xFFFC, I1MN)
Store (I1MN, I1MX)
Add (I1MN, 0x80, Local0)
Store (Local0, I2MN)
Store (Local0, I2MX)
And (\_SB.PCI0.SMB0.NVSB, 0xFFFC, I3MN)
Store (I3MN, I3MX)
Add (I3MN, 0x80, Local0)
Store (Local0, I4MN)
Store (Local0, I4MX)
And (\_SB.PCI0.SMB0.ANLG, 0xFFFC, I5MN)
Store (I5MN, I5MX)
Add (I5MN, 0x80, Local0)
Store (Local0, I6MN)
Store (Local0, I6MX)
And (\_SB.PCI0.SMB0.SB7C, 0xFFFC, I9MN)
Store (I9MN, I9MX)
If (I1MN)
{
Store (IORT, Local0)
}
Else
{
Store (IODM, Local0)
}
Return (Local0)
}
}
}
__________________
nForce5, AMD 5600+; HP dv9700z, AMD "Puma"; both openSUSE 11.1 x86-64 Last edited by snakedriver; 11-Aug-2008 at 07:31. |
|
||||
|
Section 4. Fixing the DSDT on a new HP dv9700z
Part 3. Ok, let's tackle the DSDT's errors and warnings. I will state up front that I still have not completely solved 4 warnings associated with _HOT & _CRT which is part of that HP Vista mess discussed in part 1. As I have done this explanation twice already, I pickup at "Find your errors & warnings" found in the 1st post of this thread. Code:
jim@linux-wwgh:~> cd /home/jim jim@linux-wwgh:~> ./iasl -tc dsdt.dsl Intel ACPI Component Architecture ASL Optimizing Compiler version 20080213 [Jun 6 2008] Copyright (C) 2000 - 2008 Intel Corporation Supports ACPI Specification Revision 3.0a dsdt.dsl 99: Method (\_WAK, 1, NotSerialized) Warning 1079 - ^ Reserved method must return a value (_WAK) dsdt.dsl 3676: Method (_Q16, 0, NotSerialized) Warning 1086 - ^ Not all control paths return a valu e (_Q16) dsdt.dsl 6750: Method (_EJ0, 0, NotSerialized) Warning 1076 - ^ Reserved method has too few arg uments (_EJ0 requires 1) dsdt.dsl 8056: Method (_HOT, 0, Serialized) Warning 1086 - ^ Not all control paths return a valu e (_HOT) dsdt.dsl 8056: Method (_HOT, 0, Serialized) Warning 1079 - ^ Reserved method must return a value (_HOT) dsdt.dsl 8058: Zero Error 4094 - ^ syntax error, unexpected PARSEOP_ZERO dsdt.dsl 8065: Method (_CRT, 0, Serialized) Warning 1086 - ^ Not all control paths return a valu e (_CRT) dsdt.dsl 8065: Method (_CRT, 0, Serialized) Warning 1079 - ^ Reserved method must return a value (_CRT) dsdt.dsl 8067: Zero Error 4094 - ^ syntax error, unexpected PARSEOP_ZERO ASL Input: dsdt.dsl - 8479 lines, 298450 bytes, 4483 keywords Compilation complete. 2 Errors, 7 Warnings, 0 Remarks, 1227 Optimizations jim@linux-wwgh:~> 1. dsdt.dsl 99: Method (\_WAK, 1, NotSerialized) Warning 1079 - ^ Reserved method must return a value (_WAK) Original: Code:
Method (\_WAK, 1, NotSerialized)
{
Or (Arg0, 0x50, DBUG)
If (LEqual (Arg0, 0x03))
{
Acquire (\_SB.PCI0.PSMX, 0xFFFF)
Store (0x84, \_SB.PCI0.SMIC)
Store (\_SB.PCI0.SMIS, Local0)
Release (\_SB.PCI0.PSMX)
Notify (\_SB.PWRB, 0x02)
Z000 ()
Notify (\_SB.PCI0.XVR1, 0x00)
}
If (LEqual (Arg0, 0x04))
{
Acquire (\_SB.PCI0.PSMX, 0xFFFF)
Store (0x85, \_SB.PCI0.SMIC)
Store (\_SB.PCI0.SMIS, Local0)
Release (\_SB.PCI0.PSMX)
Store (Zero, S4FL)
Store (Zero, S4RT)
Notify (\_SB.PWRB, 0x02)
Z000 ()
Acquire (\_SB.PCI0.PSMX, 0xFFFF)
Store (0x0A, \_SB.PCI0.SMIS)
Store (0x86, \_SB.PCI0.SMIC)
Store (\_SB.PCI0.SMIS, CTK0)
Store (0x0B, \_SB.PCI0.SMIS)
Store (0x86, \_SB.PCI0.SMIC)
Store (\_SB.PCI0.SMIS, CTK1)
Store (0x0C, \_SB.PCI0.SMIS)
Store (0x86, \_SB.PCI0.SMIC)
Store (\_SB.PCI0.SMIS, CTK2)
Store (0x0D, \_SB.PCI0.SMIS)
Store (0x86, \_SB.PCI0.SMIC)
Store (\_SB.PCI0.SMIS, CTK3)
Release (\_SB.PCI0.PSMX)
}
}
Code:
Method (\_WAK, 1, NotSerialized)
{
Or (Arg0, 0x50, DBUG)
If (LEqual (Arg0, 0x03))
{
Acquire (\_SB.PCI0.PSMX, 0xFFFF)
Store (0x84, \_SB.PCI0.SMIC)
Store (\_SB.PCI0.SMIS, Local0)
Release (\_SB.PCI0.PSMX)
Notify (\_SB.PWRB, 0x02)
Z000 ()
Notify (\_SB.PCI0.XVR1, 0x00)
}
If (LEqual (Arg0, 0x04))
{
Acquire (\_SB.PCI0.PSMX, 0xFFFF)
Store (0x85, \_SB.PCI0.SMIC)
Store (\_SB.PCI0.SMIS, Local0)
Release (\_SB.PCI0.PSMX)
Store (Zero, S4FL)
Store (Zero, S4RT)
Notify (\_SB.PWRB, 0x02)
Z000 ()
Acquire (\_SB.PCI0.PSMX, 0xFFFF)
Store (0x0A, \_SB.PCI0.SMIS)
Store (0x86, \_SB.PCI0.SMIC)
Store (\_SB.PCI0.SMIS, CTK0)
Store (0x0B, \_SB.PCI0.SMIS)
Store (0x86, \_SB.PCI0.SMIC)
Store (\_SB.PCI0.SMIS, CTK1)
Store (0x0C, \_SB.PCI0.SMIS)
Store (0x86, \_SB.PCI0.SMIC)
Store (\_SB.PCI0.SMIS, CTK2)
Store (0x0D, \_SB.PCI0.SMIS)
Store (0x86, \_SB.PCI0.SMIC)
Store (\_SB.PCI0.SMIS, CTK3)
Release (\_SB.PCI0.PSMX)
}
Return(Package(0x02){0x00, 0x00}) <-- added that line
}
__________________
nForce5, AMD 5600+; HP dv9700z, AMD "Puma"; both openSUSE 11.1 x86-64 |
|
||||
|
Section 4. Fixing the DSDT on a new HP dv9700z
Part 3 continued 1 2. dsdt.dsl 3676: Method (_Q16, 0, NotSerialized) Warning 1086 - ^ Not all control paths return a valu e (_Q16) Original: Code:
Method (_Q16, 0, NotSerialized)
{
Store (QBBB, Local0)
If (LEqual (Local0, 0x03))
{
Notify (\_SB.MUBN, 0x02)
Return (0x00)
}
If (LEqual (Local0, 0x06))
{
Notify (\_SB.PIBN, 0x02)
Return (0x00)
}
If (LEqual (Local0, 0x12))
{
Notify (\_SB.VOBN, 0x02)
Return (0x00)
}
If (LEqual (Local0, 0x11))
{
Notify (\_SB.LVBN, 0x02)
Return (0x00)
}
Store (0x04, \_SB.WMID.Z013)
Store (0x00, \_SB.WMID.Z014)
Notify (\_SB.WMID, 0x80)
}
Code:
Method (_Q16, 0, NotSerialized)
{
Store (QBBB, Local0)
If (LEqual (Local0, 0x03))
{
Notify (\_SB.MUBN, 0x02)
Return (0x00)
}
If (LEqual (Local0, 0x06))
{
Notify (\_SB.PIBN, 0x02)
Return (0x00)
}
If (LEqual (Local0, 0x12))
{
Notify (\_SB.VOBN, 0x02)
Return (0x00)
}
If (LEqual (Local0, 0x11))
{
Notify (\_SB.LVBN, 0x02)
Return (0x00)
}
Store (0x04, \_SB.WMID.Z013)
Store (0x00, \_SB.WMID.Z014)
Notify (\_SB.WMID, 0x80)
Return (0x00) <--- added that line
}
__________________
nForce5, AMD 5600+; HP dv9700z, AMD "Puma"; both openSUSE 11.1 x86-64 |
|
||||
|
Section 4. Fixing the DSDT on a new HP dv9700z
Part 3 continued 2 3. dsdt.dsl 6750: Method (_EJ0, 0, NotSerialized) Warning 1076 - ^ Reserved method has too few arg uments (_EJ0 requires 1) Original. Code:
Method (_EJ0, 0, NotSerialized)
{
Return (0x00)
}
Code:
Method (_EJ0, 1, NotSerialized) <-- changed the "0" to a "1"
{
Return (0x00)
}
Continued in the next part...
__________________
nForce5, AMD 5600+; HP dv9700z, AMD "Puma"; both openSUSE 11.1 x86-64 |
|
||||
|
Section 4. Fixing the DSDT on a new HP dv9700z
Part 3 continued 3 4.dsdt.dsl 8056: Method (_HOT, 0, Serialized) Warning 1086 - ^ Not all control paths return a valu e (_HOT) dsdt.dsl 8056: Method (_HOT, 0, Serialized) Warning 1079 - ^ Reserved method must return a value (_HOT) dsdt.dsl 8058: Zero Error 4094 - ^ syntax error, unexpected PARSEOP_ZERO AND 5.dsdt.dsl 8065: Method (_CRT, 0, Serialized) Warning 1086 - ^ Not all control paths return a value (_CRT) dsdt.dsl 8065: Method (_CRT, 0, Serialized) Warning 1079 - ^ Reserved method must return a value (_CRT) dsdt.dsl 8067: Zero Error 4094 - ^ syntax error, unexpected PARSEOP_ZERO These are directly related to the HP Vista bug presented in part1 and specifically the reference ACPI OSI disaster on latest HP laptops - critical temperature shutdowns | Linux | Kernel Code:
# BIOS checks which OS is running (most parts cut off)
# Linux is returning true for all but not for "Windows 2006 SP1"
# (Vista SP1) and not for "Linux"
...
# Valid critical/hot temperature: 105 (0x69)
Name (TPC, 0x69)
...
Method (_HOT, 0, Serialized)
{
# Match for Vista only, not for Vista SP1 !
!!! If (LEqual (TPOS, 0x40))
{
Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
}
Else
{
Return (Zero)
}
}
Method (_CRT, 0, Serialized)
{
# Returns valid values for all Windows version before Vista
!!! If (LLess (TPOS, 0x40))
{
# This is the valid one: 105 C -> (105 * 10) + 2732 (Kelvin * 10)
Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
}
Else
{
# This is returned on Windows Vista
Return (Zero)
}
}
Original: Code:
Method (_HOT, 0, Serialized)
{
Zero
If (LEqual (OSYS, 0x07D6))
{
Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
}
}
Method (_CRT, 0, Serialized)
{
Zero
If (LLess (OSYS, 0x07D6))
{
Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
}
}
Code:
Method (_HOT, 0, Serialized)
{
If (LEqual (OSYS, 0x07D6))
{
Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
}
Else
{
Return (Zero)
}
}
Method (_CRT, 0, Serialized)
{
If (LLess (OSYS, 0x07D6))
{
Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
}
Else
{
Return (Zero)
}
}
Fixed: Code:
Method (_HOT, 0, Serialized)
{
If (LEqual (OSYS, 0x07D6))
{
Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
}
}
Method (_CRT, 0, Serialized)
{
If (LLess (OSYS, 0x07D6))
{
Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
}
}
That compiles w/o error, but, leaves me with 4 warnings: Quote:
Compilation complete. 0 Errors, 4 Warnings, 0 Remarks, 1230 Optimizations I'd say: "0 Errors, 4 Warnings, 0 Remarks, 1230 Optimizations" makes all the above (and a little searching) worthwhile ![]() Now if we read completely through the thread @ http://lkml.org/lkml/2008/7/24/286; we can determine that we can probably safely delete the _HOT and _CRT dsdt.dsl sections above. However, I am presently running with the 4 warnings. I'll periodically revisit this particular issue and any kernel updates that may totally correct the HP Vista bug. ---end of Section 4--- Have fun
__________________
nForce5, AMD 5600+; HP dv9700z, AMD "Puma"; both openSUSE 11.1 x86-64 Last edited by snakedriver; 10-Aug-2008 at 13:00. |
![]() |
|
| Bookmarks |
| Tags |
| dsdt |
| Thread Tools | |
| Display Modes | |
|
|