125cf1a30Sjl139090 /* 225cf1a30Sjl139090 * CDDL HEADER START 325cf1a30Sjl139090 * 425cf1a30Sjl139090 * The contents of this file are subject to the terms of the 525cf1a30Sjl139090 * Common Development and Distribution License (the "License"). 625cf1a30Sjl139090 * You may not use this file except in compliance with the License. 725cf1a30Sjl139090 * 825cf1a30Sjl139090 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 925cf1a30Sjl139090 * or http://www.opensolaris.org/os/licensing. 1025cf1a30Sjl139090 * See the License for the specific language governing permissions 1125cf1a30Sjl139090 * and limitations under the License. 1225cf1a30Sjl139090 * 1325cf1a30Sjl139090 * When distributing Covered Code, include this CDDL HEADER in each 1425cf1a30Sjl139090 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1525cf1a30Sjl139090 * If applicable, add the following below this CDDL HEADER, with the 1625cf1a30Sjl139090 * fields enclosed by brackets "[]" replaced with your own identifying 1725cf1a30Sjl139090 * information: Portions Copyright [yyyy] [name of copyright owner] 1825cf1a30Sjl139090 * 1925cf1a30Sjl139090 * CDDL HEADER END 2025cf1a30Sjl139090 */ 2125cf1a30Sjl139090 /* 22*26947304SEvan Yan * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 2325cf1a30Sjl139090 * Use is subject to license terms. 2425cf1a30Sjl139090 */ 2525cf1a30Sjl139090 2625cf1a30Sjl139090 #ifndef _SYS_OBERON_REGS_H 2725cf1a30Sjl139090 #define _SYS_OBERON_REGS_H 2825cf1a30Sjl139090 2925cf1a30Sjl139090 #ifdef __cplusplus 3025cf1a30Sjl139090 extern "C" { 3125cf1a30Sjl139090 #endif 3225cf1a30Sjl139090 3325cf1a30Sjl139090 3425cf1a30Sjl139090 #define UBC_ERROR_LOG_ENABLE 0x471000 3525cf1a30Sjl139090 #define UBC_ERROR_STATUS_CLEAR 0x471018 3625cf1a30Sjl139090 #define UBC_INTERRUPT_ENABLE 0x471008 3725cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS 0x471010 3825cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_DMARDUEA_P 0 3925cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_DMAWTUEA_P 1 4025cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_MEMRDAXA_P 2 4125cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_MEMWTAXA_P 3 4225cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_DMARDUEB_P 8 4325cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_DMAWTUEB_P 9 4425cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_MEMRDAXB_P 10 4525cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_MEMWTAXB_P 11 4625cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_PIOWTUE_P 16 4725cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_PIOWBEUE_P 17 4825cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_PIORBEUE_P 18 4925cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_DMARDUEA_S 32 5025cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_DMAWTUEA_S 33 5125cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_MEMRDAXA_S 34 5225cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_MEMWTAXA_S 35 5325cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_DMARDUEB_S 40 5425cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_DMAWTUEB_S 41 5525cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_MEMRDAXB_S 42 5625cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_MEMWTAXB_S 43 5725cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_PIOWTUE_S 48 5825cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_PIOWBEUE_S 49 5925cf1a30Sjl139090 #define UBC_INTERRUPT_STATUS_PIORBEUE_S 50 6025cf1a30Sjl139090 #define UBC_ERROR_STATUS_SET 0x471020 6125cf1a30Sjl139090 #define UBC_PERFORMANCE_COUNTER_SELECT 0x472000 6225cf1a30Sjl139090 #define UBC_PERFORMANCE_COUNTER_ZERO 0x472008 6325cf1a30Sjl139090 #define UBC_PERFORMANCE_COUNTER_ONE 0x472010 6425cf1a30Sjl139090 #define UBC_PERFORMANCE_COUNTER_SEL_MASKS 0x3f3f 6525cf1a30Sjl139090 #define UBC_MEMORY_UE_LOG 0x471028 6625cf1a30Sjl139090 #define UBC_MEMORY_UE_LOG_EID 60 6725cf1a30Sjl139090 #define UBC_MEMORY_UE_LOG_EID_MASK 0x3 6825cf1a30Sjl139090 #define UBC_MEMORY_UE_LOG_MARKED 48 6925cf1a30Sjl139090 #define UBC_MEMORY_UE_LOG_MARKED_MASK 0x3fff 7025cf1a30Sjl139090 #define UBC_MARKED_MAX_CPUID_MASK 0x1ff 7125cf1a30Sjl139090 /* 7225cf1a30Sjl139090 * Class qualifiers on errors for which EID is valid. 7325cf1a30Sjl139090 */ 7425cf1a30Sjl139090 #define UBC_EID_MEM 0 7525cf1a30Sjl139090 #define UBC_EID_CHANNEL 1 7625cf1a30Sjl139090 #define UBC_EID_CPU 2 7725cf1a30Sjl139090 #define UBC_EID_PATH 3 7881f63062Sarutz /* 7981f63062Sarutz * Mask within UBC_INTERRUPT_STATUS for Leaf-A errors 8081f63062Sarutz */ 8181f63062Sarutz #define UBC_INTERRUPT_STATUS_LEAFA \ 8281f63062Sarutz ((1UL << UBC_INTERRUPT_STATUS_DMARDUEA_P) |\ 8381f63062Sarutz (1UL << UBC_INTERRUPT_STATUS_DMAWTUEA_P) |\ 8481f63062Sarutz (1UL << UBC_INTERRUPT_STATUS_MEMRDAXA_P) |\ 8581f63062Sarutz (1UL << UBC_INTERRUPT_STATUS_MEMWTAXA_P) |\ 8681f63062Sarutz (1UL << UBC_INTERRUPT_STATUS_DMARDUEA_S) |\ 8781f63062Sarutz (1UL << UBC_INTERRUPT_STATUS_DMAWTUEA_S) |\ 8881f63062Sarutz (1UL << UBC_INTERRUPT_STATUS_MEMRDAXA_S) |\ 8981f63062Sarutz (1UL << UBC_INTERRUPT_STATUS_MEMWTAXA_S)) 9081f63062Sarutz /* 9181f63062Sarutz * Mask within UBC_INTERRUPT_STATUS for Leaf-B errors 9281f63062Sarutz */ 9381f63062Sarutz #define UBC_INTERRUPT_STATUS_LEAFB \ 9481f63062Sarutz ((1UL << UBC_INTERRUPT_STATUS_DMARDUEB_P) |\ 9581f63062Sarutz (1UL << UBC_INTERRUPT_STATUS_DMAWTUEB_P) |\ 9681f63062Sarutz (1UL << UBC_INTERRUPT_STATUS_MEMRDAXB_P) |\ 9781f63062Sarutz (1UL << UBC_INTERRUPT_STATUS_MEMWTAXB_P) |\ 9881f63062Sarutz (1UL << UBC_INTERRUPT_STATUS_DMARDUEB_S) |\ 9981f63062Sarutz (1UL << UBC_INTERRUPT_STATUS_DMAWTUEB_S) |\ 10081f63062Sarutz (1UL << UBC_INTERRUPT_STATUS_MEMRDAXB_S) |\ 10181f63062Sarutz (1UL << UBC_INTERRUPT_STATUS_MEMWTAXB_S)) 10225cf1a30Sjl139090 10325cf1a30Sjl139090 #define OBERON_UBC_ID_MAX 64 10425cf1a30Sjl139090 #define OBERON_UBC_ID_IOC 0 10525cf1a30Sjl139090 #define OBERON_UBC_ID_LSB 2 10625cf1a30Sjl139090 10781f63062Sarutz #define OBERON_PORT_ID_LEAF 0 10881f63062Sarutz #define OBERON_PORT_ID_LEAF_MASK 0x1 10925cf1a30Sjl139090 #define OBERON_PORT_ID_IOC 1 11025cf1a30Sjl139090 #define OBERON_PORT_ID_IOC_MASK 0x03 11125cf1a30Sjl139090 #define OBERON_PORT_ID_LSB 4 11225cf1a30Sjl139090 #define OBERON_PORT_ID_LSB_MASK 0x0F 11325cf1a30Sjl139090 11481f63062Sarutz /* values for OBERON_PORT_ID_LEAF field */ 11581f63062Sarutz #define OBERON_PORT_ID_LEAF_A 0 11681f63062Sarutz #define OBERON_PORT_ID_LEAF_B 1 11781f63062Sarutz 11825cf1a30Sjl139090 #define INTERRUPT_MAPPING_ENTRIES_T_DESTID 21 11925cf1a30Sjl139090 #define INTERRUPT_MAPPING_ENTRIES_T_DESTID_MASK 0x3ff 12025cf1a30Sjl139090 12125cf1a30Sjl139090 #define OBERON_TLU_CONTROL_DRN_TR_DIS 35 12225cf1a30Sjl139090 #define OBERON_TLU_CONTROL_CPLEP_DEN 34 12325cf1a30Sjl139090 #define OBERON_TLU_CONTROL_ECRCCHK_DIS 33 12425cf1a30Sjl139090 #define OBERON_TLU_CONTROL_ECRCGEN_DIS 32 12525cf1a30Sjl139090 12625cf1a30Sjl139090 #define TLU_SLOT_CAPABILITIES_HP 6 12725cf1a30Sjl139090 #define TLU_SLOT_CAPABILITIES_HPSUP 5 12825cf1a30Sjl139090 #define TLU_SLOT_CAPABILITIES_PWINDP 4 12925cf1a30Sjl139090 #define TLU_SLOT_CAPABILITIES_ATINDP 3 13025cf1a30Sjl139090 #define TLU_SLOT_CAPABILITIES_MRLSP 2 13125cf1a30Sjl139090 #define TLU_SLOT_CAPABILITIES_PWCNTLP 1 13225cf1a30Sjl139090 #define TLU_SLOT_CAPABILITIES_ATBTNP 0 13325cf1a30Sjl139090 13425cf1a30Sjl139090 #define DLU_INTERRUPT_MASK 0xe2048 13525cf1a30Sjl139090 #define DLU_INTERRUPT_MASK_MSK_INTERRUPT_EN 31 13625cf1a30Sjl139090 #define DLU_INTERRUPT_MASK_MSK_LINK_LAYER 5 13725cf1a30Sjl139090 #define DLU_INTERRUPT_MASK_MSK_PHY_ERROR 4 13825cf1a30Sjl139090 #define DLU_LINK_LAYER_CONFIG 0xe2200 13925cf1a30Sjl139090 #define DLU_LINK_LAYER_CONFIG_VC0_EN 8 14025cf1a30Sjl139090 #define DLU_LINK_LAYER_CONFIG_TLP_XMIT_FC_EN 3 14125cf1a30Sjl139090 #define DLU_LINK_LAYER_CONFIG_FREQ_ACK_ENABLE 2 14225cf1a30Sjl139090 #define DLU_LINK_LAYER_CONFIG_RETRY_DISABLE 1 143ba640a72Sjj156685 #define DLU_LINK_LAYER_STATUS 0xe2208 144ba640a72Sjj156685 #define DLU_LINK_LAYER_STATUS_LNK_STATE_MACH_STS_MASK 0x7 145ba640a72Sjj156685 #define DLU_LINK_LAYER_STATUS_LNK_STATE_MACH_STS_DL_INACTIVE 0x1 146ba640a72Sjj156685 #define DLU_LINK_LAYER_STATUS_LNK_STATE_MACH_STS_DL_INIT 0x2 147ba640a72Sjj156685 #define DLU_LINK_LAYER_STATUS_LNK_STATE_MACH_STS_DL_ACTIVE 0x4 148ba640a72Sjj156685 #define DLU_LINK_LAYER_STATUS_DLUP_STS 3 149ba640a72Sjj156685 #define DLU_LINK_LAYER_STATUS_INIT_FC_SM_STS 4 150ba640a72Sjj156685 #define DLU_LINK_LAYER_STATUS_INIT_FC_SM_STS_MASK 0x3 151ba640a72Sjj156685 #define DLU_LINK_LAYER_STATUS_INIT_FC_SM_STS_FC_IDLE 0x0 152ba640a72Sjj156685 #define DLU_LINK_LAYER_STATUS_INIT_FC_SM_STS_FC_INIT_1 0x1 153ba640a72Sjj156685 #define DLU_LINK_LAYER_STATUS_INIT_FC_SM_STS_FC_INIT_2 0x3 154ba640a72Sjj156685 #define DLU_LINK_LAYER_STATUS_INIT_FC_SM_STS_FC_INIT_DONE 0x2 15525cf1a30Sjl139090 #define DLU_LINK_LAYER_INTERRUPT_AND_STATUS 0xe2210 15625cf1a30Sjl139090 #define DLU_LINK_LAYER_INTERRUPT_AND_STATUS_INT_LINK_ERR_ACT 31 15725cf1a30Sjl139090 #define DLU_LINK_LAYER_INTERRUPT_AND_STATUS_INT_PARABUS_PE 23 15825cf1a30Sjl139090 #define DLU_LINK_LAYER_INTERRUPT_AND_STATUS_INT_UNSPRTD_DLLP 22 15925cf1a30Sjl139090 #define DLU_LINK_LAYER_INTERRUPT_AND_STATUS_INT_SRC_ERR_TLP 17 16025cf1a30Sjl139090 #define DLU_LINK_LAYER_INTERRUPT_MASK 0xe2220 16125cf1a30Sjl139090 #define DLU_LINK_LAYER_INTERRUPT_MASK_MSK_LINK_ERR_ACT 31 16225cf1a30Sjl139090 #define DLU_LINK_LAYER_INTERRUPT_MASK_MSK_PARABUS_PE 23 16325cf1a30Sjl139090 #define DLU_LINK_LAYER_INTERRUPT_MASK_MSK_UNSPRTD_DLLP 22 16425cf1a30Sjl139090 #define DLU_LINK_LAYER_INTERRUPT_MASK_MSK_SRC_ERR_TLP 17 16525cf1a30Sjl139090 #define DLU_FLOW_CONTROL_UPDATE_CONTROL 0xe2240 16625cf1a30Sjl139090 #define DLU_FLOW_CONTROL_UPDATE_CONTROL_FC0_U_C_EN 2 16725cf1a30Sjl139090 #define DLU_FLOW_CONTROL_UPDATE_CONTROL_FC0_U_NP_EN 1 16825cf1a30Sjl139090 #define DLU_FLOW_CONTROL_UPDATE_CONTROL_FC0_U_P_EN 0 16925cf1a30Sjl139090 #define DLU_TXLINK_REPLAY_TIMER_THRESHOLD 0xe2410 17025cf1a30Sjl139090 #define DLU_TXLINK_REPLAY_TIMER_THRESHOLD_RPLAY_TMR_THR 0 17125cf1a30Sjl139090 #define DLU_TXLINK_REPLAY_TIMER_THRESHOLD_RPLAY_TMR_THR_MASK 0xfffff 17225cf1a30Sjl139090 #define DLU_TXLINK_REPLAY_TIMER_THRESHOLD_DEFAULT 0xc9 17325cf1a30Sjl139090 #define DLU_PORT_CONTROL 0xe2b00 17425cf1a30Sjl139090 #define DLU_PORT_CONTROL_CK_EN 0 17525cf1a30Sjl139090 #define DLU_PORT_STATUS 0xe2b08 17625cf1a30Sjl139090 17725cf1a30Sjl139090 #define MMU_INTERRUPT_STATUS_TTC_DUE_P 8 17825cf1a30Sjl139090 #define MMU_INTERRUPT_STATUS_TTC_DUE_S 40 17925cf1a30Sjl139090 #define ILU_INTERRUPT_STATUS_IHB_UE_P 4 18025cf1a30Sjl139090 #define ILU_INTERRUPT_STATUS_IHB_UE_S 36 18125cf1a30Sjl139090 #define TLU_UNCORRECTABLE_ERROR_STATUS_CLEAR_ECRC_P 19 18225cf1a30Sjl139090 #define TLU_UNCORRECTABLE_ERROR_STATUS_CLEAR_ECRC_S 51 18325cf1a30Sjl139090 #define TLU_UNCORRECTABLE_ERROR_STATUS_CLEAR_POIS_P 12 18425cf1a30Sjl139090 #define TLU_UNCORRECTABLE_ERROR_STATUS_CLEAR_POIS_S 44 18525cf1a30Sjl139090 #define TLU_OTHER_EVENT_STATUS_CLEAR_EIUE_P 0 18625cf1a30Sjl139090 #define TLU_OTHER_EVENT_STATUS_CLEAR_EIUE_S 32 18725cf1a30Sjl139090 #define TLU_OTHER_EVENT_STATUS_CLEAR_ERBUE_P 1 18825cf1a30Sjl139090 #define TLU_OTHER_EVENT_STATUS_CLEAR_ERBUE_S 33 18925cf1a30Sjl139090 #define TLU_OTHER_EVENT_STATUS_CLEAR_TLUEITMO_P 7 19025cf1a30Sjl139090 #define TLU_OTHER_EVENT_STATUS_CLEAR_TLUEITMO_S 39 19125cf1a30Sjl139090 #define TLU_OTHER_EVENT_STATUS_CLEAR_EHBUE_P 12 19225cf1a30Sjl139090 #define TLU_OTHER_EVENT_STATUS_CLEAR_EHBUE_S 44 19325cf1a30Sjl139090 #define TLU_OTHER_EVENT_STATUS_CLEAR_EDBUE_P 12 19425cf1a30Sjl139090 #define TLU_OTHER_EVENT_STATUS_CLEAR_EDBUE_S 44 19525cf1a30Sjl139090 19625cf1a30Sjl139090 #define TLU_CONTROL_DRN_TR_DIS 35 19725cf1a30Sjl139090 19825cf1a30Sjl139090 #define TLU_SLOT_CONTROL 0x90038 19925cf1a30Sjl139090 #define TLU_SLOT_CONTROL_PWFDEN 1 20025cf1a30Sjl139090 #define TLU_SLOT_STATUS 0x90040 20125cf1a30Sjl139090 #define TLU_SLOT_STATUS_PSD 6 20225cf1a30Sjl139090 #define TLU_SLOT_STATUS_MRLS 5 20325cf1a30Sjl139090 #define TLU_SLOT_STATUS_CMDCPLT 4 20425cf1a30Sjl139090 #define TLU_SLOT_STATUS_PSDC 3 20525cf1a30Sjl139090 #define TLU_SLOT_STATUS_MRLC 2 20625cf1a30Sjl139090 #define TLU_SLOT_STATUS_PWFD 1 20725cf1a30Sjl139090 #define TLU_SLOT_STATUS_ABTN 0 20825cf1a30Sjl139090 209ba640a72Sjj156685 #define FLP_PORT_LINK_CONTROL 0xe5008 210ba640a72Sjj156685 #define FLP_PORT_LINK_CONTROL_RETRAIN 5 211ba640a72Sjj156685 21225cf1a30Sjl139090 #define FLP_PORT_CONTROL 0xe5200 21325cf1a30Sjl139090 #define FLP_PORT_CONTROL_PORT_DIS 0 21425cf1a30Sjl139090 215ba640a72Sjj156685 #define FLP_PORT_ACTIVE_STATUS 0xe5240 216ba640a72Sjj156685 #define FLP_PORT_ACTIVE_STATUS_TRAIN_ERROR 1 217ba640a72Sjj156685 21825cf1a30Sjl139090 #define HOTPLUG_CONTROL 0x88000 21925cf1a30Sjl139090 #define HOTPLUG_CONTROL_SLOTPON 3 22025cf1a30Sjl139090 #define HOTPLUG_CONTROL_PWREN 2 22125cf1a30Sjl139090 #define HOTPLUG_CONTROL_CLKEN 1 22225cf1a30Sjl139090 #define HOTPLUG_CONTROL_N_PERST 0 22325cf1a30Sjl139090 224d60bae31Sdwoods #define DRAIN_CONTROL_STATUS 0x51100 225d60bae31Sdwoods #define DRAIN_CONTROL_STATUS_DRAIN 0 226d60bae31Sdwoods 22725cf1a30Sjl139090 #ifdef __cplusplus 22825cf1a30Sjl139090 } 22925cf1a30Sjl139090 #endif 23025cf1a30Sjl139090 23125cf1a30Sjl139090 #endif /* _SYS_OBERON_REGS_H */ 232