gct.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __ALPHA_GCT_H
  3. #define __ALPHA_GCT_H
  4. typedef u64 gct_id;
  5. typedef u64 gct6_handle;
  6. typedef struct __gct6_node {
  7. u8 type;
  8. u8 subtype;
  9. u16 size;
  10. u32 hd_extension;
  11. gct6_handle owner;
  12. gct6_handle active_user;
  13. gct_id id;
  14. u64 flags;
  15. u16 rev;
  16. u16 change_counter;
  17. u16 max_child;
  18. u16 reserved1;
  19. gct6_handle saved_owner;
  20. gct6_handle affinity;
  21. gct6_handle parent;
  22. gct6_handle next;
  23. gct6_handle prev;
  24. gct6_handle child;
  25. u64 fw_flags;
  26. u64 os_usage;
  27. u64 fru_id;
  28. u32 checksum;
  29. u32 magic; /* 'GLXY' */
  30. } gct6_node;
  31. typedef struct {
  32. u8 type;
  33. u8 subtype;
  34. void (*callout)(gct6_node *);
  35. } gct6_search_struct;
  36. #define GCT_NODE_MAGIC 0x59584c47 /* 'GLXY' */
  37. /*
  38. * node types
  39. */
  40. #define GCT_TYPE_HOSE 0x0E
  41. /*
  42. * node subtypes
  43. */
  44. #define GCT_SUBTYPE_IO_PORT_MODULE 0x2C
  45. #define GCT_NODE_PTR(off) ((gct6_node *)((char *)hwrpb + \
  46. hwrpb->frut_offset + \
  47. (gct6_handle)(off))) \
  48. int gct6_find_nodes(gct6_node *, gct6_search_struct *);
  49. #endif /* __ALPHA_GCT_H */