os_info.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * OS info memory interface
  3. *
  4. * Copyright IBM Corp. 2012
  5. * Author(s): Michael Holzheu <holzheu@linux.vnet.ibm.com>
  6. */
  7. #ifndef _ASM_S390_OS_INFO_H
  8. #define _ASM_S390_OS_INFO_H
  9. #define OS_INFO_VERSION_MAJOR 1
  10. #define OS_INFO_VERSION_MINOR 1
  11. #define OS_INFO_MAGIC 0x4f53494e464f535aULL /* OSINFOSZ */
  12. #define OS_INFO_VMCOREINFO 0
  13. #define OS_INFO_REIPL_BLOCK 1
  14. #define OS_INFO_INIT_FN 2
  15. struct os_info_entry {
  16. u64 addr;
  17. u64 size;
  18. u32 csum;
  19. } __packed;
  20. struct os_info {
  21. u64 magic;
  22. u32 csum;
  23. u16 version_major;
  24. u16 version_minor;
  25. u64 crashkernel_addr;
  26. u64 crashkernel_size;
  27. struct os_info_entry entry[3];
  28. u8 reserved[4004];
  29. } __packed;
  30. void os_info_init(void);
  31. void os_info_entry_add(int nr, void *ptr, u64 len);
  32. void os_info_crashkernel_add(unsigned long base, unsigned long size);
  33. u32 os_info_csum(struct os_info *os_info);
  34. #ifdef CONFIG_CRASH_DUMP
  35. void *os_info_old_entry(int nr, unsigned long *size);
  36. int copy_from_oldmem(void *dest, void *src, size_t count);
  37. #else
  38. static inline void *os_info_old_entry(int nr, unsigned long *size)
  39. {
  40. return NULL;
  41. }
  42. #endif
  43. #endif /* _ASM_S390_OS_INFO_H */