hinv.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. /*
  2. * ARCS hardware/memory inventory/configuration and system ID definitions.
  3. */
  4. #ifndef _ASM_ARC_HINV_H
  5. #define _ASM_ARC_HINV_H
  6. #include <asm/sgidefs.h>
  7. #include <asm/fw/arc/types.h>
  8. /* configuration query defines */
  9. typedef enum configclass {
  10. SystemClass,
  11. ProcessorClass,
  12. CacheClass,
  13. #ifndef _NT_PROM
  14. MemoryClass,
  15. AdapterClass,
  16. ControllerClass,
  17. PeripheralClass
  18. #else /* _NT_PROM */
  19. AdapterClass,
  20. ControllerClass,
  21. PeripheralClass,
  22. MemoryClass
  23. #endif /* _NT_PROM */
  24. } CONFIGCLASS;
  25. typedef enum configtype {
  26. ARC,
  27. CPU,
  28. FPU,
  29. PrimaryICache,
  30. PrimaryDCache,
  31. SecondaryICache,
  32. SecondaryDCache,
  33. SecondaryCache,
  34. #ifndef _NT_PROM
  35. Memory,
  36. #endif
  37. EISAAdapter,
  38. TCAdapter,
  39. SCSIAdapter,
  40. DTIAdapter,
  41. MultiFunctionAdapter,
  42. DiskController,
  43. TapeController,
  44. CDROMController,
  45. WORMController,
  46. SerialController,
  47. NetworkController,
  48. DisplayController,
  49. ParallelController,
  50. PointerController,
  51. KeyboardController,
  52. AudioController,
  53. OtherController,
  54. DiskPeripheral,
  55. FloppyDiskPeripheral,
  56. TapePeripheral,
  57. ModemPeripheral,
  58. MonitorPeripheral,
  59. PrinterPeripheral,
  60. PointerPeripheral,
  61. KeyboardPeripheral,
  62. TerminalPeripheral,
  63. LinePeripheral,
  64. NetworkPeripheral,
  65. #ifdef _NT_PROM
  66. Memory,
  67. #endif
  68. OtherPeripheral,
  69. /* new stuff for IP30 */
  70. /* added without moving anything */
  71. /* except ANONYMOUS. */
  72. XTalkAdapter,
  73. PCIAdapter,
  74. GIOAdapter,
  75. TPUAdapter,
  76. Anonymous
  77. } CONFIGTYPE;
  78. typedef enum {
  79. Failed = 1,
  80. ReadOnly = 2,
  81. Removable = 4,
  82. ConsoleIn = 8,
  83. ConsoleOut = 16,
  84. Input = 32,
  85. Output = 64
  86. } IDENTIFIERFLAG;
  87. #ifndef NULL /* for GetChild(NULL); */
  88. #define NULL 0
  89. #endif
  90. union key_u {
  91. struct {
  92. #ifdef _MIPSEB
  93. unsigned char c_bsize; /* block size in lines */
  94. unsigned char c_lsize; /* line size in bytes/tag */
  95. unsigned short c_size; /* cache size in 4K pages */
  96. #else /* _MIPSEL */
  97. unsigned short c_size; /* cache size in 4K pages */
  98. unsigned char c_lsize; /* line size in bytes/tag */
  99. unsigned char c_bsize; /* block size in lines */
  100. #endif /* _MIPSEL */
  101. } cache;
  102. ULONG FullKey;
  103. };
  104. #if _MIPS_SIM == _MIPS_SIM_ABI64
  105. #define SGI_ARCS_VERS 64 /* sgi 64-bit version */
  106. #define SGI_ARCS_REV 0 /* rev .00 */
  107. #else
  108. #define SGI_ARCS_VERS 1 /* first version */
  109. #define SGI_ARCS_REV 10 /* rev .10, 3/04/92 */
  110. #endif
  111. typedef struct component {
  112. CONFIGCLASS Class;
  113. CONFIGTYPE Type;
  114. IDENTIFIERFLAG Flags;
  115. USHORT Version;
  116. USHORT Revision;
  117. ULONG Key;
  118. ULONG AffinityMask;
  119. ULONG ConfigurationDataSize;
  120. ULONG IdentifierLength;
  121. char *Identifier;
  122. } COMPONENT;
  123. /* internal structure that holds pathname parsing data */
  124. struct cfgdata {
  125. char *name; /* full name */
  126. int minlen; /* minimum length to match */
  127. CONFIGTYPE type; /* type of token */
  128. };
  129. /* System ID */
  130. typedef struct systemid {
  131. CHAR VendorId[8];
  132. CHAR ProductId[8];
  133. } SYSTEMID;
  134. /* memory query functions */
  135. typedef enum memorytype {
  136. ExceptionBlock,
  137. SPBPage, /* ARCS == SystemParameterBlock */
  138. #ifndef _NT_PROM
  139. FreeContiguous,
  140. FreeMemory,
  141. BadMemory,
  142. LoadedProgram,
  143. FirmwareTemporary,
  144. FirmwarePermanent
  145. #else /* _NT_PROM */
  146. FreeMemory,
  147. BadMemory,
  148. LoadedProgram,
  149. FirmwareTemporary,
  150. FirmwarePermanent,
  151. FreeContiguous
  152. #endif /* _NT_PROM */
  153. } MEMORYTYPE;
  154. typedef struct memorydescriptor {
  155. MEMORYTYPE Type;
  156. LONG BasePage;
  157. LONG PageCount;
  158. } MEMORYDESCRIPTOR;
  159. #endif /* _ASM_ARC_HINV_H */