kldir.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_SN_KLDIR_H
  3. #define _ASM_SN_KLDIR_H
  4. #define KLDIR_MAGIC 0x434d5f53505f5357
  5. #define KLDIR_OFF_MAGIC 0x00
  6. #define KLDIR_OFF_OFFSET 0x08
  7. #define KLDIR_OFF_POINTER 0x10
  8. #define KLDIR_OFF_SIZE 0x18
  9. #define KLDIR_OFF_COUNT 0x20
  10. #define KLDIR_OFF_STRIDE 0x28
  11. #define KLDIR_ENT_SIZE 0x40
  12. #define KLDIR_MAX_ENTRIES (0x400 / 0x40)
  13. #ifndef __ASSEMBLY__
  14. typedef struct kldir_ent_s {
  15. u64 magic; /* Indicates validity of entry */
  16. off_t offset; /* Offset from start of node space */
  17. unsigned long pointer; /* Pointer to area in some cases */
  18. size_t size; /* Size in bytes */
  19. u64 count; /* Repeat count if array, 1 if not */
  20. size_t stride; /* Stride if array, 0 if not */
  21. char rsvd[16]; /* Pad entry to 0x40 bytes */
  22. /* NOTE: These 16 bytes are used in the Partition KLDIR
  23. entry to store partition info. Refer to klpart.h for this. */
  24. } kldir_ent_t;
  25. #endif /* !__ASSEMBLY__ */
  26. #ifdef CONFIG_SGI_IP27
  27. #include <asm/sn/sn0/kldir.h>
  28. #endif
  29. #endif /* _ASM_SN_KLDIR_H */