8446 uts: pci_check_bios() should check for BIOS
[unleashed.git] / include / sys / memlist.h
blob1664c42f2ff0bf5802b134a57cf07fcf405d3b7c
1 /*
2 * CDDL HEADER START
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.
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.
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]
19 * CDDL HEADER END
22 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _SYS_MEMLIST_H
27 #define _SYS_MEMLIST_H
30 * Common memlist format, exported by boot.
33 #include <sys/types.h>
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
40 * Boot programs of version 4 and greater pass a linked list
41 * of struct memlist to the kernel.
43 typedef struct memlist {
44 uint64_t ml_address; /* starting address of memory segment */
45 uint64_t ml_size; /* size of same */
46 struct memlist *ml_next; /* link to next list element */
47 struct memlist *ml_prev; /* link to previous list element */
48 } memlist_t;
50 extern int address_in_memlist(struct memlist *, uint64_t, size_t);
53 * phys_install is the pointer to the physical installed memory list
54 * which may change when memory is added or deleted. The functions
55 * memlist_read_lock() and memlist_read_unlock() should be used
56 * to protect reading this list.
58 extern struct memlist *phys_install;
60 #if defined(__x86)
62 * bios reserved memory
64 extern struct memlist *bios_rsvd;
65 #endif
67 extern pgcnt_t num_phys_pages();
69 #ifdef __cplusplus
71 #endif
73 #endif /* _SYS_MEMLIST_H */