klconfig.h 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Derived from IRIX <sys/SN/klconfig.h>.
  7. *
  8. * Copyright (C) 1992 - 1997, 1999, 2000 Silicon Graphics, Inc.
  9. * Copyright (C) 1999, 2000 by Ralf Baechle
  10. */
  11. #ifndef _ASM_SN_KLCONFIG_H
  12. #define _ASM_SN_KLCONFIG_H
  13. /*
  14. * The KLCONFIG structures store info about the various BOARDs found
  15. * during Hardware Discovery. In addition, it stores info about the
  16. * components found on the BOARDs.
  17. */
  18. /*
  19. * WARNING:
  20. * Certain assembly language routines (notably xxxxx.s) in the IP27PROM
  21. * will depend on the format of the data structures in this file. In
  22. * most cases, rearranging the fields can seriously break things.
  23. * Adding fields in the beginning or middle can also break things.
  24. * Add fields if necessary, to the end of a struct in such a way
  25. * that offsets of existing fields do not change.
  26. */
  27. #include <linux/config.h>
  28. #include <linux/types.h>
  29. #include <asm/sn/types.h>
  30. #if defined(CONFIG_SGI_IP27)
  31. #include <asm/sn/sn0/addrs.h>
  32. //#include <sys/SN/router.h>
  33. // XXX Stolen from <sys/SN/router.h>:
  34. #define MAX_ROUTER_PORTS (6) /* Max. number of ports on a router */
  35. #include <asm/sn/sn0/sn0_fru.h>
  36. //#include <sys/graph.h>
  37. //#include <sys/xtalk/xbow.h>
  38. #elif defined(CONFIG_SGI_IP35)
  39. #include <asm/sn/sn1/addrs.h>
  40. #include <sys/sn/router.h>
  41. #include <sys/graph.h>
  42. #include <asm/xtalk/xbow.h>
  43. #endif /* !CONFIG_SGI_IP27 && !CONFIG_SGI_IP35 */
  44. #if defined(CONFIG_SGI_IP27) || defined(CONFIG_SGI_IP35)
  45. #include <asm/sn/agent.h>
  46. #include <asm/arc/types.h>
  47. #include <asm/arc/hinv.h>
  48. #if defined(CONFIG_SGI_IO) || defined(CONFIG_SGI_IP35)
  49. // The hack file has to be before vector and after sn0_fru....
  50. #include <asm/hack.h>
  51. #include <asm/sn/vector.h>
  52. #include <asm/xtalk/xtalk.h>
  53. #endif /* CONFIG_SGI_IO || CONFIG_SGI_IP35 */
  54. #endif /* CONFIG_SGI_IP27 || CONFIG_SGI_IP35 */
  55. #define KLCFGINFO_MAGIC 0xbeedbabe
  56. #ifdef FRUTEST
  57. typedef u64 klconf_off_t;
  58. #else
  59. typedef s32 klconf_off_t;
  60. #endif
  61. /*
  62. * Some IMPORTANT OFFSETS. These are the offsets on all NODES.
  63. */
  64. #if 0
  65. #define RAMBASE 0
  66. #define ARCSSPB_OFF 0x1000 /* shift it to sys/arcs/spb.h */
  67. #define OFF_HWGRAPH 0
  68. #endif
  69. #define MAX_MODULE_ID 255
  70. #define SIZE_PAD 4096 /* 4k padding for structures */
  71. /*
  72. * 1 NODE brd, 2 Router brd (1 8p, 1 meta), 6 Widgets,
  73. * 2 Midplanes assuming no pci card cages
  74. */
  75. #define MAX_SLOTS_PER_NODE (1 + 2 + 6 + 2)
  76. /* XXX if each node is guranteed to have some memory */
  77. #define MAX_PCI_DEVS 8
  78. /* lboard_t->brd_flags fields */
  79. /* All bits in this field are currently used. Try the pad fields if
  80. you need more flag bits */
  81. #define ENABLE_BOARD 0x01
  82. #define FAILED_BOARD 0x02
  83. #define DUPLICATE_BOARD 0x04 /* Boards like midplanes/routers which
  84. are discovered twice. Use one of them */
  85. #define VISITED_BOARD 0x08 /* Used for compact hub numbering. */
  86. #define LOCAL_MASTER_IO6 0x10 /* master io6 for that node */
  87. #define GLOBAL_MASTER_IO6 0x20
  88. #define THIRD_NIC_PRESENT 0x40 /* for future use */
  89. #define SECOND_NIC_PRESENT 0x80 /* addons like MIO are present */
  90. /* klinfo->flags fields */
  91. #define KLINFO_ENABLE 0x01 /* This component is enabled */
  92. #define KLINFO_FAILED 0x02 /* This component failed */
  93. #define KLINFO_DEVICE 0x04 /* This component is a device */
  94. #define KLINFO_VISITED 0x08 /* This component has been visited */
  95. #define KLINFO_CONTROLLER 0x10 /* This component is a device controller */
  96. #define KLINFO_INSTALL 0x20 /* Install a driver */
  97. #define KLINFO_HEADLESS 0x40 /* Headless (or hubless) component */
  98. #define IS_CONSOLE_IOC3(i) ((((klinfo_t *)i)->flags) & KLINFO_INSTALL)
  99. #define GB2 0x80000000
  100. #define MAX_RSV_PTRS 32
  101. /* Structures to manage various data storage areas */
  102. /* The numbers must be contiguous since the array index i
  103. is used in the code to allocate various areas.
  104. */
  105. #define BOARD_STRUCT 0
  106. #define COMPONENT_STRUCT 1
  107. #define ERRINFO_STRUCT 2
  108. #define KLMALLOC_TYPE_MAX (ERRINFO_STRUCT + 1)
  109. #define DEVICE_STRUCT 3
  110. typedef struct console_s {
  111. #if defined(CONFIG_SGI_IO) /* FIXME */
  112. __psunsigned_t uart_base;
  113. __psunsigned_t config_base;
  114. __psunsigned_t memory_base;
  115. #else
  116. unsigned long uart_base;
  117. unsigned long config_base;
  118. unsigned long memory_base;
  119. #endif
  120. short baud;
  121. short flag;
  122. int type;
  123. nasid_t nasid;
  124. char wid;
  125. char npci;
  126. nic_t baseio_nic;
  127. } console_t;
  128. typedef struct klc_malloc_hdr {
  129. klconf_off_t km_base;
  130. klconf_off_t km_limit;
  131. klconf_off_t km_current;
  132. } klc_malloc_hdr_t;
  133. /* Functions/macros needed to use this structure */
  134. typedef struct kl_config_hdr {
  135. u64 ch_magic; /* set this to KLCFGINFO_MAGIC */
  136. u32 ch_version; /* structure version number */
  137. klconf_off_t ch_malloc_hdr_off; /* offset of ch_malloc_hdr */
  138. klconf_off_t ch_cons_off; /* offset of ch_cons */
  139. klconf_off_t ch_board_info; /* the link list of boards */
  140. console_t ch_cons_info; /* address info of the console */
  141. klc_malloc_hdr_t ch_malloc_hdr[KLMALLOC_TYPE_MAX];
  142. confidence_t ch_sw_belief; /* confidence that software is bad*/
  143. confidence_t ch_sn0net_belief; /* confidence that sn0net is bad */
  144. } kl_config_hdr_t;
  145. #define KL_CONFIG_HDR(_nasid) ((kl_config_hdr_t *)(KLCONFIG_ADDR(_nasid)))
  146. #if 0
  147. #define KL_CONFIG_MALLOC_HDR(_nasid) \
  148. (KL_CONFIG_HDR(_nasid)->ch_malloc_hdr)
  149. #endif
  150. #define KL_CONFIG_INFO_OFFSET(_nasid) \
  151. (KL_CONFIG_HDR(_nasid)->ch_board_info)
  152. #define KL_CONFIG_INFO_SET_OFFSET(_nasid, _off) \
  153. (KL_CONFIG_HDR(_nasid)->ch_board_info = (_off))
  154. #define KL_CONFIG_INFO(_nasid) \
  155. (lboard_t *)((KL_CONFIG_HDR(_nasid)->ch_board_info) ? \
  156. NODE_OFFSET_TO_K1((_nasid), KL_CONFIG_HDR(_nasid)->ch_board_info) : \
  157. 0)
  158. #define KL_CONFIG_MAGIC(_nasid) (KL_CONFIG_HDR(_nasid)->ch_magic)
  159. #define KL_CONFIG_CHECK_MAGIC(_nasid) \
  160. (KL_CONFIG_HDR(_nasid)->ch_magic == KLCFGINFO_MAGIC)
  161. #define KL_CONFIG_HDR_INIT_MAGIC(_nasid) \
  162. (KL_CONFIG_HDR(_nasid)->ch_magic = KLCFGINFO_MAGIC)
  163. /* --- New Macros for the changed kl_config_hdr_t structure --- */
  164. #if defined(CONFIG_SGI_IO)
  165. #define PTR_CH_MALLOC_HDR(_k) ((klc_malloc_hdr_t *)\
  166. ((__psunsigned_t)_k + (_k->ch_malloc_hdr_off)))
  167. #else
  168. #define PTR_CH_MALLOC_HDR(_k) ((klc_malloc_hdr_t *)\
  169. (unsigned long)_k + (_k->ch_malloc_hdr_off)))
  170. #endif
  171. #define KL_CONFIG_CH_MALLOC_HDR(_n) PTR_CH_MALLOC_HDR(KL_CONFIG_HDR(_n))
  172. #if defined(CONFIG_SGI_IO)
  173. #define PTR_CH_CONS_INFO(_k) ((console_t *)\
  174. ((__psunsigned_t)_k + (_k->ch_cons_off)))
  175. #else
  176. #define PTR_CH_CONS_INFO(_k) ((console_t *)\
  177. ((unsigned long)_k + (_k->ch_cons_off)))
  178. #endif
  179. #define KL_CONFIG_CH_CONS_INFO(_n) PTR_CH_CONS_INFO(KL_CONFIG_HDR(_n))
  180. /* ------------------------------------------------------------- */
  181. #define KL_CONFIG_INFO_START(_nasid) \
  182. (klconf_off_t)(KLCONFIG_OFFSET(_nasid) + sizeof(kl_config_hdr_t))
  183. #define KL_CONFIG_BOARD_NASID(_brd) ((_brd)->brd_nasid)
  184. #define KL_CONFIG_BOARD_SET_NEXT(_brd, _off) ((_brd)->brd_next = (_off))
  185. #define KL_CONFIG_DUPLICATE_BOARD(_brd) ((_brd)->brd_flags & DUPLICATE_BOARD)
  186. #define XBOW_PORT_TYPE_HUB(_xbowp, _link) \
  187. ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_flag & XBOW_PORT_HUB)
  188. #define XBOW_PORT_TYPE_IO(_xbowp, _link) \
  189. ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_flag & XBOW_PORT_IO)
  190. #define XBOW_PORT_IS_ENABLED(_xbowp, _link) \
  191. ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_flag & XBOW_PORT_ENABLE)
  192. #define XBOW_PORT_NASID(_xbowp, _link) \
  193. ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_nasid)
  194. #define XBOW_PORT_IO 0x1
  195. #define XBOW_PORT_HUB 0x2
  196. #define XBOW_PORT_ENABLE 0x4
  197. #define SN0_PORT_FENCE_SHFT 0
  198. #define SN0_PORT_FENCE_MASK (1 << SN0_PORT_FENCE_SHFT)
  199. /*
  200. * The KLCONFIG area is organized as a LINKED LIST of BOARDs. A BOARD
  201. * can be either 'LOCAL' or 'REMOTE'. LOCAL means it is attached to
  202. * the LOCAL/current NODE. REMOTE means it is attached to a different
  203. * node.(TBD - Need a way to treat ROUTER boards.)
  204. *
  205. * There are 2 different structures to represent these boards -
  206. * lboard - Local board, rboard - remote board. These 2 structures
  207. * can be arbitrarily mixed in the LINKED LIST of BOARDs. (Refer
  208. * Figure below). The first byte of the rboard or lboard structure
  209. * is used to find out its type - no unions are used.
  210. * If it is a lboard, then the config info of this board will be found
  211. * on the local node. (LOCAL NODE BASE + offset value gives pointer to
  212. * the structure.
  213. * If it is a rboard, the local structure contains the node number
  214. * and the offset of the beginning of the LINKED LIST on the remote node.
  215. * The details of the hardware on a remote node can be built locally,
  216. * if required, by reading the LINKED LIST on the remote node and
  217. * ignoring all the rboards on that node.
  218. *
  219. * The local node uses the REMOTE NODE NUMBER + OFFSET to point to the
  220. * First board info on the remote node. The remote node list is
  221. * traversed as the local list, using the REMOTE BASE ADDRESS and not
  222. * the local base address and ignoring all rboard values.
  223. *
  224. *
  225. KLCONFIG
  226. +------------+ +------------+ +------------+ +------------+
  227. | lboard | +-->| lboard | +-->| rboard | +-->| lboard |
  228. +------------+ | +------------+ | +------------+ | +------------+
  229. | board info | | | board info | | |errinfo,bptr| | | board info |
  230. +------------+ | +------------+ | +------------+ | +------------+
  231. | offset |--+ | offset |--+ | offset |--+ |offset=NULL |
  232. +------------+ +------------+ +------------+ +------------+
  233. +------------+
  234. | board info |
  235. +------------+ +--------------------------------+
  236. | compt 1 |------>| type, rev, diaginfo, size ... | (CPU)
  237. +------------+ +--------------------------------+
  238. | compt 2 |--+
  239. +------------+ | +--------------------------------+
  240. | ... | +--->| type, rev, diaginfo, size ... | (MEM_BANK)
  241. +------------+ +--------------------------------+
  242. | errinfo |--+
  243. +------------+ | +--------------------------------+
  244. +--->|r/l brd errinfo,compt err flags |
  245. +--------------------------------+
  246. *
  247. * Each BOARD consists of COMPONENTs and the BOARD structure has
  248. * pointers (offsets) to its COMPONENT structure.
  249. * The COMPONENT structure has version info, size and speed info, revision,
  250. * error info and the NIC info. This structure can accommodate any
  251. * BOARD with arbitrary COMPONENT composition.
  252. *
  253. * The ERRORINFO part of each BOARD has error information
  254. * that describes errors about the BOARD itself. It also has flags to
  255. * indicate the COMPONENT(s) on the board that have errors. The error
  256. * information specific to the COMPONENT is present in the respective
  257. * COMPONENT structure.
  258. *
  259. * The ERRORINFO structure is also treated like a COMPONENT, ie. the
  260. * BOARD has pointers(offset) to the ERRORINFO structure. The rboard
  261. * structure also has a pointer to the ERRORINFO structure. This is
  262. * the place to store ERRORINFO about a REMOTE NODE, if the HUB on
  263. * that NODE is not working or if the REMOTE MEMORY is BAD. In cases where
  264. * only the CPU of the REMOTE NODE is disabled, the ERRORINFO pointer can
  265. * be a NODE NUMBER, REMOTE OFFSET combination, pointing to error info
  266. * which is present on the REMOTE NODE.(TBD)
  267. * REMOTE ERRINFO can be stored on any of the nearest nodes
  268. * or on all the nearest nodes.(TBD)
  269. * Like BOARD structures, REMOTE ERRINFO structures can be built locally
  270. * using the rboard errinfo pointer.
  271. *
  272. * In order to get useful information from this Data organization, a set of
  273. * interface routines are provided (TBD). The important thing to remember while
  274. * manipulating the structures, is that, the NODE number information should
  275. * be used. If the NODE is non-zero (remote) then each offset should
  276. * be added to the REMOTE BASE ADDR else it should be added to the LOCAL BASE ADDR.
  277. * This includes offsets for BOARDS, COMPONENTS and ERRORINFO.
  278. *
  279. * Note that these structures do not provide much info about connectivity.
  280. * That info will be part of HWGRAPH, which is an extension of the cfg_t
  281. * data structure. (ref IP27prom/cfg.h) It has to be extended to include
  282. * the IO part of the Network(TBD).
  283. *
  284. * The data structures below define the above concepts.
  285. */
  286. /*
  287. * Values for CPU types
  288. */
  289. #define KL_CPU_R4000 0x1 /* Standard R4000 */
  290. #define KL_CPU_TFP 0x2 /* TFP processor */
  291. #define KL_CPU_R10000 0x3 /* R10000 (T5) */
  292. #define KL_CPU_NONE (-1) /* no cpu present in slot */
  293. /*
  294. * IP27 BOARD classes
  295. */
  296. #define KLCLASS_MASK 0xf0
  297. #define KLCLASS_NONE 0x00
  298. #define KLCLASS_NODE 0x10 /* CPU, Memory and HUB board */
  299. #define KLCLASS_CPU KLCLASS_NODE
  300. #define KLCLASS_IO 0x20 /* BaseIO, 4 ch SCSI, ethernet, FDDI
  301. and the non-graphics widget boards */
  302. #define KLCLASS_ROUTER 0x30 /* Router board */
  303. #define KLCLASS_MIDPLANE 0x40 /* We need to treat this as a board
  304. so that we can record error info */
  305. #define KLCLASS_GFX 0x50 /* graphics boards */
  306. #define KLCLASS_PSEUDO_GFX 0x60 /* HDTV type cards that use a gfx
  307. * hw ifc to xtalk and are not gfx
  308. * class for sw purposes */
  309. #define KLCLASS_MAX 7 /* Bump this if a new CLASS is added */
  310. #define KLTYPE_MAX 10 /* Bump this if a new CLASS is added */
  311. #define KLCLASS_UNKNOWN 0xf0
  312. #define KLCLASS(_x) ((_x) & KLCLASS_MASK)
  313. /*
  314. * IP27 board types
  315. */
  316. #define KLTYPE_MASK 0x0f
  317. #define KLTYPE_NONE 0x00
  318. #define KLTYPE_EMPTY 0x00
  319. #define KLTYPE_WEIRDCPU (KLCLASS_CPU | 0x0)
  320. #define KLTYPE_IP27 (KLCLASS_CPU | 0x1) /* 2 CPUs(R10K) per board */
  321. #define KLTYPE_WEIRDIO (KLCLASS_IO | 0x0)
  322. #define KLTYPE_BASEIO (KLCLASS_IO | 0x1) /* IOC3, SuperIO, Bridge, SCSI */
  323. #define KLTYPE_IO6 KLTYPE_BASEIO /* Additional name */
  324. #define KLTYPE_4CHSCSI (KLCLASS_IO | 0x2)
  325. #define KLTYPE_MSCSI KLTYPE_4CHSCSI /* Additional name */
  326. #define KLTYPE_ETHERNET (KLCLASS_IO | 0x3)
  327. #define KLTYPE_MENET KLTYPE_ETHERNET /* Additional name */
  328. #define KLTYPE_FDDI (KLCLASS_IO | 0x4)
  329. #define KLTYPE_UNUSED (KLCLASS_IO | 0x5) /* XXX UNUSED */
  330. #define KLTYPE_HAROLD (KLCLASS_IO | 0x6) /* PCI SHOE BOX */
  331. #define KLTYPE_PCI KLTYPE_HAROLD
  332. #define KLTYPE_VME (KLCLASS_IO | 0x7) /* Any 3rd party VME card */
  333. #define KLTYPE_MIO (KLCLASS_IO | 0x8)
  334. #define KLTYPE_FC (KLCLASS_IO | 0x9)
  335. #define KLTYPE_LINC (KLCLASS_IO | 0xA)
  336. #define KLTYPE_TPU (KLCLASS_IO | 0xB) /* Tensor Processing Unit */
  337. #define KLTYPE_GSN_A (KLCLASS_IO | 0xC) /* Main GSN board */
  338. #define KLTYPE_GSN_B (KLCLASS_IO | 0xD) /* Auxiliary GSN board */
  339. #define KLTYPE_GFX (KLCLASS_GFX | 0x0) /* unknown graphics type */
  340. #define KLTYPE_GFX_KONA (KLCLASS_GFX | 0x1) /* KONA graphics on IP27 */
  341. #define KLTYPE_GFX_MGRA (KLCLASS_GFX | 0x3) /* MGRAS graphics on IP27 */
  342. #define KLTYPE_WEIRDROUTER (KLCLASS_ROUTER | 0x0)
  343. #define KLTYPE_ROUTER (KLCLASS_ROUTER | 0x1)
  344. #define KLTYPE_ROUTER2 KLTYPE_ROUTER /* Obsolete! */
  345. #define KLTYPE_NULL_ROUTER (KLCLASS_ROUTER | 0x2)
  346. #define KLTYPE_META_ROUTER (KLCLASS_ROUTER | 0x3)
  347. #define KLTYPE_WEIRDMIDPLANE (KLCLASS_MIDPLANE | 0x0)
  348. #define KLTYPE_MIDPLANE8 (KLCLASS_MIDPLANE | 0x1) /* 8 slot backplane */
  349. #define KLTYPE_MIDPLANE KLTYPE_MIDPLANE8
  350. #define KLTYPE_PBRICK_XBOW (KLCLASS_MIDPLANE | 0x2)
  351. #define KLTYPE_IOBRICK (KLCLASS_IOBRICK | 0x0)
  352. #define KLTYPE_IBRICK (KLCLASS_IOBRICK | 0x1)
  353. #define KLTYPE_PBRICK (KLCLASS_IOBRICK | 0x2)
  354. #define KLTYPE_XBRICK (KLCLASS_IOBRICK | 0x3)
  355. #define KLTYPE_PBRICK_BRIDGE KLTYPE_PBRICK
  356. /* The value of type should be more than 8 so that hinv prints
  357. * out the board name from the NIC string. For values less than
  358. * 8 the name of the board needs to be hard coded in a few places.
  359. * When bringup started nic names had not standardized and so we
  360. * had to hard code. (For people interested in history.)
  361. */
  362. #define KLTYPE_XTHD (KLCLASS_PSEUDO_GFX | 0x9)
  363. #define KLTYPE_UNKNOWN (KLCLASS_UNKNOWN | 0xf)
  364. #define KLTYPE(_x) ((_x) & KLTYPE_MASK)
  365. #define IS_MIO_PRESENT(l) ((l->brd_type == KLTYPE_BASEIO) && \
  366. (l->brd_flags & SECOND_NIC_PRESENT))
  367. #define IS_MIO_IOC3(l,n) (IS_MIO_PRESENT(l) && (n > 2))
  368. /*
  369. * board structures
  370. */
  371. #define MAX_COMPTS_PER_BRD 24
  372. #define LOCAL_BOARD 1
  373. #define REMOTE_BOARD 2
  374. #define LBOARD_STRUCT_VERSION 2
  375. typedef struct lboard_s {
  376. klconf_off_t brd_next; /* Next BOARD */
  377. unsigned char struct_type; /* type of structure, local or remote */
  378. unsigned char brd_type; /* type+class */
  379. unsigned char brd_sversion; /* version of this structure */
  380. unsigned char brd_brevision; /* board revision */
  381. unsigned char brd_promver; /* board prom version, if any */
  382. unsigned char brd_flags; /* Enabled, Disabled etc */
  383. unsigned char brd_slot; /* slot number */
  384. unsigned short brd_debugsw; /* Debug switches */
  385. moduleid_t brd_module; /* module to which it belongs */
  386. partid_t brd_partition; /* Partition number */
  387. unsigned short brd_diagval; /* diagnostic value */
  388. unsigned short brd_diagparm; /* diagnostic parameter */
  389. unsigned char brd_inventory; /* inventory history */
  390. unsigned char brd_numcompts; /* Number of components */
  391. nic_t brd_nic; /* Number in CAN */
  392. nasid_t brd_nasid; /* passed parameter */
  393. klconf_off_t brd_compts[MAX_COMPTS_PER_BRD]; /* pointers to COMPONENTS */
  394. klconf_off_t brd_errinfo; /* Board's error information */
  395. struct lboard_s *brd_parent; /* Logical parent for this brd */
  396. vertex_hdl_t brd_graph_link; /* vertex hdl to connect extern compts */
  397. confidence_t brd_confidence; /* confidence that the board is bad */
  398. nasid_t brd_owner; /* who owns this board */
  399. unsigned char brd_nic_flags; /* To handle 8 more NICs */
  400. char brd_name[32];
  401. } lboard_t;
  402. /*
  403. * Make sure we pass back the calias space address for local boards.
  404. * klconfig board traversal and error structure extraction defines.
  405. */
  406. #define BOARD_SLOT(_brd) ((_brd)->brd_slot)
  407. #define KLCF_CLASS(_brd) KLCLASS((_brd)->brd_type)
  408. #define KLCF_TYPE(_brd) KLTYPE((_brd)->brd_type)
  409. #define KLCF_REMOTE(_brd) (((_brd)->struct_type & LOCAL_BOARD) ? 0 : 1)
  410. #define KLCF_NUM_COMPS(_brd) ((_brd)->brd_numcompts)
  411. #define KLCF_MODULE_ID(_brd) ((_brd)->brd_module)
  412. #ifdef FRUTEST
  413. #define KLCF_NEXT(_brd) ((_brd)->brd_next ? (lboard_t *)((_brd)->brd_next): NULL)
  414. #define KLCF_COMP(_brd, _ndx) (klinfo_t *)((_brd)->brd_compts[(_ndx)])
  415. #define KLCF_COMP_ERROR(_brd, _comp) (_brd = _brd , (_comp)->errinfo)
  416. #else
  417. #define KLCF_NEXT(_brd) \
  418. ((_brd)->brd_next ? \
  419. (lboard_t *)(NODE_OFFSET_TO_K1(NASID_GET(_brd), (_brd)->brd_next)):\
  420. NULL)
  421. #define KLCF_COMP(_brd, _ndx) \
  422. (klinfo_t *)(NODE_OFFSET_TO_K1(NASID_GET(_brd), \
  423. (_brd)->brd_compts[(_ndx)]))
  424. #define KLCF_COMP_ERROR(_brd, _comp) \
  425. (NODE_OFFSET_TO_K1(NASID_GET(_brd), (_comp)->errinfo))
  426. #endif
  427. #define KLCF_COMP_TYPE(_comp) ((_comp)->struct_type)
  428. #define KLCF_BRIDGE_W_ID(_comp) ((_comp)->physid) /* Widget ID */
  429. /*
  430. * Generic info structure. This stores common info about a
  431. * component.
  432. */
  433. typedef struct klinfo_s { /* Generic info */
  434. unsigned char struct_type; /* type of this structure */
  435. unsigned char struct_version; /* version of this structure */
  436. unsigned char flags; /* Enabled, disabled etc */
  437. unsigned char revision; /* component revision */
  438. unsigned short diagval; /* result of diagnostics */
  439. unsigned short diagparm; /* diagnostic parameter */
  440. unsigned char inventory; /* previous inventory status */
  441. nic_t nic; /* MUst be aligned properly */
  442. unsigned char physid; /* physical id of component */
  443. unsigned int virtid; /* virtual id as seen by system */
  444. unsigned char widid; /* Widget id - if applicable */
  445. nasid_t nasid; /* node number - from parent */
  446. char pad1; /* pad out structure. */
  447. char pad2; /* pad out structure. */
  448. COMPONENT *arcs_compt; /* ptr to the arcs struct for ease*/
  449. klconf_off_t errinfo; /* component specific errors */
  450. unsigned short pad3; /* pci fields have moved over to */
  451. unsigned short pad4; /* klbri_t */
  452. } klinfo_t ;
  453. #define KLCONFIG_INFO_ENABLED(_i) ((_i)->flags & KLINFO_ENABLE)
  454. /*
  455. * Component structures.
  456. * Following are the currently identified components:
  457. * CPU, HUB, MEM_BANK,
  458. * XBOW(consists of 16 WIDGETs, each of which can be HUB or GRAPHICS or BRIDGE)
  459. * BRIDGE, IOC3, SuperIO, SCSI, FDDI
  460. * ROUTER
  461. * GRAPHICS
  462. */
  463. #define KLSTRUCT_UNKNOWN 0
  464. #define KLSTRUCT_CPU 1
  465. #define KLSTRUCT_HUB 2
  466. #define KLSTRUCT_MEMBNK 3
  467. #define KLSTRUCT_XBOW 4
  468. #define KLSTRUCT_BRI 5
  469. #define KLSTRUCT_IOC3 6
  470. #define KLSTRUCT_PCI 7
  471. #define KLSTRUCT_VME 8
  472. #define KLSTRUCT_ROU 9
  473. #define KLSTRUCT_GFX 10
  474. #define KLSTRUCT_SCSI 11
  475. #define KLSTRUCT_FDDI 12
  476. #define KLSTRUCT_MIO 13
  477. #define KLSTRUCT_DISK 14
  478. #define KLSTRUCT_TAPE 15
  479. #define KLSTRUCT_CDROM 16
  480. #define KLSTRUCT_HUB_UART 17
  481. #define KLSTRUCT_IOC3ENET 18
  482. #define KLSTRUCT_IOC3UART 19
  483. #define KLSTRUCT_UNUSED 20 /* XXX UNUSED */
  484. #define KLSTRUCT_IOC3PCKM 21
  485. #define KLSTRUCT_RAD 22
  486. #define KLSTRUCT_HUB_TTY 23
  487. #define KLSTRUCT_IOC3_TTY 24
  488. /* Early Access IO proms are compatible
  489. only with KLSTRUCT values upto 24. */
  490. #define KLSTRUCT_FIBERCHANNEL 25
  491. #define KLSTRUCT_MOD_SERIAL_NUM 26
  492. #define KLSTRUCT_IOC3MS 27
  493. #define KLSTRUCT_TPU 28
  494. #define KLSTRUCT_GSN_A 29
  495. #define KLSTRUCT_GSN_B 30
  496. #define KLSTRUCT_XTHD 31
  497. /*
  498. * These are the indices of various components within a lboard structure.
  499. */
  500. #define IP27_CPU0_INDEX 0
  501. #define IP27_CPU1_INDEX 1
  502. #define IP27_HUB_INDEX 2
  503. #define IP27_MEM_INDEX 3
  504. #define BASEIO_BRIDGE_INDEX 0
  505. #define BASEIO_IOC3_INDEX 1
  506. #define BASEIO_SCSI1_INDEX 2
  507. #define BASEIO_SCSI2_INDEX 3
  508. #define MIDPLANE_XBOW_INDEX 0
  509. #define ROUTER_COMPONENT_INDEX 0
  510. #define CH4SCSI_BRIDGE_INDEX 0
  511. /* Info holders for various hardware components */
  512. typedef u64 *pci_t;
  513. typedef u64 *vmeb_t;
  514. typedef u64 *vmed_t;
  515. typedef u64 *fddi_t;
  516. typedef u64 *scsi_t;
  517. typedef u64 *mio_t;
  518. typedef u64 *graphics_t;
  519. typedef u64 *router_t;
  520. /*
  521. * The port info in ip27_cfg area translates to a lboart_t in the
  522. * KLCONFIG area. But since KLCONFIG does not use pointers, lboart_t
  523. * is stored in terms of a nasid and a offset from start of KLCONFIG
  524. * area on that nasid.
  525. */
  526. typedef struct klport_s {
  527. nasid_t port_nasid;
  528. unsigned char port_flag;
  529. klconf_off_t port_offset;
  530. } klport_t;
  531. #if 0
  532. /*
  533. * This is very similar to the klport_s but instead of having a componant
  534. * offset it has a board offset.
  535. */
  536. typedef struct klxbow_port_s {
  537. nasid_t port_nasid;
  538. unsigned char port_flag;
  539. klconf_off_t board_offset;
  540. } klxbow_port_t;
  541. #endif
  542. typedef struct klcpu_s { /* CPU */
  543. klinfo_t cpu_info;
  544. unsigned short cpu_prid; /* Processor PRID value */
  545. unsigned short cpu_fpirr; /* FPU IRR value */
  546. unsigned short cpu_speed; /* Speed in MHZ */
  547. unsigned short cpu_scachesz; /* secondary cache size in MB */
  548. unsigned short cpu_scachespeed;/* secondary cache speed in MHz */
  549. } klcpu_t ;
  550. #define CPU_STRUCT_VERSION 2
  551. typedef struct klhub_s { /* HUB */
  552. klinfo_t hub_info;
  553. uint hub_flags; /* PCFG_HUB_xxx flags */
  554. klport_t hub_port; /* hub is connected to this */
  555. nic_t hub_box_nic; /* nic of containing box */
  556. klconf_off_t hub_mfg_nic; /* MFG NIC string */
  557. u64 hub_speed; /* Speed of hub in HZ */
  558. } klhub_t ;
  559. typedef struct klhub_uart_s { /* HUB */
  560. klinfo_t hubuart_info;
  561. uint hubuart_flags; /* PCFG_HUB_xxx flags */
  562. nic_t hubuart_box_nic; /* nic of containing box */
  563. } klhub_uart_t ;
  564. #define MEMORY_STRUCT_VERSION 2
  565. typedef struct klmembnk_s { /* MEMORY BANK */
  566. klinfo_t membnk_info;
  567. short membnk_memsz; /* Total memory in megabytes */
  568. short membnk_dimm_select; /* bank to physical addr mapping*/
  569. short membnk_bnksz[MD_MEM_BANKS]; /* Memory bank sizes */
  570. short membnk_attr;
  571. } klmembnk_t ;
  572. #define KLCONFIG_MEMBNK_SIZE(_info, _bank) \
  573. ((_info)->membnk_bnksz[(_bank)])
  574. #define MEMBNK_PREMIUM 1
  575. #define KLCONFIG_MEMBNK_PREMIUM(_info, _bank) \
  576. ((_info)->membnk_attr & (MEMBNK_PREMIUM << (_bank)))
  577. #define MAX_SERIAL_NUM_SIZE 10
  578. typedef struct klmod_serial_num_s {
  579. klinfo_t snum_info;
  580. union {
  581. char snum_str[MAX_SERIAL_NUM_SIZE];
  582. unsigned long long snum_int;
  583. } snum;
  584. } klmod_serial_num_t;
  585. /* Macros needed to access serial number structure in lboard_t.
  586. Hard coded values are necessary since we cannot treat
  587. serial number struct as a component without losing compatibility
  588. between prom versions. */
  589. #define GET_SNUM_COMP(_l) ((klmod_serial_num_t *)\
  590. KLCF_COMP(_l, _l->brd_numcompts))
  591. #define MAX_XBOW_LINKS 16
  592. typedef struct klxbow_s { /* XBOW */
  593. klinfo_t xbow_info ;
  594. klport_t xbow_port_info[MAX_XBOW_LINKS] ; /* Module number */
  595. int xbow_master_hub_link;
  596. /* type of brd connected+component struct ptr+flags */
  597. } klxbow_t ;
  598. #define MAX_PCI_SLOTS 8
  599. typedef struct klpci_device_s {
  600. s32 pci_device_id; /* 32 bits of vendor/device ID. */
  601. s32 pci_device_pad; /* 32 bits of padding. */
  602. } klpci_device_t;
  603. #define BRIDGE_STRUCT_VERSION 2
  604. typedef struct klbri_s { /* BRIDGE */
  605. klinfo_t bri_info ;
  606. unsigned char bri_eprominfo ; /* IO6prom connected to bridge */
  607. unsigned char bri_bustype ; /* PCI/VME BUS bridge/GIO */
  608. pci_t pci_specific ; /* PCI Board config info */
  609. klpci_device_t bri_devices[MAX_PCI_DEVS] ; /* PCI IDs */
  610. klconf_off_t bri_mfg_nic ;
  611. } klbri_t ;
  612. #define MAX_IOC3_TTY 2
  613. typedef struct klioc3_s { /* IOC3 */
  614. klinfo_t ioc3_info ;
  615. unsigned char ioc3_ssram ; /* Info about ssram */
  616. unsigned char ioc3_nvram ; /* Info about nvram */
  617. klinfo_t ioc3_superio ; /* Info about superio */
  618. klconf_off_t ioc3_tty_off ;
  619. klinfo_t ioc3_enet ;
  620. klconf_off_t ioc3_enet_off ;
  621. klconf_off_t ioc3_kbd_off ;
  622. } klioc3_t ;
  623. #define MAX_VME_SLOTS 8
  624. typedef struct klvmeb_s { /* VME BRIDGE - PCI CTLR */
  625. klinfo_t vmeb_info ;
  626. vmeb_t vmeb_specific ;
  627. klconf_off_t vmeb_brdinfo[MAX_VME_SLOTS] ; /* VME Board config info */
  628. } klvmeb_t ;
  629. typedef struct klvmed_s { /* VME DEVICE - VME BOARD */
  630. klinfo_t vmed_info ;
  631. vmed_t vmed_specific ;
  632. klconf_off_t vmed_brdinfo[MAX_VME_SLOTS] ; /* VME Board config info */
  633. } klvmed_t ;
  634. #define ROUTER_VECTOR_VERS 2
  635. /* XXX - Don't we need the number of ports here?!? */
  636. typedef struct klrou_s { /* ROUTER */
  637. klinfo_t rou_info ;
  638. uint rou_flags ; /* PCFG_ROUTER_xxx flags */
  639. nic_t rou_box_nic ; /* nic of the containing module */
  640. klport_t rou_port[MAX_ROUTER_PORTS + 1] ; /* array index 1 to 6 */
  641. klconf_off_t rou_mfg_nic ; /* MFG NIC string */
  642. u64 rou_vector; /* vector from master node */
  643. } klrou_t ;
  644. /*
  645. * Graphics Controller/Device
  646. *
  647. * (IP27/IO6) Prom versions 6.13 (and 6.5.1 kernels) and earlier
  648. * used a couple different structures to store graphics information.
  649. * For compatibility reasons, the newer data structure preserves some
  650. * of the layout so that fields that are used in the old versions remain
  651. * in the same place (with the same info). Determination of what version
  652. * of this structure we have is done by checking the cookie field.
  653. */
  654. #define KLGFX_COOKIE 0x0c0de000
  655. typedef struct klgfx_s { /* GRAPHICS Device */
  656. klinfo_t gfx_info;
  657. klconf_off_t old_gndevs; /* for compatibility with older proms */
  658. klconf_off_t old_gdoff0; /* for compatibility with older proms */
  659. uint cookie; /* for compatibility with older proms */
  660. uint moduleslot;
  661. struct klgfx_s *gfx_next_pipe;
  662. graphics_t gfx_specific;
  663. klconf_off_t pad0; /* for compatibility with older proms */
  664. klconf_off_t gfx_mfg_nic;
  665. } klgfx_t;
  666. typedef struct klxthd_s {
  667. klinfo_t xthd_info ;
  668. klconf_off_t xthd_mfg_nic ; /* MFG NIC string */
  669. } klxthd_t ;
  670. typedef struct kltpu_s { /* TPU board */
  671. klinfo_t tpu_info ;
  672. klconf_off_t tpu_mfg_nic ; /* MFG NIC string */
  673. } kltpu_t ;
  674. typedef struct klgsn_s { /* GSN board */
  675. klinfo_t gsn_info ;
  676. klconf_off_t gsn_mfg_nic ; /* MFG NIC string */
  677. } klgsn_t ;
  678. #define MAX_SCSI_DEVS 16
  679. /*
  680. * NOTE: THis is the max sized kl* structure and is used in klmalloc.c
  681. * to allocate space of type COMPONENT. Make sure that if the size of
  682. * any other component struct becomes more than this, then redefine
  683. * that as the size to be klmalloced.
  684. */
  685. typedef struct klscsi_s { /* SCSI Controller */
  686. klinfo_t scsi_info ;
  687. scsi_t scsi_specific ;
  688. unsigned char scsi_numdevs ;
  689. klconf_off_t scsi_devinfo[MAX_SCSI_DEVS] ;
  690. } klscsi_t ;
  691. typedef struct klscdev_s { /* SCSI device */
  692. klinfo_t scdev_info ;
  693. struct scsidisk_data *scdev_cfg ; /* driver fills up this */
  694. } klscdev_t ;
  695. typedef struct klttydev_s { /* TTY device */
  696. klinfo_t ttydev_info ;
  697. struct terminal_data *ttydev_cfg ; /* driver fills up this */
  698. } klttydev_t ;
  699. typedef struct klenetdev_s { /* ENET device */
  700. klinfo_t enetdev_info ;
  701. struct net_data *enetdev_cfg ; /* driver fills up this */
  702. } klenetdev_t ;
  703. typedef struct klkbddev_s { /* KBD device */
  704. klinfo_t kbddev_info ;
  705. struct keyboard_data *kbddev_cfg ; /* driver fills up this */
  706. } klkbddev_t ;
  707. typedef struct klmsdev_s { /* mouse device */
  708. klinfo_t msdev_info ;
  709. void *msdev_cfg ;
  710. } klmsdev_t ;
  711. #define MAX_FDDI_DEVS 10 /* XXX Is this true */
  712. typedef struct klfddi_s { /* FDDI */
  713. klinfo_t fddi_info ;
  714. fddi_t fddi_specific ;
  715. klconf_off_t fddi_devinfo[MAX_FDDI_DEVS] ;
  716. } klfddi_t ;
  717. typedef struct klmio_s { /* MIO */
  718. klinfo_t mio_info ;
  719. mio_t mio_specific ;
  720. } klmio_t ;
  721. typedef union klcomp_s {
  722. klcpu_t kc_cpu;
  723. klhub_t kc_hub;
  724. klmembnk_t kc_mem;
  725. klxbow_t kc_xbow;
  726. klbri_t kc_bri;
  727. klioc3_t kc_ioc3;
  728. klvmeb_t kc_vmeb;
  729. klvmed_t kc_vmed;
  730. klrou_t kc_rou;
  731. klgfx_t kc_gfx;
  732. klscsi_t kc_scsi;
  733. klscdev_t kc_scsi_dev;
  734. klfddi_t kc_fddi;
  735. klmio_t kc_mio;
  736. klmod_serial_num_t kc_snum ;
  737. } klcomp_t;
  738. typedef union kldev_s { /* for device structure allocation */
  739. klscdev_t kc_scsi_dev ;
  740. klttydev_t kc_tty_dev ;
  741. klenetdev_t kc_enet_dev ;
  742. klkbddev_t kc_kbd_dev ;
  743. } kldev_t ;
  744. /* Data structure interface routines. TBD */
  745. /* Include launch info in this file itself? TBD */
  746. /*
  747. * TBD - Can the ARCS and device driver related info also be included in the
  748. * KLCONFIG area. On the IO4PROM, prom device driver info is part of cfgnode_t
  749. * structure, viz private to the IO4prom.
  750. */
  751. /*
  752. * TBD - Allocation issues.
  753. *
  754. * Do we need to Mark off sepatate heaps for lboard_t, rboard_t, component,
  755. * errinfo and allocate from them, or have a single heap and allocate all
  756. * structures from it. Debug is easier in the former method since we can
  757. * dump all similar structs in one command, but there will be lots of holes,
  758. * in memory and max limits are needed for number of structures.
  759. * Another way to make it organized, is to have a union of all components
  760. * and allocate a aligned chunk of memory greater than the biggest
  761. * component.
  762. */
  763. typedef union {
  764. lboard_t *lbinfo ;
  765. } biptr_t ;
  766. #define BRI_PER_XBOW 6
  767. #define PCI_PER_BRI 8
  768. #define DEV_PER_PCI 16
  769. /* Virtual dipswitch values (starting from switch "7"): */
  770. #define VDS_NOGFX 0x8000 /* Don't enable gfx and autoboot */
  771. #define VDS_NOMP 0x100 /* Don't start slave processors */
  772. #define VDS_MANUMODE 0x80 /* Manufacturing mode */
  773. #define VDS_NOARB 0x40 /* No bootmaster arbitration */
  774. #define VDS_PODMODE 0x20 /* Go straight to POD mode */
  775. #define VDS_NO_DIAGS 0x10 /* Don't run any diags after BM arb */
  776. #define VDS_DEFAULTS 0x08 /* Use default environment values */
  777. #define VDS_NOMEMCLEAR 0x04 /* Don't run mem cfg code */
  778. #define VDS_2ND_IO4 0x02 /* Boot from the second IO4 */
  779. #define VDS_DEBUG_PROM 0x01 /* Print PROM debugging messages */
  780. /* external declarations of Linux kernel functions. */
  781. extern lboard_t *find_lboard(lboard_t *start, unsigned char type);
  782. extern klinfo_t *find_component(lboard_t *brd, klinfo_t *kli, unsigned char type);
  783. extern klinfo_t *find_first_component(lboard_t *brd, unsigned char type);
  784. extern klcpu_t *nasid_slice_to_cpuinfo(nasid_t, int);
  785. extern lboard_t *find_lboard_class(lboard_t *start, unsigned char brd_class);
  786. #if defined(CONFIG_SGI_IO)
  787. extern xwidgetnum_t nodevertex_widgetnum_get(vertex_hdl_t node_vtx);
  788. extern vertex_hdl_t nodevertex_xbow_peer_get(vertex_hdl_t node_vtx);
  789. extern lboard_t *find_gfxpipe(int pipenum);
  790. extern void setup_gfxpipe_link(vertex_hdl_t vhdl,int pipenum);
  791. extern lboard_t *find_lboard_module_class(lboard_t *start, moduleid_t mod,
  792. unsigned char brd_class);
  793. extern lboard_t *find_nic_lboard(lboard_t *, nic_t);
  794. extern lboard_t *find_nic_type_lboard(nasid_t, unsigned char, nic_t);
  795. extern lboard_t *find_lboard_modslot(lboard_t *start, moduleid_t mod, slotid_t slot);
  796. extern lboard_t *find_lboard_module(lboard_t *start, moduleid_t mod);
  797. extern lboard_t *get_board_name(nasid_t nasid, moduleid_t mod, slotid_t slot, char *name);
  798. extern int config_find_nic_router(nasid_t, nic_t, lboard_t **, klrou_t**);
  799. extern int config_find_nic_hub(nasid_t, nic_t, lboard_t **, klhub_t**);
  800. extern int config_find_xbow(nasid_t, lboard_t **, klxbow_t**);
  801. extern klcpu_t *get_cpuinfo(cpuid_t cpu);
  802. extern int update_klcfg_cpuinfo(nasid_t, int);
  803. extern void board_to_path(lboard_t *brd, char *path);
  804. extern moduleid_t get_module_id(nasid_t nasid);
  805. extern void nic_name_convert(char *old_name, char *new_name);
  806. extern int module_brds(nasid_t nasid, lboard_t **module_brds, int n);
  807. extern lboard_t *brd_from_key(ulong_t key);
  808. extern void device_component_canonical_name_get(lboard_t *,klinfo_t *,
  809. char *);
  810. extern int board_serial_number_get(lboard_t *,char *);
  811. extern int is_master_baseio(nasid_t,moduleid_t,slotid_t);
  812. extern nasid_t get_actual_nasid(lboard_t *brd) ;
  813. extern net_vec_t klcfg_discover_route(lboard_t *, lboard_t *, int);
  814. #else /* CONFIG_SGI_IO */
  815. extern klcpu_t *sn_get_cpuinfo(cpuid_t cpu);
  816. #endif /* CONFIG_SGI_IO */
  817. #endif /* _ASM_SN_KLCONFIG_H */