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 (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright (c) 2015 by Delphix. All rights reserved.
24 * Copyright 2016 Joyent, Inc.
25 */
26
27 /* Copyright (c) 1988 AT&T */
28 /* All Rights Reserved */
29
30
31 #ifndef _SYS_MACHPARAM_H
32 #define _SYS_MACHPARAM_H
33
34 #if !defined(_ASM)
35 #include <sys/types.h>
36
37 #if defined(__xpv)
38 #include <sys/xpv_impl.h>
39 #endif
40
41 #endif
42
43 #ifdef __cplusplus
44 extern "C" {
276 #else
277 #define KERNEL_TEXT KERNEL_TEXT_i386
278 #endif
279
280 /*
281 * Virtual address range available to the debugger
282 * We place it just above the kernel text (4M) and kernel data (4M).
283 */
284 #define SEGDEBUGBASE (KERNEL_TEXT + ADDRESS_C(0x800000))
285 #define SEGDEBUGSIZE ADDRESS_C(0x400000)
286
287 /*
288 * Define upper limit on user address space
289 */
290 #define USERLIMIT KERNELBASE
291 #define USERLIMIT32 USERLIMIT
292
293 #endif /* __i386 */
294
295 /*
296 * Reserve pages just below KERNEL_TEXT for the GDT, IDT, TSS and debug info.
297 *
298 * For now, DEBUG_INFO_VA must be first in this list for "xm" initiated dumps
299 * of solaris domUs to be usable with mdb. Relying on a fixed VA is not viable
300 * long term, but it's the best we've got for now.
301 */
302 #if !defined(_ASM)
303 #define DEBUG_INFO_VA (KERNEL_TEXT - MMU_PAGESIZE)
304 #define GDT_VA (DEBUG_INFO_VA - MMU_PAGESIZE)
305 #define IDT_VA (GDT_VA - MMU_PAGESIZE)
306 #define KTSS_VA (IDT_VA - MMU_PAGESIZE)
307 #define DFTSS_VA (KTSS_VA - MMU_PAGESIZE)
308 #define MISC_VA_BASE (DFTSS_VA)
309 #define MISC_VA_SIZE (KERNEL_TEXT - MISC_VA_BASE)
310 #endif /* !_ASM */
311
312 #if !defined(_ASM) && !defined(_KMDB)
313 extern uintptr_t kernelbase, segmap_start, segmapsize;
314 #endif
315
316 /*
317 * ARGSBASE is the base virtual address of the range which
318 * the kernel uses to map the arguments for exec.
319 */
320 #define ARGSBASE PROMSTART
321
322 /*
323 * reserve space for modules
324 */
325 #define MODTEXT (1024 * 1024 * 2)
326 #define MODDATA (1024 * 300)
|
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 (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright (c) 2015 by Delphix. All rights reserved.
24 * Copyright 2018 Joyent, Inc.
25 */
26
27 /* Copyright (c) 1988 AT&T */
28 /* All Rights Reserved */
29
30
31 #ifndef _SYS_MACHPARAM_H
32 #define _SYS_MACHPARAM_H
33
34 #if !defined(_ASM)
35 #include <sys/types.h>
36
37 #if defined(__xpv)
38 #include <sys/xpv_impl.h>
39 #endif
40
41 #endif
42
43 #ifdef __cplusplus
44 extern "C" {
276 #else
277 #define KERNEL_TEXT KERNEL_TEXT_i386
278 #endif
279
280 /*
281 * Virtual address range available to the debugger
282 * We place it just above the kernel text (4M) and kernel data (4M).
283 */
284 #define SEGDEBUGBASE (KERNEL_TEXT + ADDRESS_C(0x800000))
285 #define SEGDEBUGSIZE ADDRESS_C(0x400000)
286
287 /*
288 * Define upper limit on user address space
289 */
290 #define USERLIMIT KERNELBASE
291 #define USERLIMIT32 USERLIMIT
292
293 #endif /* __i386 */
294
295 /*
296 * Reserve pages just below KERNEL_TEXT for the GDT, IDT, LDT, TSS and debug
297 * info.
298 *
299 * For now, DEBUG_INFO_VA must be first in this list for "xm" initiated dumps
300 * of solaris domUs to be usable with mdb. Relying on a fixed VA is not viable
301 * long term, but it's the best we've got for now.
302 */
303 #if !defined(_ASM)
304 #define DEBUG_INFO_VA (KERNEL_TEXT - MMU_PAGESIZE)
305 #define GDT_VA (DEBUG_INFO_VA - MMU_PAGESIZE)
306 #define IDT_VA (GDT_VA - MMU_PAGESIZE)
307 #define LDT_VA (IDT_VA - (16 * MMU_PAGESIZE))
308 #define KTSS_VA (LDT_VA - MMU_PAGESIZE)
309 #define DFTSS_VA (KTSS_VA - MMU_PAGESIZE)
310 #define MISC_VA_BASE (DFTSS_VA)
311 #define MISC_VA_SIZE (KERNEL_TEXT - MISC_VA_BASE)
312 #endif /* !_ASM */
313
314 #if !defined(_ASM) && !defined(_KMDB)
315 extern uintptr_t kernelbase, segmap_start, segmapsize;
316 #endif
317
318 /*
319 * ARGSBASE is the base virtual address of the range which
320 * the kernel uses to map the arguments for exec.
321 */
322 #define ARGSBASE PROMSTART
323
324 /*
325 * reserve space for modules
326 */
327 #define MODTEXT (1024 * 1024 * 2)
328 #define MODDATA (1024 * 300)
|