No APM yet for AMD?

Bruno Ducrot ducrot at poupinou.org
Thu Jan 5 03:37:59 PST 2006


On Thu, Jan 05, 2006 at 12:33:16PM +0100, Bruno Ducrot wrote:
> On Wed, Jan 04, 2006 at 10:14:13AM -0500, Francisco Reyes wrote:
> > Bruno Ducrot writes:
> > 
> > >>http://public.natserv.net/acpidump.txt
> > >
> > >Well could you try to add this to your /boot/loader.conf:
> > >hw.acpi.osname="Microsoft Windows NT"
> > 
> > Done
> 
> Please remove that line.
> 
> > 
> > 
> > >It's because I want to check what happens if the following ASL is
> > >triggered:
> > >
> > >If (LEqual (SizeOf (\_OS), 0x14))
> > >{
> > >    BPOL (0x3C)
> > >}
> > 
> > Second dump on the same location... different name
> > http://public.natserv.net/acpidump2.txt
> > 
> > >That's look like a workaround for Windows NT and that seems to
> > >be related to batteries and AC adapter.
> > 
> > Not sure what was supposed to happen after trying the change in 
> > loader.conf, but I tried "sysctl -a |grep acpi.bat" and the results are the 
> > same as before.
> > 
> > hw.acpi.battery.life: -1 
> > hw.acpi.battery.time: -1
> > hw.acpi.battery.state: 7
> > hw.acpi.battery.units: 1
> > hw.acpi.battery.info_expire: 5
> 
> Could you please try this patch to your asl?
> --- Francisco_Reyes.asl	2006/01/05 10:38:17	1.1
> +++ Francisco_Reyes.asl	2006/01/05 11:19:42
> @@ -3520,7 +3520,14 @@
>  
>                      Method (UPBS, 0, NotSerialized)
>                      {
> -                        Store (0xFFFFFFFF, Index (PBST, 0x01))
> +
> +                        // read remain capacity
> +                        If (\_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x0F, RefOf (Local0)))
> +                        {
> +                            Return (IVBS())
> +                        }
> +
> +                        Store (Local0, Index (PBST, 0x01))
>                          Store (\_SB.PCI0.LPC0.EC0.MBRM, Local5)
>                          If (LNot (And (Local5, 0x8000)))
>                          {
> 
> 
> 
> I've renamed your acpidump.txt as Francisco_Reyes.asl.
> 

Oops I'm stupid.  I've introduced an useless warning.
Try this one instead:

--- Francisco_Reyes.asl	2006/01/05 10:38:17	1.1
+++ Francisco_Reyes.asl	2006/01/05 11:29:45
@@ -3520,21 +3520,27 @@
 
                     Method (UPBS, 0, NotSerialized)
                     {
-                        Store (0xFFFFFFFF, Index (PBST, 0x01))
-                        Store (\_SB.PCI0.LPC0.EC0.MBRM, Local5)
-                        If (LNot (And (Local5, 0x8000)))
+
+                        // read remain capacity
+                        If (LNot(\_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x0F, RefOf (Local0))))
                         {
-                            ShiftRight (Local5, 0x05, Local5)
-                            ShiftLeft (Local5, 0x05, Local5)
-                            If (LNot (LEqual (Local5, DerefOf (Index (PBST, 0x02)))))
-                            {
-                                Store (Local5, Index (PBST, 0x02))
+                            Store (Local0, Index (PBST, 0x01))
+                            Store (\_SB.PCI0.LPC0.EC0.MBRM, Local5)
+                            If (LNot (And (Local5, 0x8000)))
+                            {
+                                ShiftRight (Local5, 0x05, Local5)
+                                ShiftLeft (Local5, 0x05, Local5)
+                                If (LNot (LEqual (Local5, DerefOf (Index (PBST, 0x02)))))
+                                {
+                                    Store (Local5, Index (PBST, 0x02))
+                                }
                             }
-                        }
 
-                        Store (0xFFFFFFFF, Index (PBST, 0x03))
-                        Store (\_SB.PCI0.LPC0.EC0.MBST, Index (PBST, 0x00))
-                        Store (\_SB.PCI0.LPC0.EC0.BA1C, \_SB.CM26)
+                            Store (0xFFFFFFFF, Index (PBST, 0x03))
+                            Store (\_SB.PCI0.LPC0.EC0.MBST, Index (PBST, 0x00))
+                            Store (\_SB.PCI0.LPC0.EC0.BA1C, \_SB.CM26)
+                        }
+                        Return (IVBS())
                     }
 
                     Method (IVBI, 0, NotSerialized)

-- 
Bruno Ducrot

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


More information about the freebsd-acpi mailing list