hinv.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:3k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

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