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 (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26 #ifndef _SYS_MEMLIST_PLAT_H 27 #define _SYS_MEMLIST_PLAT_H 28 29 #pragma ident "%Z%%M% %I% %E% SMI" 30 31 /* 32 * Boot time configuration information objects 33 */ 34 35 #include <sys/types.h> 36 #include <sys/memlist.h> 37 38 #ifdef __cplusplus 39 extern "C" { 40 #endif 41 42 /* 43 * The prom hands us an array of these 44 * as available and installed props 45 */ 46 typedef struct prom_memlist { 47 u_longlong_t addr; 48 u_longlong_t size; 49 } prom_memlist_t; 50 51 extern int check_boot_version(int); 52 extern void copy_memlist(prom_memlist_t *, size_t, struct memlist **); 53 extern void size_physavail(prom_memlist_t *physavail, size_t size, 54 pgcnt_t *npages, int *memblocks); 55 extern pgcnt_t size_virtalloc(prom_memlist_t *avail, size_t size); 56 extern void installed_top_size_memlist_array(prom_memlist_t *, size_t, pfn_t *, 57 pgcnt_t *); 58 extern void installed_top_size(struct memlist *, pfn_t *, pgcnt_t *); 59 extern void fix_prom_pages(struct memlist *, struct memlist *); 60 extern void init_boot_memlists(void); 61 extern void copy_boot_memlists( 62 prom_memlist_t **physinstalled, size_t *physinstalled_len, 63 prom_memlist_t **physavail, size_t *physavail_len, 64 prom_memlist_t **virtavail, size_t *virtavail_len); 65 extern void phys_install_has_changed(void); 66 67 extern void diff_memlists(struct memlist *, struct memlist *, 68 void (*)(uint64_t, uint64_t)); 69 extern void sync_memlists(struct memlist *, struct memlist *); 70 71 #ifdef __cplusplus 72 } 73 #endif 74 75 #endif /* _SYS_MEMLIST_PLAT_H */ 76