Contribute
Register

<< Solved >> Problem in fixing DSDT for battery.

Status
Not open for further replies.
Joined
Dec 7, 2019
Messages
12
Motherboard
miniPC (China)
CPU
Intel Core i9 CPU 10880H
Graphics
Intel UHD Graphics 630
Mac
  1. MacBook Air
Mobile Phone
  1. Android
Hello!
There is a problem. I cannot patch DSDT.
Help me fix DSDT for battery.
I use a utility method B1B2.
Corrected some parameters but stuck here:

Code:
            OperationRegion (ECF2, EmbeddedControl, Zero, 0xFF)
            Field (ECF2, ByteAcc, Lock, Preserve)
            {
                Offset (0x18),
                SPTR,   8,
                ...
                Offset (0x64),
                BFV0,8,BFV1,8,
                BCR0,8,BCR1,8,
                Offset (0x6A),
                BRC0,8,BRC1,8,
                B1FC,   16,
                Offset (0x76),
                B1DV,   16,
                B1DC,   16
            }

I need to fix B1FC + B1DV + B1DC here:
Code:
                   If (ECAV)
                    {
                        If (LAnd (LAnd (ECRD (RefOf (B1DV)), ECRD (RefOf (B1FC))), ECRD (RefOf (B1DC))))
                        {
                            Store (ECRD (RefOf (B1DC)), Index (BPKG, One))
                            Store (ECRD (RefOf (B1FC)), Index (BPKG, 0x02))
                            Store (ECRD (RefOf (B1DV)), Index (BPKG, 0x04))
                            Store (Divide (Multiply (ECRD (RefOf (B1FC)), 0x04), 0x64, ), Index (BPKG, 0x05))
                            Store (Divide (Multiply (ECRD (RefOf (B1FC)), 0x03), 0x64, ), Index (BPKG, 0x06))
                        }
                    }
 

Attachments

  • DSDT.dsl
    712.6 KB · Views: 50
Last edited:
Сan anyone help?
 
I fix it.

Code:
If (LAnd (LAnd (ECRD (RefOf (B1DV)), ECRD (RefOf (B1FC))), ECRD (RefOf (B1DC))))
to
Code:
If (LAnd (LAnd (LAnd (LAnd (LAnd (ECRD (RefOf (BDV0)), ECRD (RefOf (BDV1))), ECRD (RefOf (BFC0))), ECRD (RefOf (BFC1))), ECRD (RefOf (BDC0))), ECRD (RefOf (BDC1))))

Code:
      Store (ECRD (RefOf (B1DC)), Index (BPKG, One))
      Store (ECRD (RefOf (B1FC)), Index (BPKG, 0x02))
      Store (ECRD (RefOf (B1DV)), Index (BPKG, 0x04))
      Store (Divide (Multiply (ECRD (RefOf (B1FC)), 0x04), 0x64, ), Index (BPKG, 0x05))
      Store (Divide (Multiply (ECRD (RefOf (B1FC)), 0x03), 0x64, ), Index (BPKG, 0x06))

to
Code:
       Store (B1B2(BDC0,BDC1), Local0)
       Store (ECRD (RefOf (Local0)), Index (BPKG, One))
       Store (B1B2(BFC0,BFC1), Local0)
       Store (ECRD (RefOf (Local0)), Index (BPKG, 0x02))
       Store (B1B2(BDV0,BDV1), Local0)
       Store (ECRD (RefOf (Local0)), Index (BPKG, 0x04))
       Store (B1B2(BFC0,BFC1), Local0)
       Store (Divide (Multiply (ECRD (RefOf (Local0)), 0x04), 0x64, ), Index (BPKG, 0x05))
       Store (Divide (Multiply (ECRD (RefOf (Local0)), 0x03), 0x64, ), Index (BPKG, 0x06))
       And(Local0, Ones, Local0)
 
Status
Not open for further replies.
Back
Top