Skip to content

Commit 0a4cad9

Browse files
Enric Balletbo i SerraTzung-Bi Shih
authored andcommitted
platform/chrome: Add ChromeOS ACPI device driver
The x86 Chromebooks have the ChromeOS ACPI device. This driver attaches to the ChromeOS ACPI device and exports the values reported by ACPI in a sysfs directory. This data isn't present in ACPI tables when read through ACPI tools, hence a driver is needed to do it. The driver gets data from firmware using the ACPI component of the kernel. The ACPI values are presented in string form (numbers as decimal values) or binary blobs, and can be accessed as the contents of the appropriate read only files in the standard ACPI device's sysfs directory tree. This data is consumed by the ChromeOS user space. Reviewed-by: Guenter Roeck <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Co-developed-by: Muhammad Usama Anjum <[email protected]> Signed-off-by: Muhammad Usama Anjum <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/Yn4OKYrtV35Dv+nd@debian-BULLSEYE-live-builder-AMD64
1 parent 7464ff8 commit 0a4cad9

File tree

6 files changed

+759
-0
lines changed

6 files changed

+759
-0
lines changed
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
What: /sys/bus/platform/devices/GGL0001:*/BINF.2
2+
Date: May 2022
3+
KernelVersion: 5.19
4+
Description:
5+
This file shows information about the current boot of
6+
the active EC firmware.
7+
* 0 - Read only (recovery) firmware.
8+
* 1 - Rewritable firmware.
9+
10+
What: /sys/bus/platform/devices/GGL0001:*/BINF.3
11+
Date: May 2022
12+
KernelVersion: 5.19
13+
Description:
14+
This file shows information about the current boot of
15+
the active main firmware type.
16+
* 0 - Recovery.
17+
* 1 - Normal.
18+
* 2 - Developer.
19+
* 3 - Netboot (factory installation only).
20+
21+
What: /sys/bus/platform/devices/GGL0001:*/CHSW
22+
Date: May 2022
23+
KernelVersion: 5.19
24+
Description:
25+
This file shows the switch position for the Chrome OS specific
26+
hardware switches.
27+
* 0 - No changes.
28+
* 2 - Recovery button was pressed when firmware booted.
29+
* 4 - Recovery button was pressed when EC firmware booted.
30+
* 32 - Developer switch was enabled when firmware booted.
31+
* 512 - Firmware write protection was disabled when firmware
32+
booted.
33+
34+
What: /sys/bus/platform/devices/GGL0001:*/FMAP
35+
Date: May 2022
36+
KernelVersion: 5.19
37+
Description:
38+
This file shows the physical memory address of the start of
39+
the main processor firmware flashmap.
40+
41+
What: /sys/bus/platform/devices/GGL0001:*/FRID
42+
Date: May 2022
43+
KernelVersion: 5.19
44+
Description:
45+
This file shows the firmware version for the read-only portion
46+
of the main processor firmware.
47+
48+
What: /sys/bus/platform/devices/GGL0001:*/FWID
49+
Date: May 2022
50+
KernelVersion: 5.19
51+
Description:
52+
This file shows the firmware version for the rewritable portion
53+
of the main processor firmware.
54+
55+
What: /sys/bus/platform/devices/GGL0001:*/GPIO.X/GPIO.0
56+
Date: May 2022
57+
KernelVersion: 5.19
58+
Description:
59+
This file shows the type of the GPIO signal for the Chrome OS
60+
specific GPIO assignments.
61+
* 1 - Recovery button.
62+
* 2 - Developer mode switch.
63+
* 3 - Firmware write protection switch.
64+
* 256 to 511 - Debug header GPIO 0 to GPIO 255.
65+
66+
What: /sys/bus/platform/devices/GGL0001:*/GPIO.X/GPIO.1
67+
Date: May 2022
68+
KernelVersion: 5.19
69+
Description:
70+
This file shows the signal attributes of the GPIO signal.
71+
* 0 - Signal is active low.
72+
* 1 - Signal is active high.
73+
74+
What: /sys/bus/platform/devices/GGL0001:*/GPIO.X/GPIO.2
75+
Date: May 2022
76+
KernelVersion: 5.19
77+
Description:
78+
This file shows the GPIO number on the specified GPIO
79+
controller.
80+
81+
What: /sys/bus/platform/devices/GGL0001:*/GPIO.X/GPIO.3
82+
Date: May 2022
83+
KernelVersion: 5.19
84+
Description:
85+
This file shows the name of the GPIO controller.
86+
87+
What: /sys/bus/platform/devices/GGL0001:*/HWID
88+
Date: May 2022
89+
KernelVersion: 5.19
90+
Description:
91+
This file shows the hardware ID for the Chromebook.
92+
93+
What: /sys/bus/platform/devices/GGL0001:*/MECK
94+
Date: May 2022
95+
KernelVersion: 5.19
96+
Description:
97+
This binary file returns the SHA-1 or SHA-256 hash that is
98+
read out of the Management Engine extended registers during
99+
boot. The hash is exported vi ACPI so the OS can verify that
100+
the Management Engine firmware has not changed. If Management
101+
Engine is not present, or if the firmware was unable to read the
102+
extended registers, this buffer size can be zero.
103+
104+
What: /sys/bus/platform/devices/GGL0001:*/VBNV.0
105+
Date: May 2022
106+
KernelVersion: 5.19
107+
Description:
108+
This file shows the offset in CMOS bank 0 of the verified boot
109+
non-volatile storage block, counting from the first writable
110+
CMOS byte (that is, 'offset = 0' is the byte following the 14
111+
bytes of clock data).
112+
113+
What: /sys/bus/platform/devices/GGL0001:*/VBNV.1
114+
Date: May 2022
115+
KernelVersion: 5.19
116+
Description:
117+
This file shows the size in bytes of the verified boot
118+
non-volatile storage block.
119+
120+
What: /sys/bus/platform/devices/GGL0001:*/VDAT
121+
Date: May 2022
122+
KernelVersion: 5.19
123+
Description:
124+
This binary file returns the verified boot data block shared
125+
between the firmware verification step and the kernel
126+
verification step.

0 commit comments

Comments
 (0)