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) 2000-2001 by Sun Microsystems, Inc. 24 * All rights reserved. 25 */ 26 27 #ifndef _MEMCFG_IMPL_H 28 #define _MEMCFG_IMPL_H 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 34 /* 35 * Log message texts 36 */ 37 #define EM_INIT_FAILED gettext("SUNW_piclmemcfg init failed!\n") 38 #define EM_PHYSIC_MEM_TREE_FAILED \ 39 gettext("SUNW_piclmemcfg physic memory tree failed!\n") 40 #define EM_LOGIC_MEM_TREE_FAILED \ 41 gettext("SUNW_piclmemcfg logic memory tree failed!\n") 42 43 /* 44 * Constants for some PICL properties 45 */ 46 #define INTERLEAVEFACTOR 1 /* Only one interleave way */ 47 48 /* 49 * OBP property names 50 */ 51 #define OBP_PROP_SIZE_CELLS "#size-cells" 52 53 #define SUPPORTED_NUM_CELL_SIZE 2 /* #size-cells */ 54 55 #define TOTAL_MEM_SLOTS 4 /* Total memory module slots */ 56 57 typedef struct memmod_info { 58 picl_nodehdl_t memmodh; /* memory-module node handle */ 59 uint64_t base; /* base address at the slot */ 60 uint64_t size; /* in bytes */ 61 } mmodinfo_t; 62 63 /* 64 * The expected values of the IEEE 1275 reg property of a memory node 65 * in PLATFORM 66 */ 67 typedef struct regspec { 68 uint64_t physaddr; 69 uint64_t size; 70 } regspec_t; 71 72 #ifdef __cplusplus 73 } 74 #endif 75 76 #endif /* _MEMCFG_IMPL_H */ 77