memconsole.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. #ifndef __FIRMWARE_GOOGLE_MEMCONSOLE_H
  18. #define __FIRMWARE_GOOGLE_MEMCONSOLE_H
  19. #include <linux/types.h>
  20. /*
  21. * memconsole_setup
  22. *
  23. * Initialize the memory console, passing the function to handle read accesses.
  24. */
  25. void memconsole_setup(ssize_t (*read_func)(char *, loff_t, size_t));
  26. /*
  27. * memconsole_sysfs_init
  28. *
  29. * Update memory console length and create binary file
  30. * for firmware object.
  31. */
  32. int memconsole_sysfs_init(void);
  33. /* memconsole_exit
  34. *
  35. * Unmap the console buffer.
  36. */
  37. void memconsole_exit(void);
  38. #endif /* __FIRMWARE_GOOGLE_MEMCONSOLE_H */