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

Linux/Unix编程

开发平台:

Unix_Linux

  1. /* $Id$
  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) 1992 - 1997, 2000-2001 Silicon Graphics, Inc. All rights reserved.
  8.  */
  9. /************************************************************************
  10.  *                                                                      *
  11.  *      WARNING!!!  WARNING!!!  WARNING!!!  WARNING!!!  WARNING!!!      *
  12.  *                                                                      *
  13.  * This file is created by an automated script. Any (minimal) changes   *
  14.  * made manually to this  file should be made with care.                *
  15.  *                                                                      *
  16.  *               MAKE ALL ADDITIONS TO THE END OF THIS FILE             *
  17.  *                                                                      *
  18.  ************************************************************************/
  19. #ifndef _ASM_IA64_SN_SN1_HUBLB_H
  20. #define _ASM_IA64_SN_SN1_HUBLB_H
  21. #define    LB_REV_ID                 0x00600000    /*
  22.                                                     * Bedrock Revision
  23.                                                     * and ID
  24.                                                     */
  25. #define    LB_CPU_PERMISSION         0x00604000    /*
  26.                                                     * CPU PIO access
  27.                                                     * permission bits
  28.                                                     */
  29. #define    LB_CPU_PERM_OVRRD         0x00604008    /*
  30.                                                     * CPU PIO access
  31.                                                     * permission bit
  32.                                                     * override
  33.                                                     */
  34. #define    LB_IO_PERMISSION          0x00604010    /*
  35.                                                     * IO PIO access
  36.                                                     * permission bits
  37.                                                     */
  38. #define    LB_SOFT_RESET             0x00604018    /*
  39.                                                     * Soft reset the
  40.                                                     * Bedrock chip
  41.                                                     */
  42. #define    LB_REGION_PRESENT         0x00604020    /*
  43.                                                     * Regions Present for
  44.                                                     * Invalidates
  45.                                                     */
  46. #define    LB_NODES_ABSENT           0x00604028    /*
  47.                                                     * Nodes Absent for
  48.                                                     * Invalidates
  49.                                                     */
  50. #define    LB_MICROLAN_CTL           0x00604030    /*
  51.                                                     * Microlan Control
  52.                                                     * (NIC)
  53.                                                     */
  54. #define    LB_ERROR_BITS             0x00604040    /*
  55.                                                     * Local Block error
  56.                                                     * bits
  57.                                                     */
  58. #define    LB_ERROR_MASK_CLR         0x00604048    /*
  59.                                                     * Bit mask write to
  60.                                                     * clear error bits
  61.                                                     */
  62. #define    LB_ERROR_HDR1             0x00604050    /*
  63.                                                     * Source, Suppl and
  64.                                                     * Cmd fields
  65.                                                     */
  66. #define    LB_ERROR_HDR2             0x00604058    /*
  67.                                                     * Address field from
  68.                                                     * first error
  69.                                                     */
  70. #define    LB_ERROR_DATA             0x00604060    /*
  71.                                                     * Data flit (if any)
  72.                                                     * from first error
  73.                                                     */
  74. #define    LB_DEBUG_SELECT           0x00604100    /*
  75.                                                     * Choice of debug
  76.                                                     * signals from chip
  77.                                                     */
  78. #define    LB_DEBUG_PINS             0x00604108    /*
  79.                                                     * Value on the chip's
  80.                                                     * debug pins
  81.                                                     */
  82. #define    LB_RT_LOCAL_CTRL          0x00604200    /*
  83.                                                     * Local generation of
  84.                                                     * real-time clock
  85.                                                     */
  86. #define    LB_RT_FILTER_CTRL         0x00604208    /*
  87.                                                     * Control of
  88.                                                     * filtering of global
  89.                                                     * clock
  90.                                                     */
  91. #define    LB_SCRATCH_REG0           0x00608000    /* Scratch Register 0     */
  92. #define    LB_SCRATCH_REG1           0x00608008    /* Scratch Register 1     */
  93. #define    LB_SCRATCH_REG2           0x00608010    /* Scratch Register 2     */
  94. #define    LB_SCRATCH_REG3           0x00608018    /* Scratch Register 3     */
  95. #define    LB_SCRATCH_REG4           0x00608020    /* Scratch Register 4     */
  96. #define    LB_SCRATCH_REG0_WZ        0x00608040    /*
  97.                                                     * Scratch Register 0
  98.                                                     * (WZ alias)
  99.                                                     */
  100. #define    LB_SCRATCH_REG1_WZ        0x00608048    /*
  101.                                                     * Scratch Register 1
  102.                                                     * (WZ alias)
  103.                                                     */
  104. #define    LB_SCRATCH_REG2_WZ        0x00608050    /*
  105.                                                     * Scratch Register 2
  106.                                                     * (WZ alias)
  107.                                                     */
  108. #define    LB_SCRATCH_REG3_RZ        0x00608058    /*
  109.                                                     * Scratch Register 3
  110.                                                     * (RZ alias)
  111.                                                     */
  112. #define    LB_SCRATCH_REG4_RZ        0x00608060    /*
  113.                                                     * Scratch Register 4
  114.                                                     * (RZ alias)
  115.                                                     */
  116. #define    LB_VECTOR_PARMS           0x0060C000    /*
  117.                                                     * Vector PIO
  118.                                                     * parameters
  119.                                                     */
  120. #define    LB_VECTOR_ROUTE           0x0060C008    /*
  121.                                                     * Vector PIO Vector
  122.                                                     * Route
  123.                                                     */
  124. #define    LB_VECTOR_DATA            0x0060C010    /*
  125.                                                     * Vector PIO Write
  126.                                                     * Data
  127.                                                     */
  128. #define    LB_VECTOR_STATUS          0x0060C020    /*
  129.                                                     * Vector PIO Return
  130.                                                     * Status
  131.                                                     */
  132. #define    LB_VECTOR_RETURN          0x0060C028    /*
  133.                                                     * Vector PIO Return
  134.                                                     * Route
  135.                                                     */
  136. #define    LB_VECTOR_READ_DATA       0x0060C030    /*
  137.                                                     * Vector PIO Read
  138.                                                     * Data
  139.                                                     */
  140. #define    LB_VECTOR_STATUS_CLEAR    0x0060C038    /*
  141.                                                     * Clear Vector PIO
  142.                                                     * Return Status
  143.                                                     */
  144. #ifndef __ASSEMBLY__
  145. /************************************************************************
  146.  *                                                                      *
  147.  * Description:  This register contains information that allows         *
  148.  * exploratory software to probe for chip type. This is also the        *
  149.  * register that sets this node's ID and the size of each region        *
  150.  * (which affects the maximum possible system size). IBM assigns the    *
  151.  * values for the REVISION, PART_NUMBER and MANUFACTURER fields, in     *
  152.  * accordance with the IEEE 1149.1 standard; SGI is not at liberty to   *
  153.  * unilaterally change the values of these fields.                      *
  154.  *  .                                                                   *
  155.  *                                                                      *
  156.  ************************************************************************/
  157. #ifdef LITTLE_ENDIAN
  158. typedef union lb_rev_id_u {
  159. bdrkreg_t lb_rev_id_regval;
  160. struct  {
  161. bdrkreg_t ri_reserved_2             :  1;
  162. bdrkreg_t       ri_manufacturer           :     11;
  163. bdrkreg_t       ri_part_number            :     16;
  164. bdrkreg_t       ri_revision               :      4;
  165. bdrkreg_t       ri_node_id                :      8;
  166. bdrkreg_t       ri_reserved_1             :      6;
  167. bdrkreg_t       ri_region_size            :      2;
  168. bdrkreg_t       ri_reserved               :     16;
  169. } lb_rev_id_fld_s;
  170. } lb_rev_id_u_t;
  171. #else
  172. typedef union lb_rev_id_u {
  173.         bdrkreg_t       lb_rev_id_regval;
  174. struct {
  175. bdrkreg_t ri_reserved   : 16;
  176. bdrkreg_t ri_region_size   :  2;
  177. bdrkreg_t ri_reserved_1   :  6;
  178. bdrkreg_t ri_node_id   :  8;
  179. bdrkreg_t ri_revision   :  4;
  180. bdrkreg_t ri_part_number   : 16;
  181. bdrkreg_t ri_manufacturer   : 11;
  182. bdrkreg_t ri_reserved_2   :  1;
  183. } lb_rev_id_fld_s;
  184. } lb_rev_id_u_t;
  185. #endif
  186. /************************************************************************
  187.  *                                                                      *
  188.  *  This register contains the PI-access-rights bit-vector for the      *
  189.  * LB, NI, XB and MD portions of the Bedrock local register space. If   *
  190.  * a bit in the bit-vector is set, the region corresponding to that     *
  191.  * bit has read/write permission on the LB, NI, XB and MD local         *
  192.  * registers. If the bit is clear, that region has no write access to   *
  193.  * the local registers and no read access if the read will cause any    *
  194.  * state change. If a write or a read with side effects is attempted    *
  195.  * by a PI in a region for which access is restricted, the LB will      *
  196.  * not perform the operation and will send back a reply which           *
  197.  * indicates an error.                                                  *
  198.  *                                                                      *
  199.  ************************************************************************/
  200. typedef union lb_cpu_permission_u {
  201. bdrkreg_t lb_cpu_permission_regval;
  202. struct  {
  203. bdrkreg_t cp_cpu_access             : 64;
  204. } lb_cpu_permission_fld_s;
  205. } lb_cpu_permission_u_t;
  206. /************************************************************************
  207.  *                                                                      *
  208.  *  A write to this register of the 64-bit value "SGIrules" will        *
  209.  * cause the bit in the LB_CPU_PROTECT register corresponding to the    *
  210.  * region of the requester to be set.                                   *
  211.  *                                                                      *
  212.  ************************************************************************/
  213. typedef union lb_cpu_perm_ovrrd_u {
  214. bdrkreg_t lb_cpu_perm_ovrrd_regval;
  215. struct  {
  216. bdrkreg_t cpo_cpu_perm_ovr          : 64;
  217. } lb_cpu_perm_ovrrd_fld_s;
  218. } lb_cpu_perm_ovrrd_u_t;
  219. /************************************************************************
  220.  *                                                                      *
  221.  *  This register contains the II-access-rights bit-vector for the      *
  222.  * LB, NI, XB and MD portions of the Bedrock local register space. If   *
  223.  * a bit in the bit-vector is set, the region corresponding to that     *
  224.  * bit has read/write permission on the LB, NI, XB and MD local         *
  225.  * registers. If the bit is clear, then that region has no write        *
  226.  * access to the local registers and no read access if the read         *
  227.  * results in any state change. If a write or a read with side          *
  228.  * effects is attempted by an II in a region for which access is        *
  229.  * restricted, the LB will not perform the operation and will send      *
  230.  * back a reply which indicates an error.                               *
  231.  *                                                                      *
  232.  ************************************************************************/
  233. typedef union lb_io_permission_u {
  234. bdrkreg_t lb_io_permission_regval;
  235. struct  {
  236. bdrkreg_t ip_io_permission          : 64;
  237. } lb_io_permission_fld_s;
  238. } lb_io_permission_u_t;
  239. /************************************************************************
  240.  *                                                                      *
  241.  *  A write to this bit resets the Bedrock chip with a soft reset.      *
  242.  *                                                                      *
  243.  ************************************************************************/
  244. #ifdef LITTLE_ENDIAN
  245. typedef union lb_soft_reset_u {
  246. bdrkreg_t lb_soft_reset_regval;
  247. struct  {
  248. bdrkreg_t sr_soft_reset             :  1;
  249. bdrkreg_t sr_reserved   : 63;
  250. } lb_soft_reset_fld_s;
  251. } lb_soft_reset_u_t;
  252. #else
  253. typedef union lb_soft_reset_u {
  254. bdrkreg_t lb_soft_reset_regval;
  255. struct {
  256. bdrkreg_t sr_reserved   : 63;
  257. bdrkreg_t sr_soft_reset   :  1;
  258. } lb_soft_reset_fld_s;
  259. } lb_soft_reset_u_t;
  260. #endif
  261. /************************************************************************
  262.  *                                                                      *
  263.  *  This register indicates which regions are present and capable of    *
  264.  * receiving an invalidate (INVAL) request. The LB samples this         *
  265.  * register at the start of processing each LINVAL. When an LINVAL      *
  266.  * indicates that a particular PI unit might hold a shared copy of a    *
  267.  * cache block but this PI is in a region which is not present (i.e.,   *
  268.  * its bit in LB_REGION_PRESENT is clear), then the LB sends an IVACK   *
  269.  * reply packet on behalf of this PI. The REGION_SIZE field in the      *
  270.  * LB_REV_ID register determines the number of nodes per region (and    *
  271.  * hence, the number of PI units which share a common bit in the        *
  272.  * LB_REGION_PRESENT register).                                         *
  273.  *                                                                      *
  274.  ************************************************************************/
  275. typedef union lb_region_present_u {
  276. bdrkreg_t lb_region_present_regval;
  277. struct  {
  278. bdrkreg_t rp_present_bits           : 64;
  279. } lb_region_present_fld_s;
  280. } lb_region_present_u_t;
  281. /************************************************************************
  282.  *                                                                      *
  283.  * Description:  This register indicates which nodes are absent and     *
  284.  * not capable of receiving an invalidate (INVAL) request. The LB       *
  285.  * samples this register at the start of processing each LINVAL. When   *
  286.  * an LINVAL indicates that a particular PI unit might hold a shared    *
  287.  * copy of a cache block but this PI unit's node is not present         *
  288.  * (i.e., its node ID is listed in the LB_NODES_ABSENT register),       *
  289.  * then the LB sends an IVACK reply packet on behalf of this PI.        *
  290.  *                                                                      *
  291.  *                                                                      *
  292.  ************************************************************************/
  293. #ifdef LITTLE_ENDIAN
  294. typedef union lb_nodes_absent_u {
  295. bdrkreg_t lb_nodes_absent_regval;
  296. struct  {
  297. bdrkreg_t na_node_0                 :  8;
  298. bdrkreg_t       na_reserved_3             :      7;
  299. bdrkreg_t       na_node_0_valid           :      1;
  300. bdrkreg_t       na_node_1                 :      8;
  301. bdrkreg_t       na_reserved_2             :      7;
  302. bdrkreg_t       na_node_1_valid           :      1;
  303. bdrkreg_t       na_node_2                 :      8;
  304. bdrkreg_t       na_reserved_1             :      7;
  305. bdrkreg_t       na_node_2_valid           :      1;
  306. bdrkreg_t       na_node_3                 :      8;
  307. bdrkreg_t       na_reserved               :      7;
  308. bdrkreg_t       na_node_3_valid           :      1;
  309. } lb_nodes_absent_fld_s;
  310. } lb_nodes_absent_u_t;
  311. #else
  312. typedef union lb_nodes_absent_u {
  313. bdrkreg_t lb_nodes_absent_regval;
  314. struct {
  315. bdrkreg_t na_node_3_valid   :  1;
  316. bdrkreg_t na_reserved   :  7;
  317. bdrkreg_t na_node_3   :  8;
  318. bdrkreg_t na_node_2_valid   :  1;
  319. bdrkreg_t na_reserved_1   :  7;
  320. bdrkreg_t na_node_2   :  8;
  321. bdrkreg_t na_node_1_valid   :  1;
  322. bdrkreg_t na_reserved_2   :  7;
  323. bdrkreg_t na_node_1   :  8;
  324. bdrkreg_t na_node_0_valid   :  1;
  325. bdrkreg_t na_reserved_3   :  7;
  326. bdrkreg_t na_node_0   :  8;
  327. } lb_nodes_absent_fld_s;
  328. } lb_nodes_absent_u_t;
  329. #endif
  330. /************************************************************************
  331.  *                                                                      *
  332.  *  This register provides access to the Number-In-a-Can add-only       *
  333.  * serial PROM that is used to store node board serial number and       *
  334.  * configuration information. (Refer to NIC datasheet Dallas 1990A      *
  335.  * that is viewable at                                                  *
  336.  * URL::http://www.dalsemi.com/DocControl/PDFs/pdfindex.html). Data     *
  337.  * comes from this interface LSB first.                                 *
  338.  *                                                                      *
  339.  ************************************************************************/
  340. #ifdef LITTLE_ENDIAN
  341. typedef union lb_microlan_ctl_u {
  342. bdrkreg_t lb_microlan_ctl_regval;
  343. struct  {
  344. bdrkreg_t mc_rd_data                :  1;
  345. bdrkreg_t       mc_done                   :      1;
  346. bdrkreg_t       mc_sample                 :      8;
  347. bdrkreg_t       mc_pulse                  :     10;
  348. bdrkreg_t       mc_clkdiv_phi0            :      7;
  349. bdrkreg_t       mc_clkdiv_phi1            :      7;
  350. bdrkreg_t       mc_reserved               :     30;
  351. } lb_microlan_ctl_fld_s;
  352. } lb_microlan_ctl_u_t;
  353. #else
  354. typedef union lb_microlan_ctl_u {
  355.         bdrkreg_t       lb_microlan_ctl_regval;
  356.         struct  {
  357.                 bdrkreg_t       mc_reserved               :     30;
  358.                 bdrkreg_t       mc_clkdiv_phi1            :      7;
  359.                 bdrkreg_t       mc_clkdiv_phi0            :      7;
  360.                 bdrkreg_t       mc_pulse                  :     10;
  361.                 bdrkreg_t       mc_sample                 :      8;
  362.                 bdrkreg_t       mc_done                   :      1;
  363.                 bdrkreg_t       mc_rd_data                :      1;
  364.         } lb_microlan_ctl_fld_s;
  365. } lb_microlan_ctl_u_t;
  366. #endif
  367. /************************************************************************
  368.  *                                                                      *
  369.  * Description:  This register contains the LB error status bits.       *
  370.  * Whenever a particular type of error occurs, the LB sets its bit in   *
  371.  * this register so that software will be aware that such an event      *
  372.  * has happened. Reads from this register are non-destructive and the   *
  373.  * contents of this register remain intact across reset operations.     *
  374.  * Whenever any of these bits is set, the LB will assert its            *
  375.  * interrupt request output signals that go to the PI units.            *
  376.  *  Software can simulate the occurrence of an error by first writing   *
  377.  * appropriate values into the LB_ERROR_HDR1, LB_ERROR_HDR2 and         *
  378.  * LB_ERROR_DATA registers, and then writing to the LB_ERROR_BITS       *
  379.  * register to set the error bits in a particular way. Setting one or   *
  380.  * more error bits will cause the LB to interrupt a processor and       *
  381.  * invoke error-handling software.                                      *
  382.  *                                                                      *
  383.  ************************************************************************/
  384. #ifdef LITTLE_ENDIAN
  385. typedef union lb_error_bits_u {
  386. bdrkreg_t lb_error_bits_regval;
  387. struct  {
  388. bdrkreg_t eb_rq_bad_cmd             :  1;
  389. bdrkreg_t       eb_rp_bad_cmd             :      1;
  390. bdrkreg_t       eb_rq_short               :      1;
  391. bdrkreg_t       eb_rp_short               :      1;
  392. bdrkreg_t       eb_rq_long                :      1;
  393. bdrkreg_t       eb_rp_long                :      1;
  394. bdrkreg_t       eb_rq_bad_data            :      1;
  395. bdrkreg_t       eb_rp_bad_data            :      1;
  396. bdrkreg_t       eb_rq_bad_addr            :      1;
  397. bdrkreg_t       eb_rq_bad_linval          :      1;
  398. bdrkreg_t       eb_gclk_drop              :      1;
  399. bdrkreg_t       eb_reserved               :     53;
  400. } lb_error_bits_fld_s;
  401. } lb_error_bits_u_t;
  402. #else
  403. typedef union lb_error_bits_u {
  404. bdrkreg_t lb_error_bits_regval;
  405. struct {
  406. bdrkreg_t eb_reserved   : 53;
  407. bdrkreg_t eb_gclk_drop   :  1;
  408. bdrkreg_t eb_rq_bad_linval   :  1;
  409. bdrkreg_t eb_rq_bad_addr   :  1;
  410. bdrkreg_t eb_rp_bad_data   :  1;
  411. bdrkreg_t eb_rq_bad_data   :  1;
  412. bdrkreg_t eb_rp_long   :  1;
  413. bdrkreg_t eb_rq_long   :  1;
  414. bdrkreg_t eb_rp_short   :  1;
  415. bdrkreg_t eb_rq_short   :  1;
  416. bdrkreg_t eb_rp_bad_cmd   :  1;
  417. bdrkreg_t eb_rq_bad_cmd   :  1;
  418. } lb_error_bits_fld_s;
  419. } lb_error_bits_u_t;
  420. #endif
  421. /************************************************************************
  422.  *                                                                      *
  423.  *  This register lets software clear some of the bits in the           *
  424.  * LB_ERROR_BITS register without affecting other bits.  Essentially,   *
  425.  * it provides bit mask functionality. When software writes to the      *
  426.  * LB_ERROR_MASK_CLR register, the bits which are set in the data       *
  427.  * value indicate which bits are to be cleared in LB_ERROR_BITS. If a   *
  428.  * bit is clear in the data value written to the LB_ERROR_MASK_CLR      *
  429.  * register, then its corresponding bit in the LB_ERROR_BITS register   *
  430.  * is not affected. Hence, software can atomically clear any subset     *
  431.  * of the error bits in the LB_ERROR_BITS register.                     *
  432.  *                                                                      *
  433.  ************************************************************************/
  434. #ifdef LITTLE_ENDIAN
  435. typedef union lb_error_mask_clr_u {
  436. bdrkreg_t lb_error_mask_clr_regval;
  437. struct  {
  438. bdrkreg_t emc_clr_rq_bad_cmd        :  1;
  439. bdrkreg_t       emc_clr_rp_bad_cmd        :      1;
  440. bdrkreg_t       emc_clr_rq_short          :      1;
  441. bdrkreg_t       emc_clr_rp_short          :      1;
  442. bdrkreg_t       emc_clr_rq_long           :      1;
  443. bdrkreg_t       emc_clr_rp_long           :      1;
  444. bdrkreg_t       emc_clr_rq_bad_data       :      1;
  445. bdrkreg_t       emc_clr_rp_bad_data       :      1;
  446. bdrkreg_t       emc_clr_rq_bad_addr       :      1;
  447. bdrkreg_t       emc_clr_rq_bad_linval     :      1;
  448. bdrkreg_t       emc_clr_gclk_drop         :      1;
  449. bdrkreg_t       emc_reserved              :     53;
  450. } lb_error_mask_clr_fld_s;
  451. } lb_error_mask_clr_u_t;
  452. #else
  453. typedef union lb_error_mask_clr_u {
  454. bdrkreg_t lb_error_mask_clr_regval;
  455. struct {
  456. bdrkreg_t emc_reserved   : 53;
  457. bdrkreg_t emc_clr_gclk_drop   :  1;
  458. bdrkreg_t emc_clr_rq_bad_linval   :  1;
  459. bdrkreg_t emc_clr_rq_bad_addr   :  1;
  460. bdrkreg_t emc_clr_rp_bad_data   :  1;
  461. bdrkreg_t emc_clr_rq_bad_data   :  1;
  462. bdrkreg_t emc_clr_rp_long   :  1;
  463. bdrkreg_t emc_clr_rq_long   :  1;
  464. bdrkreg_t emc_clr_rp_short   :  1;
  465. bdrkreg_t emc_clr_rq_short   :  1;
  466. bdrkreg_t emc_clr_rp_bad_cmd   :  1;
  467. bdrkreg_t emc_clr_rq_bad_cmd   :  1;
  468. } lb_error_mask_clr_fld_s;
  469. } lb_error_mask_clr_u_t;
  470. #endif
  471. /************************************************************************
  472.  *                                                                      *
  473.  *  If the LB detects an error when VALID==0 in the LB_ERROR_HDR1       *
  474.  * register, then it saves the contents of the offending packet's       *
  475.  * header flit in the LB_ERROR_HDR1 and LB_ERROR_HDR2 registers, sets   *
  476.  * the VALID bit in LB_ERROR_HDR1 and clears the OVERRUN bit in         *
  477.  * LB_ERROR_HDR1 (and it will also set the corresponding bit in the     *
  478.  * LB_ERROR_BITS register). The ERR_TYPE field indicates specifically   *
  479.  * what kind of error occurred.  Its encoding corresponds to the bit    *
  480.  * positions in the LB_ERROR_BITS register (e.g., ERR_TYPE==5           *
  481.  * indicates a RP_LONG error).  If an error (of any type except         *
  482.  * GCLK_DROP) subsequently happens while VALID==1, then the LB sets     *
  483.  * the OVERRUN bit in LB_ERROR_HDR1. This register is not relevant      *
  484.  * when a GCLK_DROP error occurs; the LB does not even attempt to       *
  485.  * change the ERR_TYPE, VALID or OVERRUN field when a GCLK_DROP error   *
  486.  * happens.                                                             *
  487.  *                                                                      *
  488.  ************************************************************************/
  489. #ifdef LITTLE_ENDIAN
  490. typedef union lb_error_hdr1_u {
  491. bdrkreg_t lb_error_hdr1_regval;
  492. struct  {
  493. bdrkreg_t eh_command                :  7;
  494. bdrkreg_t       eh_reserved_5             :      1;
  495. bdrkreg_t       eh_suppl                  :     11;
  496. bdrkreg_t       eh_reserved_4             :      1;
  497. bdrkreg_t       eh_source                 :     11;
  498. bdrkreg_t       eh_reserved_3             :      1;
  499. bdrkreg_t       eh_err_type               :      4;
  500. bdrkreg_t       eh_reserved_2             :      4;
  501. bdrkreg_t       eh_overrun                :      1;
  502. bdrkreg_t       eh_reserved_1             :      3;
  503. bdrkreg_t       eh_valid                  :      1;
  504. bdrkreg_t       eh_reserved               :     19;
  505. } lb_error_hdr1_fld_s;
  506. } lb_error_hdr1_u_t;
  507. #else
  508. typedef union lb_error_hdr1_u {
  509. bdrkreg_t lb_error_hdr1_regval;
  510. struct {
  511. bdrkreg_t eh_reserved   : 19;
  512. bdrkreg_t eh_valid   :  1;
  513. bdrkreg_t eh_reserved_1   :  3;
  514. bdrkreg_t eh_overrun   :  1;
  515. bdrkreg_t eh_reserved_2   :  4;
  516. bdrkreg_t eh_err_type   :  4;
  517. bdrkreg_t eh_reserved_3   :  1;
  518. bdrkreg_t eh_source   : 11;
  519. bdrkreg_t eh_reserved_4   :  1;
  520. bdrkreg_t eh_suppl   : 11;
  521. bdrkreg_t eh_reserved_5   :  1;
  522. bdrkreg_t eh_command   :  7;
  523. } lb_error_hdr1_fld_s;
  524. } lb_error_hdr1_u_t;
  525. #endif
  526. /************************************************************************
  527.  *                                                                      *
  528.  *  Contents of the Address field from header flit of first packet      *
  529.  * that causes an error. This register is not relevant when a           *
  530.  * GCLK_DROP error occurs.                                              *
  531.  *                                                                      *
  532.  ************************************************************************/
  533. #ifdef LITTLE_ENDIAN
  534. typedef union lb_error_hdr2_u {
  535. bdrkreg_t lb_error_hdr2_regval;
  536. struct  {
  537. bdrkreg_t eh_address                : 38;
  538. bdrkreg_t       eh_reserved               :     26;
  539. } lb_error_hdr2_fld_s;
  540. } lb_error_hdr2_u_t;
  541. #else
  542. typedef union lb_error_hdr2_u {
  543. bdrkreg_t lb_error_hdr2_regval;
  544. struct {
  545. bdrkreg_t eh_reserved   : 26;
  546. bdrkreg_t eh_address   : 38;
  547. } lb_error_hdr2_fld_s;
  548. } lb_error_hdr2_u_t;
  549. #endif
  550. /************************************************************************
  551.  *                                                                      *
  552.  * Description:  This register accompanies the LB_ERROR_HDR1 and        *
  553.  * LB_ERROR_HDR2 registers.  The LB updates the value in this           *
  554.  * register when an incoming packet with a data flit causes an error    *
  555.  * while VALID==0 in the LB_ERROR_HDR1 register.  This register         *
  556.  * retains the contents of the data flit from the incoming packet       *
  557.  * that caused the error. This register is relevant for the following   *
  558.  * types of errors:                                                     *
  559.  * <UL >                                                                *
  560.  * <UL >                                                                *
  561.  * <UL >                                                                *
  562.  * <UL >                                                                *
  563.  * <UL >                                                                *
  564.  * <LI >RQ_BAD_LINVAL for a LINVAL request.                             *
  565.  * <LI >RQ_BAD_ADDR for a normal or vector PIO request.                 *
  566.  * <LI >RP_BAD_DATA for a vector PIO reply.                             *
  567.  * <LI >RQ_BAD DATA for an incoming request with data.                  *
  568.  * <LI >RP_LONG for a vector PIO reply.                                 *
  569.  * <LI >RQ_LONG for an incoming request with expected data.             *
  570.  * <BLOCKQUOTE >                                                        *
  571.  * In the case of RQ_BAD_LINVAL, the register retains the 64-bit data   *
  572.  * value that followed the header flit.  In the case of RQ_BAD_ADDR     *
  573.  * or RQ_BAD_DATA, the register retains the incoming packet's 64-bit    *
  574.  * data value (i.e., 2nd flit in the packet for a normal PIO write or   *
  575.  * an LINVAL, 3rd flit for a vector PIO read or write). In the case     *
  576.  * of RP_BAD_DATA, the register retains the 64-bit data value in the    *
  577.  * 3rd flit of the packet. When a RP_LONG or RQ_LONG error occurs,      *
  578.  * the LB loads the LB_ERROR_DATA register with the contents of the     *
  579.  * expected data flit (i.e., the 3rd flit in the packet for a vector    *
  580.  * PIO request or reply, the 2nd flit for other packets), if any. The   *
  581.  * contents of the LB_ERROR_DATA register are undefined after a         *
  582.  * RP_SHORT, RQ_SHORT, RP_BAD_CMD or RQ_BAD_CMD error. The contents     *
  583.  * of the LB_ERROR_DATA register are also undefined after an incoming   *
  584.  * normal PIO read request which encounters a RQ_LONG error.            *
  585.  *                                                                      *
  586.  ************************************************************************/
  587. typedef union lb_error_data_u {
  588. bdrkreg_t lb_error_data_regval;
  589. struct  {
  590. bdrkreg_t ed_data                   : 64;
  591. } lb_error_data_fld_s;
  592. } lb_error_data_u_t;
  593. /************************************************************************
  594.  *                                                                      *
  595.  *  This register enables software to control what internal Bedrock     *
  596.  * signals are visible on the chip's debug pins. The LB provides the    *
  597.  * 6-bit value in this register to Bedrock's DEBUG unit. The JTAG       *
  598.  * unit provides a similar 6-bit selection input to the DEBUG unit,     *
  599.  * along with another signal that tells the DEBUG unit whether to use   *
  600.  * the selection signal from the LB or the JTAG unit. For a             *
  601.  * description of the menu of choices for debug signals, refer to the   *
  602.  * documentation for the DEBUG unit.                                    *
  603.  *                                                                      *
  604.  ************************************************************************/
  605. #ifdef LITTLE_ENDIAN
  606. typedef union lb_debug_select_u {
  607. bdrkreg_t lb_debug_select_regval;
  608. struct  {
  609. bdrkreg_t ds_debug_sel              :  6;
  610. bdrkreg_t       ds_reserved               :     58;
  611. } lb_debug_select_fld_s;
  612. } lb_debug_select_u_t;
  613. #else
  614. typedef union lb_debug_select_u {
  615. bdrkreg_t lb_debug_select_regval;
  616. struct {
  617. bdrkreg_t ds_reserved   : 58;
  618. bdrkreg_t ds_debug_sel   :  6;
  619. } lb_debug_select_fld_s;
  620. } lb_debug_select_u_t;
  621. #endif
  622. /************************************************************************
  623.  *                                                                      *
  624.  *  A PIO read from this register returns the 32-bit value that is      *
  625.  * currently on the Bedrock chip's debug pins. This register allows     *
  626.  * software to observe debug pin output values which do not change      *
  627.  * frequently (i.e., they remain constant over a period of many         *
  628.  * cycles).                                                             *
  629.  *                                                                      *
  630.  ************************************************************************/
  631. #ifdef LITTLE_ENDIAN
  632. typedef union lb_debug_pins_u {
  633. bdrkreg_t lb_debug_pins_regval;
  634. struct  {
  635. bdrkreg_t dp_debug_pins             : 32;
  636. bdrkreg_t       dp_reserved               :     32;
  637. } lb_debug_pins_fld_s;
  638. } lb_debug_pins_u_t;
  639. #else
  640. typedef union lb_debug_pins_u {
  641. bdrkreg_t lb_debug_pins_regval;
  642. struct {
  643. bdrkreg_t dp_reserved   : 32;
  644. bdrkreg_t dp_debug_pins   : 32;
  645. } lb_debug_pins_fld_s;
  646. } lb_debug_pins_u_t;
  647. #endif
  648. /************************************************************************
  649.  *                                                                      *
  650.  *  The LB unit provides the PI0 and PI1 units with a real-time clock   *
  651.  * signal. The LB can generate this signal itself, based on the         *
  652.  * Bedrock chip's system clock which the LB receives as an input.       *
  653.  * Alternatively, the LB can filter a global clock signal which it      *
  654.  * receives as an input and provide the filtered version to PI0 and     *
  655.  * PI1. The user can program the LB_RT_LOCAL_CTRL register to choose    *
  656.  * the source of the real-time clock. If the user chooses to generate   *
  657.  * the real-time clock internally within the LB, then the user can      *
  658.  * specify the period for the real-time clock signal.                   *
  659.  *                                                                      *
  660.  ************************************************************************/
  661. #ifdef LITTLE_ENDIAN
  662. typedef union lb_rt_local_ctrl_u {
  663. bdrkreg_t lb_rt_local_ctrl_regval;
  664. struct  {
  665. bdrkreg_t rlc_gclk_enable           :  1;
  666. bdrkreg_t       rlc_reserved_4            :      3;
  667. bdrkreg_t       rlc_max_count             :     10;
  668. bdrkreg_t       rlc_reserved_3            :      2;
  669. bdrkreg_t       rlc_gclk_counter          :     10;
  670. bdrkreg_t       rlc_reserved_2            :      2;
  671. bdrkreg_t       rlc_gclk                  :      1;
  672. bdrkreg_t       rlc_reserved_1            :      3;
  673. bdrkreg_t       rlc_use_internal          :      1;
  674. bdrkreg_t       rlc_reserved              :     31;
  675. } lb_rt_local_ctrl_fld_s;
  676. } lb_rt_local_ctrl_u_t;
  677. #else
  678. typedef union lb_rt_local_ctrl_u {
  679.         bdrkreg_t       lb_rt_local_ctrl_regval;
  680.         struct  {
  681.                 bdrkreg_t       rlc_reserved              :     31;
  682.                 bdrkreg_t       rlc_use_internal          :      1;
  683.                 bdrkreg_t       rlc_reserved_1            :      3;
  684.                 bdrkreg_t       rlc_gclk                  :      1;
  685.                 bdrkreg_t       rlc_reserved_2            :      2;
  686.                 bdrkreg_t       rlc_gclk_counter          :     10;
  687.                 bdrkreg_t       rlc_reserved_3            :      2;
  688.                 bdrkreg_t       rlc_max_count             :     10;
  689.                 bdrkreg_t       rlc_reserved_4            :      3;
  690.                 bdrkreg_t       rlc_gclk_enable           :      1;
  691.         } lb_rt_local_ctrl_fld_s;
  692. } lb_rt_local_ctrl_u_t;
  693. #endif
  694. /************************************************************************
  695.  *                                                                      *
  696.  *  When the value of the USE_INTERNAL field in the LB_RT_LOCAL_CTRL    *
  697.  * register is 0, the LB filters an incoming global clock signal and    *
  698.  * provides the result to PI0 and PI1 for their real-time clock         *
  699.  * inputs. The LB can perform either simple filtering or complex        *
  700.  * filtering, depending on the value of the MASK_ENABLE bit. For the    *
  701.  * simple filtering option, the LB merely removes glitches from the     *
  702.  * incoming global clock; if the global clock goes high (or low) for    *
  703.  * only a single cycle, the LB considers it to be a glitch and does     *
  704.  * not pass it through to PI0 and PI1. For the complex filtering        *
  705.  * option, the LB expects positive edges on the incoming global clock   *
  706.  * to be spaced at fairly regular intervals and it looks for them at    *
  707.  * these times; the LB keeps track of unexpected or missing positive    *
  708.  * edges, and it generates an edge itself whenever the incoming         *
  709.  * global clock apparently misses an edge. For each filtering option,   *
  710.  * the real-time clock which the LB provides to PI0 and PI1 is not      *
  711.  * necessarily a square wave; when a positive edge happens, the         *
  712.  * real-time clock stays high for (2*MAX_COUNT+1-OFFSET)/2 cycles of    *
  713.  * the LB's system clock, and then is low until the next positive       *
  714.  * edge.                                                                *
  715.  *                                                                      *
  716.  ************************************************************************/
  717. #ifdef LITTLE_ENDIAN
  718. typedef union lb_rt_filter_ctrl_u {
  719. bdrkreg_t lb_rt_filter_ctrl_regval;
  720. struct  {
  721. bdrkreg_t       rfc_offset                :      5;
  722. bdrkreg_t       rfc_reserved_4            :      3;
  723. bdrkreg_t       rfc_mask_counter          :     12;
  724. bdrkreg_t       rfc_mask_enable           :      1;
  725. bdrkreg_t       rfc_reserved_3            :      3;
  726. bdrkreg_t       rfc_dropout_counter       :     10;
  727. bdrkreg_t       rfc_reserved_2            :      2;
  728. bdrkreg_t       rfc_dropout_thresh        :     10;
  729. bdrkreg_t       rfc_reserved_1            :      2;
  730. bdrkreg_t       rfc_error_counter         :     10;
  731. bdrkreg_t       rfc_reserved              :      6;
  732. } lb_rt_filter_ctrl_fld_s;
  733. } lb_rt_filter_ctrl_u_t;
  734. #else
  735. typedef union lb_rt_filter_ctrl_u {
  736.         bdrkreg_t       lb_rt_filter_ctrl_regval;
  737.         struct  {
  738.                 bdrkreg_t       rfc_reserved              :      6;
  739.                 bdrkreg_t       rfc_error_counter         :     10;
  740.                 bdrkreg_t       rfc_reserved_1            :      2;
  741.                 bdrkreg_t       rfc_dropout_thresh        :     10;
  742.                 bdrkreg_t       rfc_reserved_2            :      2;
  743.                 bdrkreg_t       rfc_dropout_counter       :     10;
  744.                 bdrkreg_t       rfc_reserved_3            :      3;
  745.                 bdrkreg_t       rfc_mask_enable           :      1;
  746.                 bdrkreg_t       rfc_mask_counter          :     12;
  747.                 bdrkreg_t       rfc_reserved_4            :      3;
  748.                 bdrkreg_t       rfc_offset                :      5;
  749.         } lb_rt_filter_ctrl_fld_s;
  750. } lb_rt_filter_ctrl_u_t;
  751. #endif
  752. /************************************************************************
  753.  *                                                                      *
  754.  *  This register is a scratch register that is reset to 0x0. At the    *
  755.  * normal address, the register is a simple storage location. At the    *
  756.  * Write-If-Zero address, the register accepts a new value from a       *
  757.  * write operation only if the current value is zero.                   *
  758.  *                                                                      *
  759.  ************************************************************************/
  760. typedef union lb_scratch_reg0_u {
  761. bdrkreg_t lb_scratch_reg0_regval;
  762. struct  {
  763. bdrkreg_t sr_scratch_bits           : 64;
  764. } lb_scratch_reg0_fld_s;
  765. } lb_scratch_reg0_u_t;
  766. /************************************************************************
  767.  *                                                                      *
  768.  *  These registers are scratch registers that are not reset. At a      *
  769.  * register's normal address, it is a simple storage location. At a     *
  770.  * register's Write-If-Zero address, it accepts a new value from a      *
  771.  * write operation only if the current value is zero.                   *
  772.  *                                                                      *
  773.  ************************************************************************/
  774. typedef union lb_scratch_reg1_u {
  775. bdrkreg_t lb_scratch_reg1_regval;
  776. struct  {
  777. bdrkreg_t sr_scratch_bits           : 64;
  778. } lb_scratch_reg1_fld_s;
  779. } lb_scratch_reg1_u_t;
  780. /************************************************************************
  781.  *                                                                      *
  782.  *  These registers are scratch registers that are not reset. At a      *
  783.  * register's normal address, it is a simple storage location. At a     *
  784.  * register's Write-If-Zero address, it accepts a new value from a      *
  785.  * write operation only if the current value is zero.                   *
  786.  *                                                                      *
  787.  ************************************************************************/
  788. typedef union lb_scratch_reg2_u {
  789. bdrkreg_t lb_scratch_reg2_regval;
  790. struct  {
  791. bdrkreg_t sr_scratch_bits           : 64;
  792. } lb_scratch_reg2_fld_s;
  793. } lb_scratch_reg2_u_t;
  794. /************************************************************************
  795.  *                                                                      *
  796.  *  These one-bit registers are scratch registers. At a register's      *
  797.  * normal address, it is a simple storage location. At a register's     *
  798.  * Read-Set-If-Zero address, it returns the original contents and       *
  799.  * sets the bit if the original value is zero.                          *
  800.  *                                                                      *
  801.  ************************************************************************/
  802. #ifdef LITTLE_ENDIAN
  803. typedef union lb_scratch_reg3_u {
  804. bdrkreg_t lb_scratch_reg3_regval;
  805. struct  {
  806. bdrkreg_t sr_scratch_bit            :  1;
  807. bdrkreg_t sr_reserved   : 63;
  808. } lb_scratch_reg3_fld_s;
  809. } lb_scratch_reg3_u_t;
  810. #else
  811. typedef union lb_scratch_reg3_u {
  812. bdrkreg_t lb_scratch_reg3_regval;
  813. struct {
  814. bdrkreg_t sr_reserved   : 63;
  815. bdrkreg_t sr_scratch_bit   :  1;
  816. } lb_scratch_reg3_fld_s;
  817. } lb_scratch_reg3_u_t;
  818. #endif
  819. /************************************************************************
  820.  *                                                                      *
  821.  *  These one-bit registers are scratch registers. At a register's      *
  822.  * normal address, it is a simple storage location. At a register's     *
  823.  * Read-Set-If-Zero address, it returns the original contents and       *
  824.  * sets the bit if the original value is zero.                          *
  825.  *                                                                      *
  826.  ************************************************************************/
  827. #ifdef LITTLE_ENDIAN
  828. typedef union lb_scratch_reg4_u {
  829. bdrkreg_t lb_scratch_reg4_regval;
  830. struct  {
  831. bdrkreg_t sr_scratch_bit            :  1;
  832. bdrkreg_t       sr_reserved               :     63;
  833. } lb_scratch_reg4_fld_s;
  834. } lb_scratch_reg4_u_t;
  835. #else
  836. typedef union lb_scratch_reg4_u {
  837. bdrkreg_t lb_scratch_reg4_regval;
  838. struct {
  839. bdrkreg_t sr_reserved   : 63;
  840. bdrkreg_t sr_scratch_bit   :  1;
  841. } lb_scratch_reg4_fld_s;
  842. } lb_scratch_reg4_u_t;
  843. #endif
  844. /************************************************************************
  845.  *                                                                      *
  846.  *  This register is a scratch register that is reset to 0x0. At the    *
  847.  * normal address, the register is a simple storage location. At the    *
  848.  * Write-If-Zero address, the register accepts a new value from a       *
  849.  * write operation only if the current value is zero.                   *
  850.  *                                                                      *
  851.  ************************************************************************/
  852. typedef union lb_scratch_reg0_wz_u {
  853. bdrkreg_t lb_scratch_reg0_wz_regval;
  854. struct  {
  855. bdrkreg_t srw_scratch_bits          : 64;
  856. } lb_scratch_reg0_wz_fld_s;
  857. } lb_scratch_reg0_wz_u_t;
  858. /************************************************************************
  859.  *                                                                      *
  860.  *  These registers are scratch registers that are not reset. At a      *
  861.  * register's normal address, it is a simple storage location. At a     *
  862.  * register's Write-If-Zero address, it accepts a new value from a      *
  863.  * write operation only if the current value is zero.                   *
  864.  *                                                                      *
  865.  ************************************************************************/
  866. typedef union lb_scratch_reg1_wz_u {
  867. bdrkreg_t lb_scratch_reg1_wz_regval;
  868. struct  {
  869. bdrkreg_t srw_scratch_bits          : 64;
  870. } lb_scratch_reg1_wz_fld_s;
  871. } lb_scratch_reg1_wz_u_t;
  872. /************************************************************************
  873.  *                                                                      *
  874.  *  These registers are scratch registers that are not reset. At a      *
  875.  * register's normal address, it is a simple storage location. At a     *
  876.  * register's Write-If-Zero address, it accepts a new value from a      *
  877.  * write operation only if the current value is zero.                   *
  878.  *                                                                      *
  879.  ************************************************************************/
  880. typedef union lb_scratch_reg2_wz_u {
  881. bdrkreg_t lb_scratch_reg2_wz_regval;
  882. struct  {
  883. bdrkreg_t srw_scratch_bits          : 64;
  884. } lb_scratch_reg2_wz_fld_s;
  885. } lb_scratch_reg2_wz_u_t;
  886. /************************************************************************
  887.  *                                                                      *
  888.  *  These one-bit registers are scratch registers. At a register's      *
  889.  * normal address, it is a simple storage location. At a register's     *
  890.  * Read-Set-If-Zero address, it returns the original contents and       *
  891.  * sets the bit if the original value is zero.                          *
  892.  *                                                                      *
  893.  ************************************************************************/
  894. #ifdef LITTLE_ENDIAN
  895. typedef union lb_scratch_reg3_rz_u {
  896. bdrkreg_t lb_scratch_reg3_rz_regval;
  897. struct  {
  898. bdrkreg_t srr_scratch_bit           :  1;
  899. bdrkreg_t       srr_reserved              :     63;
  900. } lb_scratch_reg3_rz_fld_s;
  901. } lb_scratch_reg3_rz_u_t;
  902. #else
  903. typedef union lb_scratch_reg3_rz_u {
  904. bdrkreg_t lb_scratch_reg3_rz_regval;
  905. struct {
  906. bdrkreg_t srr_reserved   : 63;
  907. bdrkreg_t srr_scratch_bit   :  1;
  908. } lb_scratch_reg3_rz_fld_s;
  909. } lb_scratch_reg3_rz_u_t;
  910. #endif
  911. /************************************************************************
  912.  *                                                                      *
  913.  *  These one-bit registers are scratch registers. At a register's      *
  914.  * normal address, it is a simple storage location. At a register's     *
  915.  * Read-Set-If-Zero address, it returns the original contents and       *
  916.  * sets the bit if the original value is zero.                          *
  917.  *                                                                      *
  918.  ************************************************************************/
  919. #ifdef LITTLE_ENDIAN
  920. typedef union lb_scratch_reg4_rz_u {
  921. bdrkreg_t lb_scratch_reg4_rz_regval;
  922. struct  {
  923. bdrkreg_t srr_scratch_bit           :  1;
  924. bdrkreg_t       srr_reserved              :     63;
  925. } lb_scratch_reg4_rz_fld_s;
  926. } lb_scratch_reg4_rz_u_t;
  927. #else
  928. typedef union lb_scratch_reg4_rz_u {
  929. bdrkreg_t lb_scratch_reg4_rz_regval;
  930. struct {
  931. bdrkreg_t srr_reserved   : 63;
  932. bdrkreg_t srr_scratch_bit   :  1;
  933. } lb_scratch_reg4_rz_fld_s;
  934. } lb_scratch_reg4_rz_u_t;
  935. #endif
  936. /************************************************************************
  937.  *                                                                      *
  938.  * Description:  This register contains vector PIO parameters. A        *
  939.  * write to this register triggers the LB to send out a vector PIO      *
  940.  * request packet. Immediately after servicing a write request to the   *
  941.  * LB_VECTOR_PARMS register, the LB sends back a reply (i.e., the LB    *
  942.  * doesn't wait for the vector PIO operation to finish first). Three    *
  943.  * LB registers provide the contents for an outgoing vector PIO         *
  944.  * request packet. Software should wait until the BUSY bit in           *
  945.  * LB_VECTOR_PARMS is clear and then initialize all three of these      *
  946.  * registers before initiating a vector PIO operation. The three        *
  947.  * vector PIO registers are:                                            *
  948.  * LB_VECTOR_ROUTE                                                      *
  949.  * LB_VECTOR_DATA                                                       *
  950.  * LB_VECTOR_PARMS (should be written last)                             *
  951.  *                                                                      *
  952.  ************************************************************************/
  953. #ifdef LITTLE_ENDIAN
  954. typedef union lb_vector_parms_u {
  955. bdrkreg_t lb_vector_parms_regval;
  956. struct  {
  957. bdrkreg_t vp_type                   :  1;
  958. bdrkreg_t       vp_reserved_2             :      2;
  959. bdrkreg_t       vp_address                :     21;
  960. bdrkreg_t       vp_reserved_1             :      8;
  961. bdrkreg_t       vp_write_id               :      8;
  962. bdrkreg_t       vp_pio_id                 :     11;
  963. bdrkreg_t       vp_reserved               :     12;
  964. bdrkreg_t       vp_busy                   :      1;
  965. } lb_vector_parms_fld_s;
  966. } lb_vector_parms_u_t;
  967. #else
  968. typedef union lb_vector_parms_u {
  969. bdrkreg_t lb_vector_parms_regval;
  970. struct {
  971. bdrkreg_t vp_busy   :  1;
  972. bdrkreg_t vp_reserved   : 12;
  973. bdrkreg_t vp_pio_id   : 11;
  974. bdrkreg_t vp_write_id   :  8;
  975. bdrkreg_t vp_reserved_1   :  8;
  976. bdrkreg_t vp_address   : 21;
  977. bdrkreg_t vp_reserved_2   :  2;
  978. bdrkreg_t vp_type   :  1;
  979. } lb_vector_parms_fld_s;
  980. } lb_vector_parms_u_t;
  981. #endif
  982. /************************************************************************
  983.  *                                                                      *
  984.  *  This register contains the vector PIO route. This is one of the 3   *
  985.  * vector PIO control registers.                                        *
  986.  *                                                                      *
  987.  ************************************************************************/
  988. typedef union lb_vector_route_u {
  989. bdrkreg_t lb_vector_route_regval;
  990. struct  {
  991. bdrkreg_t vr_vector                 : 64;
  992. } lb_vector_route_fld_s;
  993. } lb_vector_route_u_t;
  994. /************************************************************************
  995.  *                                                                      *
  996.  *  This register contains the vector PIO write data. This is one of    *
  997.  * the 3 vector PIO control registers. The contents of this register    *
  998.  * also provide the data value to be sent in outgoing vector PIO read   *
  999.  * requests and vector PIO write replies.                               *
  1000.  *                                                                      *
  1001.  ************************************************************************/
  1002. typedef union lb_vector_data_u {
  1003. bdrkreg_t lb_vector_data_regval;
  1004. struct  {
  1005. bdrkreg_t vd_write_data             : 64;
  1006. } lb_vector_data_fld_s;
  1007. } lb_vector_data_u_t;
  1008. /************************************************************************
  1009.  *                                                                      *
  1010.  * Description:  This register contains the vector PIO return status.   *
  1011.  * Software should clear this register before launching a vector PIO    *
  1012.  * request from the LB. The LB will not modify this register's value    *
  1013.  * if an incoming reply packet encounters any kind of error. If an      *
  1014.  * incoming reply packet does not encounter an error but the            *
  1015.  * STATUS_VALID bit is already set, then the LB sets the OVERRUN bit    *
  1016.  * and leaves the other fields unchanged. The LB updates the values     *
  1017.  * of the SOURCE, PIO_ID, WRITE_ID, ADDRESS and TYPE fields only if     *
  1018.  * an incoming vector PIO reply packet does not encounter an error      *
  1019.  * and the STATUS_VALID bit is clear; at the same time, the LB sets     *
  1020.  * the STATUS_VALID bit and will also update the LB_VECTOR_RETURN and   *
  1021.  * LB_VECTOR_READ_DATA registers.                                       *
  1022.  *                                                                      *
  1023.  *                                                                      *
  1024.  ************************************************************************/
  1025. #ifdef LITTLE_ENDIAN
  1026. typedef union lb_vector_status_u {
  1027. bdrkreg_t lb_vector_status_regval;
  1028. struct  {
  1029. bdrkreg_t vs_type                   :  3;
  1030. bdrkreg_t       vs_address                :     21;
  1031. bdrkreg_t       vs_reserved               :      8;
  1032. bdrkreg_t       vs_write_id               :      8;
  1033. bdrkreg_t       vs_pio_id                 :     11;
  1034. bdrkreg_t       vs_source                 :     11;
  1035. bdrkreg_t       vs_overrun                :      1;
  1036. bdrkreg_t       vs_status_valid           :      1;
  1037. } lb_vector_status_fld_s;
  1038. } lb_vector_status_u_t;
  1039. #else
  1040. typedef union lb_vector_status_u {
  1041. bdrkreg_t lb_vector_status_regval;
  1042. struct {
  1043. bdrkreg_t vs_status_valid   :  1;
  1044. bdrkreg_t vs_overrun   :  1;
  1045. bdrkreg_t vs_source   : 11;
  1046. bdrkreg_t vs_pio_id   : 11;
  1047. bdrkreg_t vs_write_id   :  8;
  1048. bdrkreg_t vs_reserved   :  8;
  1049. bdrkreg_t vs_address   : 21;
  1050. bdrkreg_t vs_type   :  3;
  1051. } lb_vector_status_fld_s;
  1052. } lb_vector_status_u_t;
  1053. #endif
  1054. /************************************************************************
  1055.  *                                                                      *
  1056.  *  This register contains the return vector PIO route. The LB will     *
  1057.  * not modify this register's value if an incoming reply packet         *
  1058.  * encounters any kind of error. The LB also will not modify this       *
  1059.  * register's value if the STATUS_VALID bit in the LB_VECTOR_STATUS     *
  1060.  * register is set when it receives an incoming vector PIO reply. The   *
  1061.  * LB stores an incoming vector PIO reply packet's vector route flit    *
  1062.  * in this register only if the packet does not encounter an error      *
  1063.  * and the STATUS_VALID bit is clear.                                   *
  1064.  *                                                                      *
  1065.  ************************************************************************/
  1066. typedef union lb_vector_return_u {
  1067. bdrkreg_t lb_vector_return_regval;
  1068. struct  {
  1069. bdrkreg_t vr_return_vector          : 64;
  1070. } lb_vector_return_fld_s;
  1071. } lb_vector_return_u_t;
  1072. /************************************************************************
  1073.  *                                                                      *
  1074.  *  This register contains the vector PIO read data, if any. The LB     *
  1075.  * will not modify this register's value if an incoming reply packet    *
  1076.  * encounters any kind of error. The LB also will not modify this       *
  1077.  * register's value if the STATUS_VALID bit in the LB_VECTOR_STATUS     *
  1078.  * register is set when it receives an incoming vector PIO reply. The   *
  1079.  * LB stores an incoming vector PIO reply packet's data flit in this    *
  1080.  * register only if the packet does not encounter an error and the      *
  1081.  * STATUS_VALID bit is clear.                                           *
  1082.  *                                                                      *
  1083.  ************************************************************************/
  1084. typedef union lb_vector_read_data_u {
  1085. bdrkreg_t lb_vector_read_data_regval;
  1086. struct  {
  1087. bdrkreg_t vrd_read_data             : 64;
  1088. } lb_vector_read_data_fld_s;
  1089. } lb_vector_read_data_u_t;
  1090. /************************************************************************
  1091.  *                                                                      *
  1092.  * Description:  This register contains the vector PIO return status.   *
  1093.  * Software should clear this register before launching a vector PIO    *
  1094.  * request from the LB. The LB will not modify this register's value    *
  1095.  * if an incoming reply packet encounters any kind of error. If an      *
  1096.  * incoming reply packet does not encounter an error but the            *
  1097.  * STATUS_VALID bit is already set, then the LB sets the OVERRUN bit    *
  1098.  * and leaves the other fields unchanged. The LB updates the values     *
  1099.  * of the SOURCE, PIO_ID, WRITE_ID, ADDRESS and TYPE fields only if     *
  1100.  * an incoming vector PIO reply packet does not encounter an error      *
  1101.  * and the STATUS_VALID bit is clear; at the same time, the LB sets     *
  1102.  * the STATUS_VALID bit and will also update the LB_VECTOR_RETURN and   *
  1103.  * LB_VECTOR_READ_DATA registers.                                       *
  1104.  *                                                                      *
  1105.  *                                                                      *
  1106.  ************************************************************************/
  1107. #ifdef LITTLE_ENDIAN
  1108. typedef union lb_vector_status_clear_u {
  1109. bdrkreg_t lb_vector_status_clear_regval;
  1110. struct  {
  1111. bdrkreg_t vsc_type                  :  3;
  1112. bdrkreg_t       vsc_address               :     21;
  1113. bdrkreg_t       vsc_reserved              :      8;
  1114. bdrkreg_t       vsc_write_id              :      8;
  1115. bdrkreg_t       vsc_pio_id                :     11;
  1116. bdrkreg_t       vsc_source                :     11;
  1117. bdrkreg_t       vsc_overrun               :      1;
  1118. bdrkreg_t       vsc_status_valid          :      1;
  1119. } lb_vector_status_clear_fld_s;
  1120. } lb_vector_status_clear_u_t;
  1121. #else
  1122. typedef union lb_vector_status_clear_u {
  1123. bdrkreg_t lb_vector_status_clear_regval;
  1124. struct {
  1125. bdrkreg_t vsc_status_valid   :  1;
  1126. bdrkreg_t vsc_overrun   :  1;
  1127. bdrkreg_t vsc_source   : 11;
  1128. bdrkreg_t vsc_pio_id   : 11;
  1129. bdrkreg_t vsc_write_id   :  8;
  1130. bdrkreg_t vsc_reserved   :  8;
  1131. bdrkreg_t vsc_address   : 21;
  1132. bdrkreg_t vsc_type   :  3;
  1133. } lb_vector_status_clear_fld_s;
  1134. } lb_vector_status_clear_u_t;
  1135. #endif
  1136. #endif /* __ASSEMBLY__ */
  1137. /************************************************************************
  1138.  *                                                                      *
  1139.  *               MAKE ALL ADDITIONS AFTER THIS LINE                     *
  1140.  *                                                                      *
  1141.  ************************************************************************/
  1142. #endif /* _ASM_IA64_SN_SN1_HUBLB_H */