Jump to content

HP DVx ACPI 3.x/4.x Battery Driver (10.6/10.7)


gsly
 Share

229 posts in this topic

Recommended Posts

It looks like I'll get to test the driver with a new 12-cell battery (just ordered) as my original 8-cell HP battery is now showing "Service Battery" in OSX and "Consider replacing your battery" in Windows 7 :( Apparently the original battery has 31 cycles on it.

Link to comment
Share on other sites

Thanks gsly.

 

That was very nice of you to do the edits on my dsdt.

 

Unfortunately, it doesn't work.

 

When I put back Store (^^LPCB.EC0.BIF9 (), Index (PBIF, 0x09)) in Method _BIF, Method _BIF fails and no battery information is returned. There is also an unexpected side effect from your edits. I lose the fan rpm sensor in iStat each time.

 

 

SOLVED!!: Method SMBR can now read the battery name string without crashing in Lion.

 

Gsly, I tried your dsdt with the Method SMBR 8-bit re-write in Snow Leopard and it perfectly read the battery name string, indicating that your Method SMBR re-write was flawless. So, something else in Method SMBR was causing it to fail in Lion. With the help of your adundant comments on my dsdt, my suspicions closed in on the instruction Store (Zero, BDAT). That essentially stores a zero in a big 32 byte field. For what purpose? And that did not look entirely Lion compatible, so I deleted that line and voila! Method SMBR can retrieve the battery name string without crashing. So, it was your SMBR re-write, combined with deleting that line. Thanks much.

 

Oh, I also solved the disappearing fan sensor issue by converting both fan EC registers TAH0 and TAH1 to 8-bit, not just TAH0 like before.

 

I have updated my post# 95 with a complete dsl instruction file of all the dsdt edits to get SmartBattery working in Lion. It's for my Asus M60J, but is likely to be applicable to all Asus core i3/i5/i7 notebooks.

Link to comment
Share on other sites

SOLVED!!: Method SMBR can now read the battery name string without crashing in Lion.

 

Gsly, I tried your dsdt with the Method SMBR 8-bit re-write in Snow Leopard and it perfectly read the battery name string, indicating that your Method SMBR re-write was flawless. So, something else in Method SMBR was causing it to fail in Lion. With the help of your adundant comments on my dsdt, my suspicions closed in on the instruction Store (Zero, BDAT). That essentially stores a zero in a big 32 byte field. For what purpose? And that did not look entirely Lion compatible, so I deleted that line and voila! Method SMBR can retrieve the battery name string without crashing. So, it was your SMBR re-write, combined with deleting that line. Thanks much.

 

Oh, I also solved the disappearing fan sensor issue by converting both fan EC registers TAH0 and TAH1 to 8-bit, not just TAH0 like before.

 

I have updated my post# 95 with a complete dsl instruction file of all the dsdt edits to get SmartBattery working in Lion. It's for my Asus M60J, but is likely to be applicable to all Asus core i3/i5/i7 notebooks.

Awesome! Thanks for the feedback and updated posting to relate your platform specific findings. This also proves we can build up a number of standard DSDT methods between different platforms as long as the underlying hardware is relatively standard (EC, SMBus, SBS, etc)

Link to comment
Share on other sites

  • 2 weeks later...

gsly,

 

Thank you for such comprehensive guide on dsdt battery changes.

I also own HP laptop machine owner and followed all available guides on this forum. My EC0 16bit registers are divided into half and B1B2 routine introduced by Zprood is used to make it work in Lion.

I'm stuck however on two issues:

 

original:

 

If (LEqual (Local2, 0x04))

