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

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. #ifndef _ASM_IA64_SN_SN1_HUBLB_NEXT_H
  10. #define _ASM_IA64_SN_SN1_HUBLB_NEXT_H
  11. /**********************************************************************
  12.  This contains some mask and shift values for LB defined as required
  13.  for compatibility.
  14.  **********************************************************************/
  15. #define LRI_SYSTEM_SIZE_SHFT        46
  16. #define LRI_SYSTEM_SIZE_MASK        (UINT64_CAST 0x3 << LRI_SYSTEM_SIZE_SHFT)
  17. #define LRI_NODEID_SHFT        32
  18. #define LRI_NODEID_MASK        (UINT64_CAST 0xff << LRI_NODEID_SHFT)/* Node ID    */
  19. #define LRI_CHIPID_SHFT 12
  20. #define LRI_CHIPID_MASK (UINT64_CAST 0xffff << LRI_CHIPID_SHFT) /* should be 0x3012 */
  21. #define LRI_REV_SHFT        28
  22. #define LRI_REV_MASK        (UINT64_CAST 0xf << LRI_REV_SHFT)/* Chip revision    */
  23. /* Values for LRI_SYSTEM_SIZE */
  24. #define SYSTEM_SIZE_INVALID 0x3
  25. #define SYSTEM_SIZE_NMODE 0x2
  26. #define SYSTEM_SIZE_COARSE  0x1
  27. #define SYSTEM_SIZE_SMALL 0x0
  28. /* In fine mode, each node is a region.  In coarse mode, there are
  29.  * 2 nodes per region.  In N-mode, there are 4 nodes per region. */
  30. #define NASID_TO_FINEREG_SHFT   0
  31. #define NASID_TO_COARSEREG_SHFT 1
  32. #define NASID_TO_NMODEREG_SHFT  2
  33. #define LR_LOCALRESET               (UINT64_CAST 1)
  34. /*
  35.  * LB_VECTOR_PARMS mask and shift definitions.
  36.  * TYPE may be any of the first four PIOTYPEs defined under NI_VECTOR_STATUS.
  37.  */
  38. #define LVP_BUSY (UINT64_CAST 1 << 63)
  39. #define LVP_PIOID_SHFT          40
  40. #define LVP_PIOID_MASK          (UINT64_CAST 0x7ff << 40)
  41. #define LVP_WRITEID_SHFT        32
  42. #define LVP_WRITEID_MASK        (UINT64_CAST 0xff << 32)
  43. #define LVP_ADDRESS_MASK        (UINT64_CAST 0xfffff8)   /* Bits 23:3        */
  44. #define LVP_TYPE_SHFT           0
  45. #define LVP_TYPE_MASK           (UINT64_CAST 0x3)
  46. /* LB_VECTOR_STATUS mask and shift definitions */
  47. #define LVS_VALID               (UINT64_CAST 1 << 63)
  48. #define LVS_OVERRUN             (UINT64_CAST 1 << 62)
  49. #define LVS_TARGET_SHFT         51
  50. #define LVS_TARGET_MASK         (UINT64_CAST 0x7ff << 51)
  51. #define LVS_PIOID_SHFT          40
  52. #define LVS_PIOID_MASK          (UINT64_CAST 0x7ff << 40)
  53. #define LVS_WRITEID_SHFT        32
  54. #define LVS_WRITEID_MASK        (UINT64_CAST 0xff << 32)
  55. #define LVS_ADDRESS_MASK        (UINT64_CAST 0xfffff8)   /* Bits 23:3     */
  56. #define LVS_TYPE_SHFT           0
  57. #define LVS_TYPE_MASK           (UINT64_CAST 0x7)
  58. #define LVS_ERROR_MASK          (UINT64_CAST 0x4)  /* bit set means error */
  59. /* LB_RT_LOCAL_CTRL mask and shift definitions */
  60. #define LRLC_USE_INT_SHFT       32
  61. #define LRLC_USE_INT_MASK       (UINT64_CAST 1 << 32)
  62. #define LRLC_USE_INT            (UINT64_CAST 1 << 32)
  63. #define LRLC_GCLK_SHFT          28
  64. #define LRLC_GCLK_MASK          (UINT64_CAST 1 << 28)
  65. #define LRLC_GCLK               (UINT64_CAST 1 << 28)
  66. #define LRLC_GCLK_COUNT_SHFT    16
  67. #define LRLC_GCLK_COUNT_MASK    (UINT64_CAST 0x3ff << 16)
  68. #define LRLC_MAX_COUNT_SHFT     4
  69. #define LRLC_MAX_COUNT_MASK     (UINT64_CAST 0x3ff << 4)
  70. #define LRLC_GCLK_EN_SHFT       0
  71. #define LRLC_GCLK_EN_MASK       (UINT64_CAST 1)
  72. #define LRLC_GCLK_EN            (UINT64_CAST 1)
  73. /* LB_NODES_ABSENT mask and shift definitions */
  74. #define LNA_VALID_SHFT 15
  75. #define LNA_VALID_MASK (UINT64_CAST 1 << LNA_VALID_SHFT)
  76. #define LNA_VALID (UINT64_CAST 1 << LNA_VALID_SHFT)
  77. #define LNA_NODE_SHFT 0
  78. #define LNA_NODE_MASK (UINT64_CAST 0xff << LNA_NODE_SHFT)
  79. /* LB_NODES_ABSENT has 4 identical sub-registers, on 16-bit boundaries */
  80. #define LNA_ENTRY_SHFT 16
  81. #define LNA_MAX_ENTRIES 4
  82. #define LNA_ADD(_reg, _n) ((_reg) = (_reg) << LNA_ENTRY_SHFT | 
  83.   LNA_VALID | (_n) << LNA_NODE_SHFT)
  84. #define  PIOTYPE_READ           0       /* VECTOR_PARMS and VECTOR_STATUS   */
  85. #define  PIOTYPE_WRITE          1       /* VECTOR_PARMS and VECTOR_STATUS   */
  86. #define  PIOTYPE_UNDEFINED      2       /* VECTOR_PARMS and VECTOR_STATUS   */
  87. /* XXX IP35 doesn't support vector exchange:  scr. regs. do locks directly */
  88. #define  PIOTYPE_EXCHANGE       3       /* VECTOR_PARMS and VECTOR_STATUS   */
  89. #define  PIOTYPE_ADDR_ERR       4       /* VECTOR_STATUS only               */
  90. #define  PIOTYPE_CMD_ERR        5       /* VECTOR_STATUS only               */
  91. #define  PIOTYPE_PROT_ERR       6       /* VECTOR_STATUS only               */
  92. #define  PIOTYPE_UNKNOWN        7       /* VECTOR_STATUS only               */
  93. #endif /* _ASM_IA64_SN_SN1_HUBLB_NEXT_H */