VirtualBox

Changeset 60009 in vbox


Ignore:
Timestamp:
Mar 13, 2016 4:34:32 PM (9 years ago)
Author:
vboxsync
Message:

bs3kit: Updates

Location:
trunk/src/VBox/ValidationKit/bootsectors
Files:
6 edited

Legend:

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

    r60003 r60009  
    4040# Include sub-makefile.
    4141#
     42# The VBOX_WITH_BS3KIT feature requires NASM 2.12 and either MSVC or gcc
     43# with ms_abi function attribute (gcc v4.4+, MSVC default).
     44#
    4245if defined(VBOX_WITH_OPEN_WATCOM)
    4346 if1of ($(KBUILD_TARGET), win)
    4447  VBOX_WITH_BS3KIT = 1
    4548 else if $(VBOX_GCC_VERSION_CC) >= 40400 # ms_abi was added in 4.4
    46   if1of ($(KBUILD_TARGET), linux) # Requires patched NASM in tools.
    47    VBOX_WITH_BS3KIT = 1
    48   endif
     49# Awaiting elf -> omf converter #  if1of ($(KBUILD_TARGET), linux)
     50# Awaiting elf -> omf converter #   VBOX_WITH_BS3KIT = 1
     51# Awaiting elf -> omf converter #  endif
    4952 endif
    5053 ifdef VBOX_WITH_BS3KIT
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-basic-2-c.c

    r60002 r60009  
    3232
    3333
     34BS3TESTMODE_PROTOTYPES_CMN(bs3CpuBasic2_Hello);
     35
    3436//BS3TESTMODE_PROTOTYPES_CMN(bs3CpuBasic2_iret);
    3537//#pragma alias("_bs3CpuBasic2_iret_c64", "bs3CpuBasic2_iret_c64")
    3638
    3739BS3TESTMODE_PROTOTYPES_MODE(bs3CpuBasic2_iret);
    38 #pragma alias("_bs3CpuBasic2_iret_lm64", "bs3CpuBasic2_iret_lm64")
     40
    3941
    4042static const BS3TESTMODEENTRY g_aModeTest[] =
    4143{
     44    BS3TESTMODEENTRY_CMN("Hello", bs3CpuBasic2_Hello),
    4245    //BS3TESTMODEENTRY_CMN("iret", bs3CpuBasic2_iret),
    4346    BS3TESTMODEENTRY_MODE("iret", bs3CpuBasic2_iret),
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-basic-2-template.c

    r60003 r60009  
    22
    33
    4 BS3_DECL(uint8_t) BS3_CMN_NM(Hello)(uint8_t bMode)
     4BS3_DECL(uint8_t) BS3_CMN_NM(bs3CpuBasic2_Hello)(uint8_t bMode)
    55{
    6 
     6    Bs3Printf("Hello C Word: %#x\n", bMode);
    77    return UINT8_MAX;
    88}
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/VBoxBs3ObjConverter.cpp

    r59955 r60009  
    15711571                        && pThis->paSymbols[iSym].enmType   == OMFSYMTYPE_PUBDEF)
    15721572                    {
    1573                         if (!omfWriter_PubDefAdd(pThis, paSymbols[iSym].Value,
    1574                                                  coffGetSymbolName(&paSymbols[iSym], pchStrTab, cbStrTab, szShort)) )
     1573                        const char *pszName = coffGetSymbolName(&paSymbols[iSym], pchStrTab, cbStrTab, szShort);
     1574                        if (!omfWriter_PubDefAdd(pThis, paSymbols[iSym].Value, pszName))
    15751575                            return false;
     1576
     1577                        /* If the symbol doesn't start with an underscore, add an underscore
     1578                           prefixed alias to ease access from 16-bit and 32-bit code. */
     1579                        if (*pszName != '_')
     1580                        {
     1581                            char   szCdeclName[512];
     1582                            size_t cchName = strlen(pszName);
     1583                            if (cchName > sizeof(szCdeclName) - 2)
     1584                                cchName = sizeof(szCdeclName) - 2;
     1585                            szCdeclName[0] = '_';
     1586                            memcpy(&szCdeclName[1], pszName, cchName);
     1587                            szCdeclName[cchName + 1] = '\0';
     1588                            if (!omfWriter_PubDefAdd(pThis, paSymbols[iSym].Value, szCdeclName))
     1589                                return false;
     1590                        }
     1591
    15761592                        pThis->paSymbols[iSym].idx = idxPubDef++;
    15771593                    }
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxConvertToRingX.c

    r59976 r60009  
    3838 * @param   bRing           The target ring.
    3939 */
    40 uint16_t bs3RegCtxConvertRealSegToRingX(uint16_t uSeg, uint8_t bRing)
     40static uint16_t bs3RegCtxConvertRealSegToRingX(uint16_t uSeg, uint8_t bRing)
    4141{
    4242    uint16_t uSel;
     
    7474 * @param   bRing           The target ring.
    7575 */
    76 uint16_t bs3RegCtxConvertProtSelToRingX(uint16_t uSel, uint8_t bRing)
     76static uint16_t bs3RegCtxConvertProtSelToRingX(uint16_t uSel, uint8_t bRing)
    7777{
    7878    if (   uSel > X86_SEL_RPL
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.mac

    r59976 r60009  
    600600;
    601601%macro BS3_PROC_BEGIN 1
     602%if __BITS__ == 64
     603 BS3_GLOBAL_NAME_EX _ %+ %1, function, (_ %+ %1 %+ _EndProc - %1)
     604%endif
    602605BS3_GLOBAL_NAME_EX %1, function, (%1 %+ _EndProc - %1)
    603606%endmacro
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