17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*39470729Skd93003 * Common Development and Distribution License (the "License"). 6*39470729Skd93003 * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22*39470729Skd93003 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate #ifndef _SYS_PCI_REGS_H 277c478bd9Sstevel@tonic-gate #define _SYS_PCI_REGS_H 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gate #ifdef __cplusplus 327c478bd9Sstevel@tonic-gate extern "C" { 337c478bd9Sstevel@tonic-gate #endif 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gate /* 367c478bd9Sstevel@tonic-gate * Offsets of registers in the interrupt block: 377c478bd9Sstevel@tonic-gate */ 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gate #define COMMON_IB_UPA0_INTR_MAP_REG_OFFSET 0x6000 407c478bd9Sstevel@tonic-gate #define COMMON_IB_UPA1_INTR_MAP_REG_OFFSET 0x8000 417c478bd9Sstevel@tonic-gate #define COMMON_IB_SLOT_INTR_STATE_DIAG_REG 0xA800 427c478bd9Sstevel@tonic-gate #define COMMON_IB_OBIO_INTR_STATE_DIAG_REG 0xA808 437c478bd9Sstevel@tonic-gate #define COMMON_IB_SLOT_CLEAR_INTR_REG_OFFSET 0x1400 447c478bd9Sstevel@tonic-gate #define COMMON_IB_INTR_RETRY_TIMER_OFFSET 0x1A00 457c478bd9Sstevel@tonic-gate 467c478bd9Sstevel@tonic-gate /* 477c478bd9Sstevel@tonic-gate * Offsets of registers in the ECC block: 487c478bd9Sstevel@tonic-gate */ 497c478bd9Sstevel@tonic-gate #define COMMON_ECC_CSR_OFFSET 0x20 507c478bd9Sstevel@tonic-gate #define COMMON_UE_AFSR_OFFSET 0x30 517c478bd9Sstevel@tonic-gate #define COMMON_UE_AFAR_OFFSET 0x38 527c478bd9Sstevel@tonic-gate #define COMMON_CE_AFSR_OFFSET 0x40 537c478bd9Sstevel@tonic-gate #define COMMON_CE_AFAR_OFFSET 0x48 547c478bd9Sstevel@tonic-gate 557c478bd9Sstevel@tonic-gate /* 567c478bd9Sstevel@tonic-gate * Offsets of registers in the iommu block: 577c478bd9Sstevel@tonic-gate */ 587c478bd9Sstevel@tonic-gate #define COMMON_IOMMU_CTRL_REG_OFFSET 0x00000200 597c478bd9Sstevel@tonic-gate #define COMMON_IOMMU_TSB_BASE_ADDR_REG_OFFSET 0x00000208 607c478bd9Sstevel@tonic-gate #define COMMON_IOMMU_FLUSH_PAGE_REG_OFFSET 0x00000210 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gate #define COMMON_IOMMU_TLB_TAG_DIAG_ACC_OFFSET 0x0000A580 637c478bd9Sstevel@tonic-gate #define COMMON_IOMMU_TLB_DATA_DIAG_ACC_OFFSET 0x0000A600 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gate /* 667c478bd9Sstevel@tonic-gate * (psycho and schizo) control register bit definitions: 677c478bd9Sstevel@tonic-gate */ 687c478bd9Sstevel@tonic-gate #define COMMON_CB_CONTROL_STATUS_IGN 0x0007c00000000000ull 697c478bd9Sstevel@tonic-gate #define COMMON_CB_CONTROL_STATUS_IGN_SHIFT 46 707c478bd9Sstevel@tonic-gate #define COMMON_CB_CONTROL_STATUS_APCKEN 0x0000000000000008ull 717c478bd9Sstevel@tonic-gate #define COMMON_CB_CONTROL_STATUS_APERR 0x0000000000000004ull 727c478bd9Sstevel@tonic-gate #define COMMON_CB_CONTROL_STATUS_IAP 0x0000000000000002ull 737c478bd9Sstevel@tonic-gate 747c478bd9Sstevel@tonic-gate /* 757c478bd9Sstevel@tonic-gate * (psycho and schizo) interrupt mapping register bit definitions: 767c478bd9Sstevel@tonic-gate */ 777c478bd9Sstevel@tonic-gate #define COMMON_INTR_MAP_REG_VALID 0x0000000080000000ull 787c478bd9Sstevel@tonic-gate #define COMMON_INTR_MAP_REG_TID 0x000000007C000000ull 797c478bd9Sstevel@tonic-gate #define COMMON_INTR_MAP_REG_IGN 0x00000000000007C0ull 807c478bd9Sstevel@tonic-gate #define COMMON_INTR_MAP_REG_INO 0x000000000000003full 817c478bd9Sstevel@tonic-gate #define COMMON_INTR_MAP_REG_TID_SHIFT 26 827c478bd9Sstevel@tonic-gate #define COMMON_INTR_MAP_REG_IGN_SHIFT 6 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gate /* 857c478bd9Sstevel@tonic-gate * psycho clear interrupt register bit definitions: 867c478bd9Sstevel@tonic-gate */ 877c478bd9Sstevel@tonic-gate #define COMMON_CLEAR_INTR_REG_MASK 0x0000000000000003ull 887c478bd9Sstevel@tonic-gate #define COMMON_CLEAR_INTR_REG_IDLE 0x0000000000000000ull 897c478bd9Sstevel@tonic-gate #define COMMON_CLEAR_INTR_REG_RECEIVED 0x0000000000000001ull 907c478bd9Sstevel@tonic-gate #define COMMON_CLEAR_INTR_REG_RSVD 0x0000000000000002ull 917c478bd9Sstevel@tonic-gate #define COMMON_CLEAR_INTR_REG_PENDING 0x0000000000000003ull 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gate /* 947c478bd9Sstevel@tonic-gate * psycho and schizo ECC control register bit definitions: 957c478bd9Sstevel@tonic-gate */ 967c478bd9Sstevel@tonic-gate #define COMMON_ECC_CTRL_ECC_EN 0x8000000000000000ull 977c478bd9Sstevel@tonic-gate #define COMMON_ECC_CTRL_UE_INTEN 0x4000000000000000ull 987c478bd9Sstevel@tonic-gate #define COMMON_ECC_CTRL_CE_INTEN 0x2000000000000000ull 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gate /* 1017c478bd9Sstevel@tonic-gate * sabre ECC UE AFSR bit definitions: 1027c478bd9Sstevel@tonic-gate */ 1037c478bd9Sstevel@tonic-gate #define SABRE_UE_AFSR_SDTE_SHIFT 57 1047c478bd9Sstevel@tonic-gate #define SABRE_UE_AFSR_PDTE_SHIFT 56 1057c478bd9Sstevel@tonic-gate #define SABRE_UE_ARSR_DTE_MASK 0x0000000000000003ull 1067c478bd9Sstevel@tonic-gate #define SABRE_UE_AFSR_E_SDTE 0x2 1077c478bd9Sstevel@tonic-gate #define SABRE_UE_AFSR_E_PDTE 0x1 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gate /* 1107c478bd9Sstevel@tonic-gate * psycho and schizo ECC UE AFSR bit definitions: 1117c478bd9Sstevel@tonic-gate */ 1127c478bd9Sstevel@tonic-gate #define COMMON_ECC_UE_AFSR_PE_SHIFT 61 1137c478bd9Sstevel@tonic-gate #define COMMON_ECC_UE_AFSR_SE_SHIFT 58 1147c478bd9Sstevel@tonic-gate #define COMMON_ECC_UE_AFSR_E_MASK 0x0000000000000007ull 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gate /* 1177c478bd9Sstevel@tonic-gate * psycho and schizo ECC CE AFSR bit definitions: 1187c478bd9Sstevel@tonic-gate */ 1197c478bd9Sstevel@tonic-gate #define COMMON_ECC_CE_AFSR_PE_SHIFT 61 1207c478bd9Sstevel@tonic-gate #define COMMON_ECC_CE_AFSR_SE_SHIFT 58 1217c478bd9Sstevel@tonic-gate #define COMMON_ECC_CE_AFSR_E_MASK 0x0000000000000007ull 122*39470729Skd93003 123*39470729Skd93003 /* 124*39470729Skd93003 * psycho and schizo ECC CE/UE AFSR bit definitions for error types: 125*39470729Skd93003 */ 126*39470729Skd93003 #define COMMON_ECC_AFSR_E_PIO 0x0000000000000004ull 127*39470729Skd93003 #define COMMON_ECC_AFSR_E_DRD 0x0000000000000002ull 128*39470729Skd93003 #define COMMON_ECC_AFSR_E_DWR 0x0000000000000001ull 1297c478bd9Sstevel@tonic-gate 1307c478bd9Sstevel@tonic-gate /* 1317c478bd9Sstevel@tonic-gate * psycho and schizo pci control register bits: 1327c478bd9Sstevel@tonic-gate */ 1337c478bd9Sstevel@tonic-gate #define COMMON_PCI_CTRL_SBH_ERR 0x0000000800000000ull 1347c478bd9Sstevel@tonic-gate #define COMMON_PCI_CTRL_SERR 0x0000000400000000ull 1357c478bd9Sstevel@tonic-gate #define COMMON_PCI_CTRL_SPEED 0x0000000200000000ull 1367c478bd9Sstevel@tonic-gate 1377c478bd9Sstevel@tonic-gate /* 1387c478bd9Sstevel@tonic-gate * psycho and schizo PCI diagnostic register bit definitions: 1397c478bd9Sstevel@tonic-gate */ 1407c478bd9Sstevel@tonic-gate #define COMMON_PCI_DIAG_DIS_RETRY 0x0000000000000040ull 1417c478bd9Sstevel@tonic-gate #define COMMON_PCI_DIAG_DIS_INTSYNC 0x0000000000000020ull 1427c478bd9Sstevel@tonic-gate 1437c478bd9Sstevel@tonic-gate /* 1447c478bd9Sstevel@tonic-gate * psycho and schizo IOMMU control register bit definitions: 1457c478bd9Sstevel@tonic-gate */ 1467c478bd9Sstevel@tonic-gate #define COMMON_IOMMU_CTRL_ENABLE 0x0000000000000001ull 1477c478bd9Sstevel@tonic-gate #define COMMON_IOMMU_CTRL_DIAG_ENABLE 0x0000000000000002ull 1487c478bd9Sstevel@tonic-gate #define COMMON_IOMMU_CTRL_TSB_SZ_SHIFT 16 1497c478bd9Sstevel@tonic-gate #define COMMON_IOMMU_CTRL_TBW_SZ_SHIFT 2 1507c478bd9Sstevel@tonic-gate #define COMMON_IOMMU_CTRL_LCK_ENABLE 0x0000000000800000ull 1517c478bd9Sstevel@tonic-gate 1527c478bd9Sstevel@tonic-gate /* 1537c478bd9Sstevel@tonic-gate * psycho and schizo streaming cache control register bit definitions: 1547c478bd9Sstevel@tonic-gate */ 1557c478bd9Sstevel@tonic-gate #define COMMON_SC_CTRL_ENABLE 0x0000000000000001ull 1567c478bd9Sstevel@tonic-gate #define COMMON_SC_CTRL_DIAG_ENABLE 0x0000000000000002ull 1577c478bd9Sstevel@tonic-gate #define COMMON_SC_CTRL_RR__DISABLE 0x0000000000000004ull 1587c478bd9Sstevel@tonic-gate #define COMMON_SC_CTRL_LRU_LE 0x0000000000000008ull 1597c478bd9Sstevel@tonic-gate 1607c478bd9Sstevel@tonic-gate /* 1617c478bd9Sstevel@tonic-gate * offsets of PCI address spaces from base address: 1627c478bd9Sstevel@tonic-gate */ 1637c478bd9Sstevel@tonic-gate #define PCI_CONFIG 0x001000000ull 1647c478bd9Sstevel@tonic-gate #define PCI_A_IO 0x002000000ull 1657c478bd9Sstevel@tonic-gate #define PCI_B_IO 0x002010000ull 1667c478bd9Sstevel@tonic-gate #define PCI_A_MEMORY 0x100000000ull 1677c478bd9Sstevel@tonic-gate #define PCI_B_MEMORY 0x180000000ull 1687c478bd9Sstevel@tonic-gate #define PCI_IO_SIZE 0x000010000ull 1697c478bd9Sstevel@tonic-gate #define PCI_MEM_SIZE 0x080000000ull 1707c478bd9Sstevel@tonic-gate 1717c478bd9Sstevel@tonic-gate #ifdef __cplusplus 1727c478bd9Sstevel@tonic-gate } 1737c478bd9Sstevel@tonic-gate #endif 1747c478bd9Sstevel@tonic-gate 1757c478bd9Sstevel@tonic-gate #endif /* _SYS_PCI_REGS_H */ 176