Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-19450

[ADVENT 4211] ACPI control method battery device is not enumerated

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None

    Description

      ReactOS version: ReactOS 0.4.15-dev-7585-g51a446f-x86-gcc-lin-dbg
      Device: ADVENT 4211 (MSI U100 clone) - Laptop without COM port.

      Description: There is no driver for the PNP0C09 ACPI embedded driver. This might affect some laptops to detect the batteries and other ACPI functions/shortcuts:

      Windows XP behavior: The PNP0C09 embedded controller has several children devices, including the battery (PNP0C0A). Device by connection: ACPI => PCI => PCI-ISA bridge => ACPI Embedded Controller => Battery.

      I dumped the ACPI. Attached the image from the reference.

      I will provide a debug log ASAP.

      Adding more info into the ticket: There are at least two issues about this. One is about the AML misdetection by ReactOS ACPICA. Simone helped me to locate the root, and he proposed me this patch (including some debug logs in osl that could be erased). MSIU100-ACPIBATT.patch

      Quoting Simone:

      The device status method checks if SB was initalized and EC was registered. If no, it reports a missing battery. Most DSDT does not implement the status method in battery snd acpi protocol makes it assume it's present. Since the status method checks MYEC field in EC region space, the missing handler on ACPI made the AML execution fails because it didn't know how to retrieve that field (no handler found). 

      DSDT from MSIU100 (SB.PCI0.SBRG.EC.MYEC And SB.PCI0.SBRG.EC.MBTS refered the EC region). 
      That dummy = 1 thing basically forced that field value to 1 without looking the acpi memory region.

              Device (BAT1)
              {
                  Name (_HID, EisaId ("PNP0C0A") /* Control Method Battery */)  // _HID: Hardware ID
                  Name (_UID, 0x01)  // _UID: Unique ID
                  Name (_PCL, Package (0x01)  // _PCL: Power Consumer List
                  {
                      \_SB
                  })
                  Method (_STA, 0, NotSerialized)  // _STA: Status
                  {
                      If (\_SB.PCI0.SBRG.EC.MYEC)
                      {
                          If (\_SB.PCI0.SBRG.EC.MBTS)
                          {
                              Return (0x1F)
                          }
                          Else
                          {
                              Return (0x0F)
                          }
                      }
                      Else
                      {
                          Return (0x0F)
                      }
                  } 

      After the patch, the battery is exposed in the device manager and so, but it's still not recognizing some parameters of the EC region.
      Images after patch:

       

      Attachments

        1. ReactOS_acpi_tree.jpg
          ReactOS_acpi_tree.jpg
          217 kB
        2. MSIU100-ACPIBATT.patch
          5 kB
        3. IMG_20241113_215024_496.jpg
          IMG_20241113_215024_496.jpg
          9.38 MB
        4. IMG_20241113_214934_331.jpg
          IMG_20241113_214934_331.jpg
          8.22 MB
        5. image.png
          image.png
          25 kB
        6. dump-acpi.reg
          136 kB
        7. debug+osl.log
          1.13 MB
        8. battery_on_ec.jpg
          battery_on_ec.jpg
          224 kB
        9. battery_id.jpg
          battery_id.jpg
          205 kB
        10. ADVENT MSI U100 - Debug boot.txt
          59 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              julenuri julenuri
              Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: