VirtualBox

Changeset 97430 in vbox


Ignore:
Timestamp:
Nov 7, 2022 1:51:44 PM (2 years ago)
Author:
vboxsync
Message:

ValKit/bs3kit: Added Bs3SelLnkPtrToFlat. bugref:9898

Location:
trunk/src/VBox/ValidationKit/bootsectors/bs3kit
Files:
5 edited
1 copied

Legend:

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

    r97320 r97430  
    192192       bs3-cmn-SelFlatDataToRealMode.asm \
    193193       bs3-cmn-SelLnkPtrToCurPtr.c \
     194       bs3-cmn-SelLnkPtrToFlat.c \
    194195       bs3-cmn-SelSetup16BitData.c \
    195196       bs3-cmn-SelSetup16BitCode.c \
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SelLnkPtrToFlat.c

    r97405 r97430  
    11/* $Id$ */
    22/** @file
    3  * BS3Kit - Bs3SelLnkPtrToCurPtr
     3 * BS3Kit - Bs3SelLnkPtrToFlat
    44 */
    55
     
    3838
    3939
    40 #undef Bs3SelLnkPtrToCurPtr
    41 BS3_CMN_DEF(void BS3_FAR *, Bs3SelLnkPtrToCurPtr,(void BS3_FAR *pvLnkPtr))
     40#undef Bs3SelLnkPtrToFlat
     41BS3_CMN_DEF(uint32_t, Bs3SelLnkPtrToFlat,(void BS3_FAR *pvLnkPtr))
    4242{
    4343#if ARCH_BITS == 16
    44     if (BS3_MODE_IS_RM_OR_V86(g_bBs3CurrentMode))
    45         return pvLnkPtr;
    46     return (void BS3_FAR *)Bs3SelRealModeDataToProtFar16((uint32_t)pvLnkPtr);
     44    return Bs3SelRealModeDataToFlat(pvLnkPtr);
    4745#else
    48     return pvLnkPtr;
     46    return (uint32_t)(uintptr_t)pvLnkPtr;
    4947#endif
    5048}
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-autostubs.kmk

    r97320 r97430  
    3737$(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,Bs3SelFlatDataToProtFar16,4)
    3838$(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,Bs3SelFlatDataToRealMode,4)
     39$(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,Bs3SelLnkPtrToFlat,4)
    3940$(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,Bs3SelProtFar16DataToFlat,4)
    4041$(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,Bs3SelProtFar16DataToRealMode,4)
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-define.h

    r97320 r97430  
    161161#define Bs3SelFlatDataToRealMode BS3_CMN_MANGLER(Bs3SelFlatDataToRealMode)
    162162#define Bs3SelLnkPtrToCurPtr BS3_CMN_MANGLER(Bs3SelLnkPtrToCurPtr)
     163#define Bs3SelLnkPtrToFlat BS3_CMN_MANGLER(Bs3SelLnkPtrToFlat)
    163164#define Bs3SelProtFar16DataToFlat BS3_CMN_MANGLER(Bs3SelProtFar16DataToFlat)
    164165#define Bs3SelProtFar16DataToRealMode BS3_CMN_MANGLER(Bs3SelProtFar16DataToRealMode)
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-undef.h

    r97320 r97430  
    161161#undef Bs3SelFlatDataToRealMode
    162162#undef Bs3SelLnkPtrToCurPtr
     163#undef Bs3SelLnkPtrToFlat
    163164#undef Bs3SelProtFar16DataToFlat
    164165#undef Bs3SelProtFar16DataToRealMode
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h

    r97320 r97430  
    19441944
    19451945/**
     1946 * Converts a link-time pointer to a flat address.
     1947 *
     1948 * @returns 32-bit flag address.
     1949 * @param   pvLnkPtr    The pointer the linker produced.
     1950 */
     1951BS3_CMN_PROTO_FARSTUB(4, uint32_t, Bs3SelLnkPtrToFlat,(void BS3_FAR *pvLnkPtr));
     1952
     1953/**
    19461954 * Gets a flat address from a working poitner.
    19471955 *
     
    41194127
    41204128/**
    4121  * Initialized the X0TEXT16 and X1TEXT16 GDT entries.
     4129 * Initializes the X0TEXT16 and X1TEXT16 GDT entries.
    41224130 */
    41234131BS3_DECL_FAR(void) Bs3InitGdt_rm_far(void);
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