* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: schizo_mdu.h
* Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
* The above named program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License version 2 as published by the Free Software Foundation.
* The above named program is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
* You should have received a copy of the GNU General Public
* License along with this work; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
* ========== Copyright Header End ============================================
* Copyright (C) 1996, Sun Microsystems, Inc.
#pragma ident "@(#)1.1 01/08/23 schizo_mdu.h"
#define NUM_INTERNAL_INT 8
#define NUM_LEVEL_INTS NUM_PCI_INTS + NUM_OBIO_INTS + MAX_NUM_INTERNAL_INT
#define MAX_NUM_EXTERNAL_INT NUM_PCI_INTS + NUM_OBIO_INTS + NUM_PULSE_INTS
#define MAX_NUM_INT_SOURCES MAX_NUM_EXTERNAL_INT + MAX_NUM_INTERNAL_INT
#define INX_SHIFT 6 /* to get AgentID into INR */
#define INO_MASK 0x3f /* to get INO into INR */
#define NO_INTERR 50 /* A random high int to diff. NULL and zero */
/* Internal interrupts INO value */
#define STATE_MASK 0x00000003 /* get only LSB 2 bits ie int_state */
// Interrupt State Register, Diagnostic Reg
// There are two such registers one for pci_bus_isr and the other obio_isr
// for level interrupts 2 bits are reqd 0-idle, 1-Rcved, 2-illegal, 3-Pending
// for pulse interrupts 1 bit is sufficient, 0-idle 1-recieved.
typedef struct s_pci_bus_isr
{
uint32_t pb3_int_D
:2; // [63:62]
uint32_t pb3_int_C
:2; // [61:60]
uint32_t pb3_int_B
:2; // [59:58]
uint32_t pb3_int_A
:2; // [57:56]
uint32_t pb2_int_D
:2; // [55:54]
uint32_t pb2_int_C
:2; // [53:52]
uint32_t pb2_int_B
:2; // [51:50]
uint32_t pb2_int_A
:2; // [49:48]
uint32_t pb1_int_D
:2; // [47:46]
uint32_t pb1_int_C
:2; // [45:44]
uint32_t pb1_int_B
:2; // [43:42]
uint32_t pb1_int_A
:2; // [41:40]
uint32_t pb0_int_D
:2; // [39:38]
uint32_t pb0_int_C
:2; // [37:36]
uint32_t pb0_int_B
:2; // [35:34]
uint32_t pb0_int_A
:2; // [33:32]
uint32_t rsvd
:16; // [31:16]
uint32_t pa1_int_D
:2; // [15:14]
uint32_t pa1_int_C
:2; // [13:12]
uint32_t pa1_int_B
:2; // [11:10]
uint32_t pa1_int_A
:2; // [09:08]
uint32_t pa0_int_D
:2; // [07:06]
uint32_t pa0_int_C
:2; // [05:04]
uint32_t pa0_int_B
:2; // [03:02]
uint32_t pa0_int_A
:2; // [01:00]
typedef struct s_obio_isr
{
uint32_t rsvd
:16; // [63:48]
uint32_t int_int_state
:16; // [47:32]
uint32_t obio_int_state
:32; // [31:00]
typedef union u_obio_isr
{
* Writing to this Register will caues the interrupt to transit from
* any state to idle, recieved, or pending depending on value 0,1 or 3 resp.
* There is one such register for each interrupt
typedef struct s_clear_int
{
uint32_t int_state
:2; /* state the interrupt will transit to */
typedef struct s_pulse_clr
{
/* The mapping registers keeps the INR value for all interrupts. */
// Schizo specification (spp), revision 50, Nov. 2000. spp 201 or epp 218
// epp refers to page number in Excalibur arch manual.
typedef struct s_int_mapping
{
uint32_t v
:1; /* valid bit-rw */
uint32_t agent_id
:5; /* 30:26 target processor Agent_id-rw */
uint32_t node_id
:5; /* 25:21 target processor Node_id */
uint32_t rsvd
:10; /* 20:11 read-only */
uint32_t ign
:5; /* 10:6 intr grp Num==AGentid -ro */
uint32_t ino
:6; /* 5:0interrupt Number offset -ro */
typedef struct s_int_retry_timer
{
uint32_t rsvd2
:32; /* unused */
uint32_t rsvd1
:25; /* unused */
uint32_t limit
:7; /* retry interval(max 255 clks delay) */
union u_int_retry_timer
{