/arch/mips/include/asm/fw/arc/hinv.h

http://github.com/mirrors/linux · C Header · 176 lines · 149 code · 16 blank · 11 comment · 1 complexity · d32c3c45de8cf72a1895626ff0beadc6 MD5 · raw file

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