os_info.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. struct os_info_entry {
  15. u64 addr;
  16. u64 size;
  17. u32 csum;
  18. } __packed;
  19. struct os_info {
  20. u64 magic;
  21. u32 csum;
  22. u16 version_major;
  23. u16 version_minor;
  24. u64 crashkernel_addr;
  25. u64 crashkernel_size;
  26. struct os_info_entry entry[2];
  27. u8 reserved[4024];
  28. } __packed;
  29. void os_info_init(void);
  30. void os_info_entry_add(int nr, void *ptr, u64 len);
  31. void os_info_crashkernel_add(unsigned long base, unsigned long size);
  32. u32 os_info_csum(struct os_info *os_info);
  33. #ifdef CONFIG_CRASH_DUMP
  34. void *os_info_old_entry(int nr, unsigned long *size);
  35. int copy_oldmem_kernel(void *dst, void *src, size_t count);
  36. #else
  37. static inline void *os_info_old_entry(int nr, unsigned long *size)
  38. {
  39. return NULL;
  40. }
  41. #endif
  42. #endif /* _ASM_S390_OS_INFO_H */