ec/google/chromeec: hide absent battery and MKBP devices#34
Draft
jackadam1981 wants to merge 1 commit into
Draft
ec/google/chromeec: hide absent battery and MKBP devices#34jackadam1981 wants to merge 1 commit into
jackadam1981 wants to merge 1 commit into
Conversation
Owner
|
looks good at first glance, just need to verify no issues on devices that don't support the EC feature flag |
Owner
|
here's the version I upstreamed, seems to work properly in my limited testing: https://review.coreboot.org/c/coreboot/+/93260 just added a check for the DFUD flag before using the feature flags to determine status |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Use Chrome EC feature bits to hide Chrome OS laptop-oriented ACPI devices when the EC reports that the hardware is not present.
_STA = 0for the ACPI battery device when neitherBATTnorSBATis reported by the EC._STA = 0for the Chrome EC MKBP keyboard/buttons device (GOOG0007) when the EC does not reportKEYB.GOOG0004) and AC adapter (ACPI0003) visible, because charger/PD/EC command functionality can still be valid on Chromebox-style systems.Rationale
Kaisa-style Chromebox systems can share Chrome EC ACPI code with Chromebook designs, but the EC feature bitmap already tells us whether battery and EC keyboard/button capabilities exist. Hiding these devices via
_STAavoids exposing non-functional laptop devices to the OS without adding board-specific policy knobs.Validation
Built
google/puffKaisa fromMrChromebox-2603with a release iPXE payload./home/jack/coreboot_build/src/coreboot-2603-chromeec-acpi-pr/home/jack/coreboot_build/out/logs/build-kaisa-2603-release-ipxe-only-chromeec-acpi-sta-20260601-170324.log/home/jack/coreboot_build/out/roms/kaisa-2603-release-ipxe-only-chromeec-acpi-sta-20260601-171620/kaisa-2603-release-ipxe-only-chromeec-acpi-sta.rom458babe81b708f3a5acbd1a3971afcfcca5e4daff1bc9c74f9887fdd70ac03bfFlashed the ROM on a Kaisa target using the local MrChromebox-style flash script, preserving/injecting platform data from the backup.
/home/jack/文档/CoreBoot-Build/out/backups/backup_20260602_011854.romVERIFIEDAfter reboot on the target:
PNP0C0A:00battery path\_SB_.PCI0.LPCB.EC0_.BAT0reportsstatus=0.GOOG0007:00path\_SB_.PCI0.LPCB.EC0_.CREC.CKSCreportsstatus=0.cros_ec_buttonsis no longer present in/sys/class/input.GOOG0004:00remains present withstatus=15.ACPI0003:00remains present withstatus=15.Power Buttoninput remains present./sys/class/power_supplystill exposesAC,CROS_DEDICATED_CHARGER, andCROS_USBPD_CHARGER0.Note: the flashed validation ROM contained only this PR's change on top of
MrChromebox-2603, so unrelated Kaisa eMMC hiding work was not included in this runtime test image.