[coreboot-gerrit] Patch set updated for coreboot: ec/ene932: correct ACPI battery data fed into ToString()

Matt DeVillier (matt.devillier@gmail.com) gerrit at coreboot.org
Sat Dec 10 05:38:50 CET 2016


Matt DeVillier (matt.devillier at gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17783

-gerrit

commit 2e297724691d351db90158c8b59cc65cd677c557
Author: Matt DeVillier <matt.devillier at gmail.com>
Date:   Fri Dec 9 18:14:57 2016 -0600

    ec/ene932: correct ACPI battery data fed into ToString()
    
    ToString() requires the input buffer data to be null-terminated,
    but the data returned by the EC is not, leading Windows to fail
    to report any battery data at all.  Correct this by concatenating
    a null terminator (0x00) to the end of the buffer data before
    inputting to ToString() where needed
    
    Change-Id: Ic86048d1d6354b9b0dac3c8957df318d0825c905
    Signed-off-by: Matt DeVillier <matt.devillier at gmail.com>
---
 src/ec/compal/ene932/acpi/battery.asl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/ec/compal/ene932/acpi/battery.asl b/src/ec/compal/ene932/acpi/battery.asl
index 12092c7..3d0798d 100644
--- a/src/ec/compal/ene932/acpi/battery.asl
+++ b/src/ec/compal/ene932/acpi/battery.asl
@@ -84,9 +84,9 @@ Device (BATX)
 		Multiply(Local1, 0x03, Local1)
 		Store (Local1, Index (PBIF, 6))
 
-		Store (ToString(BATD), Index (PBIF, 9))  // model
+		Store (ToString(Concatenate(BATD,0x00)), Index (PBIF, 9))  // model
 		Store (ToHexString(BSN0), Index (PBIF, 10))  // serial
-		Store (ToString(BMFN), Index (PBIF, 12))  // venor
+		Store (ToString(BMFN), Index (PBIF, 12))  // vendor
 
 		Store(BDN0, BTNM)	// Save the battery number
 



More information about the coreboot-gerrit mailing list