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