VirtualBox

source: vbox/trunk/include/VBox/param.h@ 28800

Last change on this file since 28800 was 28800, checked in by vboxsync, 14 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.5 KB
Line 
1/** @file
2 * VirtualBox Parameter Definitions. (VMM,+)
3 *
4 * param.mac is generated from this file by running 'kmk incs' in the root.
5 */
6
7/*
8 * Copyright (C) 2006-2009 Oracle Corporation
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 *
18 * The contents of this file may alternatively be used under the terms
19 * of the Common Development and Distribution License Version 1.0
20 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
21 * VirtualBox OSE distribution, in which case the provisions of the
22 * CDDL are applicable instead of those of the GPL.
23 *
24 * You may elect to license modified versions of this file under the
25 * terms and conditions of either the GPL or the CDDL or both.
26 */
27
28#ifndef ___VBox_param_h
29#define ___VBox_param_h
30
31#include <iprt/param.h>
32#include <iprt/cdefs.h>
33
34
35/** @defgroup grp_vbox_param VBox Parameter Definition
36 * @{
37 */
38
39/** The maximum number of pages that can be allocated and mapped
40 * by various MM, PGM and SUP APIs. */
41#define VBOX_MAX_ALLOC_PAGE_COUNT (256U * _1M / PAGE_SIZE)
42
43
44/** @defgroup grp_vbox_param_mm Memory Monitor Parameters
45 * @ingroup grp_vbox_param
46 * @{
47 */
48/** Initial address of Hypervisor Memory Area.
49 * MUST BE PAGE TABLE ALIGNED! */
50#define MM_HYPER_AREA_ADDRESS UINT32_C(0xa0000000)
51
52/** The max size of the hypervisor memory area. */
53#define MM_HYPER_AREA_MAX_SIZE (40U * _1M) /**< @todo Readjust when floating RAMRANGEs have been implemented. Used to be 20 * _1MB */
54
55/** Maximum number of bytes we can dynamically map into the hypervisor region.
56 * This must be a power of 2 number of pages!
57 */
58#define MM_HYPER_DYNAMIC_SIZE (16U * PAGE_SIZE)
59
60/** The minimum guest RAM size in bytes. */
61#define MM_RAM_MIN UINT32_C(0x00400000)
62/** The maximum guest RAM size in bytes. */
63#if HC_ARCH_BITS == 64
64# define MM_RAM_MAX UINT64_C(0x400000000)
65#else
66# define MM_RAM_MAX UINT64_C(0x0E0000000)
67#endif
68/** The minimum guest RAM size in MBs. */
69#define MM_RAM_MIN_IN_MB UINT32_C(4)
70/** The maximum guest RAM size in MBs. */
71#if HC_ARCH_BITS == 64
72# define MM_RAM_MAX_IN_MB UINT32_C(16384)
73#else
74# define MM_RAM_MAX_IN_MB UINT32_C(3584)
75#endif
76/** The default size of the below 4GB RAM hole. */
77#define MM_RAM_HOLE_SIZE_DEFAULT (512U * _1M)
78/** @} */
79
80
81/** @defgroup grp_vbox_param_pgm Page Manager Parameters
82 * @ingroup grp_vbox_param
83 * @{
84 */
85/** The number of handy pages.
86 * This should be a power of two. */
87#define PGM_HANDY_PAGES 128
88/** The threshold at which allocation of more handy pages is flagged. */
89#define PGM_HANDY_PAGES_SET_FF 32
90/** The threshold at which we will allocate more when in ring-3.
91 * This is must be smaller than both PGM_HANDY_PAGES_SET_FF and
92 * PGM_HANDY_PAGES_MIN. */
93#define PGM_HANDY_PAGES_R3_ALLOC 8
94/** The threshold at which we will allocate more when in ring-0 or raw mode.
95 * The idea is that we should never go below this threshold while in ring-0 or
96 * raw mode because of PGM_HANDY_PAGES_RZ_TO_R3. However, should this happen and
97 * we are actually out of memory, we will have 8 page to get out of whatever
98 * code we're executing.
99 *
100 * This is must be smaller than both PGM_HANDY_PAGES_SET_FF and
101 * PGM_HANDY_PAGES_MIN. */
102#define PGM_HANDY_PAGES_RZ_ALLOC 8
103/** The threshold at which we force return to R3 ASAP.
104 * The idea is that this should be large enough to get out of any code and up to
105 * the main EM loop when we are out of memory.
106 * This must be less or equal to PGM_HANDY_PAGES_MIN. */
107#define PGM_HANDY_PAGES_RZ_TO_R3 24
108/** The minimum number of handy pages (after allocation).
109 * This must be greater or equal to PGM_HANDY_PAGES_SET_FF.
110 * Another name would be PGM_HANDY_PAGES_EXTRA_RESERVATION or _PARANOIA. :-) */
111#define PGM_HANDY_PAGES_MIN 32
112/** @} */
113
114
115/** @defgroup grp_vbox_param_vmm VMM Parameters
116 * @ingroup grp_vbox_param
117 * @{
118 */
119/** VMM stack size. */
120#ifdef RT_OS_DARWIN
121# define VMM_STACK_SIZE 16384U
122#else
123# define VMM_STACK_SIZE 8192U
124#endif
125/** Min number of Virtual CPUs. */
126#define VMM_MIN_CPU_COUNT 1
127/** Max number of Virtual CPUs. */
128#define VMM_MAX_CPU_COUNT 32
129
130/** @} */
131
132
133/** @defgroup grp_vbox_pci PCI Identifiers
134 * @{ */
135/** VirtualBox PCI vendor ID. */
136#define VBOX_PCI_VENDORID (0x80ee)
137
138/** @name VirtualBox graphics card identifiers
139 * @{ */
140#define VBOX_VENDORID VBOX_PCI_VENDORID /**< @todo wonderful choice of name! Please squeeze a _VGA_ or something in there, please. */
141#define VBOX_DEVICEID (0xbeef) /**< @todo ditto. */
142#define VBOX_VESA_VENDORID VBOX_PCI_VENDORID
143#define VBOX_VESA_DEVICEID (0xbeef)
144/** @} */
145
146/** @name VMMDev PCI card identifiers
147 * @{ */
148#define VMMDEV_VENDORID VBOX_PCI_VENDORID
149#define VMMDEV_DEVICEID (0xcafe)
150/** @} */
151
152/** @} */
153
154
155/** @defgroup grp_vbox_param_misc Misc
156 * @{ */
157
158/** The maximum size of a generic segment offload (GSO) frame. This limit is
159 * imposed by the 16-bit frame size in internal networking header. */
160#define VBOX_MAX_GSO_SIZE 0xfff0
161
162/** @} */
163
164
165/** @} */
166
167#endif
168
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette