memconsole.h 719 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * memconsole.h
  4. *
  5. * Internal headers of the memory based BIOS console.
  6. *
  7. * Copyright 2017 Google Inc.
  8. */
  9. #ifndef __FIRMWARE_GOOGLE_MEMCONSOLE_H
  10. #define __FIRMWARE_GOOGLE_MEMCONSOLE_H
  11. #include <linux/types.h>
  12. /*
  13. * memconsole_setup
  14. *
  15. * Initialize the memory console, passing the function to handle read accesses.
  16. */
  17. void memconsole_setup(ssize_t (*read_func)(char *, loff_t, size_t));
  18. /*
  19. * memconsole_sysfs_init
  20. *
  21. * Update memory console length and create binary file
  22. * for firmware object.
  23. */
  24. int memconsole_sysfs_init(void);
  25. /* memconsole_exit
  26. *
  27. * Unmap the console buffer.
  28. */
  29. void memconsole_exit(void);
  30. #endif /* __FIRMWARE_GOOGLE_MEMCONSOLE_H */