VirtualBox

Changeset 41831 in vbox


Ignore:
Timestamp:
Jun 19, 2012 3:07:16 PM (12 years ago)
Author:
vboxsync
Message:

IEM hacking.

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/Makefile.kmk

    r41477 r41831  
    432432  VMMRC_SOURCES += $(VMMRCImp_0_OUTDIR)/VMMRC.def
    433433 endif
    434 
     434 ifdef VBOX_WITH_IEM
     435  VMMRC_SOURCES += \
     436        VMMAll/IEMAll.cpp \
     437        VMMAll/IEMAllAImpl.asm \
     438        VMMAll/IEMAllAImplC.cpp
     439 endif
    435440
    436441 # the very last one.
     
    532537        VMMR0/VMMR0TripleFaultHackA.asm
    533538 endif
     539 ifdef VBOX_WITH_IEM
     540  VMMR0_SOURCES += \
     541        VMMAll/IEMAll.cpp \
     542        VMMAll/IEMAllAImpl.asm \
     543        VMMAll/IEMAllAImplC.cpp
     544 endif
    534545 VMMR0_SOURCES.amd64 = \
    535546        VMMR0/VMMR0JmpA-amd64.asm
  • trunk/src/VBox/VMM/VMMAll/IEMAll.cpp

    r41829 r41831  
    7878#include <VBox/vmm/iem.h>
    7979#include <VBox/vmm/pgm.h>
     80#include <internal/pgm.h>
    8081#include <VBox/vmm/iom.h>
    8182#include <VBox/vmm/em.h>
     
    683684    {
    684685        uint32_t GCPtrPC32 = pCtx->eip;
    685         Assert(!(GCPtrPC32 & ~(uint32_t)UINT16_MAX) || pIemCpu->enmCpuMode == IEMMODE_32BIT);
     686        AssertMsg(!(GCPtrPC32 & ~(uint32_t)UINT16_MAX) || pIemCpu->enmCpuMode == IEMMODE_32BIT, ("%04x:%RX64\n", pCtx->cs, pCtx->rip));
    686687        if (GCPtrPC32 > pCtx->csHid.u32Limit)
    687688            return iemRaiseSelectorBounds(pIemCpu, X86_SREG_CS, IEM_ACCESS_INSTRUCTION);
     
    21592160     * Extensive logging.
    21602161     */
    2161 #ifdef LOG_ENABLED
     2162#if defined(LOG_ENABLED) && defined(IN_RING3)
    21622163    if (LogIs3Enabled())
    21632164    {
     
    25302531 *
    25312532 */
    2532 #include <iprt/mem.h>
     2533//#include <iprt/mem.h>
    25332534
    25342535/**
     
    25382539static void iemOpStubMsg2(PIEMCPU pIemCpu)
    25392540{
     2541#if defined(LOG_ENABLED) && defined(IN_RING3)
    25402542    PVM     pVM   = IEMCPU_TO_VM(pIemCpu);
    25412543    PVMCPU  pVCpu = IEMCPU_TO_VMCPU(pIemCpu);
     
    25742576
    25752577    RTAssertMsg2Weak("%s%s\n", szRegs, szInstr);
     2578#else
     2579    RTAssertMsg2Weak("cs:rip=%04x:%RX64\n", pIemCpu->CTX_SUFF(pCtx)->cs, pIemCpu->CTX_SUFF(pCtx)->rip);
     2580#endif
    25762581}
    25772582
     
    32953300    NOREF(pIemCpu);
    32963301#else
    3297 # error "Implement me"
     3302/** @todo RZ: FIXME */
     3303//# error "Implement me"
    32983304#endif
    32993305}
     
    44094415     */
    44104416    /** @todo need some better API. */
     4417#ifdef IN_RING3
    44114418    return PGMR3PhysTlbGCPhys2Ptr(IEMCPU_TO_VM(pIemCpu),
    44124419                                  GCPhysMem,
    44134420                                  RT_BOOL(fAccess & IEM_ACCESS_TYPE_WRITE),
    44144421                                  ppvMem);
     4422#else
     4423//# error "Implement me"
     4424    if (fAccess & IEM_ACCESS_TYPE_WRITE)
     4425        return PGMPhysGCPhys2CCPtr(IEMCPU_TO_VM(pIemCpu),
     4426                                   GCPhysMem,
     4427                                   ppvMem,
     4428                                   /** @todo pLock */ NULL);
     4429    return PGMPhysGCPhys2CCPtrReadOnly(IEMCPU_TO_VM(pIemCpu),
     4430                                       GCPhysMem,
     4431                                       (void const **)ppvMem,
     4432                                       /** @todo pLock */ NULL);
     4433#endif
    44154434}
    44164435
     
    78357854#ifdef LOG_ENABLED
    78367855    PCPUMCTX pCtx = pIemCpu->CTX_SUFF(pCtx);
     7856# ifdef IN_RING3
    78377857    if (LogIs2Enabled())
    78387858    {
     
    78617881    }
    78627882    else
     7883# endif
    78637884        LogFlow(("IEMExecOne: cs:rip=%04x:%08RX64 ss:rsp=%04x:%08RX64 EFL=%06x\n",
    78647885                 pCtx->cs, pCtx->rip, pCtx->ss, pCtx->rsp, pCtx->eflags.u));
     
    79167937
    79177938    VBOXSTRICTRC rcStrict;
    7918     if (cbOpcodeBytes)
     7939    if (   cbOpcodeBytes
     7940        && pCtx->rip == OpcodeBytesPC)
    79197941    {
    79207942        iemInitDecoder(pIemCpu);
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