{

Store (0xFA, MAXC)

Store (Package (0x02)

{

0x00,

0x00

}, Local4)

 

after replacing MAXC with AXC0 and AXC1 implementing B1B2 routine

 

Store (0xFA, B1B2 (AXC0, AXC1))

 

I'm able to compile cleanly with two different programs, however when freshly created dstd.aml is parsed again several errors are introduced.

 

 

If (LEqual (Local2, 0x04))

{

Store (0xFA, B1B2)

AXC0

AXC1

 

What am I doing wrong? Here's B1B2 routine

 

 

Method (B1B2, 2, NotSerialized)

{

ShiftLeft (Arg1, 0x08, Local0)

Or (Arg0, Local0, Local0)

Return (Local0)

}

 

Another problem I'm having is cycle count stuck at 0. What will be responsible for prowiding that information?

 

For reference I'm providing vanilla dsdt.dsl and dsdt.aml with changes already in place.

dsdt.dsl.zip

dsdt.aml.zip

Link to comment
Share on other sites

Another problem I'm having is cycle count stuck at 0. What will be responsible for prowiding that information?

 

For reference I'm providing vanilla dsdt.dsl and dsdt.aml with changes already in place.

Please re-post your DSDT as the vanilla you posted also has the same syntax errors suggesting this isn't really the correct one. From the looks of it, you are attempting to use the B1B2 method incorrectly. The B1B2 method takes two arguments (8-bit) and returns a combined 16-bit number. You are attempting to "Store" a single value to the function B1B2 and that is incorrect. I think you need a opposite method to B1B2, one that takes a 16-bit value and splits it into it's 8-bit parts and stores those into the referenced registers, but I need to see the original DSDT code to confirm.

 

The SBS function CycleCount() provides this information from the battery controller. See the referenced documentation. Your DSDT appears to use WMI to gather battery information from the embedded controller hardware so you'll have to determine if that information is provided (unlikely).

Link to comment
Share on other sites

Please re-post your DSDT as the vanilla you posted also has the same syntax errors suggesting this isn't really the correct one.

Sorry about that. My vanilla dsdt

dsdt.dsl.zip

 

My original 16bit MAXC register was broken into two 8bit AXC0, AXC1 registers. Can I replace B1B2 method at this part of the code with something like this instead?

 

If (LEqual (Local2, 0x03))

{

Store (0xFA, AXC0)

Store (0x00, AXC1)

Store (Package (0x02)

{

Zero,

Zero

}, Local4)

 

to be honest, I downloaded already patched dsdt.aml and used that to get a list of modified registers and made a patch.

 

HP_BATTERY_patch.txt.zip

 

Thank you for your time.

Link to comment
Share on other sites

Hey there,

 

i have a ThinkPad W520 and at the moment i get the following:

 

bildschirmfoto20111210uh.png

 

But my cycle count is missing. My BAT0 Device looks like:

 

			   Device (BAT0)
			    {
				    Name (_HID, EisaId ("PNP0C0A"))
				    Name (_UID, Zero)
				    Name (_PCL, Package (0x01)
				    {
					    _SB
				    })
				    Name (B0ST, Zero)
				    Name (BT0I, Package (0x0D)
				    {
					    Zero,
					    Ones,
					    Ones,
					    One,
					    0x2A30,
					    Zero,
					    Zero,
					    One,
					    One,
					    "",
					    "",
					    "",
					    ""
				    })
				    Name (BT0P, Package (0x04) {})
				    Method (_STA, 0, NotSerialized)
				    {
					    If (H8DR)
					    {
						    Store (HB0A, B0ST)
					    }
					    Else
					    {
						    If (And (RBEC (0x38), 0x80))
						    {
							    Store (One, B0ST)
						    }
						    Else
						    {
							    Store (Zero, B0ST)
						    }
					    }
					    If (B0ST)
					    {
						    Return (0x1F)
					    }
					    Else
					    {
						    Return (0x0F)
					    }
				    }
				    Method (_BIF, 0, NotSerialized)
				    {
					    Store (Zero, Local7)
					    Store (0x0A, Local6)
					    While (LAnd (LNot (Local7), Local6))
					    {
						    If (HB0A)
						    {
							    If (LEqual (And (HB0S, 0x0F), 0x0F))
							    {
								    Sleep (0x03E8)
								    Decrement (Local6)
							    }
							    Else
							    {
								    Store (One, Local7)
							    }
						    }
						    Else
						    {
							    Store (Zero, Local6)
						    }
					    }
					    Return (GBIF (Zero, BT0I, Local7))
				    }
				    Method (_BST, 0, NotSerialized)
				    {
					    XOr (DerefOf (Index (BT0I, Zero)), One, Local0)
					    Return (GBST (Zero, HB0S, Local0, BT0P))
				    }
				    Method (_BTP, 1, NotSerialized)
				    {
					    And (HAM4, 0xEF, HAM4)
					    If (Arg0)
					    {
						    Store (Arg0, Local1)
						    If (LNot (DerefOf (Index (BT0I, Zero))))
						    {
							    Divide (Local1, 0x0A, Local0, Local1)
						    }
						    And (Local1, 0xFF, HT0L)
						    And (ShiftRight (Local1, 0x08), 0xFF, HT0H)
						    Or (HAM4, 0x10, HAM4)
					    }
				    }
			    }

 

I have tried the Methods of your Post but since it is for HP i think they didn't work for me. Any ideas how to get the cycle count working? Something to do with the _BIF?

 

And thank you for your nice guide!

Link to comment
Share on other sites

Hey there,

 

i have a ThinkPad W520 ...

But my cycle count is missing. ...

 

 

I have tried the Methods of your Post but since it is for HP i think they didn't work for me. Any ideas how to get the cycle count working? Something to do with the _BIF?

 

And thank you for your nice guide!

Look at the ACPI specification document. CycleCount() support is only in the 4.x standard and therefore you would need to implement the _BIX method and set the appropriate plist keys to use this. Your posted code does not indicate if your ThinkPad uses the Smart Battery system to read the battery, but if it does, chances are it supports the CycleCount() function. If not, you are on your own and hope that Lenovo tied a hardline from the battery controller to the embedded controller with this information (unlikely).

Link to comment
Share on other sites

Thank you for your reply, but i don't have the PCI.LPC.EC.SMRD stuff inside my (EC) Device:

 

		   Device (EC)
		    {
			    Name (_HID, EisaId ("PNP0C09"))
			    Name (_UID, Zero)
			    Name (_GPE, 0x11)
			    Method (_REG, 2, NotSerialized)
			    {
				    If (LEqual (Arg0, 0x03))
				    {
					    Store (Arg1, H8DR)
				    }
			    }
			    OperationRegion (ECOR, EmbeddedControl, Zero, 0x0100)
			    Field (ECOR, ByteAcc, NoLock, Preserve)
			    {
				    HDBM,   1,
					    ,   1,
					    ,   1,
				    HFNE,   1,
					    ,   1,
					    ,   1,
				    HLDM,   1,
						    Offset (0x01),
				    BBLS,   1,
				    BTCM,   1,
					    ,   1,
					    ,   1,
					    ,   1,
				    HBPR,   1,
				    BTPC,   1,
						    Offset (0x02),
				    HDUE,   1,
					    ,   4,
				    SNLK,   1,
						    Offset (0x03),
					    ,   5,
				    HAUM,   2,
						    Offset (0x05),
				    HSPA,   1,
						    Offset (0x06),
				    HSUN,   8,
				    HSRP,   8,
						    Offset (0x0C),
				    HLCL,   8,
					    ,   4,
				    CALM,   1,
						    Offset (0x0E),
				    HFNS,   2,
						    Offset (0x0F),
					    ,   6,
				    NULS,   1,
						    Offset (0x10),
				    HAM0,   8,
				    HAM1,   8,
				    HAM2,   8,
				    HAM3,   8,
				    HAM4,   8,
				    HAM5,   8,
				    HAM6,   8,
				    HAM7,   8,
				    HAM8,   8,
				    HAM9,   8,
				    HAMA,   8,
				    HAMB,   8,
				    HAMC,   8,
				    HAMD,   8,
				    HAME,   8,
				    HAMF,   8,
						    Offset (0x23),
				    HANT,   8,
						    Offset (0x26),
					    ,   2,
				    HANA,   2,
						    Offset (0x27),
						    Offset (0x2A),
				    HATR,   8,
				    HT0H,   8,
				    HT0L,   8,
				    HT1H,   8,
				    HT1L,   8,
				    HFSP,   8,
					    ,   6,
				    HMUT,   1,
						    Offset (0x31),
					    ,   2,
				    HUWB,   1,
						    Offset (0x32),
				    HWPM,   1,
				    HWLB,   1,
				    HWLO,   1,
				    HWDK,   1,
				    HWFN,   1,
				    HWBT,   1,
				    HWRI,   1,
				    HWBU,   1,
				    HWLU,   1,
						    Offset (0x34),
					    ,   3,
				    PIBS,   1,
					    ,   3,
				    HPLO,   1,
						    Offset (0x36),
						    Offset (0x38),
				    HB0S,   7,
				    HB0A,   1,
				    HB1S,   7,
				    HB1A,   1,
				    HCMU,   1,
					    ,   2,
				    OVRQ,   1,
				    DCBD,   1,
				    DCWL,   1,
				    DCWW,   1,
				    HB1I,   1,
					    ,   1,
				    KBLT,   1,
				    BTPW,   1,
				    BTDT,   1,
				    HUBS,   1,
				    BDPW,   1,
				    BDDT,   1,
				    HUBB,   1,
						    Offset (0x46),
					    ,   1,
				    BTWK,   1,
				    HPLD,   1,
					    ,   1,
				    HPAC,   1,
				    BTST,   1,
						    Offset (0x47),
				    HPBU,   1,
					    ,   1,
				    HBID,   1,
					    ,   3,
				    HBCS,   1,
				    HPNF,   1,
					    ,   1,
				    GSTS,   1,
					    ,   2,
				    HLBU,   1,
				    DOCD,   1,
				    HCBL,   1,
						    Offset (0x49),
				    SLUL,   1,
						    Offset (0x4C),
				    HTMH,   8,
				    HTML,   8,
				    HWAK,   16,
				    HMPR,   8,
					    ,   7,
				    HMDN,   1,
						    Offset (0x78),
				    TMP0,   8,
						    Offset (0x81),
				    HIID,   8,
						    Offset (0x83),
				    HFNI,   8,
				    HSPD,   16,
						    Offset (0x88),
				    TSL0,   7,
				    TSR0,   1,
				    TSL1,   7,
				    TSR1,   1,
				    TSL2,   7,
				    TSR2,   1,
				    TSL3,   7,
				    TSR3,   1,
						    Offset (0x8D),
				    HDAA,   3,
				    HDAB,   3,
				    HDAC,   2,
						    Offset (0xB0),
				    HDEN,   32,
				    HDEP,   32,
				    HDEM,   8,
				    HDES,   8,
						    Offset (0xBB),
				    PLSL,   8,
				    PLMS,   8,
				    PLLS,   8,
				    PLTU,   8,
						    Offset (0xC8),
				    ATMX,   8,
				    HWAT,   8,
						    Offset (0xCC),
				    PWMH,   8,
				    PWML,   8,
						    Offset (0xED),
					    ,   4,
				    HDDD,   1,
						    Offset (0xFF),
				    FQ5B,   1,
					    ,   4,
				    OCPF,   1,
				    P7FG,   1,
				    VTAF,   1
			    }

 

Maybe its just another name for it from Lenovo...? Im no DSDT-Pro :worried_anim: but i think its a tricky problem. Maybe i can find something with google later today. I will report.

Link to comment
Share on other sites

I tried it by myself but no chance i searched Google for hours, but i didn't find anything about the SMBus write / reading on Thinkpads DSDT.

Maybe you can take a short look on my DSDT if you can find something about this. I think you know more about this stuff than me :).

dsdt.aml.zip

Link to comment
Share on other sites

I have updated my post# 95 with a complete dsl instruction file of all the dsdt edits to get SmartBattery working in Lion. It's for my Asus M60J, but is likely to be applicable to all Asus core i3/i5/i7 notebooks.

 

Awesome! Thanks for the feedback and updated posting to relate your platform specific findings. This also proves we can build up a number of standard DSDT methods between different platforms as long as the underlying hardware is relatively standard (EC, SMBus, SBS, etc)

 

Jingu, I can confirm it works on a u36sd. However, I did not need the calculation correction with my 6cell so I would suggest not using that as a standard since it may be specific to your battery. I also did not convert my EC registers, I have an error somewhere in my work on that but its not needed for the calculation so...

 

For the benefit of others reading this; leave FBIF stock, use jingu's CBIF edit, change CBST 'If (PUNT)' to 'If (LEqual (PUNT, Zero))', add SMBR 8bit edits and disable UseExtBatInfoMethod and UseExtraBatInfoMethod in kext and you should be good to go.

  • Like 1
Link to comment
Share on other sites

Jingu, I can confirm it works on a u36sd. However, I did not need the calculation correction with my 6cell so I would suggest not using that as a standard since it may be specific to your battery. I also did not convert my EC registers, I have an error somewhere in my work on that but its not needed for the calculation so...

 

For the benefit of others reading this; leave FBIF stock, use jingu's CBIF edit, change CBST 'If (PUNT)' to 'If (LEqual (PUNT, Zero))', add SMBR 8bit edits and disable UseExtBatInfoMethod and UseExtraBatInfoMethod in kext and you should be good to go.

 

Hi there, I also have a U36SD, would you share your DSDT so I can compare with mine? I have made the modifications that @jingu shared but they did not worked, @jingu also kindly helped me to solve the problem but I did not work, so, if you could help my by sharing a working DSDT I would really appreciate it.

Link to comment
Share on other sites

I tried it by myself but no chance i searched Google for hours, but i didn't find anything about the SMBus write / reading on Thinkpads DSDT.

Maybe you can take a short look on my DSDT if you can find something about this. I think you know more about this stuff than me :).

I don't see any SMBus related code and it looks like all of the battery information is hard connected to the embedded controller. I can tell from the following naming patterns that all of this is likely related to the (S)mart (B)attery:


                   Field (ECOR, ByteAcc, NoLock, Preserve)
                   {
                               Offset (0xA0), 
                       SBRC,   16, 
                       SBFC,   16, 
                       SBAE,   16, 
                       SBRS,   16, 
                       SBAC,   16, 
                       SBVO,   16, 
                       SBAF,   16, 
                       SBBS,   16
                   }

                   Field (ECOR, ByteAcc, NoLock, Preserve)
                   {
                               Offset (0xA0), 
                           ,   15, 
                       SBCM,   1, 
                       SBMD,   16, 
                       SBCC,   16
                   }

                   Field (ECOR, ByteAcc, NoLock, Preserve)
                   {
                               Offset (0xA0), 
                       SBDC,   16, 
                       SBDV,   16, 
                       SBOM,   16, 
                       SBSI,   16, 
                       SBDT,   16, 
                       SBSN,   16
                   }

                   Field (ECOR, ByteAcc, NoLock, Preserve)
                   {
                               Offset (0xA0), 
                       SBCH,   32
                   }

                   Field (ECOR, ByteAcc, NoLock, Preserve)
                   {
                               Offset (0xA0), 
                       SBMN,   128
                   }

                   Field (ECOR, ByteAcc, NoLock, Preserve)
                   {
                               Offset (0xA0), 
                       SBDN,   128
                   }

i.e. SBDN = Smart Battery Device Name, SBMN = Smart battery Model Number, etc. Perhaps one of the other fields provides Cycle Count... like say, SBCC? :)

SBCC isn't referenced by any DSDT code, but that doesn't mean the hardware designer didn't do his job correctly and more than likely all the battery information has been provided by the EC.

 

Use RW Everything on Windows to look at/monitor this field in the Embedded controller and see what it returns. Or better yet, implement a _BIX method and return the value of this field for CycleCount and see what you get!

  • Like 1
Link to comment
Share on other sites

Thank you for your reply.

 

Ok with Windows an RE everything:

 

unbenanntegz.jpg

 

But where or how can i get the SBCC output? Sorry but i have no experience with this stuff and google wasn't a real help here.

With DSDT i don't really know how to set up the _BIX Method :wallbash: (see test.zip)

test.zip

Link to comment
Share on other sites

It looks like I'll get to test the driver with a new 12-cell battery (just ordered) as my original 8-cell HP battery is now showing "Service Battery" in OSX and "Consider replacing your battery" in Windows 7 :( Apparently the original battery has 31 cycles on it.

Hi gsly

I have 12-cell battery on my HP, everything is fine except sometimes I'm getting 'FIXME' messages in console:

15/12/2011 09:30:57 configd[14] FIXME: IOUnserialize has detected a string that is not valid UTF-8, "DV9000-00017���u�=��_i�ղ".
15/12/2011 09:32:03 configd[14] FIXME: IOUnserialize has detected a string that is not valid UTF-8, "DV9000-00017���u`e�gQ".
15/12/2011 09:39:51 configd[14] FIXME: IOUnserialize has detected a string that is not valid UTF-8, "DV9000-00017���u`<�".
15/12/2011 09:50:24 configd[14] FIXME: IOUnserialize has detected a string that is not valid UTF-8, "DV9000-00017���u@Q� \�".

this doesn't seem to affect system or battery information in any way, from google search I found that this may be battery problem itself but then battery is 2 months old, any ideas from you ?

Thanks

swavek

Link to comment
Share on other sites

Hi gsly

I have 12-cell battery on my HP, everything is fine except sometimes I'm getting 'FIXME' messages in console:

15/12/2011 09:30:57 configd[14] FIXME: IOUnserialize has detected a string that is not valid UTF-8, "DV9000-00017���u�=��_i�ղ".
15/12/2011 09:32:03 configd[14] FIXME: IOUnserialize has detected a string that is not valid UTF-8, "DV9000-00017���u`e�gQ".
15/12/2011 09:39:51 configd[14] FIXME: IOUnserialize has detected a string that is not valid UTF-8, "DV9000-00017���u`<�".
15/12/2011 09:50:24 configd[14] FIXME: IOUnserialize has detected a string that is not valid UTF-8, "DV9000-00017���u@Q� \�".

this doesn't seem to affect system or battery information in any way, from google search I found that this may be battery problem itself but then battery is 2 months old, any ideas from you ?

Thanks

swavek

This is the bug I found in the HP ITOS() method (See OP/first page) that doesn't end the ASCII string will a zero byte (terminator) and is the reason you see the garbage after the legitimate string in the log output. I looked for this bug for a long time thinking it was in the driver but after much debugging, I finally traced it to bad HP code. And yes, there are other bugs in the HP DSDT code as well...

Link to comment
Share on other sites

This is the bug I found in the HP ITOS() method (See OP/first page) that doesn't end the ASCII string will a zero byte (terminator) and is the reason you see the garbage after the legitimate string in the log output. I looked for this bug for a long time thinking it was in the driver but after much debugging, I finally traced it to bad HP code. And yes, there are other bugs in the HP DSDT code as well...

 

Does this effect the performance or the functionality of the battery? I am planning to buy a 12 cell battery. The original one died for a while back and I got a new one from the Ebay, which is working well so far.

Link to comment
Share on other sites

Does this effect the performance or the functionality of the battery? I am planning to buy a 12 cell battery. The original one dies for a while back and I got a new one from the Ebay, which is working well so far.

No it does not. The bug just causes the string returned by ACPI to the driver code to not have a proper zero termination and when that string it passed to the Apple API to put it into the IORegistry, some check in their code generates the logging message as it detects (essentially) a buffer overflow condition.

 

BTW, I just purchased a 12-cell battery for my DV8 a few weeks back as my stock one decided to die after 31 cycles. The new battery works well and this driver picked up all of the information from it no problem and everything is still calculated correctly. I'll post a few screen shots soon.

Link to comment
Share on other sites

This is the bug I found in the HP ITOS() method (See OP/first page) that doesn't end the ASCII string will a zero byte (terminator) and is the reason you see the garbage after the legitimate string in the log output. I looked for this bug for a long time thinking it was in the driver but after much debugging, I finally traced it to bad HP code. And yes, there are other bugs in the HP DSDT code as well...

Thanks a million again gsly !

I confess I went extra lazy way when I was doing DSDT patching with your methods - I had compilation errors with ITOS Method so I left it untouched (removed comments and errors are gone now)

And yes I am aware of that how buggy HP DSDT can be.. spent waaay too much time fiddling and studying it..

But must say by looking at some other DSDTs - different models or laptop brands I still consider myself being lucky ;)

 

