VirtualBox

Changeset 20742 in vbox for trunk/include


Ignore:
Timestamp:
Jun 21, 2009 3:09:35 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
48858
Message:

VMM,++: Increased the stack size on darwin to 16KB since we're switching stack and 16KB is the kernel stack size of xnu. Added support for conditionals to the .h -> .mac conversion sed-script.

Location:
trunk/include/VBox
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/err.mac

    r20604 r20742  
    396396%define VERR_VUSB_USBFS_PERMISSION    (-3405)
    397397%define VERR_VUSB_DEVICE_IS_RESETTING    (-3406)
     398%define VERR_VUSB_DEVICE_IS_SUSPENDED    (-3407)
    398399%define VERR_VGA_INVALID_CUSTOM_MODE    (-3500)
    399400%define VINF_VGA_RESIZE_IN_PROGRESS    (3501)
  • trunk/include/VBox/param.h

    r20542 r20742  
    122122 */
    123123/** 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
    125129/** Min number of Virtual CPUs. */
    126130#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)
    24%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)
    57%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
    613%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)
    820%define PGM_HANDY_PAGES             128
    921%define PGM_HANDY_PAGES_SET_FF      32
     
    1224%define PGM_HANDY_PAGES_RZ_TO_R3    24
    1325%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
    1531%define VMM_MIN_CPU_COUNT           1
    1632%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.
     7s/[[:space:]][[:space:]]*\/\*.*$//g
     8s/[[:space:]][[:space:]]*\/\/.*$//g
     9s/[[: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
     22d
     23b 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
    330/\$/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:]]\/\*\*<.*$//
     31s/#\([[:space:]]*\)define/\1%define/
    832
     33s/\([[:space:]]0[xX][0-9a-fA-F][0-9a-fA-F]*\)U$/\1/
     34s/\([[:space:]]0[xX][0-9a-fA-F][0-9a-fA-F]*\)U\([[:space:]]*\))$/\1\2)/
     35s/\([[:space:]][0-9][0-9]*\)U[[:space:]]*$/\1/
     36s/\([[:space:]][0-9][0-9]*\)U\([[:space:]]*\))$/\1\2)/
     37
     38s/\([[:space:]]0[xX][0-9a-fA-F][0-9a-fA-F]*\)UL$/\1/
     39s/\([[:space:]]0[xX][0-9a-fA-F][0-9a-fA-F]*\)UL\([[:space:]]*\))$/\1\2)/
     40s/\([[:space:]][0-9][0-9]*\)UL[[:space:]]*$/\1/
     41s/\([[:space:]][0-9][0-9]*\)UL\([[:space:]]*\))$/\1\2)/
     42
     43s/\([[:space:]]0[xX][0-9a-fA-F][0-9a-fA-F]*\)ULL$/\1/
     44s/\([[:space:]]0[xX][0-9a-fA-F][0-9a-fA-F]*\)ULL\([[:space:]]*\))$/\1\2)/
     45s/\([[:space:]][0-9][0-9]*\)ULL[[:space:]]*$/\1/
     46s/\([[:space:]][0-9][0-9]*\)ULL\([[:space:]]*\))$/\1\2)/
     47
     48b end
     49
     50#
     51# Conditional statements, 1:1.
     52#
     53:ifdef
     54s/#\([[:space:]]*\)ifdef/\1%ifdef/
     55b end
     56
     57:ifndef
     58s/#\([[:space:]]*\)ifndef/\1%ifndef/
     59b end
     60
     61:if
     62s/#\([[:space:]]*\)if/\1%if/
     63b end
     64
     65:elif
     66s/#\([[:space:]]*\)elif/\1%elif/
     67b end
     68
     69:else
     70s/#\([[:space:]]*\)else.*$/\1%else/
     71b end
     72
     73:endif
     74s/#\([[:space:]]*\)endif.*$/\1%endif/
     75b end
     76
     77#
     78# Assembly statement... may need adjusting when used.
     79#
     80:asm-inc
     81b end
     82
     83:end
     84
  • trunk/include/VBox/x86.h

    r20542 r20742  
    3737
    3838/* Workaround for Solaris sys/regset.h defining CS, DS */
    39 #if defined(RT_OS_SOLARIS)
     39#ifdef RT_OS_SOLARIS
    4040# undef CS
    4141# undef DS
     
    20432043 * Return the base address of a descriptor.
    20442044 */
    2045 #define X86DESC_BASE(desc) \
     2045#define X86DESC_BASE(desc) /*ASM-NOINC*/ \
    20462046        (  ((uint32_t)((desc).Gen.u8BaseHigh2) << 24) \
    20472047         | (           (desc).Gen.u8BaseHigh1  << 16) \
     
    20512051 * Return the limit of a descriptor.
    20522052 */
    2053 #define X86DESC_LIMIT(desc) \
     2053#define X86DESC_LIMIT(desc) /*ASM-NOINC*/ \
    20542054        (  ((uint32_t)((desc).Gen.u4LimitHigh) << 16) \
    20552055         | (           (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
    15%define X86_EFL_CF          RT_BIT(0)
    26%define X86_EFL_PF          RT_BIT(2)
     
    1923%define X86_EFL_GET_IOPL(efl)   (((efl) >> X86_EFL_IOPL_SHIFT) & 3)
    2024%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
    2731%define X86_CPUID_FEATURE_ECX_SSE3      RT_BIT(0)
    2832%define X86_CPUID_FEATURE_ECX_MONITOR   RT_BIT(3)
     
    193197%define X86_DR7_LEN_DWORD                   3
    194198%define X86_DR7_LEN(iBp, cb)                ( (cb) << ((iBp) * 4 + 18) )
    195 %define X86_DR7_GET_LEN(uDR7, iBp)          ( ( (uDR7) >> ((iBp) * 4 + 18) ) & 0x3U)
     199%define X86_DR7_GET_LEN(uDR7, iBp)          ( ( (uDR7) >> ((iBp) * 4 + 18) ) & 0x3)
    196200%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))
    197201%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))
     
    199203%define MSR_IA32_TSC                        0x10
    200204%define MSR_IA32_PLATFORM_ID                0x17
     205%ifndef MSR_IA32_APICBASE
    201206%define MSR_IA32_APICBASE                   0x1b
     207%endif
    202208%define MSR_IA32_FEATURE_CONTROL            0x3A
    203209%define MSR_IA32_FEATURE_CONTROL_LOCK       RT_BIT(0)
     
    206212%define MSR_IA32_BIOS_SIGN_ID               0x8B
    207213%define MSR_IA32_MTRR_CAP                   0xFE
     214%ifndef MSR_IA32_SYSENTER_CS
    208215%define MSR_IA32_SYSENTER_CS                0x174
    209216%define MSR_IA32_SYSENTER_ESP               0x175
    210217%define MSR_IA32_SYSENTER_EIP               0x176
     218%endif
    211219%define MSR_IA32_MCP_CAP                    0x179
    212220%define MSR_IA32_MCP_STATUS                 0x17A
     
    288296%define X86_PAGE_4K_SHIFT                   12
    289297%define X86_PAGE_4K_OFFSET_MASK             0xfff
    290 %define X86_PAGE_4K_BASE_MASK               0xfffffffffffff000ULL
     298%define X86_PAGE_4K_BASE_MASK               0xfffffffffffff000
    291299%define X86_PAGE_4K_BASE_MASK_32            0xfffff000
    292300%define X86_PAGE_2M_SIZE                    _2M
    293301%define X86_PAGE_2M_SHIFT                   21
    294302%define X86_PAGE_2M_OFFSET_MASK             0x001fffff
    295 %define X86_PAGE_2M_BASE_MASK               0xffffffffffe00000ULL
     303%define X86_PAGE_2M_BASE_MASK               0xffffffffffe00000
    296304%define X86_PAGE_2M_BASE_MASK_32            0xffe00000
    297305%define X86_PAGE_4M_SIZE                    _4M
    298306%define X86_PAGE_4M_SHIFT                   22
    299307%define X86_PAGE_4M_OFFSET_MASK             0x003fffff
    300 %define X86_PAGE_4M_BASE_MASK               0xffffffffffc00000ULL
     308%define X86_PAGE_4M_BASE_MASK               0xffffffffffc00000
    301309%define X86_PAGE_4M_BASE_MASK_32            0xffc00000
    302310%define X86_PTE_BIT_P                       0
     
    320328%define X86_PTE_AVL_MASK                    (RT_BIT(9) | RT_BIT(10) | RT_BIT(11))
    321329%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
    325336%define X86_PTE_PAE_NX                      RT_BIT_64(63)
    326337%define X86_PT_SHIFT                        12
     
    337348%define X86_PDE_AVL_MASK                    (RT_BIT(9) | RT_BIT(10) | RT_BIT(11))
    338349%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
    342356%define X86_PDE_PAE_NX                      RT_BIT_64(63)
    343357%define X86_PDE4M_P                         RT_BIT(0)
     
    356370%define X86_PDE4M_PG_HIGH_MASK              ( 0x001fe000 )
    357371%define X86_PDE4M_PG_HIGH_SHIFT             19
    358 %define X86_PDE2M_PAE_PG_MASK               ( 0x000fffffffe00000ULL )
     372%define X86_PDE2M_PAE_PG_MASK               ( 0x000fffffffe00000 )
    359373%define X86_PDE2M_PAE_NX                    X86_PDE2M_PAE_NX
    360374%define X86_PD_SHIFT                        22
     
    369383%define X86_PDPE_A                          RT_BIT(5)
    370384%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
    374391%define X86_PDPE_NX                         RT_BIT_64(63)
    375392%define X86_PDPT_SHIFT             30
     
    383400%define X86_PML4E_A                         RT_BIT(5)
    384401%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
    388408%define X86_PML4E_NX                        RT_BIT_64(63)
    389409%define X86_PML4_SHIFT              39
    390410%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
    393414%define X86DESC64_BASE(desc) \
    394415%define X86_SEL_TYPE_CODE                   8
     
    446467%define X86_SEL_SHIFT       3
    447468%define AMD64_SEL_SHIFT     4
     469%if HC_ARCH_BITS == 64
    448470%define X86_SEL_SHIFT_HC    AMD64_SEL_SHIFT
     471%else
    449472%define X86_SEL_SHIFT_HC    X86_SEL_SHIFT
     473%endif
    450474%define X86_SEL_MASK        0xfff8
    451475%define X86_SEL_LDT         0x0004
     
    461485%define X86_TRAP_PF_RSVD            RT_BIT(3)
    462486%define X86_TRAP_PF_ID              RT_BIT(4)
     487%endif
Note: See TracChangeset for help on using the changeset viewer.

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