1 /*
2  * memconsole.h
3  *
4  * Internal headers of the memory based BIOS console.
5  *
6  * Copyright 2017 Google Inc.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License v2.0 as published by
10  * the Free Software Foundation.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  */
17 
18 #ifndef __FIRMWARE_GOOGLE_MEMCONSOLE_H
19 #define __FIRMWARE_GOOGLE_MEMCONSOLE_H
20 
21 #include <linux/types.h>
22 
23 /*
24  * memconsole_setup
25  *
26  * Initialize the memory console, passing the function to handle read accesses.
27  */
28 void memconsole_setup(ssize_t (*read_func)(char *, loff_t, size_t));
29 
30 /*
31  * memconsole_sysfs_init
32  *
33  * Update memory console length and create binary file
34  * for firmware object.
35  */
36 int memconsole_sysfs_init(void);
37 
38 /* memconsole_exit
39  *
40  * Unmap the console buffer.
41  */
42 void memconsole_exit(void);
43 
44 #endif /* __FIRMWARE_GOOGLE_MEMCONSOLE_H */
45