Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/84300?usp=email )
Change subject: [RFC] ec/google/chromeec: Guard reading long battery strings ......................................................................
[RFC] ec/google/chromeec: Guard reading long battery strings
Commit b97ec4f0166b ("chromeec: support reading long battery strings") added support for reading long battery strings, but the method used to determine if this feature is supported causes Windows to hang when booting on older pre-CR50 ChromeOS devices. Guard the use of the method to use the longer battery strings so pre-CR50 devices do not call it.
In testing, affected platforms were Broadwell/Braswell and earlier. Technically Skylake is pre-CR50 as well, but not affected either way.
TEST=build/boot Windows on google link, wolf, samus, chell and others. Verify boot successful and battery info populated correctly.
Change-Id: If3686dc9b82b44202947081ec7e253317deb8fff Signed-off-by: Matt DeVillier matt.devillier@gmail.com --- M src/ec/google/chromeec/acpi/battery.asl 1 file changed, 16 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/00/84300/1
diff --git a/src/ec/google/chromeec/acpi/battery.asl b/src/ec/google/chromeec/acpi/battery.asl index f5047cb..33c98c5 100644 --- a/src/ec/google/chromeec/acpi/battery.asl +++ b/src/ec/google/chromeec/acpi/battery.asl @@ -171,9 +171,15 @@ Arg1[6] = Local2
// Get battery info from mainboard +#if CONFIG(TPM_GOOGLE_CR50) || CONFIG(TPM_GOOGLE_TI50) Arg1[9] = BRSX (1) Arg1[10] = BRSX (2) Arg1[12] = BRSX (3) +#else + Arg1[9] = ToString(Concatenate(BMOD, 0x00)) + Arg1[10] = ToString(Concatenate(BSER, 0x00)) + Arg1[12] = ToString(Concatenate(BMFG, 0x00)) +#endif
Release (^BATM) Return (Arg1) @@ -214,9 +220,16 @@ Arg1[8] = BTCC
// Get battery info from mainboard - Arg1[16] = BRSX (1) - Arg1[17] = BRSX (2) - Arg1[19] = BRSX (3) +#if CONFIG(TPM_GOOGLE_CR50) || CONFIG(TPM_GOOGLE_TI50) + Arg1[9] = BRSX (1) + Arg1[10] = BRSX (2) + Arg1[12] = BRSX (3) +#else + Arg1[16] = ToString(Concatenate(BMOD, 0x00)) + Arg1[17] = ToString(Concatenate(BSER, 0x00)) + Arg1[19] = ToString(Concatenate(BMFG, 0x00)) +#endif +
Release (^BATM) Return (Arg1)