blob: aaff2b72b606e4ac3cde688d4171853bf2877db8 [file] [log] [blame]
Thomas Gleixnerd9523672019-05-29 07:18:01 -07001/* SPDX-License-Identifier: GPL-2.0-only */
Thierry Escandeafe9dba42017-03-28 18:11:26 +02002/*
3 * memconsole.h
4 *
5 * Internal headers of the memory based BIOS console.
6 *
7 * Copyright 2017 Google Inc.
Thierry Escandeafe9dba42017-03-28 18:11:26 +02008 */
9
10#ifndef __FIRMWARE_GOOGLE_MEMCONSOLE_H
11#define __FIRMWARE_GOOGLE_MEMCONSOLE_H
12
Julius Werner7918cfc2017-05-02 15:16:29 -070013#include <linux/types.h>
14
Thierry Escandeafe9dba42017-03-28 18:11:26 +020015/*
16 * memconsole_setup
17 *
Julius Werner7918cfc2017-05-02 15:16:29 -070018 * Initialize the memory console, passing the function to handle read accesses.
Thierry Escandeafe9dba42017-03-28 18:11:26 +020019 */
Julius Werner7918cfc2017-05-02 15:16:29 -070020void memconsole_setup(ssize_t (*read_func)(char *, loff_t, size_t));
Thierry Escandeafe9dba42017-03-28 18:11:26 +020021
22/*
23 * memconsole_sysfs_init
24 *
25 * Update memory console length and create binary file
26 * for firmware object.
27 */
28int memconsole_sysfs_init(void);
29
30/* memconsole_exit
31 *
32 * Unmap the console buffer.
33 */
34void memconsole_exit(void);
35
36#endif /* __FIRMWARE_GOOGLE_MEMCONSOLE_H */