2019-05-29 22:18:01 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2017-03-29 00:11:26 +08:00
|
|
|
/*
|
|
|
|
* memconsole.h
|
|
|
|
*
|
|
|
|
* Internal headers of the memory based BIOS console.
|
|
|
|
*
|
|
|
|
* Copyright 2017 Google Inc.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __FIRMWARE_GOOGLE_MEMCONSOLE_H
|
|
|
|
#define __FIRMWARE_GOOGLE_MEMCONSOLE_H
|
|
|
|
|
2017-05-03 06:16:29 +08:00
|
|
|
#include <linux/types.h>
|
|
|
|
|
2017-03-29 00:11:26 +08:00
|
|
|
/*
|
|
|
|
* memconsole_setup
|
|
|
|
*
|
2017-05-03 06:16:29 +08:00
|
|
|
* Initialize the memory console, passing the function to handle read accesses.
|
2017-03-29 00:11:26 +08:00
|
|
|
*/
|
2017-05-03 06:16:29 +08:00
|
|
|
void memconsole_setup(ssize_t (*read_func)(char *, loff_t, size_t));
|
2017-03-29 00:11:26 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* memconsole_sysfs_init
|
|
|
|
*
|
|
|
|
* Update memory console length and create binary file
|
|
|
|
* for firmware object.
|
|
|
|
*/
|
|
|
|
int memconsole_sysfs_init(void);
|
|
|
|
|
|
|
|
/* memconsole_exit
|
|
|
|
*
|
|
|
|
* Unmap the console buffer.
|
|
|
|
*/
|
|
|
|
void memconsole_exit(void);
|
|
|
|
|
|
|
|
#endif /* __FIRMWARE_GOOGLE_MEMCONSOLE_H */
|