VirtualBox

Ignore:
Timestamp:
Mar 28, 2016 10:50:57 PM (9 years ago)
Author:
vboxsync
Message:

bs3kit: updates

Location:
trunk/src/VBox/ValidationKit/bootsectors
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/Config.kmk

    r60212 r60231  
    600600TEMPLATE_VBoxBS3KitImg64_ASOBJSUFF    = .o64
    601601TEMPLATE_VBoxBS3KitImg64_ASFLAGS      = -f obj -g $(BS3KIT_NASM_allow_64_bit) -w+orphan-labels
    602 TEMPLATE_VBoxBS3KitImg64_ASDEFS       = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__
     602TEMPLATE_VBoxBS3KitImg64_ASDEFS       = ASM_FORMAT_OMF ASM_CALL64_MSC RT_NOINC_SEGMENTS __NASM__
    603603TEMPLATE_VBoxBS3KitImg64_DEFS         = IN_BS3KIT ARCH_BITS=64
    604604TEMPLATE_VBoxBS3KitImg64_DEFS.debug   = BS3_STRICT
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk

    r60195 r60231  
    8282       bs3-cmn-PagingInitRootForPAE.c \
    8383       bs3-cmn-PagingInitRootForLM.c \
     84       bs3-cmn-PagingProtect.c \
    8485       bs3-cmn-RegCtxRestore.asm \
    8586       bs3-cmn-RegCtxConvertToRingX.c \
     
    193194bs3kit-common-64_ASDEFS   = RT_ASMDEFS_INC_FIRST_FILE
    194195bs3kit-common-64_SOURCES  = $(VBOX_BS3KIT_COMMON_SOURCES) \
    195        bs3-c64-Trap64Generic.asm
     196       bs3-c64-Trap64Generic.asm \
     197       ../../../Runtime/common/asm/ASMGetIdtr.asm \
     198       ../../../Runtime/common/asm/ASMSetIdtr.asm \
    196199
    197200
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-paging.h

    r59244 r60231  
    4646
    4747
     48#define bs3PagingGetLegacyPte BS3_CMN_NM(bs3PagingGetLegacyPte)
     49BS3_DECL(X86PTE BS3_FAR *) bs3PagingGetLegacyPte(RTCCUINTXREG cr3, uint32_t uFlat, bool fUseInvlPg, int *prc);
     50
     51#define bs3PagingGetPte BS3_CMN_NM(bs3PagingGetPte)
     52BS3_DECL(X86PTEPAE BS3_FAR *) bs3PagingGetPte(RTCCUINTXREG cr3, uint64_t uFlat, bool fUseInvlPg, int *prc);
     53
     54
    4855#endif
    4956
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h

    r60217 r60231  
    10781078
    10791079/**
    1080  * Gets a working pointer from a 32-bit flat address.
     1080 * Gets a working pointer from a flat address.
    10811081 *
    10821082 * @returns Current context pointer.
    1083  * @param   uFlatPtr    The flat address to convert.
    1084  */
    1085 DECLINLINE(void BS3_FAR *) Bs3XptrFlatToCurrent(uint32_t uFlatPtr)
     1083 * @param   uFlatPtr    The flat address to convert (32-bit or 64-bit).
     1084 */
     1085DECLINLINE(void BS3_FAR *) Bs3XptrFlatToCurrent(RTCCUINTXREG uFlatPtr)
    10861086{
    10871087    BS3_XPTR_AUTO(void, pTmp);
     
    13951395
    13961396/**
    1397  * Gets a 32-bit flat address from a working poitner.
    1398  *
    1399  * @returns 32-bit flat address.
     1397 * Gets a flat address from a working poitner.
     1398 *
     1399 * @returns flat address (32-bit or 64-bit).
    14001400 * @param   pv          Current context pointer.
    14011401 */
    1402 DECLINLINE(uint32_t) Bs3SelPtrToFlat(void BS3_FAR *pv)
     1402DECLINLINE(RTCCUINTXREG) Bs3SelPtrToFlat(void BS3_FAR *pv)
    14031403{
    14041404#if ARCH_BITS == 16
    14051405    return Bs3SelFar32ToFlat32(BS3_FP_OFF(pv), BS3_FP_SEG(pv));
    14061406#else
    1407     return (uint32_t)(uintptr_t)pv;
     1407    return (uintptr_t)pv;
    14081408#endif
    14091409}
     
    17221722#define Bs3PagingInitRootForLM BS3_CMN_NM(Bs3PagingInitRootForLM) /**< Selects #Bs3PagingInitRootForLM_c16, #Bs3PagingInitRootForLM_c32 or #Bs3PagingInitRootForLM_c64. */
    17231723
     1724/**
     1725 * Modifies the page table protection of an address range.
     1726 *
     1727 * This only works on the lowest level of the page tables in the current mode.
     1728 *
     1729 * Since we generally use the largest pages available when setting up the
     1730 * initial page tables, this function will usually have to allocate and create
     1731 * more tables.  This may fail if we're low on memory.
     1732 *
     1733 * @returns IPRT status code.
     1734 * @param   uFlat       The flat address of the first page in the range (rounded
     1735 *                      down nearest page boundrary).
     1736 * @param   cb          The range size from @a pv (rounded up to nearest page boundrary).
     1737 * @param   fSet        Mask of zero or more X86_PTE_XXX values to set for the range.
     1738 * @param   fClear      Mask of zero or more X86_PTE_XXX values to clear for the range.
     1739 */
     1740BS3_DECL(int) Bs3PagingProtect_c16(uint64_t uFlat, uint64_t cb, uint64_t fSet, uint64_t fClear);
     1741BS3_DECL(int) Bs3PagingProtect_c32(uint64_t uFlat, uint64_t cb, uint64_t fSet, uint64_t fClear); /**< @copydoc Bs3PagingProtect_c16 */
     1742BS3_DECL(int) Bs3PagingProtect_c64(uint64_t uFlat, uint64_t cb, uint64_t fSet, uint64_t fClear); /**< @copydoc Bs3PagingProtect_c16 */
     1743#define Bs3PagingProtect BS3_CMN_NM(Bs3PagingProtect) /**< Selects #Bs3PagingProtect_c16, #Bs3PagingProtect_c32 or #Bs3PagingProtect_c64. */
     1744
     1745/**
     1746 * Modifies the page table protection of an address range.
     1747 *
     1748 * This only works on the lowest level of the page tables in the current mode.
     1749 *
     1750 * Since we generally use the largest pages available when setting up the
     1751 * initial page tables, this function will usually have to allocate and create
     1752 * more tables.  This may fail if we're low on memory.
     1753 *
     1754 * @returns IPRT status code.
     1755 * @param   pv          The address of the first page in the range (rounded
     1756 *                      down nearest page boundrary).
     1757 * @param   cb          The range size from @a pv (rounded up to nearest page boundrary).
     1758 * @param   fSet        Mask of zero or more X86_PTE_XXX values to set for the range.
     1759 * @param   fClear      Mask of zero or more X86_PTE_XXX values to clear for the range.
     1760 */
     1761BS3_DECL(int) Bs3PagingProtectPtr_c16(void BS3_FAR *pv, size_t cb, uint64_t fSet, uint64_t fClear);
     1762BS3_DECL(int) Bs3PagingProtectPtr_c32(void BS3_FAR *pv, size_t cb, uint64_t fSet, uint64_t fClear); /**< @copydoc Bs3PagingProtectPtr_c16 */
     1763BS3_DECL(int) Bs3PagingProtectPtr_c64(void BS3_FAR *pv, size_t cb, uint64_t fSet, uint64_t fClear); /**< @copydoc Bs3PagingProtectPtr_c16 */
     1764#define Bs3PagingProtectPtr BS3_CMN_NM(Bs3PagingProtectPtr) /**< Selects #Bs3PagingProtectPtr_c16, #Bs3PagingProtectPtr_c32 or #Bs3PagingProtectPtr_c64. */
    17241765
    17251766/**
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