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

嵌入式Linux

开发平台:

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 Silicon Graphics, Inc.
  8.  * Copyright (C) 2000 by Colin Ngam
  9.  */
  10. #ifndef _ASM_SN_SN1_HUBPI_H
  11. #define _ASM_SN_SN1_HUBPI_H
  12. /************************************************************************
  13.  *                                                                      *
  14.  *      WARNING!!!  WARNING!!!  WARNING!!!  WARNING!!!  WARNING!!!      *
  15.  *                                                                      *
  16.  * This file is created by an automated script. Any (minimal) changes   *
  17.  * made manually to this  file should be made with care.                *
  18.  *                                                                      *
  19.  *               MAKE ALL ADDITIONS TO THE END OF THIS FILE             *
  20.  *                                                                      *
  21.  ************************************************************************/
  22. #define    PI_CPU_PROTECT            0x00000000    /* CPU Protection         */
  23. #define    PI_PROT_OVRRD             0x00000008    /*
  24.                                                     * Clear CPU
  25.                                                     * Protection bit in 
  26.                                                     * CPU_PROTECT
  27.                                                     */
  28. #define    PI_IO_PROTECT             0x00000010    /*
  29.                                                     * Interrupt Pending
  30.                                                     * Protection for IO
  31.                                                     * access
  32.                                                     */
  33. #define    PI_REGION_PRESENT         0x00000018    /* Region present         */
  34. #define    PI_CPU_NUM                0x00000020    /* CPU Number ID          */
  35. #define    PI_CALIAS_SIZE            0x00000028    /* Cached Alias Size      */
  36. #define    PI_MAX_CRB_TIMEOUT        0x00000030    /*
  37.                                                     * Maximum Timeout for
  38.                                                     * CRB
  39.                                                     */
  40. #define    PI_CRB_SFACTOR            0x00000038    /*
  41.                                                     * Scale Factor for
  42.                                                     * CRB Timeout
  43.                                                     */
  44. #define    PI_CPU_PRESENT_A          0x00000040    /*
  45.                                                     * CPU Present for
  46.                                                     * CPU_A
  47.                                                     */
  48. #define    PI_CPU_PRESENT_B          0x00000048    /*
  49.                                                     * CPU Present for
  50.                                                     * CPU_B
  51.                                                     */
  52. #define    PI_CPU_ENABLE_A           0x00000050    /*
  53.                                                     * CPU Enable for
  54.                                                     * CPU_A
  55.                                                     */
  56. #define    PI_CPU_ENABLE_B           0x00000058    /*
  57.                                                     * CPU Enable for
  58.                                                     * CPU_B
  59.                                                     */
  60. #define    PI_REPLY_LEVEL            0x00010060    /*
  61.                                                     * Reply FIFO Priority
  62.                                                     * Control
  63.                                                     */
  64. #define    PI_GFX_CREDIT_MODE        0x00020068    /*
  65.                                                     * Graphics Credit
  66.                                                     * Mode
  67.                                                     */
  68. #define    PI_NMI_A                  0x00000070    /*
  69.                                                     * Non-maskable
  70.                                                     * Interrupt to CPU A
  71.                                                     */
  72. #define    PI_NMI_B                  0x00000078    /*
  73.                                                     * Non-maskable
  74.                                                     * Interrupt to CPU B
  75.                                                     */
  76. #define    PI_INT_PEND_MOD           0x00000090    /*
  77.                                                     * Interrupt Pending
  78.                                                     * Modify
  79.                                                     */
  80. #define    PI_INT_PEND0              0x00000098    /* Interrupt Pending 0    */
  81. #define    PI_INT_PEND1              0x000000A0    /* Interrupt Pending 1    */
  82. #define    PI_INT_MASK0_A            0x000000A8    /*
  83.                                                     * Interrupt Mask 0
  84.                                                     * for CPU A
  85.                                                     */
  86. #define    PI_INT_MASK1_A            0x000000B0    /*
  87.                                                     * Interrupt Mask 1
  88.                                                     * for CPU A
  89.                                                     */
  90. #define    PI_INT_MASK0_B            0x000000B8    /*
  91.                                                     * Interrupt Mask 0
  92.                                                     * for CPU B
  93.                                                     */
  94. #define    PI_INT_MASK1_B            0x000000C0    /*
  95.                                                     * Interrupt Mask 1
  96.                                                     * for CPU B
  97.                                                     */
  98. #define    PI_CC_PEND_SET_A          0x000000C8    /*
  99.                                                     * CC Interrupt
  100.                                                     * Pending for CPU A
  101.                                                     */
  102. #define    PI_CC_PEND_SET_B          0x000000D0    /*
  103.                                                     * CC Interrupt
  104.                                                     * Pending for CPU B
  105.                                                     */
  106. #define    PI_CC_PEND_CLR_A          0x000000D8    /*
  107.                                                     * CPU to CPU
  108.                                                     * Interrupt Pending
  109.                                                     * Clear for CPU A
  110.                                                     */
  111. #define    PI_CC_PEND_CLR_B          0x000000E0    /*
  112.                                                     * CPU to CPU
  113.                                                     * Interrupt Pending
  114.                                                     * Clear for CPU B
  115.                                                     */
  116. #define    PI_CC_MASK                0x000000E8    /*
  117.                                                     * Mask of both
  118.                                                     * CC_PENDs
  119.                                                     */
  120. #define    PI_INT_PEND1_REMAP        0x000000F0    /*
  121.                                                     * Remap Interrupt
  122.                                                     * Pending
  123.                                                     */
  124. #define    PI_RT_COUNTER             0x00030100    /* Real Time Counter      */
  125. #define    PI_RT_COMPARE_A           0x00000108    /* Real Time Compare A    */
  126. #define    PI_RT_COMPARE_B           0x00000110    /* Real Time Compare B    */
  127. #define    PI_PROFILE_COMPARE        0x00000118    /* Profiling Compare      */
  128. #define    PI_RT_INT_PEND_A          0x00000120    /*
  129.                                                     * RT interrupt
  130.                                                     * pending
  131.                                                     */
  132. #define    PI_RT_INT_PEND_B          0x00000128    /*
  133.                                                     * RT interrupt
  134.                                                     * pending
  135.                                                     */
  136. #define    PI_PROF_INT_PEND_A        0x00000130    /*
  137.                                                     * Profiling interrupt
  138.                                                     * pending
  139.                                                     */
  140. #define    PI_PROF_INT_PEND_B        0x00000138    /*
  141.                                                     * Profiling interrupt
  142.                                                     * pending
  143.                                                     */
  144. #define    PI_RT_INT_EN_A            0x00000140    /* RT Interrupt Enable    */
  145. #define    PI_RT_INT_EN_B            0x00000148    /* RT Interrupt Enable    */
  146. #define    PI_PROF_INT_EN_A          0x00000150    /*
  147.                                                     * Profiling Interrupt
  148.                                                     * Enable
  149.                                                     */
  150. #define    PI_PROF_INT_EN_B          0x00000158    /*
  151.                                                     * Profiling Interrupt
  152.                                                     * Enable
  153.                                                     */
  154. #define    PI_DEBUG_SEL              0x00000160    /* PI Debug Select        */
  155. #define    PI_INT_PEND_MOD_ALIAS     0x00000180    /*
  156.                                                     * Interrupt Pending
  157.                                                     * Modify
  158.                                                     */
  159. #define    PI_PERF_CNTL_A            0x00040200    /*
  160.                                                     * Performance Counter
  161.                                                     * Control A
  162.                                                     */
  163. #define    PI_PERF_CNTR0_A           0x00040208    /*
  164.                                                     * Performance Counter
  165.                                                     * 0 A
  166.                                                     */
  167. #define    PI_PERF_CNTR1_A           0x00040210    /*
  168.                                                     * Performance Counter
  169.                                                     * 1 A
  170.                                                     */
  171. #define    PI_PERF_CNTL_B            0x00050200    /*
  172.                                                     * Performance Counter
  173.                                                     * Control B
  174.                                                     */
  175. #define    PI_PERF_CNTR0_B           0x00050208    /*
  176.                                                     * Performance Counter
  177.                                                     * 0 B
  178.                                                     */
  179. #define    PI_PERF_CNTR1_B           0x00050210    /*
  180.                                                     * Performance Counter
  181.                                                     * 1 B
  182.                                                     */
  183. #define    PI_GFX_PAGE_A             0x00000300    /* Graphics Page          */
  184. #define    PI_GFX_CREDIT_CNTR_A      0x00000308    /*
  185.                                                     * Graphics Credit
  186.                                                     * Counter
  187.                                                     */
  188. #define    PI_GFX_BIAS_A             0x00000310    /* TRex+ BIAS             */
  189. #define    PI_GFX_INT_CNTR_A         0x00000318    /*
  190.                                                     * Graphics Interrupt
  191.                                                     * Counter
  192.                                                     */
  193. #define    PI_GFX_INT_CMP_A          0x00000320    /*
  194.                                                     * Graphics Interrupt
  195.                                                     * Compare
  196.                                                     */
  197. #define    PI_GFX_PAGE_B             0x00000328    /* Graphics Page          */
  198. #define    PI_GFX_CREDIT_CNTR_B      0x00000330    /*
  199.                                                     * Graphics Credit
  200.                                                     * Counter
  201.                                                     */
  202. #define    PI_GFX_BIAS_B             0x00000338    /* TRex+ BIAS             */
  203. #define    PI_GFX_INT_CNTR_B         0x00000340    /*
  204.                                                     * Graphics Interrupt
  205.                                                     * Counter
  206.                                                     */
  207. #define    PI_GFX_INT_CMP_B          0x00000348    /*
  208.                                                     * Graphics Interrupt
  209.                                                     * Compare
  210.                                                     */
  211. #define    PI_ERR_INT_PEND_WR        0x000003F8    /*
  212.                                                     * Error Interrupt
  213.                                                     * Pending (Writable)
  214.                                                     */
  215. #define    PI_ERR_INT_PEND           0x00000400    /*
  216.                                                     * Error Interrupt
  217.                                                     * Pending
  218.                                                     */
  219. #define    PI_ERR_INT_MASK_A         0x00000408    /*
  220.                                                     * Error Interrupt
  221.                                                     * Mask CPU_A
  222.                                                     */
  223. #define    PI_ERR_INT_MASK_B         0x00000410    /*
  224.                                                     * Error Interrupt
  225.                                                     * Mask CPU_B
  226.                                                     */
  227. #define    PI_ERR_STACK_ADDR_A       0x00000418    /*
  228.                                                     * Error Stack Address
  229.                                                     * Pointer
  230.                                                     */
  231. #define    PI_ERR_STACK_ADDR_B       0x00000420    /*
  232.                                                     * Error Stack Address
  233.                                                     * Pointer
  234.                                                     */
  235. #define    PI_ERR_STACK_SIZE         0x00000428    /* Error Stack Size       */
  236. #define    PI_ERR_STATUS0_A          0x00000430    /* Error Status 0         */
  237. #define    PI_ERR_STATUS0_A_CLR      0x00000438    /* Error Status 0         */
  238. #define    PI_ERR_STATUS1_A          0x00000440    /* Error Status 1         */
  239. #define    PI_ERR_STATUS1_A_CLR      0x00000448    /* Error Status 1         */
  240. #define    PI_ERR_STATUS0_B          0x00000450    /* Error Status 0         */
  241. #define    PI_ERR_STATUS0_B_CLR      0x00000458    /* Error Status 0         */
  242. #define    PI_ERR_STATUS1_B          0x00000460    /* Error Status 1         */
  243. #define    PI_ERR_STATUS1_B_CLR      0x00000468    /* Error Status 1         */
  244. #define    PI_SPOOL_CMP_A            0x00000470    /* Spool Compare          */
  245. #define    PI_SPOOL_CMP_B            0x00000478    /* Spool Compare          */
  246. #define    PI_CRB_TIMEOUT_A          0x00000480    /*
  247.                                                     * CRB entries which
  248.                                                     * have timed out but
  249.                                                     * are still valid
  250.                                                     */
  251. #define    PI_CRB_TIMEOUT_B          0x00000488    /*
  252.                                                     * CRB entries which
  253.                                                     * have timed out but
  254.                                                     * are still valid
  255.                                                     */
  256. #define    PI_SYSAD_ERRCHK_EN        0x00000490    /*
  257.                                                     * enables
  258.                                                     * sysad/cmd/state
  259.                                                     * error checking
  260.                                                     */
  261. #define    PI_FORCE_BAD_CHECK_BIT_A  0x00000498    /*
  262.                                                     * force SysAD Check
  263.                                                     * Bit error
  264.                                                     */
  265. #define    PI_FORCE_BAD_CHECK_BIT_B  0x000004A0    /*
  266.                                                     * force SysAD Check
  267.                                                     * Bit error
  268.                                                     */
  269. #define    PI_NACK_CNT_A             0x000004A8    /*
  270.                                                     * consecutive NACK
  271.                                                     * counter
  272.                                                     */
  273. #define    PI_NACK_CNT_B             0x000004B0    /*
  274.                                                     * consecutive NACK
  275.                                                     * counter
  276.                                                     */
  277. #define    PI_NACK_CMP               0x000004B8    /* NACK count compare     */
  278. #define    PI_SPOOL_MASK             0x000004C0    /* Spool error mask       */
  279. #define    PI_SPURIOUS_HDR_0         0x000004C8    /* Spurious Error 0       */
  280. #define    PI_SPURIOUS_HDR_1         0x000004D0    /* Spurious Error 1       */
  281. #define    PI_ERR_INJECT             0x000004D8    /*
  282.                                                     * SysAD bus error
  283.                                                     * injection
  284.                                                     */
  285. #ifdef _LANGUAGE_C
  286. /************************************************************************
  287.  *                                                                      *
  288.  * Description:  This read/write register determines on a               *
  289.  * bit-per-region basis whether incoming CPU-initiated PIO Read and     *
  290.  * Write to local PI registers are allowed. If access is allowed, the   *
  291.  * PI's response to a partial read is a PRPLY message, and the          *
  292.  * response to a partial write is a PACK message. If access is not      *
  293.  * allowed, the PI's response to a partial read is a PRERR message,     *
  294.  * and the response to a partial write is a PWERR message.              *
  295.  * This register is not reset by a soft reset.                          *
  296.  *                                                                      *
  297.  ************************************************************************/
  298. typedef union pi_cpu_protect_u {
  299. bdrkreg_t pi_cpu_protect_regval;
  300. struct  {
  301. bdrkreg_t cp_cpu_protect            : 64;
  302. } pi_cpu_protect_fld_s;
  303. } pi_cpu_protect_u_t;
  304. /************************************************************************
  305.  *                                                                      *
  306.  *  A write with a special data pattern allows any CPU to set its       *
  307.  * region's bit in CPU_PROTECT. This register has data pattern          *
  308.  * protection.                                                          *
  309.  *                                                                      *
  310.  ************************************************************************/
  311. typedef union pi_prot_ovrrd_u {
  312. bdrkreg_t pi_prot_ovrrd_regval;
  313. struct  {
  314. bdrkreg_t po_prot_ovrrd             : 64;
  315. } pi_prot_ovrrd_fld_s;
  316. } pi_prot_ovrrd_u_t;
  317. /************************************************************************
  318.  *                                                                      *
  319.  * Description:  This read/write register determines on a               *
  320.  * bit-per-region basis whether incoming IO-initiated interrupts are    *
  321.  * allowed to set bits in INT_PEND0 and INT_PEND1. If access is         *
  322.  * allowed, the PI's response to a partial read is a PRPLY message,     *
  323.  * and the response to a partial write is a PACK message. If access     *
  324.  * is not allowed, the PI's response to a partial read is a PRERR       *
  325.  * message, and the response to a partial write is a PWERR message.     *
  326.  * This register is not reset by a soft reset.                          *
  327.  *                                                                      *
  328.  ************************************************************************/
  329. typedef union pi_io_protect_u {
  330. bdrkreg_t pi_io_protect_regval;
  331. struct  {
  332. bdrkreg_t ip_io_protect             : 64;
  333. } pi_io_protect_fld_s;
  334. } pi_io_protect_u_t;
  335. /************************************************************************
  336.  *                                                                      *
  337.  * Description:  This read/write register determines on a               *
  338.  * bit-per-region basis whether read access from a local processor to   *
  339.  * the region is permissible. For example, setting a bit to 0           *
  340.  * prevents speculative reads to that non-existent node. If a read      *
  341.  * request to a non-present region occurs, an ERR response is issued    *
  342.  * to the TRex+ (no PI error registers are modified). It is up to       *
  343.  * software to load this register with the proper contents.             *
  344.  * Region-present checking is only done for coherent read requests -    *
  345.  * partial reads/writes will be issued to a non-present region. The     *
  346.  * setting of these bits does not affect a node's access to its         *
  347.  * CALIAS space.                                                        *
  348.  * This register is not reset by a soft reset.                          *
  349.  *                                                                      *
  350.  ************************************************************************/
  351. typedef union pi_region_present_u {
  352. bdrkreg_t pi_region_present_regval;
  353. struct  {
  354. bdrkreg_t rp_region_present         : 64;
  355. } pi_region_present_fld_s;
  356. } pi_region_present_u_t;
  357. /************************************************************************
  358.  *                                                                      *
  359.  *  A read to the location will allow a CPU to identify itself as       *
  360.  * either CPU_A or CPU_B, and will indicate whether the CPU is          *
  361.  * connected to PI 0 or PI 1.                                           *
  362.  *                                                                      *
  363.  ************************************************************************/
  364. #ifdef LITTLE_ENDIAN
  365. typedef union pi_cpu_num_u {
  366. bdrkreg_t pi_cpu_num_regval;
  367. struct  {
  368. bdrkreg_t cn_cpu_num                :  1;
  369.                 bdrkreg_t       cn_pi_id                  :      1;
  370.                 bdrkreg_t       cn_rsvd                   :     62;
  371. } pi_cpu_num_fld_s;
  372. } pi_cpu_num_u_t;
  373. #else
  374. typedef union pi_cpu_num_u {
  375. bdrkreg_t pi_cpu_num_regval;
  376. struct {
  377. bdrkreg_t cn_rsvd   : 62;
  378. bdrkreg_t cn_pi_id   :  1;
  379. bdrkreg_t cn_cpu_num   :  1;
  380. } pi_cpu_num_fld_s;
  381. } pi_cpu_num_u_t;
  382. #endif
  383. /************************************************************************
  384.  *                                                                      *
  385.  * Description:  This read/write location determines the size of the    *
  386.  * Calias Space.                                                        *
  387.  * This register is not reset by a soft reset.                          *
  388.  * NOTE: For predictable behavior, all Calias spaces in a system must   *
  389.  * be set to the same size.                                             *
  390.  *                                                                      *
  391.  ************************************************************************/
  392. #ifdef LITTLE_ENDIAN
  393. typedef union pi_calias_size_u {
  394. bdrkreg_t pi_calias_size_regval;
  395. struct  {
  396. bdrkreg_t cs_calias_size            :  4;
  397. bdrkreg_t       cs_rsvd                   :     60;
  398. } pi_calias_size_fld_s;
  399. } pi_calias_size_u_t;
  400. #else
  401. typedef union pi_calias_size_u {
  402. bdrkreg_t pi_calias_size_regval;
  403. struct {
  404. bdrkreg_t cs_rsvd   : 60;
  405. bdrkreg_t cs_calias_size   :  4;
  406. } pi_calias_size_fld_s;
  407. } pi_calias_size_u_t;
  408. #endif
  409. /************************************************************************
  410.  *                                                                      *
  411.  *  This Read/Write location determines at which value (increment)      *
  412.  * the CRB Timeout Counters cause a timeout error to occur. See         *
  413.  * Section 3.4.2.2, "Time-outs in RRB and WRB" in the         *
  414.  * Processor Interface chapter, volume 1 of this document for more      *
  415.  * details.                                                             *
  416.  *                                                                      *
  417.  ************************************************************************/
  418. #ifdef LITTLE_ENDIAN
  419. typedef union pi_max_crb_timeout_u {
  420. bdrkreg_t pi_max_crb_timeout_regval;
  421. struct  {
  422. bdrkreg_t mct_max_timeout           :  8;
  423. bdrkreg_t       mct_rsvd                  :     56;
  424. } pi_max_crb_timeout_fld_s;
  425. } pi_max_crb_timeout_u_t;
  426. #else
  427. typedef union pi_max_crb_timeout_u {
  428. bdrkreg_t pi_max_crb_timeout_regval;
  429. struct {
  430. bdrkreg_t mct_rsvd   : 56;
  431. bdrkreg_t mct_max_timeout   :  8;
  432. } pi_max_crb_timeout_fld_s;
  433. } pi_max_crb_timeout_u_t;
  434. #endif
  435. /************************************************************************
  436.  *                                                                      *
  437.  *  This Read/Write location determines how often a valid CRB's         *
  438.  * Timeout Counter is incremented. See Section 3.4.2.2,                 *
  439.  * "Time-outs in RRB and WRB" in the Processor Interface      *
  440.  * chapter, volume 1 of this document for more details.                 *
  441.  *                                                                      *
  442.  ************************************************************************/
  443. #ifdef LITTLE_ENDIAN
  444. typedef union pi_crb_sfactor_u {
  445. bdrkreg_t pi_crb_sfactor_regval;
  446. struct  {
  447. bdrkreg_t cs_sfactor                : 24;
  448. bdrkreg_t       cs_rsvd                   :     40;
  449. } pi_crb_sfactor_fld_s;
  450. } pi_crb_sfactor_u_t;
  451. #else
  452. typedef union pi_crb_sfactor_u {
  453. bdrkreg_t pi_crb_sfactor_regval;
  454. struct {
  455. bdrkreg_t cs_rsvd   : 40;
  456. bdrkreg_t cs_sfactor   : 24;
  457. } pi_crb_sfactor_fld_s;
  458. } pi_crb_sfactor_u_t;
  459. #endif
  460. /************************************************************************
  461.  *                                                                      *
  462.  *  There is one of these registers for each CPU. The PI sets this      *
  463.  * bit when it sees the first transaction initiated by the associated   *
  464.  * CPU.                                                                 *
  465.  *                                                                      *
  466.  ************************************************************************/
  467. #ifdef LITTLE_ENDIAN
  468. typedef union pi_cpu_present_a_u {
  469. bdrkreg_t pi_cpu_present_a_regval;
  470. struct  {
  471. bdrkreg_t cpa_cpu_present           :  1;
  472. bdrkreg_t       cpa_rsvd                  :     63;
  473. } pi_cpu_present_a_fld_s;
  474. } pi_cpu_present_a_u_t;
  475. #else
  476. typedef union pi_cpu_present_a_u {
  477. bdrkreg_t pi_cpu_present_a_regval;
  478. struct {
  479. bdrkreg_t cpa_rsvd   : 63;
  480. bdrkreg_t cpa_cpu_present   :  1;
  481. } pi_cpu_present_a_fld_s;
  482. } pi_cpu_present_a_u_t;
  483. #endif
  484. /************************************************************************
  485.  *                                                                      *
  486.  *  There is one of these registers for each CPU. The PI sets this      *
  487.  * bit when it sees the first transaction initiated by the associated   *
  488.  * CPU.                                                                 *
  489.  *                                                                      *
  490.  ************************************************************************/
  491. #ifdef LITTLE_ENDIAN
  492. typedef union pi_cpu_present_b_u {
  493. bdrkreg_t pi_cpu_present_b_regval;
  494. struct  {
  495. bdrkreg_t cpb_cpu_present           :  1;
  496. bdrkreg_t       cpb_rsvd                  :     63;
  497. } pi_cpu_present_b_fld_s;
  498. } pi_cpu_present_b_u_t;
  499. #else
  500. typedef union pi_cpu_present_b_u {
  501. bdrkreg_t pi_cpu_present_b_regval;
  502. struct {
  503. bdrkreg_t cpb_rsvd   : 63;
  504. bdrkreg_t cpb_cpu_present   :  1;
  505. } pi_cpu_present_b_fld_s;
  506. } pi_cpu_present_b_u_t;
  507. #endif
  508. /************************************************************************
  509.  *                                                                      *
  510.  * Description:  There is one of these registers for each CPU. This     *
  511.  * Read/Write location determines whether the associated CPU is         *
  512.  * enabled to issue external requests. When this bit is zero for a      *
  513.  * processor, the PI ignores SysReq_L from that processor, and so       *
  514.  * never grants it the bus.                                             *
  515.  * This register is not reset by a soft reset.                          *
  516.  *                                                                      *
  517.  ************************************************************************/
  518. #ifdef LITTLE_ENDIAN
  519. typedef union pi_cpu_enable_a_u {
  520. bdrkreg_t pi_cpu_enable_a_regval;
  521. struct  {
  522. bdrkreg_t cea_cpu_enable            :  1;
  523. bdrkreg_t       cea_rsvd                  :     63;
  524. } pi_cpu_enable_a_fld_s;
  525. } pi_cpu_enable_a_u_t;
  526. #else
  527. typedef union pi_cpu_enable_a_u {
  528. bdrkreg_t pi_cpu_enable_a_regval;
  529. struct {
  530. bdrkreg_t cea_rsvd   : 63;
  531. bdrkreg_t cea_cpu_enable   :  1;
  532. } pi_cpu_enable_a_fld_s;
  533. } pi_cpu_enable_a_u_t;
  534. #endif
  535. /************************************************************************
  536.  *                                                                      *
  537.  * Description:  There is one of these registers for each CPU. This     *
  538.  * Read/Write location determines whether the associated CPU is         *
  539.  * enabled to issue external requests. When this bit is zero for a      *
  540.  * processor, the PI ignores SysReq_L from that processor, and so       *
  541.  * never grants it the bus.                                             *
  542.  * This register is not reset by a soft reset.                          *
  543.  *                                                                      *
  544.  ************************************************************************/
  545. #ifdef LITTLE_ENDIAN
  546. typedef union pi_cpu_enable_b_u {
  547. bdrkreg_t pi_cpu_enable_b_regval;
  548. struct  {
  549. bdrkreg_t ceb_cpu_enable            :  1;
  550. bdrkreg_t       ceb_rsvd                  :     63;
  551. } pi_cpu_enable_b_fld_s;
  552. } pi_cpu_enable_b_u_t;
  553. #else
  554. typedef union pi_cpu_enable_b_u {
  555. bdrkreg_t pi_cpu_enable_b_regval;
  556. struct {
  557. bdrkreg_t ceb_rsvd   : 63;
  558. bdrkreg_t ceb_cpu_enable   :  1;
  559. } pi_cpu_enable_b_fld_s;
  560. } pi_cpu_enable_b_u_t;
  561. #endif
  562. /************************************************************************
  563.  *                                                                      *
  564.  *  There is one of these registers for each CPU. A write to this       *
  565.  * location will cause an NMI to be issued to the CPU.                  *
  566.  *                                                                      *
  567.  ************************************************************************/
  568. typedef union pi_nmi_a_u {
  569. bdrkreg_t pi_nmi_a_regval;
  570. struct  {
  571. bdrkreg_t na_nmi_cpu                : 64;
  572. } pi_nmi_a_fld_s;
  573. } pi_nmi_a_u_t;
  574. /************************************************************************
  575.  *                                                                      *
  576.  *  There is one of these registers for each CPU. A write to this       *
  577.  * location will cause an NMI to be issued to the CPU.                  *
  578.  *                                                                      *
  579.  ************************************************************************/
  580. typedef union pi_nmi_b_u {
  581. bdrkreg_t pi_nmi_b_regval;
  582. struct  {
  583. bdrkreg_t nb_nmi_cpu                : 64;
  584. } pi_nmi_b_fld_s;
  585. } pi_nmi_b_u_t;
  586. /************************************************************************
  587.  *                                                                      *
  588.  *  A write to this register allows a single bit in the INT_PEND0 or    *
  589.  * INT_PEND1 registers to be set or cleared. If 6 is clear, a bit is    *
  590.  * modified in INT_PEND0, while if 6 is set, a bit is modified in       *
  591.  * INT_PEND1. The value in 5:0 (ranging from 63 to 0) will determine    *
  592.  * which bit in the register is effected. The value of 8 will           *
  593.  * determine whether the desired bit is set (8=1) or cleared (8=0).     *
  594.  * This is the only register which is accessible by IO issued PWRI      *
  595.  * command and is protected through the IO_PROTECT register. If the     *
  596.  * region bit in the IO_PROTECT is not set then a WERR reply is         *
  597.  * issued. CPU access is controlled through CPU_PROTECT. The contents   *
  598.  * of this register are masked with the contents of INT_MASK_A          *
  599.  * (INT_MASK_B) to determine whether an L2 interrupt is issued to       *
  600.  * CPU_A (CPU_B).                                                       *
  601.  *                                                                      *
  602.  ************************************************************************/
  603. #ifdef LITTLE_ENDIAN
  604. typedef union pi_int_pend_mod_u {
  605. bdrkreg_t pi_int_pend_mod_regval;
  606. struct  {
  607. bdrkreg_t ipm_bit_select            :  6;
  608.                 bdrkreg_t       ipm_reg_select            :      1;
  609.                 bdrkreg_t       ipm_rsvd_1                :      1;
  610.                 bdrkreg_t       ipm_value                 :      1;
  611.                 bdrkreg_t       ipm_rsvd                  :     55;
  612. } pi_int_pend_mod_fld_s;
  613. } pi_int_pend_mod_u_t;
  614. #else
  615. typedef union pi_int_pend_mod_u {
  616. bdrkreg_t pi_int_pend_mod_regval;
  617. struct {
  618. bdrkreg_t ipm_rsvd   : 55;
  619. bdrkreg_t ipm_value   :  1;
  620. bdrkreg_t ipm_rsvd_1   :  1;
  621. bdrkreg_t ipm_reg_select   :  1;
  622. bdrkreg_t ipm_bit_select   :  6;
  623. } pi_int_pend_mod_fld_s;
  624. } pi_int_pend_mod_u_t;
  625. #endif
  626. /************************************************************************
  627.  *                                                                      *
  628.  *  This read-only register provides information about interrupts       *
  629.  * that are currently pending. The interrupts in this register map to   *
  630.  * interrupt level 2 (L2). The GFX_INT_A/B bits are set by hardware     *
  631.  * but must be cleared by software.                                     *
  632.  *                                                                      *
  633.  ************************************************************************/
  634. #ifdef LITTLE_ENDIAN
  635. typedef union pi_int_pend0_u {
  636. bdrkreg_t pi_int_pend0_regval;
  637. struct  {
  638. bdrkreg_t ip_int_pend0_lo           :  1;
  639.                 bdrkreg_t       ip_gfx_int_a              :      1;
  640.                 bdrkreg_t       ip_gfx_int_b              :      1;
  641.                 bdrkreg_t       ip_page_migration         :      1;
  642.                 bdrkreg_t       ip_uart_ucntrl            :      1;
  643.                 bdrkreg_t       ip_or_cc_pend_a           :      1;
  644.                 bdrkreg_t       ip_or_cc_pend_b           :      1;
  645.                 bdrkreg_t       ip_int_pend0_hi           :     57;
  646. } pi_int_pend0_fld_s;
  647. } pi_int_pend0_u_t;
  648. #else
  649. typedef union pi_int_pend0_u {
  650. bdrkreg_t pi_int_pend0_regval;
  651. struct {
  652. bdrkreg_t ip_int_pend0_hi   : 57;
  653. bdrkreg_t ip_or_cc_pend_b   :  1;
  654. bdrkreg_t ip_or_cc_pend_a   :  1;
  655. bdrkreg_t ip_uart_ucntrl   :  1;
  656. bdrkreg_t ip_page_migration   :  1;
  657. bdrkreg_t ip_gfx_int_b   :  1;
  658. bdrkreg_t ip_gfx_int_a   :  1;
  659. bdrkreg_t ip_int_pend0_lo   :  1;
  660. } pi_int_pend0_fld_s;
  661. } pi_int_pend0_u_t;
  662. #endif
  663. /************************************************************************
  664.  *                                                                      *
  665.  *  This read-only register provides information about interrupts       *
  666.  * that are currently pending. The interrupts in this register map to   *
  667.  * interrupt level 3 (L3), unless remapped by the INT_PEND1_REMAP       *
  668.  * register. The SYS_COR_ERR_A/B, RTC_DROP_OUT, and NACK_INT_A/B bits   *
  669.  * are set by hardware but must be cleared by software. The             *
  670.  * SYSTEM_SHUTDOWN, NI_ERROR, LB_ERROR and XB_ERROR bits just reflect   *
  671.  * the value of other logic, and cannot be changed by PI register       *
  672.  * writes.                                                              *
  673.  *                                                                      *
  674.  ************************************************************************/
  675. #ifdef LITTLE_ENDIAN
  676. typedef union pi_int_pend1_u {
  677. bdrkreg_t pi_int_pend1_regval;
  678. struct  {
  679. bdrkreg_t ip_int_pend1              : 54;
  680.                 bdrkreg_t       ip_xb_error               :      1;
  681.                 bdrkreg_t       ip_lb_error               :      1;
  682.                 bdrkreg_t       ip_nack_int_a             :      1;
  683.                 bdrkreg_t       ip_nack_int_b             :      1;
  684.                 bdrkreg_t       ip_perf_cntr_oflow        :      1;
  685.                 bdrkreg_t       ip_sys_cor_err_b          :      1;
  686.                 bdrkreg_t       ip_sys_cor_err_a          :      1;
  687.                 bdrkreg_t       ip_md_corr_error          :      1;
  688.                 bdrkreg_t       ip_ni_error               :      1;
  689.                 bdrkreg_t       ip_system_shutdown        :      1;
  690. } pi_int_pend1_fld_s;
  691. } pi_int_pend1_u_t;
  692. #else
  693. typedef union pi_int_pend1_u {
  694. bdrkreg_t pi_int_pend1_regval;
  695. struct {
  696. bdrkreg_t ip_system_shutdown   :  1;
  697. bdrkreg_t ip_ni_error   :  1;
  698. bdrkreg_t ip_md_corr_error   :  1;
  699. bdrkreg_t ip_sys_cor_err_a   :  1;
  700. bdrkreg_t ip_sys_cor_err_b   :  1;
  701. bdrkreg_t ip_perf_cntr_oflow   :  1;
  702. bdrkreg_t ip_nack_int_b   :  1;
  703. bdrkreg_t ip_nack_int_a   :  1;
  704. bdrkreg_t ip_lb_error   :  1;
  705. bdrkreg_t ip_xb_error   :  1;
  706. bdrkreg_t ip_int_pend1   : 54;
  707. } pi_int_pend1_fld_s;
  708. } pi_int_pend1_u_t;
  709. #endif
  710. /************************************************************************
  711.  *                                                                      *
  712.  *  This read/write register masks the contents of INT_PEND0 to         *
  713.  * determine whether an L2 interrupt (bit 10 of the processor's Cause   *
  714.  * register) is sent to CPU_A if the same bit in the INT_PEND0          *
  715.  * register is also set. Only one processor in a Bedrock should         *
  716.  * enable the PAGE_MIGRATION bit/interrupt.                             *
  717.  *                                                                      *
  718.  ************************************************************************/
  719. #ifdef LITTLE_ENDIAN
  720. typedef union pi_int_mask0_a_u {
  721. bdrkreg_t pi_int_mask0_a_regval;
  722. struct  {
  723. bdrkreg_t ima_int_mask0_lo          :  1;
  724.                 bdrkreg_t       ima_gfx_int_a             :      1;
  725.                 bdrkreg_t       ima_gfx_int_b             :      1;
  726.                 bdrkreg_t       ima_page_migration        :      1;
  727.                 bdrkreg_t       ima_uart_ucntrl           :      1;
  728.                 bdrkreg_t       ima_or_ccp_mask_a         :      1;
  729.                 bdrkreg_t       ima_or_ccp_mask_b         :      1;
  730.                 bdrkreg_t       ima_int_mask0_hi          :     57;
  731. } pi_int_mask0_a_fld_s;
  732. } pi_int_mask0_a_u_t;
  733. #else
  734. typedef union pi_int_mask0_a_u {
  735. bdrkreg_t pi_int_mask0_a_regval;
  736. struct {
  737. bdrkreg_t ima_int_mask0_hi   : 57;
  738. bdrkreg_t ima_or_ccp_mask_b   :  1;
  739. bdrkreg_t ima_or_ccp_mask_a   :  1;
  740. bdrkreg_t ima_uart_ucntrl   :  1;
  741. bdrkreg_t ima_page_migration   :  1;
  742. bdrkreg_t ima_gfx_int_b   :  1;
  743. bdrkreg_t ima_gfx_int_a   :  1;
  744. bdrkreg_t ima_int_mask0_lo   :  1;
  745. } pi_int_mask0_a_fld_s;
  746. } pi_int_mask0_a_u_t;
  747. #endif
  748. /************************************************************************
  749.  *                                                                      *
  750.  *  This read/write register masks the contents of INT_PEND1 to         *
  751.  * determine whether an interrupt should be sent. Bits 63:32 always     *
  752.  * generate an L3 interrupt (bit 11 of the processor's Cause            *
  753.  * register) is sent to CPU_A if the same bit in the INT_PEND1          *
  754.  * register is set. Bits 31:0 can generate either an L3 or L2           *
  755.  * interrupt, depending on the value of INT_PEND1_REMAP[3:0]. Only      *
  756.  * one processor in a Bedrock should enable the NI_ERROR, LB_ERROR,     *
  757.  * XB_ERROR and MD_CORR_ERROR bits.                                     *
  758.  *                                                                      *
  759.  ************************************************************************/
  760. typedef union pi_int_mask1_a_u {
  761. bdrkreg_t pi_int_mask1_a_regval;
  762. struct  {
  763. bdrkreg_t ima_int_mask1             : 64;
  764. } pi_int_mask1_a_fld_s;
  765. } pi_int_mask1_a_u_t;
  766. /************************************************************************
  767.  *                                                                      *
  768.  *  This read/write register masks the contents of INT_PEND0 to         *
  769.  * determine whether an L2 interrupt (bit 10 of the processor's Cause   *
  770.  * register) is sent to CPU_B if the same bit in the INT_PEND0          *
  771.  * register is also set. Only one processor in a Bedrock should         *
  772.  * enable the PAGE_MIGRATION bit/interrupt.                             *
  773.  *                                                                      *
  774.  ************************************************************************/
  775. #ifdef LITTLE_ENDIAN
  776. typedef union pi_int_mask0_b_u {
  777. bdrkreg_t pi_int_mask0_b_regval;
  778. struct  {
  779. bdrkreg_t imb_int_mask0_lo          :  1;
  780.                 bdrkreg_t       imb_gfx_int_a             :      1;
  781.                 bdrkreg_t       imb_gfx_int_b             :      1;
  782.                 bdrkreg_t       imb_page_migration        :      1;
  783.                 bdrkreg_t       imb_uart_ucntrl           :      1;
  784.                 bdrkreg_t       imb_or_ccp_mask_a         :      1;
  785.                 bdrkreg_t       imb_or_ccp_mask_b         :      1;
  786.                 bdrkreg_t       imb_int_mask0_hi          :     57;
  787. } pi_int_mask0_b_fld_s;
  788. } pi_int_mask0_b_u_t;
  789. #else
  790. typedef union pi_int_mask0_b_u {
  791. bdrkreg_t pi_int_mask0_b_regval;
  792. struct {
  793. bdrkreg_t imb_int_mask0_hi   : 57;
  794. bdrkreg_t imb_or_ccp_mask_b   :  1;
  795. bdrkreg_t imb_or_ccp_mask_a   :  1;
  796. bdrkreg_t imb_uart_ucntrl   :  1;
  797. bdrkreg_t imb_page_migration   :  1;
  798. bdrkreg_t imb_gfx_int_b   :  1;
  799. bdrkreg_t imb_gfx_int_a   :  1;
  800. bdrkreg_t imb_int_mask0_lo   :  1;
  801. } pi_int_mask0_b_fld_s;
  802. } pi_int_mask0_b_u_t;
  803. #endif
  804. /************************************************************************
  805.  *                                                                      *
  806.  *  This read/write register masks the contents of INT_PEND1 to         *
  807.  * determine whether an interrupt should be sent. Bits 63:32 always     *
  808.  * generate an L3 interrupt (bit 11 of the processor's Cause            *
  809.  * register) is sent to CPU_B if the same bit in the INT_PEND1          *
  810.  * register is set. Bits 31:0 can generate either an L3 or L2           *
  811.  * interrupt, depending on the value of INT_PEND1_REMAP[3:0]. Only      *
  812.  * one processor in a Bedrock should enable the NI_ERROR, LB_ERROR,     *
  813.  * XB_ERROR and MD_CORR_ERROR bits.                                     *
  814.  *                                                                      *
  815.  ************************************************************************/
  816. typedef union pi_int_mask1_b_u {
  817. bdrkreg_t pi_int_mask1_b_regval;
  818. struct  {
  819. bdrkreg_t imb_int_mask1             : 64;
  820. } pi_int_mask1_b_fld_s;
  821. } pi_int_mask1_b_u_t;
  822. /************************************************************************
  823.  *                                                                      *
  824.  *  There is one of these registers for each CPU. These registers do    *
  825.  * not have access protection. A store to this location by a CPU will   *
  826.  * cause the bit corresponding to the source's region to be set in      *
  827.  * CC_PEND_A (or CC_PEND_B). The contents of CC_PEND_A (or CC_PEND_B)   *
  828.  * determines on a bit-per-region basis whether a CPU-to-CPU            *
  829.  * interrupt is pending CPU_A (or CPU_B).                               *
  830.  *                                                                      *
  831.  ************************************************************************/
  832. typedef union pi_cc_pend_set_a_u {
  833. bdrkreg_t pi_cc_pend_set_a_regval;
  834. struct  {
  835. bdrkreg_t cpsa_cc_pend              : 64;
  836. } pi_cc_pend_set_a_fld_s;
  837. } pi_cc_pend_set_a_u_t;
  838. /************************************************************************
  839.  *                                                                      *
  840.  *  There is one of these registers for each CPU. These registers do    *
  841.  * not have access protection. A store to this location by a CPU will   *
  842.  * cause the bit corresponding to the source's region to be set in      *
  843.  * CC_PEND_A (or CC_PEND_B). The contents of CC_PEND_A (or CC_PEND_B)   *
  844.  * determines on a bit-per-region basis whether a CPU-to-CPU            *
  845.  * interrupt is pending CPU_A (or CPU_B).                               *
  846.  *                                                                      *
  847.  ************************************************************************/
  848. typedef union pi_cc_pend_set_b_u {
  849. bdrkreg_t pi_cc_pend_set_b_regval;
  850. struct  {
  851. bdrkreg_t cpsb_cc_pend              : 64;
  852. } pi_cc_pend_set_b_fld_s;
  853. } pi_cc_pend_set_b_u_t;
  854. /************************************************************************
  855.  *                                                                      *
  856.  *  There is one of these registers for each CPU. Reading this          *
  857.  * location will return the contents of CC_PEND_A (or CC_PEND_B).       *
  858.  * Writing this location will clear the bits corresponding to which     *
  859.  * data bits are driven high during the store; therefore, storing all   *
  860.  * ones would clear all bits.                                           *
  861.  *                                                                      *
  862.  ************************************************************************/
  863. typedef union pi_cc_pend_clr_a_u {
  864. bdrkreg_t pi_cc_pend_clr_a_regval;
  865. struct  {
  866. bdrkreg_t cpca_cc_pend              : 64;
  867. } pi_cc_pend_clr_a_fld_s;
  868. } pi_cc_pend_clr_a_u_t;
  869. /************************************************************************
  870.  *                                                                      *
  871.  *  There is one of these registers for each CPU. Reading this          *
  872.  * location will return the contents of CC_PEND_A (or CC_PEND_B).       *
  873.  * Writing this location will clear the bits corresponding to which     *
  874.  * data bits are driven high during the store; therefore, storing all   *
  875.  * ones would clear all bits.                                           *
  876.  *                                                                      *
  877.  ************************************************************************/
  878. typedef union pi_cc_pend_clr_b_u {
  879. bdrkreg_t pi_cc_pend_clr_b_regval;
  880. struct  {
  881. bdrkreg_t cpcb_cc_pend              : 64;
  882. } pi_cc_pend_clr_b_fld_s;
  883. } pi_cc_pend_clr_b_u_t;
  884. /************************************************************************
  885.  *                                                                      *
  886.  *  This read/write register masks the contents of both CC_PEND_A and   *
  887.  * CC_PEND_B.                                                           *
  888.  *                                                                      *
  889.  ************************************************************************/
  890. typedef union pi_cc_mask_u {
  891. bdrkreg_t pi_cc_mask_regval;
  892. struct  {
  893. bdrkreg_t cm_cc_mask                : 64;
  894. } pi_cc_mask_fld_s;
  895. } pi_cc_mask_u_t;
  896. /************************************************************************
  897.  *                                                                      *
  898.  *  This read/write register redirects INT_PEND1[31:0] from L3 to L2    *
  899.  * interrupt level.Bit 4 in this register is used to enable error       *
  900.  * interrupt forwarding to the II. When this bit is set, if any of      *
  901.  * the three memory interrupts (correctable error, uncorrectable        *
  902.  * error, or page migration), or the NI, LB or XB error interrupts      *
  903.  * are set, the PI_II_ERROR_INT wire will be asserted. When this wire   *
  904.  * is asserted, the II will send an interrupt to the node specified     *
  905.  * in its IIDSR (Interrupt Destination Register). This allows these     *
  906.  * interrupts to be forwarded to another node.                          *
  907.  *                                                                      *
  908.  ************************************************************************/
  909. #ifdef LITTLE_ENDIAN
  910. typedef union pi_int_pend1_remap_u {
  911. bdrkreg_t pi_int_pend1_remap_regval;
  912. struct  {
  913. bdrkreg_t ipr_remap_0               :  1;
  914.                 bdrkreg_t       ipr_remap_1               :      1;
  915.                 bdrkreg_t       ipr_remap_2               :      1;
  916.                 bdrkreg_t       ipr_remap_3               :      1;
  917.                 bdrkreg_t       ipr_error_forward         :      1;
  918.                 bdrkreg_t       ipr_reserved              :     59;
  919. } pi_int_pend1_remap_fld_s;
  920. } pi_int_pend1_remap_u_t;
  921. #else
  922. typedef union pi_int_pend1_remap_u {
  923. bdrkreg_t pi_int_pend1_remap_regval;
  924. struct {
  925. bdrkreg_t ipr_reserved   : 59;
  926. bdrkreg_t ipr_error_forward   :  1;
  927. bdrkreg_t ipr_remap_3   :  1;
  928. bdrkreg_t ipr_remap_2   :  1;
  929. bdrkreg_t ipr_remap_1   :  1;
  930. bdrkreg_t ipr_remap_0   :  1;
  931. } pi_int_pend1_remap_fld_s;
  932. } pi_int_pend1_remap_u_t;
  933. #endif
  934. /************************************************************************
  935.  *                                                                      *
  936.  *  There is one of these registers for each CPU. When the real time    *
  937.  * counter (RT_Counter) is equal to the value in this register, the     *
  938.  * RT_INT_PEND register is set, which causes a Level-4 interrupt to     *
  939.  * be sent to the processor.                                            *
  940.  *                                                                      *
  941.  ************************************************************************/
  942. #ifdef LITTLE_ENDIAN
  943. typedef union pi_rt_compare_a_u {
  944. bdrkreg_t pi_rt_compare_a_regval;
  945. struct  {
  946. bdrkreg_t rca_rt_compare            : 55;
  947. bdrkreg_t       rca_rsvd                  :      9;
  948. } pi_rt_compare_a_fld_s;
  949. } pi_rt_compare_a_u_t;
  950. #else
  951. typedef union pi_rt_compare_a_u {
  952.         bdrkreg_t       pi_rt_compare_a_regval;
  953.         struct  {
  954.                 bdrkreg_t       rca_rsvd                  :      9;
  955.                 bdrkreg_t       rca_rt_compare            :     55;
  956.         } pi_rt_compare_a_fld_s;
  957. } pi_rt_compare_a_u_t;
  958. #endif
  959. /************************************************************************
  960.  *                                                                      *
  961.  *  There is one of these registers for each CPU. When the real time    *
  962.  * counter (RT_Counter) is equal to the value in this register, the     *
  963.  * RT_INT_PEND register is set, which causes a Level-4 interrupt to     *
  964.  * be sent to the processor.                                            *
  965.  *                                                                      *
  966.  ************************************************************************/
  967. #ifdef LITTLE_ENDIAN
  968. typedef union pi_rt_compare_b_u {
  969. bdrkreg_t pi_rt_compare_b_regval;
  970. struct  {
  971. bdrkreg_t rcb_rt_compare            : 55;
  972. bdrkreg_t       rcb_rsvd                  :      9;
  973. } pi_rt_compare_b_fld_s;
  974. } pi_rt_compare_b_u_t;
  975. #else
  976. typedef union pi_rt_compare_b_u {
  977. bdrkreg_t pi_rt_compare_b_regval;
  978. struct {
  979. bdrkreg_t rcb_rsvd   :  9;
  980. bdrkreg_t rcb_rt_compare   : 55;
  981. } pi_rt_compare_b_fld_s;
  982. } pi_rt_compare_b_u_t;
  983. #endif
  984. /************************************************************************
  985.  *                                                                      *
  986.  *  When the least significant 32 bits of the real time counter         *
  987.  * (RT_Counter) are equal to the value in this register, the            *
  988.  * PROF_INT_PEND_A and PROF_INT_PEND_B registers are set to 0x1.        *
  989.  *                                                                      *
  990.  ************************************************************************/
  991. #ifdef LITTLE_ENDIAN
  992. typedef union pi_profile_compare_u {
  993. bdrkreg_t pi_profile_compare_regval;
  994. struct  {
  995. bdrkreg_t pc_profile_compare        : 32;
  996. bdrkreg_t       pc_rsvd                   :     32;
  997. } pi_profile_compare_fld_s;
  998. } pi_profile_compare_u_t;
  999. #else
  1000. typedef union pi_profile_compare_u {
  1001. bdrkreg_t pi_profile_compare_regval;
  1002. struct {
  1003. bdrkreg_t pc_rsvd   : 32;
  1004. bdrkreg_t pc_profile_compare   : 32;
  1005. } pi_profile_compare_fld_s;
  1006. } pi_profile_compare_u_t;
  1007. #endif
  1008. /************************************************************************
  1009.  *                                                                      *
  1010.  *  There is one of these registers for each CPU. If the bit in the     *
  1011.  * corresponding RT_INT_EN_A/B register is set, the processor's level   *
  1012.  * 5 interrupt is set to the value of the RTC_INT_PEND bit in this      *
  1013.  * register. Storing any value to this location will clear the          *
  1014.  * RTC_INT_PEND bit in the register.                                    *
  1015.  *                                                                      *
  1016.  ************************************************************************/
  1017. #ifdef LITTLE_ENDIAN
  1018. typedef union pi_rt_int_pend_a_u {
  1019. bdrkreg_t pi_rt_int_pend_a_regval;
  1020. struct  {
  1021. bdrkreg_t ripa_rtc_int_pend         :  1;
  1022. bdrkreg_t       ripa_rsvd                 :     63;
  1023. } pi_rt_int_pend_a_fld_s;
  1024. } pi_rt_int_pend_a_u_t;
  1025. #else
  1026. typedef union pi_rt_int_pend_a_u {
  1027. bdrkreg_t pi_rt_int_pend_a_regval;
  1028. struct {
  1029. bdrkreg_t ripa_rsvd   : 63;
  1030. bdrkreg_t ripa_rtc_int_pend   :  1;
  1031. } pi_rt_int_pend_a_fld_s;
  1032. } pi_rt_int_pend_a_u_t;
  1033. #endif
  1034. /************************************************************************
  1035.  *                                                                      *
  1036.  *  There is one of these registers for each CPU. If the bit in the     *
  1037.  * corresponding RT_INT_EN_A/B register is set, the processor's level   *
  1038.  * 5 interrupt is set to the value of the RTC_INT_PEND bit in this      *
  1039.  * register. Storing any value to this location will clear the          *
  1040.  * RTC_INT_PEND bit in the register.                                    *
  1041.  *                                                                      *
  1042.  ************************************************************************/
  1043. #ifdef LITTLE_ENDIAN
  1044. typedef union pi_rt_int_pend_b_u {
  1045. bdrkreg_t pi_rt_int_pend_b_regval;
  1046. struct  {
  1047. bdrkreg_t ripb_rtc_int_pend         :  1;
  1048. bdrkreg_t       ripb_rsvd                 :     63;
  1049. } pi_rt_int_pend_b_fld_s;
  1050. } pi_rt_int_pend_b_u_t;
  1051. #else
  1052. typedef union pi_rt_int_pend_b_u {
  1053. bdrkreg_t pi_rt_int_pend_b_regval;
  1054. struct {
  1055. bdrkreg_t ripb_rsvd   : 63;
  1056. bdrkreg_t ripb_rtc_int_pend   :  1;
  1057. } pi_rt_int_pend_b_fld_s;
  1058. } pi_rt_int_pend_b_u_t;
  1059. #endif
  1060. /************************************************************************
  1061.  *                                                                      *
  1062.  *  There is one of these registers for each CPU. Both registers are    *
  1063.  * set when the PROFILE_COMPARE register is equal to bits [31:0] of     *
  1064.  * the RT_Counter. If the bit in the corresponding PROF_INT_EN_A/B      *
  1065.  * register is set, the processor's level 5 interrupt is set to the     *
  1066.  * value of the PROF_INT_PEND bit in this register. Storing any value   *
  1067.  * to this location will clear the PROF_INT_PEND bit in the register.   *
  1068.  * The reason for having A and B versions of this register is that      *
  1069.  * they need to be cleared independently.                               *
  1070.  *                                                                      *
  1071.  ************************************************************************/
  1072. #ifdef LITTLE_ENDIAN
  1073. typedef union pi_prof_int_pend_a_u {
  1074. bdrkreg_t pi_prof_int_pend_a_regval;
  1075. struct  {
  1076. bdrkreg_t pipa_prof_int_pend        :  1;
  1077. bdrkreg_t       pipa_rsvd                 :     63;
  1078. } pi_prof_int_pend_a_fld_s;
  1079. } pi_prof_int_pend_a_u_t;
  1080. #else
  1081. typedef union pi_prof_int_pend_a_u {
  1082. bdrkreg_t pi_prof_int_pend_a_regval;
  1083. struct {
  1084. bdrkreg_t pipa_rsvd   : 63;
  1085. bdrkreg_t pipa_prof_int_pend   :  1;
  1086. } pi_prof_int_pend_a_fld_s;
  1087. } pi_prof_int_pend_a_u_t;
  1088. #endif
  1089. /************************************************************************
  1090.  *                                                                      *
  1091.  *  There is one of these registers for each CPU. Both registers are    *
  1092.  * set when the PROFILE_COMPARE register is equal to bits [31:0] of     *
  1093.  * the RT_Counter. If the bit in the corresponding PROF_INT_EN_A/B      *
  1094.  * register is set, the processor's level 5 interrupt is set to the     *
  1095.  * value of the PROF_INT_PEND bit in this register. Storing any value   *
  1096.  * to this location will clear the PROF_INT_PEND bit in the register.   *
  1097.  * The reason for having A and B versions of this register is that      *
  1098.  * they need to be cleared independently.                               *
  1099.  *                                                                      *
  1100.  ************************************************************************/
  1101. #ifdef LITTLE_ENDIAN
  1102. typedef union pi_prof_int_pend_b_u {
  1103. bdrkreg_t pi_prof_int_pend_b_regval;
  1104. struct  {
  1105. bdrkreg_t pipb_prof_int_pend        :  1;
  1106. bdrkreg_t       pipb_rsvd                 :     63;
  1107. } pi_prof_int_pend_b_fld_s;
  1108. } pi_prof_int_pend_b_u_t;
  1109. #else
  1110. typedef union pi_prof_int_pend_b_u {
  1111. bdrkreg_t pi_prof_int_pend_b_regval;
  1112. struct {
  1113. bdrkreg_t pipb_rsvd   : 63;
  1114. bdrkreg_t pipb_prof_int_pend   :  1;
  1115. } pi_prof_int_pend_b_fld_s;
  1116. } pi_prof_int_pend_b_u_t;
  1117. #endif
  1118. /************************************************************************
  1119.  *                                                                      *
  1120.  *  There is one of these registers for each CPU. Enables RTC           *
  1121.  * interrupt to the associated CPU.                                     *
  1122.  *                                                                      *
  1123.  ************************************************************************/
  1124. #ifdef LITTLE_ENDIAN
  1125. typedef union pi_rt_int_en_a_u {
  1126. bdrkreg_t pi_rt_int_en_a_regval;
  1127. struct  {
  1128. bdrkreg_t riea_rtc_int_en           :  1;
  1129. bdrkreg_t       riea_rsvd                 :     63;
  1130. } pi_rt_int_en_a_fld_s;
  1131. } pi_rt_int_en_a_u_t;
  1132. #else
  1133. typedef union pi_rt_int_en_a_u {
  1134.         bdrkreg_t       pi_rt_int_en_a_regval;
  1135.         struct  {
  1136.                 bdrkreg_t       riea_rsvd                 :     63;
  1137.                 bdrkreg_t       riea_rtc_int_en           :      1;
  1138.         } pi_rt_int_en_a_fld_s;
  1139. } pi_rt_int_en_a_u_t;
  1140. #endif
  1141. /************************************************************************
  1142.  *                                                                      *
  1143.  *  There is one of these registers for each CPU. Enables RTC           *
  1144.  * interrupt to the associated CPU.                                     *
  1145.  *                                                                      *
  1146.  ************************************************************************/
  1147. #ifdef LITTLE_ENDIAN
  1148. typedef union pi_rt_int_en_b_u {
  1149. bdrkreg_t pi_rt_int_en_b_regval;
  1150. struct  {
  1151. bdrkreg_t rieb_rtc_int_en           :  1;
  1152. bdrkreg_t       rieb_rsvd                 :     63;
  1153. } pi_rt_int_en_b_fld_s;
  1154. } pi_rt_int_en_b_u_t;
  1155. #else
  1156. typedef union pi_rt_int_en_b_u {
  1157.         bdrkreg_t       pi_rt_int_en_b_regval;
  1158.         struct  {
  1159.                 bdrkreg_t       rieb_rsvd                 :     63;
  1160.                 bdrkreg_t       rieb_rtc_int_en           :      1;
  1161.         } pi_rt_int_en_b_fld_s;
  1162. } pi_rt_int_en_b_u_t;
  1163. #endif
  1164. /************************************************************************
  1165.  *                                                                      *
  1166.  *  There is one of these registers for each CPU. Enables profiling     *
  1167.  * interrupt to the associated CPU.                                     *
  1168.  *                                                                      *
  1169.  ************************************************************************/
  1170. #ifdef LITTLE_ENDIAN
  1171. typedef union pi_prof_int_en_a_u {
  1172. bdrkreg_t pi_prof_int_en_a_regval;
  1173. struct  {
  1174. bdrkreg_t piea_prof_int_en          :  1;
  1175. bdrkreg_t       piea_rsvd                 :     63;
  1176. } pi_prof_int_en_a_fld_s;
  1177. } pi_prof_int_en_a_u_t;
  1178. #else
  1179. typedef union pi_prof_int_en_a_u {
  1180. bdrkreg_t pi_prof_int_en_a_regval;
  1181. struct {
  1182. bdrkreg_t piea_rsvd   : 63;
  1183. bdrkreg_t piea_prof_int_en   :  1;
  1184. } pi_prof_int_en_a_fld_s;
  1185. } pi_prof_int_en_a_u_t;
  1186. #endif
  1187. /************************************************************************
  1188.  *                                                                      *
  1189.  *  There is one of these registers for each CPU. Enables profiling     *
  1190.  * interrupt to the associated CPU.                                     *
  1191.  *                                                                      *
  1192.  ************************************************************************/
  1193. #ifdef LITTLE_ENDIAN
  1194. typedef union pi_prof_int_en_b_u {
  1195. bdrkreg_t pi_prof_int_en_b_regval;
  1196. struct  {
  1197. bdrkreg_t pieb_prof_int_en          :  1;
  1198. bdrkreg_t       pieb_rsvd                 :     63;
  1199. } pi_prof_int_en_b_fld_s;
  1200. } pi_prof_int_en_b_u_t;
  1201. #else
  1202. typedef union pi_prof_int_en_b_u {
  1203. bdrkreg_t pi_prof_int_en_b_regval;
  1204. struct {
  1205. bdrkreg_t pieb_rsvd   : 63;
  1206. bdrkreg_t pieb_prof_int_en   :  1;
  1207. } pi_prof_int_en_b_fld_s;
  1208. } pi_prof_int_en_b_u_t;
  1209. #endif
  1210. /************************************************************************
  1211.  *                                                                      *
  1212.  *  This register controls operation of the debug data from the PI,     *
  1213.  * along with Debug_Sel[2:0] from the Debug module. For some values     *
  1214.  * of Debug_Sel[2:0], the B_SEL bit selects whether the debug bits      *
  1215.  * are looking at the processor A or processor B logic. The remaining   *
  1216.  * bits select which signal(s) are ORed to create DebugData bits 31     *
  1217.  * and 30 for all of the PI debug selections.                           *
  1218.  *                                                                      *
  1219.  ************************************************************************/
  1220. #ifdef LITTLE_ENDIAN
  1221. typedef union pi_debug_sel_u {
  1222. bdrkreg_t pi_debug_sel_regval;
  1223. struct  {
  1224. bdrkreg_t ds_low_t5cc_a             :  1;
  1225.                 bdrkreg_t       ds_low_t5cc_b             :      1;
  1226.                 bdrkreg_t       ds_low_totcc_a            :      1;
  1227.                 bdrkreg_t       ds_low_totcc_b            :      1;
  1228.                 bdrkreg_t       ds_low_reqcc_a            :      1;
  1229.                 bdrkreg_t       ds_low_reqcc_b            :      1;
  1230.                 bdrkreg_t       ds_low_rplcc_a            :      1;
  1231.                 bdrkreg_t       ds_low_rplcc_b            :      1;
  1232.                 bdrkreg_t       ds_low_intcc              :      1;
  1233.                 bdrkreg_t       ds_low_perf_inc_a_0       :      1;
  1234.                 bdrkreg_t       ds_low_perf_inc_a_1       :      1;
  1235.                 bdrkreg_t       ds_low_perf_inc_b_0       :      1;
  1236.                 bdrkreg_t       ds_low_perf_inc_b_1       :      1;
  1237.                 bdrkreg_t       ds_high_t5cc_a            :      1;
  1238.                 bdrkreg_t       ds_high_t5cc_b            :      1;
  1239.                 bdrkreg_t       ds_high_totcc_a           :      1;
  1240.                 bdrkreg_t       ds_high_totcc_b           :      1;
  1241.                 bdrkreg_t       ds_high_reqcc_a           :      1;
  1242.                 bdrkreg_t       ds_high_reqcc_b           :      1;
  1243.                 bdrkreg_t       ds_high_rplcc_a           :      1;
  1244.                 bdrkreg_t       ds_high_rplcc_b           :      1;
  1245.                 bdrkreg_t       ds_high_intcc             :      1;
  1246.                 bdrkreg_t       ds_high_perf_inc_a_0      :      1;
  1247.                 bdrkreg_t       ds_high_perf_inc_a_1      :      1;
  1248.                 bdrkreg_t       ds_high_perf_inc_b_0      :      1;
  1249.                 bdrkreg_t       ds_high_perf_inc_b_1      :      1;
  1250.                 bdrkreg_t       ds_b_sel                  :      1;
  1251.                 bdrkreg_t       ds_rsvd                   :     37;
  1252. } pi_debug_sel_fld_s;
  1253. } pi_debug_sel_u_t;
  1254. #else
  1255. typedef union pi_debug_sel_u {
  1256. bdrkreg_t pi_debug_sel_regval;
  1257. struct {
  1258. bdrkreg_t ds_rsvd   : 37;
  1259. bdrkreg_t ds_b_sel   :  1;
  1260. bdrkreg_t ds_high_perf_inc_b_1   :  1;
  1261. bdrkreg_t ds_high_perf_inc_b_0   :  1;
  1262. bdrkreg_t ds_high_perf_inc_a_1   :  1;
  1263. bdrkreg_t ds_high_perf_inc_a_0   :  1;
  1264. bdrkreg_t ds_high_intcc   :  1;
  1265. bdrkreg_t ds_high_rplcc_b   :  1;
  1266. bdrkreg_t ds_high_rplcc_a   :  1;
  1267. bdrkreg_t ds_high_reqcc_b   :  1;
  1268. bdrkreg_t ds_high_reqcc_a   :  1;
  1269. bdrkreg_t ds_high_totcc_b   :  1;
  1270. bdrkreg_t ds_high_totcc_a   :  1;
  1271. bdrkreg_t ds_high_t5cc_b   :  1;
  1272. bdrkreg_t ds_high_t5cc_a   :  1;
  1273. bdrkreg_t ds_low_perf_inc_b_1   :  1;
  1274. bdrkreg_t ds_low_perf_inc_b_0   :  1;
  1275. bdrkreg_t ds_low_perf_inc_a_1   :  1;
  1276. bdrkreg_t ds_low_perf_inc_a_0   :  1;
  1277. bdrkreg_t ds_low_intcc   :  1;
  1278. bdrkreg_t ds_low_rplcc_b   :  1;
  1279. bdrkreg_t ds_low_rplcc_a   :  1;
  1280. bdrkreg_t ds_low_reqcc_b   :  1;
  1281. bdrkreg_t ds_low_reqcc_a   :  1;
  1282. bdrkreg_t ds_low_totcc_b   :  1;
  1283. bdrkreg_t ds_low_totcc_a   :  1;
  1284. bdrkreg_t ds_low_t5cc_b   :  1;
  1285. bdrkreg_t ds_low_t5cc_a   :  1;
  1286. } pi_debug_sel_fld_s;
  1287. } pi_debug_sel_u_t;
  1288. #endif
  1289. /************************************************************************
  1290.  *                                                                      *
  1291.  *  A write to this register allows a single bit in the INT_PEND0 or    *
  1292.  * INT_PEND1 registers to be set or cleared. If 6 is clear, a bit is    *
  1293.  * modified in INT_PEND0, while if 6 is set, a bit is modified in       *
  1294.  * INT_PEND1. The value in 5:0 (ranging from 63 to 0) will determine    *
  1295.  * which bit in the register is effected. The value of 8 will           *
  1296.  * determine whether the desired bit is set (8=1) or cleared (8=0).     *
  1297.  * This is the only register which is accessible by IO issued PWRI      *
  1298.  * command and is protected through the IO_PROTECT register. If the     *
  1299.  * region bit in the IO_PROTECT is not set then a WERR reply is         *
  1300.  * issued. CPU access is controlled through CPU_PROTECT. The contents   *
  1301.  * of this register are masked with the contents of INT_MASK_A          *
  1302.  * (INT_MASK_B) to determine whether an L2 interrupt is issued to       *
  1303.  * CPU_A (CPU_B).                                                       *
  1304.  *                                                                      *
  1305.  ************************************************************************/
  1306. #ifdef LITTLE_ENDIAN
  1307. typedef union pi_int_pend_mod_alias_u {
  1308. bdrkreg_t pi_int_pend_mod_alias_regval;
  1309. struct  {
  1310. bdrkreg_t ipma_bit_select           :  6;
  1311.                 bdrkreg_t       ipma_reg_select           :      1;
  1312.                 bdrkreg_t       ipma_rsvd_1               :      1;
  1313.                 bdrkreg_t       ipma_value                :      1;
  1314.                 bdrkreg_t       ipma_rsvd                 :     55;
  1315. } pi_int_pend_mod_alias_fld_s;
  1316. } pi_int_pend_mod_alias_u_t;
  1317. #else
  1318. typedef union pi_int_pend_mod_alias_u {
  1319. bdrkreg_t pi_int_pend_mod_alias_regval;
  1320. struct {
  1321. bdrkreg_t ipma_rsvd   : 55;
  1322. bdrkreg_t ipma_value   :  1;
  1323. bdrkreg_t ipma_rsvd_1   :  1;
  1324. bdrkreg_t ipma_reg_select   :  1;
  1325. bdrkreg_t ipma_bit_select   :  6;
  1326. } pi_int_pend_mod_alias_fld_s;
  1327. } pi_int_pend_mod_alias_u_t;
  1328. #endif
  1329. /************************************************************************
  1330.  *                                                                      *
  1331.  *  There is one of these registers for each CPU. This register         *
  1332.  * specifies the value of the Graphics Page. Uncached writes into the   *
  1333.  * Graphics Page (with uncached attribute of IO) are done with GFXWS    *
  1334.  * commands rather than the normal PWRI commands. GFXWS commands are    *
  1335.  * tracked with the graphics credit counters.                           *
  1336.  *                                                                      *
  1337.  ************************************************************************/
  1338. #ifdef LITTLE_ENDIAN
  1339. typedef union pi_gfx_page_a_u {
  1340. bdrkreg_t pi_gfx_page_a_regval;
  1341. struct  {
  1342. bdrkreg_t gpa_rsvd_1                : 17;
  1343.                 bdrkreg_t       gpa_gfx_page_addr         :     23;
  1344.                 bdrkreg_t       gpa_en_gfx_page           :      1;
  1345.                 bdrkreg_t       gpa_rsvd                  :     23;
  1346. } pi_gfx_page_a_fld_s;
  1347. } pi_gfx_page_a_u_t;
  1348. #else
  1349. typedef union pi_gfx_page_a_u {
  1350. bdrkreg_t pi_gfx_page_a_regval;
  1351. struct {
  1352. bdrkreg_t gpa_rsvd   : 23;
  1353. bdrkreg_t gpa_en_gfx_page   :  1;
  1354. bdrkreg_t gpa_gfx_page_addr   : 23;
  1355. bdrkreg_t gpa_rsvd_1   : 17;
  1356. } pi_gfx_page_a_fld_s;
  1357. } pi_gfx_page_a_u_t;
  1358. #endif
  1359. /************************************************************************
  1360.  *                                                                      *
  1361.  *  There is one of these registers for each CPU. This register         *
  1362.  * counts graphics credits. This counter is decremented for each        *
  1363.  * doubleword sent to graphics with GFXWS or GFXWL commands. It is      *
  1364.  * incremented for each doubleword acknowledge from graphics. When      *
  1365.  * this counter has a smaller value than the GFX_BIAS register,         *
  1366.  * SysWrRdy_L is deasserted, an interrupt is sent to the processor,     *
  1367.  * and SysWrRdy_L is allowed to be asserted again. This is the basic    *
  1368.  * mechanism for flow-controlling graphics writes.                      *
  1369.  *                                                                      *
  1370.  ************************************************************************/
  1371. #ifdef LITTLE_ENDIAN
  1372. typedef union pi_gfx_credit_cntr_a_u {
  1373. bdrkreg_t pi_gfx_credit_cntr_a_regval;
  1374. struct  {
  1375. bdrkreg_t gcca_gfx_credit_cntr      : 12;
  1376. bdrkreg_t       gcca_rsvd                 :     52;
  1377. } pi_gfx_credit_cntr_a_fld_s;
  1378. } pi_gfx_credit_cntr_a_u_t;
  1379. #else
  1380. typedef union pi_gfx_credit_cntr_a_u {
  1381. bdrkreg_t pi_gfx_credit_cntr_a_regval;
  1382. struct {
  1383. bdrkreg_t gcca_rsvd   : 52;
  1384. bdrkreg_t gcca_gfx_credit_cntr   : 12;
  1385. } pi_gfx_credit_cntr_a_fld_s;
  1386. } pi_gfx_credit_cntr_a_u_t;
  1387. #endif
  1388. /************************************************************************
  1389.  *                                                                      *
  1390.  *  There is one of these registers for each CPU. When the graphics     *
  1391.  * credit counter is less than or equal to this value, a flow control   *
  1392.  * interrupt is sent.                                                   *
  1393.  *                                                                      *
  1394.  ************************************************************************/
  1395. #ifdef LITTLE_ENDIAN
  1396. typedef union pi_gfx_bias_a_u {
  1397. bdrkreg_t pi_gfx_bias_a_regval;
  1398. struct  {
  1399. bdrkreg_t gba_gfx_bias              : 12;
  1400. bdrkreg_t       gba_rsvd                  :     52;
  1401. } pi_gfx_bias_a_fld_s;
  1402. } pi_gfx_bias_a_u_t;
  1403. #else
  1404. typedef union pi_gfx_bias_a_u {
  1405. bdrkreg_t pi_gfx_bias_a_regval;
  1406. struct {