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

Linux/Unix编程

开发平台:

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