hinv.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:4k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

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