Changeset 20742 in vbox for trunk/include
- Timestamp:
- Jun 21, 2009 3:09:35 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 48858
- Location:
- trunk/include/VBox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/err.mac
r20604 r20742 396 396 %define VERR_VUSB_USBFS_PERMISSION (-3405) 397 397 %define VERR_VUSB_DEVICE_IS_RESETTING (-3406) 398 %define VERR_VUSB_DEVICE_IS_SUSPENDED (-3407) 398 399 %define VERR_VGA_INVALID_CUSTOM_MODE (-3500) 399 400 %define VINF_VGA_RESIZE_IN_PROGRESS (3501) -
trunk/include/VBox/param.h
r20542 r20742 122 122 */ 123 123 /** VMM stack size. */ 124 #define VMM_STACK_SIZE 8192U 124 #ifdef RT_OS_DARWIN 125 # define VMM_STACK_SIZE 16384U 126 #else 127 # define VMM_STACK_SIZE 8192U 128 #endif 125 129 /** Min number of Virtual CPUs. */ 126 130 #define VMM_MIN_CPU_COUNT 1 -
trunk/include/VBox/param.mac
r20542 r20742 1 %define VBOX_MAX_ALLOC_PAGE_COUNT (128 * _1M / PAGE_SIZE) 1 %ifndef ___VBox_param_h 2 %define ___VBox_param_h 3 %define VBOX_MAX_ALLOC_PAGE_COUNT (128U * _1M / PAGE_SIZE) 2 4 %define MM_HYPER_AREA_ADDRESS UINT32_C(0xa0000000) 3 %define MM_HYPER_AREA_MAX_SIZE (40 * _1M)4 %define MM_HYPER_DYNAMIC_SIZE (16 * PAGE_SIZE)5 %define MM_HYPER_AREA_MAX_SIZE (40U * _1M) 6 %define MM_HYPER_DYNAMIC_SIZE (16U * PAGE_SIZE) 5 7 %define MM_RAM_MIN UINT32_C(0x00400000) 8 %if HC_ARCH_BITS == 64 9 %define MM_RAM_MAX UINT64_C(0x400000000) 10 %else 11 %define MM_RAM_MAX UINT64_C(0x0E0000000) 12 %endif 6 13 %define MM_RAM_MIN_IN_MB UINT32_C(4) 7 %define MM_RAM_HOLE_SIZE_DEFAULT (512 * _1M) 14 %if HC_ARCH_BITS == 64 15 %define MM_RAM_MAX_IN_MB UINT32_C(16384) 16 %else 17 %define MM_RAM_MAX_IN_MB UINT32_C(3584) 18 %endif 19 %define MM_RAM_HOLE_SIZE_DEFAULT (512U * _1M) 8 20 %define PGM_HANDY_PAGES 128 9 21 %define PGM_HANDY_PAGES_SET_FF 32 … … 12 24 %define PGM_HANDY_PAGES_RZ_TO_R3 24 13 25 %define PGM_HANDY_PAGES_MIN 32 14 %define VMM_STACK_SIZE 8192 26 %ifdef RT_OS_DARWIN 27 %define VMM_STACK_SIZE 16384 28 %else 29 %define VMM_STACK_SIZE 8192 30 %endif 15 31 %define VMM_MIN_CPU_COUNT 1 16 32 %define VMM_MAX_CPU_COUNT 32 33 %endif -
trunk/include/VBox/various.sed
r20542 r20742 1 /___VBox_[a-zA-Z][a-zA-Z0-9]*_h/d 2 /#define/!d 1 2 # Check for markers (typically in comments). 3 /ASM-INC/basm-inc 4 /ASM-NOINC/basm-noinc 5 6 # Strip comments and trailing space. 7 s/[[:space:]][[:space:]]*\/\*.*$//g 8 s/[[:space:]][[:space:]]*\/\/.*$//g 9 s/[[:space:]][[:space:]]*$//g 10 11 # Try identify the statement. 12 /#[[:space:]]*define[[:space:]]/bdefine 13 /#[[:space:]]*ifdef[[:space:]]/bifdef 14 /#[[:space:]]*ifndef[[:space:]]/bifndef 15 /#[[:space:]]*if[[:space:]]/bif 16 /#[[:space:]]*elif[[:space:]]/belif 17 /#[[:space:]]*else$/belse 18 /#[[:space:]]*endif$/bendif 19 20 # Not recognized, drop it. 21 :asm-noinc 22 d 23 b end 24 25 # 26 # Defines needs some extra massaging to work in yasm. 27 # Things like trailing type indicators ('U', 'ULL' ++) does not go down well. 28 # 29 :define 3 30 /\$/d 4 s/#define/%define/ 5 s/\([0-9a-fA-F][0-9a-fA-F]*\)U$/\1/ 6 s/\([0-9a-fA-F][0-9a-fA-F]*\)U[[:space:]]/\1 / 7 s/[[:space:]]\/\*\*<.*$// 31 s/#\([[:space:]]*\)define/\1%define/ 8 32 33 s/\([[:space:]]0[xX][0-9a-fA-F][0-9a-fA-F]*\)U$/\1/ 34 s/\([[:space:]]0[xX][0-9a-fA-F][0-9a-fA-F]*\)U\([[:space:]]*\))$/\1\2)/ 35 s/\([[:space:]][0-9][0-9]*\)U[[:space:]]*$/\1/ 36 s/\([[:space:]][0-9][0-9]*\)U\([[:space:]]*\))$/\1\2)/ 37 38 s/\([[:space:]]0[xX][0-9a-fA-F][0-9a-fA-F]*\)UL$/\1/ 39 s/\([[:space:]]0[xX][0-9a-fA-F][0-9a-fA-F]*\)UL\([[:space:]]*\))$/\1\2)/ 40 s/\([[:space:]][0-9][0-9]*\)UL[[:space:]]*$/\1/ 41 s/\([[:space:]][0-9][0-9]*\)UL\([[:space:]]*\))$/\1\2)/ 42 43 s/\([[:space:]]0[xX][0-9a-fA-F][0-9a-fA-F]*\)ULL$/\1/ 44 s/\([[:space:]]0[xX][0-9a-fA-F][0-9a-fA-F]*\)ULL\([[:space:]]*\))$/\1\2)/ 45 s/\([[:space:]][0-9][0-9]*\)ULL[[:space:]]*$/\1/ 46 s/\([[:space:]][0-9][0-9]*\)ULL\([[:space:]]*\))$/\1\2)/ 47 48 b end 49 50 # 51 # Conditional statements, 1:1. 52 # 53 :ifdef 54 s/#\([[:space:]]*\)ifdef/\1%ifdef/ 55 b end 56 57 :ifndef 58 s/#\([[:space:]]*\)ifndef/\1%ifndef/ 59 b end 60 61 :if 62 s/#\([[:space:]]*\)if/\1%if/ 63 b end 64 65 :elif 66 s/#\([[:space:]]*\)elif/\1%elif/ 67 b end 68 69 :else 70 s/#\([[:space:]]*\)else.*$/\1%else/ 71 b end 72 73 :endif 74 s/#\([[:space:]]*\)endif.*$/\1%endif/ 75 b end 76 77 # 78 # Assembly statement... may need adjusting when used. 79 # 80 :asm-inc 81 b end 82 83 :end 84 -
trunk/include/VBox/x86.h
r20542 r20742 37 37 38 38 /* Workaround for Solaris sys/regset.h defining CS, DS */ 39 #if defined(RT_OS_SOLARIS)39 #ifdef RT_OS_SOLARIS 40 40 # undef CS 41 41 # undef DS … … 2043 2043 * Return the base address of a descriptor. 2044 2044 */ 2045 #define X86DESC_BASE(desc) \2045 #define X86DESC_BASE(desc) /*ASM-NOINC*/ \ 2046 2046 ( ((uint32_t)((desc).Gen.u8BaseHigh2) << 24) \ 2047 2047 | ( (desc).Gen.u8BaseHigh1 << 16) \ … … 2051 2051 * Return the limit of a descriptor. 2052 2052 */ 2053 #define X86DESC_LIMIT(desc) \2053 #define X86DESC_LIMIT(desc) /*ASM-NOINC*/ \ 2054 2054 ( ((uint32_t)((desc).Gen.u4LimitHigh) << 16) \ 2055 2055 | ( (desc).Gen.u16LimitLow ) ) -
trunk/include/VBox/x86.mac
r20542 r20742 1 %ifndef ___VBox_x86_h 2 %define ___VBox_x86_h 3 %ifdef RT_OS_SOLARIS 4 %endif 1 5 %define X86_EFL_CF RT_BIT(0) 2 6 %define X86_EFL_PF RT_BIT(2) … … 19 23 %define X86_EFL_GET_IOPL(efl) (((efl) >> X86_EFL_IOPL_SHIFT) & 3) 20 24 %define X86_EFL_POPF_BITS (X86_EFL_CF | X86_EFL_PF | X86_EFL_AF | X86_EFL_ZF | X86_EFL_SF | X86_EFL_TF | X86_EFL_IF | X86_EFL_DF | X86_EFL_OF | X86_EFL_IOPL | X86_EFL_NT | X86_EFL_AC | X86_EFL_ID) 21 %define X86_CPUID_VENDOR_INTEL_EBX 0x756e6547 /* Genu */22 %define X86_CPUID_VENDOR_INTEL_ECX 0x6c65746e /* ntel */23 %define X86_CPUID_VENDOR_INTEL_EDX 0x49656e69 /* ineI */24 %define X86_CPUID_VENDOR_AMD_EBX 0x68747541 /* Auth */25 %define X86_CPUID_VENDOR_AMD_ECX 0x444d4163 /* cAMD */26 %define X86_CPUID_VENDOR_AMD_EDX 0x69746e65 /* enti */25 %define X86_CPUID_VENDOR_INTEL_EBX 0x756e6547 26 %define X86_CPUID_VENDOR_INTEL_ECX 0x6c65746e 27 %define X86_CPUID_VENDOR_INTEL_EDX 0x49656e69 28 %define X86_CPUID_VENDOR_AMD_EBX 0x68747541 29 %define X86_CPUID_VENDOR_AMD_ECX 0x444d4163 30 %define X86_CPUID_VENDOR_AMD_EDX 0x69746e65 27 31 %define X86_CPUID_FEATURE_ECX_SSE3 RT_BIT(0) 28 32 %define X86_CPUID_FEATURE_ECX_MONITOR RT_BIT(3) … … 193 197 %define X86_DR7_LEN_DWORD 3 194 198 %define X86_DR7_LEN(iBp, cb) ( (cb) << ((iBp) * 4 + 18) ) 195 %define X86_DR7_GET_LEN(uDR7, iBp) ( ( (uDR7) >> ((iBp) * 4 + 18) ) & 0x3 U)199 %define X86_DR7_GET_LEN(uDR7, iBp) ( ( (uDR7) >> ((iBp) * 4 + 18) ) & 0x3) 196 200 %define X86_DR7_ENABLED_MASK (RT_BIT(0) | RT_BIT(1) | RT_BIT(2) | RT_BIT(3) | RT_BIT(4) | RT_BIT(5) | RT_BIT(6) | RT_BIT(7)) 197 201 %define X86_DR7_IO_ENABLED_MASK (X86_DR7_RW(0, X86_DR7_RW_IO) | X86_DR7_RW(1, X86_DR7_RW_IO) | X86_DR7_RW(2, X86_DR7_RW_IO) | X86_DR7_RW(3, X86_DR7_RW_IO)) … … 199 203 %define MSR_IA32_TSC 0x10 200 204 %define MSR_IA32_PLATFORM_ID 0x17 205 %ifndef MSR_IA32_APICBASE 201 206 %define MSR_IA32_APICBASE 0x1b 207 %endif 202 208 %define MSR_IA32_FEATURE_CONTROL 0x3A 203 209 %define MSR_IA32_FEATURE_CONTROL_LOCK RT_BIT(0) … … 206 212 %define MSR_IA32_BIOS_SIGN_ID 0x8B 207 213 %define MSR_IA32_MTRR_CAP 0xFE 214 %ifndef MSR_IA32_SYSENTER_CS 208 215 %define MSR_IA32_SYSENTER_CS 0x174 209 216 %define MSR_IA32_SYSENTER_ESP 0x175 210 217 %define MSR_IA32_SYSENTER_EIP 0x176 218 %endif 211 219 %define MSR_IA32_MCP_CAP 0x179 212 220 %define MSR_IA32_MCP_STATUS 0x17A … … 288 296 %define X86_PAGE_4K_SHIFT 12 289 297 %define X86_PAGE_4K_OFFSET_MASK 0xfff 290 %define X86_PAGE_4K_BASE_MASK 0xfffffffffffff000 ULL298 %define X86_PAGE_4K_BASE_MASK 0xfffffffffffff000 291 299 %define X86_PAGE_4K_BASE_MASK_32 0xfffff000 292 300 %define X86_PAGE_2M_SIZE _2M 293 301 %define X86_PAGE_2M_SHIFT 21 294 302 %define X86_PAGE_2M_OFFSET_MASK 0x001fffff 295 %define X86_PAGE_2M_BASE_MASK 0xffffffffffe00000 ULL303 %define X86_PAGE_2M_BASE_MASK 0xffffffffffe00000 296 304 %define X86_PAGE_2M_BASE_MASK_32 0xffe00000 297 305 %define X86_PAGE_4M_SIZE _4M 298 306 %define X86_PAGE_4M_SHIFT 22 299 307 %define X86_PAGE_4M_OFFSET_MASK 0x003fffff 300 %define X86_PAGE_4M_BASE_MASK 0xffffffffffc00000 ULL308 %define X86_PAGE_4M_BASE_MASK 0xffffffffffc00000 301 309 %define X86_PAGE_4M_BASE_MASK_32 0xffc00000 302 310 %define X86_PTE_BIT_P 0 … … 320 328 %define X86_PTE_AVL_MASK (RT_BIT(9) | RT_BIT(10) | RT_BIT(11)) 321 329 %define X86_PTE_PG_MASK ( 0xfffff000 ) 322 %define X86_PTE_PAE_PG_MASK ( 0x0000fffffffff000ULL ) 323 %define X86_PTE_PAE_PG_MASK_FULL ( 0x000ffffffffff000ULL ) 324 %define X86_PTE_PAE_PG_MASK ( 0x000ffffffffff000ULL ) 330 %if 1 331 %define X86_PTE_PAE_PG_MASK ( 0x0000fffffffff000 ) 332 %define X86_PTE_PAE_PG_MASK_FULL ( 0x000ffffffffff000 ) 333 %else 334 %define X86_PTE_PAE_PG_MASK ( 0x000ffffffffff000 ) 335 %endif 325 336 %define X86_PTE_PAE_NX RT_BIT_64(63) 326 337 %define X86_PT_SHIFT 12 … … 337 348 %define X86_PDE_AVL_MASK (RT_BIT(9) | RT_BIT(10) | RT_BIT(11)) 338 349 %define X86_PDE_PG_MASK ( 0xfffff000 ) 339 %define X86_PDE_PAE_PG_MASK ( 0x0000fffffffff000ULL ) 340 %define X86_PDE_PAE_PG_MASK_FULL ( 0x000ffffffffff000ULL ) 341 %define X86_PDE_PAE_PG_MASK ( 0x000ffffffffff000ULL ) 350 %if 1 351 %define X86_PDE_PAE_PG_MASK ( 0x0000fffffffff000 ) 352 %define X86_PDE_PAE_PG_MASK_FULL ( 0x000ffffffffff000 ) 353 %else 354 %define X86_PDE_PAE_PG_MASK ( 0x000ffffffffff000 ) 355 %endif 342 356 %define X86_PDE_PAE_NX RT_BIT_64(63) 343 357 %define X86_PDE4M_P RT_BIT(0) … … 356 370 %define X86_PDE4M_PG_HIGH_MASK ( 0x001fe000 ) 357 371 %define X86_PDE4M_PG_HIGH_SHIFT 19 358 %define X86_PDE2M_PAE_PG_MASK ( 0x000fffffffe00000 ULL)372 %define X86_PDE2M_PAE_PG_MASK ( 0x000fffffffe00000 ) 359 373 %define X86_PDE2M_PAE_NX X86_PDE2M_PAE_NX 360 374 %define X86_PD_SHIFT 22 … … 369 383 %define X86_PDPE_A RT_BIT(5) 370 384 %define X86_PDPE_AVL_MASK (RT_BIT(9) | RT_BIT(10) | RT_BIT(11)) 371 %define X86_PDPE_PG_MASK ( 0x0000fffffffff000ULL ) 372 %define X86_PDPE_PG_MASK_FULL ( 0x000ffffffffff000ULL ) 373 %define X86_PDPE_PG_MASK ( 0x000ffffffffff000ULL ) 385 %if 1 386 %define X86_PDPE_PG_MASK ( 0x0000fffffffff000 ) 387 %define X86_PDPE_PG_MASK_FULL ( 0x000ffffffffff000 ) 388 %else 389 %define X86_PDPE_PG_MASK ( 0x000ffffffffff000 ) 390 %endif 374 391 %define X86_PDPE_NX RT_BIT_64(63) 375 392 %define X86_PDPT_SHIFT 30 … … 383 400 %define X86_PML4E_A RT_BIT(5) 384 401 %define X86_PML4E_AVL_MASK (RT_BIT(9) | RT_BIT(10) | RT_BIT(11)) 385 %define X86_PML4E_PG_MASK ( 0x0000fffffffff000ULL ) 386 %define X86_PML4E_PG_MASK_FULL ( 0x000ffffffffff000ULL ) 387 %define X86_PML4E_PG_MASK ( 0x000ffffffffff000ULL ) 402 %if 1 403 %define X86_PML4E_PG_MASK ( 0x0000fffffffff000 ) 404 %define X86_PML4E_PG_MASK_FULL ( 0x000ffffffffff000 ) 405 %else 406 %define X86_PML4E_PG_MASK ( 0x000ffffffffff000 ) 407 %endif 388 408 %define X86_PML4E_NX RT_BIT_64(63) 389 409 %define X86_PML4_SHIFT 39 390 410 %define X86_PML4_MASK 0x1ff 391 %define X86DESC_BASE(desc) \ 392 %define X86DESC_LIMIT(desc) \ 411 %if HC_ARCH_BITS == 64 412 %else 413 %endif 393 414 %define X86DESC64_BASE(desc) \ 394 415 %define X86_SEL_TYPE_CODE 8 … … 446 467 %define X86_SEL_SHIFT 3 447 468 %define AMD64_SEL_SHIFT 4 469 %if HC_ARCH_BITS == 64 448 470 %define X86_SEL_SHIFT_HC AMD64_SEL_SHIFT 471 %else 449 472 %define X86_SEL_SHIFT_HC X86_SEL_SHIFT 473 %endif 450 474 %define X86_SEL_MASK 0xfff8 451 475 %define X86_SEL_LDT 0x0004 … … 461 485 %define X86_TRAP_PF_RSVD RT_BIT(3) 462 486 %define X86_TRAP_PF_ID RT_BIT(4) 487 %endif
Note:
See TracChangeset
for help on using the changeset viewer.