firmware: google memconsole: Add coreboot support
authorThierry Escande <thierry.escande@collabora.com>
Tue, 28 Mar 2017 16:11:27 +0000 (18:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Apr 2017 16:05:36 +0000 (18:05 +0200)
commitd384d6f43d1ec3f1225ab0275fd592c5980bd830
tree417fd90c8d439adb8af497c319f420e1a846b97a
parentafe9dba4f9aedae417243a1782d085ff23e97b77
firmware: google memconsole: Add coreboot support

Coreboot (http://www.coreboot.org) allows to save the firmware console
output in a memory buffer. With this patch, the address of this memory
buffer is obtained from coreboot tables on x86 chromebook devices
declaring an ACPI device with name matching GOOGCB00 or BOOT0000.

If the memconsole-coreboot driver is able to find the coreboot table,
the memconsole driver sets the cbmem_console address and initializes the
memconsole sysfs entries.

The coreboot_table-acpi driver is responsible for setting the address of
the coreboot table header when probed. If this address is not yet set
when memconsole-coreboot is probed, then the probe is deferred by
returning -EPROBE_DEFER.

This patch is a rework/split/merge of patches from the chromeos v4.4
kernel tree originally authored by:
 Vadim Bendebury <vbendeb@chromium.org>
 Wei-Ning Huang <wnhuang@google.com>
 Yuji Sasaki <sasakiy@google.com>
 Duncan Laurie <dlaurie@chromium.org>
 Julius Werner <jwerner@chromium.org>
 Brian Norris <briannorris@chromium.org>

Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/google/Kconfig
drivers/firmware/google/Makefile
drivers/firmware/google/coreboot_table-acpi.c [new file with mode: 0644]
drivers/firmware/google/coreboot_table.c [new file with mode: 0644]
drivers/firmware/google/coreboot_table.h [new file with mode: 0644]
drivers/firmware/google/memconsole-coreboot.c [new file with mode: 0644]