diff options
author | Julius Werner <jwerner@chromium.org> | 2017-05-03 01:16:29 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-18 17:59:06 +0300 |
commit | 7918cfc46cfad784b2aafdbbc690a96af0ae78d0 (patch) | |
tree | d775a893e4bc85b26b8df0f43570ccfa03c753e1 /drivers/firmware/google/memconsole.h | |
parent | acec09e67dc450d09a912735855326c3f1146a37 (diff) | |
download | linux-7918cfc46cfad784b2aafdbbc690a96af0ae78d0.tar.xz |
firmware: google: memconsole: Make memconsole interface more flexible
This patch redesigns the interface between the generic memconsole driver
and its implementations to become more flexible than a flat memory
buffer with unchanging bounds. This allows memconsoles like coreboot's
to include lines that were added by runtime firmware after the driver
was initialized. Since the console log size is thus no longer static,
this means that the /sys/firmware/log file has to become unseekable.
Signed-off-by: Julius Werner <jwerner@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/firmware/google/memconsole.h')
-rw-r--r-- | drivers/firmware/google/memconsole.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/firmware/google/memconsole.h b/drivers/firmware/google/memconsole.h index 190fc03a51ae..ff1592dc7d1a 100644 --- a/drivers/firmware/google/memconsole.h +++ b/drivers/firmware/google/memconsole.h @@ -18,13 +18,14 @@ #ifndef __FIRMWARE_GOOGLE_MEMCONSOLE_H #define __FIRMWARE_GOOGLE_MEMCONSOLE_H +#include <linux/types.h> + /* * memconsole_setup * - * Initialize the memory console from raw (virtual) base - * address and length. + * Initialize the memory console, passing the function to handle read accesses. */ -void memconsole_setup(void *baseaddr, size_t length); +void memconsole_setup(ssize_t (*read_func)(char *, loff_t, size_t)); /* * memconsole_sysfs_init |