sysinfo.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * This file is part of the libpayload project.
  3. *
  4. * Copyright (C) 2008 Advanced Micro Devices, Inc.
  5. *
  6. * SPDX-License-Identifier: BSD-3-Clause
  7. */
  8. #ifndef _COREBOOT_SYSINFO_H
  9. #define _COREBOOT_SYSINFO_H
  10. #include <common.h>
  11. #include <compiler.h>
  12. #include <libfdt.h>
  13. #include <asm/arch/tables.h>
  14. /* Allow a maximum of 16 memory range definitions. */
  15. #define SYSINFO_MAX_MEM_RANGES 16
  16. /* Allow a maximum of 8 GPIOs */
  17. #define SYSINFO_MAX_GPIOS 8
  18. struct sysinfo_t {
  19. int n_memranges;
  20. struct memrange {
  21. unsigned long long base;
  22. unsigned long long size;
  23. unsigned int type;
  24. } memrange[SYSINFO_MAX_MEM_RANGES];
  25. u32 cmos_range_start;
  26. u32 cmos_range_end;
  27. u32 cmos_checksum_location;
  28. u32 vbnv_start;
  29. u32 vbnv_size;
  30. char *version;
  31. char *extra_version;
  32. char *build;
  33. char *compile_time;
  34. char *compile_by;
  35. char *compile_host;
  36. char *compile_domain;
  37. char *compiler;
  38. char *linker;
  39. char *assembler;
  40. struct cb_framebuffer *framebuffer;
  41. int num_gpios;
  42. struct cb_gpio gpios[SYSINFO_MAX_GPIOS];
  43. void *vdat_addr;
  44. u32 vdat_size;
  45. void *tstamp_table;
  46. void *cbmem_cons;
  47. struct cb_serial *serial;
  48. };
  49. extern struct sysinfo_t lib_sysinfo;
  50. #endif