VirtualBox

Changeset 18850 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 8, 2009 5:16:43 PM (16 years ago)
Author:
vboxsync
Message:

SUPDrv.c: 64-bit darwin selectors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPDrv.c

    r18550 r18850  
    491491                         * Fixup the absolute symbols.
    492492                         *
    493                          * Because of the table indexing assumptions we'll do #ifdef orgy here rather
    494                          * than distributing this to OS specific files. At least for now.
     493                         * Because of the table indexing assumptions we'll have a little #ifdef orgy
     494                         * here rather than distributing this to OS specific files. At least for now.
    495495                         */
    496496#ifdef RT_OS_DARWIN
     497# if ARCH_BITS == 32
    497498                        if (SUPR0GetPagingMode() >= SUPPAGINGMODE_AMD64)
    498499                        {
     
    508509                        g_aFunctions[6].pfn = (void *)0x10;                     /* SUPR0AbsKernelDS - KERNEL_DS, seg.h */
    509510                        g_aFunctions[7].pfn = (void *)0x10;                     /* SUPR0AbsKernelES - KERNEL_DS, seg.h */
    510 #else
     511                        g_aFunctions[8].pfn = (void *)0x10;                     /* SUPR0AbsKernelFS - KERNEL_DS, seg.h */
     512                        g_aFunctions[9].pfn = (void *)0x48;                     /* SUPR0AbsKernelGS - CPU_DATA_GS, seg.h */
     513# else /* 64-bit darwin: */
     514                        g_aFunctions[0].pfn = (void *)1;                        /* SUPR0AbsIs64bit */
     515                        g_aFunctions[1].pfn = (void *)(uintptr_t)ASMGetCS();    /* SUPR0Abs64bitKernelCS */
     516                        g_aFunctions[2].pfn = (void *)(uintptr_t)ASMGetSS();    /* SUPR0Abs64bitKernelSS */
     517                        g_aFunctions[3].pfn = (void *)0;                        /* SUPR0Abs64bitKernelDS */
     518                        g_aFunctions[4].pfn = (void *)(uintptr_t)ASMGetCS();    /* SUPR0AbsKernelCS */
     519                        g_aFunctions[5].pfn = (void *)(uintptr_t)ASMGetSS();    /* SUPR0AbsKernelSS */
     520                        g_aFunctions[6].pfn = (void *)0;                        /* SUPR0AbsKernelDS */
     521                        g_aFunctions[7].pfn = (void *)0;                        /* SUPR0AbsKernelES */
     522                        g_aFunctions[8].pfn = (void *)0;                        /* SUPR0AbsKernelFS */
     523                        g_aFunctions[9].pfn = (void *)0;                        /* SUPR0AbsKernelGS */
     524
     525# endif
     526#else  /* !RT_OS_DARWIN */
    511527# if ARCH_BITS == 64
    512528                        g_aFunctions[0].pfn = (void *)1;                        /* SUPR0AbsIs64bit */
     
    514530                        g_aFunctions[2].pfn = (void *)(uintptr_t)ASMGetSS();    /* SUPR0Abs64bitKernelSS */
    515531                        g_aFunctions[3].pfn = (void *)(uintptr_t)ASMGetDS();    /* SUPR0Abs64bitKernelDS */
    516 # elif ARCH_BITS == 32
     532# else
    517533                        g_aFunctions[0].pfn = g_aFunctions[1].pfn = g_aFunctions[2].pfn = g_aFunctions[4].pfn = (void *)0;
    518534# endif
     
    521537                        g_aFunctions[6].pfn = (void *)(uintptr_t)ASMGetDS();    /* SUPR0AbsKernelDS */
    522538                        g_aFunctions[7].pfn = (void *)(uintptr_t)ASMGetES();    /* SUPR0AbsKernelES */
    523 #endif
    524539                        g_aFunctions[8].pfn = (void *)(uintptr_t)ASMGetFS();    /* SUPR0AbsKernelFS */
    525540                        g_aFunctions[9].pfn = (void *)(uintptr_t)ASMGetGS();    /* SUPR0AbsKernelGS */
     541#endif /* !RT_OS_DARWIN */
    526542                        return VINF_SUCCESS;
    527543                    }
Note: See TracChangeset for help on using the changeset viewer.

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