Regards

s

Link to comment
Share on other sites

This is the bug I found in the HP ITOS() method (See OP/first page) that doesn't end the ASCII string will a zero byte (terminator) and is the reason you see the garbage after the legitimate string in the log output. I looked for this bug for a long time thinking it was in the driver but after much debugging, I finally traced it to bad HP code. And yes, there are other bugs in the HP DSDT code as well...

 

hi gsly,

 

Am I to assume that your fix is not brand specific and i can fix my ITOS() method simply by adding Store(Zero, Index(Local0, Local2)) before Return (Local0) at its end ? Like this:

 

Method (ITOS, 1, NotSerialized)
		{
			Store (Buffer (0x09)
				{
					/* 0000 */	0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
					/* 0008 */	0x00
				}, Local0)
			Store (Buffer (0x11)
				{
					"0123456789ABCDEF"
				}, Local7)
			Store (0x08, Local1)
			Store (Zero, Local2)
			Store (Zero, Local3)
			While (Local1)
			{
				Decrement (Local1)
				And (ShiftRight (Arg0, ShiftLeft (Local1, 0x02)), 0x0F, Local4)
				If (Local4)
				{
					Store (Ones, Local3)
				}
				If (Local3)
				{
					GBFE (Local7, Local4, RefOf (Local5))
					PBFE (Local0, Local2, Local5)
					Increment (Local2)
				}
			}
		  Store(Zero, Index(Local0, Local2))
		  Return (Local0)
		}

 

Or there is more to do ? This is from Dell XPS L501x, Thanks

Link to comment
Share on other sites

hi gsly,

 

Am I to assume that your fix is not brand specific and i can fix my ITOS() method simply by adding Store(Zero, Index(Local0, Local2)) before Return (Local0) at its end ?

...

Or there is more to do ? This is from Dell XPS L501x, Thanks

Correct, this function is not brand specific and could be used on any platform provided the dependent supporting functions GBFE() and PBFE() are implemented as well. This method just converts a number into the ASCII string equivalent.

 

If you've found the same function with the same bug in Dell DSDT code, that either indicates that manufactures have access to the same set of common ACPI library functions, or more likely, manufacturers are just stealing each other's code. :dev:

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...