162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_cimenuconfig GOOGLE_FIRMWARE
362306a36Sopenharmony_ci	bool "Google Firmware Drivers"
462306a36Sopenharmony_ci	default n
562306a36Sopenharmony_ci	help
662306a36Sopenharmony_ci	  These firmware drivers are used by Google servers,
762306a36Sopenharmony_ci	  Chromebooks and other devices using coreboot firmware.
862306a36Sopenharmony_ci	  If in doubt, say "N".
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ciif GOOGLE_FIRMWARE
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ciconfig GOOGLE_SMI
1362306a36Sopenharmony_ci	tristate "SMI interface for Google platforms"
1462306a36Sopenharmony_ci	depends on X86 && ACPI && DMI
1562306a36Sopenharmony_ci	help
1662306a36Sopenharmony_ci	  Say Y here if you want to enable SMI callbacks for Google
1762306a36Sopenharmony_ci	  platforms.  This provides an interface for writing to and
1862306a36Sopenharmony_ci	  clearing the event log.  If CONFIG_EFI is also enabled this
1962306a36Sopenharmony_ci	  driver provides an interface for reading and writing NVRAM
2062306a36Sopenharmony_ci	  variables.
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ciconfig GOOGLE_CBMEM
2362306a36Sopenharmony_ci	tristate "CBMEM entries in sysfs"
2462306a36Sopenharmony_ci	depends on GOOGLE_COREBOOT_TABLE
2562306a36Sopenharmony_ci	help
2662306a36Sopenharmony_ci	  CBMEM is a downwards-growing memory region created by the
2762306a36Sopenharmony_ci	  Coreboot BIOS containing tagged data structures from the
2862306a36Sopenharmony_ci	  BIOS.  These data structures expose things like the verified
2962306a36Sopenharmony_ci	  boot firmware variables, flash layout, firmware event log,
3062306a36Sopenharmony_ci	  and more.
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ci	  This option enables the cbmem module, which causes the
3362306a36Sopenharmony_ci	  kernel to search for Coreboot CBMEM entries, and expose the
3462306a36Sopenharmony_ci	  memory for each entry in sysfs under
3562306a36Sopenharmony_ci	  /sys/bus/coreboot/devices/cbmem-<id>.
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ciconfig GOOGLE_COREBOOT_TABLE
3862306a36Sopenharmony_ci	tristate "Coreboot Table Access"
3962306a36Sopenharmony_ci	depends on HAS_IOMEM && (ACPI || OF)
4062306a36Sopenharmony_ci	help
4162306a36Sopenharmony_ci	  This option enables the coreboot_table module, which provides other
4262306a36Sopenharmony_ci	  firmware modules access to the coreboot table. The coreboot table
4362306a36Sopenharmony_ci	  pointer is accessed through the ACPI "GOOGCB00" object or the
4462306a36Sopenharmony_ci	  device tree node /firmware/coreboot.
4562306a36Sopenharmony_ci	  If unsure say N.
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ciconfig GOOGLE_MEMCONSOLE
4862306a36Sopenharmony_ci	tristate
4962306a36Sopenharmony_ci	depends on GOOGLE_MEMCONSOLE_X86_LEGACY || GOOGLE_MEMCONSOLE_COREBOOT
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ciconfig GOOGLE_MEMCONSOLE_X86_LEGACY
5262306a36Sopenharmony_ci	tristate "Firmware Memory Console - X86 Legacy support"
5362306a36Sopenharmony_ci	depends on X86 && ACPI && DMI
5462306a36Sopenharmony_ci	select GOOGLE_MEMCONSOLE
5562306a36Sopenharmony_ci	help
5662306a36Sopenharmony_ci	  This option enables the kernel to search for a firmware log in
5762306a36Sopenharmony_ci	  the EBDA on Google servers.  If found, this log is exported to
5862306a36Sopenharmony_ci	  userland in the file /sys/firmware/log.
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ciconfig GOOGLE_FRAMEBUFFER_COREBOOT
6162306a36Sopenharmony_ci	tristate "Coreboot Framebuffer"
6262306a36Sopenharmony_ci	depends on FB_SIMPLE || DRM_SIMPLEDRM
6362306a36Sopenharmony_ci	depends on GOOGLE_COREBOOT_TABLE
6462306a36Sopenharmony_ci	help
6562306a36Sopenharmony_ci	  This option enables the kernel to search for a framebuffer in
6662306a36Sopenharmony_ci	  the coreboot table.  If found, it is registered with simplefb.
6762306a36Sopenharmony_ci
6862306a36Sopenharmony_ciconfig GOOGLE_MEMCONSOLE_COREBOOT
6962306a36Sopenharmony_ci	tristate "Firmware Memory Console"
7062306a36Sopenharmony_ci	depends on GOOGLE_COREBOOT_TABLE
7162306a36Sopenharmony_ci	select GOOGLE_MEMCONSOLE
7262306a36Sopenharmony_ci	help
7362306a36Sopenharmony_ci	  This option enables the kernel to search for a firmware log in
7462306a36Sopenharmony_ci	  the coreboot table.  If found, this log is exported to userland
7562306a36Sopenharmony_ci	  in the file /sys/firmware/log.
7662306a36Sopenharmony_ci
7762306a36Sopenharmony_ciconfig GOOGLE_VPD
7862306a36Sopenharmony_ci	tristate "Vital Product Data"
7962306a36Sopenharmony_ci	depends on GOOGLE_COREBOOT_TABLE
8062306a36Sopenharmony_ci	help
8162306a36Sopenharmony_ci	  This option enables the kernel to expose the content of Google VPD
8262306a36Sopenharmony_ci	  under /sys/firmware/vpd.
8362306a36Sopenharmony_ci
8462306a36Sopenharmony_ciendif # GOOGLE_FIRMWARE
85