1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright (c) 1999-2000 by Sun Microsystems, Inc. 24 * All rights reserved. 25 */ 26 27 #ifndef _SCAT_PA_SPACE_H 28 #define _SCAT_PA_SPACE_H 29 30 #pragma ident "%Z%%M% %I% %E% SMI" 31 32 /* 33 * This file contains definitions related to the Starcat 34 * physical address space. 35 */ 36 37 /* 38 * POST DEVELOPERS: 39 * This file is copied to the OS workspace, and thus must abide by the OS 40 * coding standards. This file must always pass cstyle and hdrchk. 41 */ 42 43 #ifdef __cplusplus 44 extern "C" { 45 #endif 46 47 #define STARCAT_DEVICE_CONFIG (0x40000000000ull) 48 49 #define EXP_PA_ADDR(exp) (exp << 28) 50 51 /* 52 * Useful to translate an sram or fprom offset to an address 53 * that a host processor would use to reach it. 54 */ 55 #define BOOTBUS_PA_BASE 0x7FFF0000000ull 56 57 /* See bbc.h for sizes */ 58 #define BOOTBUS_FPROM_PA_BASE (BOOTBUS_PA_BASE + 0) 59 #define BOOTBUS_SRAM_PA_BASE (BOOTBUS_PA_BASE + 0x900000u) 60 61 /* 62 * Cacheable Physical Memory Addresses in Starcat are assigned 63 * to expanders in 128 GByte slices, based on PA[41:37]. 64 * The slice to exp mapping is not always 1-1, swaps may occur 65 * as a result of some DR or POST operations. 66 * The map is maintained in the PCD. 67 * The slice number will always be a valid expander board 68 * number in [0,17], but it may not reside on that expander. 69 * The PA in these macros is 64-bit, the slice is 8 bit, unsigned. 70 */ 71 #define PA_2_SLICE128G(pa) (((uint8_t)((pa) >> 37)) & 0x1Fu) 72 #define SLICE128G_2_PA_BASE(slice) (((uint64_t)((slice) & 0x1F)) << 37) 73 74 75 #ifdef __cplusplus 76 } 77 #endif 78 79 #endif /* !_SCAT_PA_SPACE_H */ 80