]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/i386/AT386/himem.h
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
23 * @OSF_FREE_COPYRIGHT@
28 * Revision 1.1.1.1 1998/09/22 21:05:38 wsanchez
29 * Import of Mac OS X kernel (~semeria)
31 * Revision 1.1.1.1 1998/03/07 02:25:39 wsanchez
32 * Import of OSF Mach kernel (~mburg)
34 * Revision 1.3.11.4 1995/12/15 10:49:49 bernadat
35 * cbus includes moved to busses/cbus
38 * Revision 1.3.11.3 1995/08/21 20:33:23 devrcs
39 * ri-osc CR1547: Fix himem buffer translation to cope with non
40 * page-aligned addresses.
41 * [1995/08/08 16:52:06 bolinger]
43 * Revision 1.3.11.2 1995/01/26 22:14:56 ezf
44 * removed extraneous CMU CR
45 * [1995/01/26 20:24:48 ezf]
47 * Revision 1.3.9.2 1994/06/08 21:14:27 dswartz
49 * [1994/06/08 21:12:31 dswartz]
51 * Revision 1.3.9.1 1994/05/19 20:30:30 dwm
52 * mk6 CR 80. Add himem_init prototype.
53 * [1994/05/19 20:30:10 dwm]
55 * Revision 1.3.2.3 1993/08/09 19:37:21 dswartz
56 * Add ANSI prototypes - CR#9523
57 * [1993/08/06 17:50:06 dswartz]
59 * Revision 1.3.2.2 1993/06/09 02:25:24 gm
60 * CR9176 - ANSI C violations: trailing tokens on CPP
61 * directives, extra semicolons after decl_ ..., asm keywords
62 * [1993/06/07 18:58:40 jeffc]
64 * Added to OSF/1 R1.3 from NMK15.0.
65 * [1993/06/02 21:01:57 jeffc]
67 * Revision 1.3 1993/04/19 16:09:54 devrcs
69 * [1993/03/03 12:12:12 bernadat]
71 * Revision 1.2 1992/11/25 01:07:16 robert
72 * integrate changes below for norma_14
73 * [1992/11/13 19:28:57 robert]
78 #ifndef _I386AT_HIMEM_H_
79 #define _I386AT_HIMEM_H_
82 * support of memory above 16 Megs for DMA limited to memory
86 #include <platforms.h>
91 extern int himem_request
;
92 extern int himem_used
;
93 #endif /* HIMEM_STATS */
96 struct himem_link
*next
;
97 vm_offset_t high_addr
; /* physical address */
98 vm_offset_t low_page
; /* physical page */
99 vm_offset_t offset
; /* offset on page */
103 typedef struct himem_link
*hil_t
;
106 #define HIGH_MEM ((vm_offset_t) 0xf00000)
108 #define _high_mem_page(x) ((vm_offset_t)(x) >= HIGH_MEM)
112 #define high_mem_page(x) \
113 (++himem_request && _high_mem_page(x) && ++himem_used)
115 #else /* HIMEM_STATS */
116 #define high_mem_page(x) _high_mem_page(x)
117 #endif /* HIMEM_STATS */
119 extern void himem_init(void);
120 extern void himem_reserve(
122 extern vm_offset_t
himem_convert(
127 extern void himem_revert(
130 #endif /* _I386AT_HIMEM_H_ */