VirtualBox

Changeset 9220 in vbox for trunk/include


Ignore:
Timestamp:
May 29, 2008 12:34:27 PM (17 years ago)
Author:
vboxsync
Message:

Default to 32 bits virtual addresses in CSAM & PATM.

Location:
trunk/include/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/csam.h

    r8217 r9220  
    7373 * @param   GCPtr       GC pointer of page table entry
    7474 */
    75 CSAMDECL(bool) CSAMDoesPageNeedScanning(PVM pVM, RTGCPTR GCPtr);
     75CSAMDECL(bool) CSAMDoesPageNeedScanning(PVM pVM, RTGCPTR32 GCPtr);
    7676
    7777/**
     
    8282 * @param   pPage       GC page address
    8383 */
    84 CSAMDECL(bool) CSAMIsPageScanned(PVM pVM, RTGCPTR pPage);
     84CSAMDECL(bool) CSAMIsPageScanned(PVM pVM, RTGCPTR32 pPage);
    8585
    8686/**
     
    9595 *
    9696 */
    97 CSAMDECL(int) CSAMMarkPage(PVM pVM, RTGCPTR pPage, bool fScanned);
     97CSAMDECL(int) CSAMMarkPage(PVM pVM, RTGCPTR32 pPage, bool fScanned);
    9898
    9999
     
    105105 * @param   GCPtr       GC pointer of page
    106106 */
    107 CSAMDECL(void) CSAMMarkPossibleCodePage(PVM pVM, RTGCPTR GCPtr);
     107CSAMDECL(void) CSAMMarkPossibleCodePage(PVM pVM, RTGCPTR32 GCPtr);
    108108
    109109/**
     
    139139 * @param   pvFault     Fault address
    140140 */
    141 CSAMDECL(int) CSAMExecFault(PVM pVM, RTGCPTR pvFault);
     141CSAMDECL(int) CSAMExecFault(PVM pVM, RTGCPTR32 pvFault);
    142142
    143143/**
     
    149149 * @param   GCPtr       GC pointer of page table entry
    150150 */
    151 CSAMDECL(bool) CSAMIsKnownDangerousInstr(PVM pVM, RTGCPTR GCPtr);
     151CSAMDECL(bool) CSAMIsKnownDangerousInstr(PVM pVM, RTGCPTR32 GCPtr);
    152152
    153153
     
    213213 * @param   addr        GC address of the page to flush
    214214 */
    215 CSAMR3DECL(int) CSAMR3FlushPage(PVM pVM, RTGCPTR addr);
     215CSAMR3DECL(int) CSAMR3FlushPage(PVM pVM, RTGCPTR32 addr);
    216216
    217217/**
     
    222222 * @param   addr        GC address of the page to flush
    223223 */
    224 CSAMR3DECL(int) CSAMR3RemovePage(PVM pVM, RTGCPTR addr);
     224CSAMR3DECL(int) CSAMR3RemovePage(PVM pVM, RTGCPTR32 addr);
    225225
    226226/**
     
    233233 * @param   pInstrGC    Instruction pointer
    234234 */
    235 CSAMR3DECL(int) CSAMR3CheckCodeEx(PVM pVM, RTSEL Sel, PCPUMSELREGHID pHiddenSel, RTGCPTR pInstrGC);
     235CSAMR3DECL(int) CSAMR3CheckCodeEx(PVM pVM, RTSEL Sel, PCPUMSELREGHID pHiddenSel, RTGCPTR32 pInstrGC);
    236236
    237237/**
     
    242242 * @param   pInstrGC    Instruction pointer (0:32 virtual address)
    243243 */
    244 CSAMR3DECL(int) CSAMR3CheckCode(PVM pVM, RTGCPTR pInstrGC);
     244CSAMR3DECL(int) CSAMR3CheckCode(PVM pVM, RTGCPTR32 pInstrGC);
    245245
    246246/**
     
    253253 * @param   fScanned    Mark as scanned or not
    254254 */
    255 CSAMR3DECL(int) CSAMR3MarkCode(PVM pVM, RTGCPTR pInstr, uint32_t opsize, bool fScanned);
     255CSAMR3DECL(int) CSAMR3MarkCode(PVM pVM, RTGCPTR32 pInstr, uint32_t opsize, bool fScanned);
    256256
    257257/**
     
    271271 * @param   enmTag      Monitor tag
    272272 */
    273 CSAMR3DECL(int) CSAMR3MonitorPage(PVM pVM, RTGCPTR pPageAddrGC, CSAMTAG enmTag);
     273CSAMR3DECL(int) CSAMR3MonitorPage(PVM pVM, RTGCPTR32 pPageAddrGC, CSAMTAG enmTag);
    274274
    275275/**
     
    281281 * @param   enmTag      Monitor tag
    282282 */
    283 CSAMR3DECL(int) CSAMR3UnmonitorPage(PVM pVM, RTGCPTR pPageAddrGC, CSAMTAG enmTag);
     283CSAMR3DECL(int) CSAMR3UnmonitorPage(PVM pVM, RTGCPTR32 pPageAddrGC, CSAMTAG enmTag);
    284284
    285285/**
     
    300300 * @param   GCPtrCall   Call address
    301301 */
    302 CSAMR3DECL(int) CSAMR3RecordCallAddress(PVM pVM, RTGCPTR GCPtrCall);
     302CSAMR3DECL(int) CSAMR3RecordCallAddress(PVM pVM, RTGCPTR32 GCPtrCall);
    303303
    304304/** @} */
  • trunk/include/VBox/patm.h

    r9212 r9220  
    9595    uint32_t  fPIF;
    9696    /* PATM inhibit irq address (used by sti) */
    97     RTGCPTR   GCPtrInhibitInterrupts;
     97    RTGCPTR32   GCPtrInhibitInterrupts;
    9898
    9999    /* Scratch room for call patch */
    100     RTGCPTR   GCCallPatchTargetAddr;
    101     RTGCPTR   GCCallReturnAddr;
     100    RTGCPTR32   GCCallPatchTargetAddr;
     101    RTGCPTR32   GCCallReturnAddr;
    102102
    103103    /* Temporary storage for guest registers. */
     
    116116{
    117117    // pointer to original guest code instruction (for emulation)
    118     RTGCPTR pNewEIP;
     118    RTGCPTR32 pNewEIP;
    119119    // pointer to the next guest code instruction
    120     RTGCPTR pNextInstr;
     120    RTGCPTR32 pNextInstr;
    121121    //pointer to the corresponding next instruction in the patch block
    122     RTGCPTR pNextPatchInstr;
     122    RTGCPTR32 pNextPatchInstr;
    123123} PATMTRAPREC, *PPATMTRAPREC;
    124124
     
    195195 * @param   pAddr       Guest context address
    196196 */
    197 PATMDECL(bool) PATMIsPatchGCAddr(PVM pVM, RTGCPTR pAddr);
     197PATMDECL(bool) PATMIsPatchGCAddr(PVM pVM, RTGCPTR32 pAddr);
    198198
    199199/**
     
    203203 * @param   pAddrGC     Guest context address
    204204 */
    205 PATMDECL(bool) PATMShouldUseRawMode(PVM pVM, RTGCPTR pAddrGC);
     205PATMDECL(bool) PATMShouldUseRawMode(PVM pVM, RTGCPTR32 pAddrGC);
    206206
    207207/**
     
    221221 * @param   pCachedData     GC pointer to cached data
    222222 */
    223 PATMDECL(int) PATMSetMMIOPatchInfo(PVM pVM, RTGCPHYS GCPhys, RTGCPTR pCachedData);
     223PATMDECL(int) PATMSetMMIOPatchInfo(PVM pVM, RTGCPHYS GCPhys, RTGCPTR32 pCachedData);
    224224
    225225
     
    233233 * @param   pRelBranchPatch     Relative duplicated function address
    234234 */
    235 PATMDECL(int) PATMAddBranchToLookupCache(PVM pVM, RTGCPTR pJumpTableGC, RTGCPTR pBranchTarget, RTGCUINTPTR pRelBranchPatch);
     235PATMDECL(int) PATMAddBranchToLookupCache(PVM pVM, RTGCPTR32 pJumpTableGC, RTGCPTR32 pBranchTarget, RTGCUINTPTR pRelBranchPatch);
    236236
    237237
     
    256256 * @param   pSize       Original instruction size (out, optional)
    257257 */
    258 PATMDECL(bool) PATMIsInt3Patch(PVM pVM, RTGCPTR pInstrGC, uint32_t *pOpcode, uint32_t *pSize);
     258PATMDECL(bool) PATMIsInt3Patch(PVM pVM, RTGCPTR32 pInstrGC, uint32_t *pOpcode, uint32_t *pSize);
    259259
    260260
     
    310310 *
    311311 */
    312 PATMGCDECL(int) PATMGCHandleWriteToPatchPage(PVM pVM, PCPUMCTXCORE pRegFrame, RTGCPTR GCPtr, uint32_t cbWrite);
     312PATMGCDECL(int) PATMGCHandleWriteToPatchPage(PVM pVM, PCPUMCTXCORE pRegFrame, RTGCPTR32 GCPtr, uint32_t cbWrite);
    313313
    314314/**
     
    402402 * @param   pcb         Size of the patch memory block
    403403 */
    404 PATMR3DECL(RTGCPTR) PATMR3QueryPatchMemGC(PVM pVM, uint32_t *pcb);
     404PATMR3DECL(RTGCPTR32) PATMR3QueryPatchMemGC(PVM pVM, uint32_t *pcb);
    405405
    406406/**
     
    412412 * @param   pPatchAddr  Guest context patch address (if true)
    413413 */
    414 PATMR3DECL(bool) PATMR3IsInsidePatchJump(PVM pVM, RTGCPTR pAddr, PRTGCPTR pPatchAddr);
     414PATMR3DECL(bool) PATMR3IsInsidePatchJump(PVM pVM, RTGCPTR32 pAddr, PRTGCPTR32 pPatchAddr);
    415415
    416416
     
    422422 * @param   pAddrGC     Guest context address
    423423 */
    424 PATMR3DECL(RTGCPTR) PATMR3QueryPatchGCPtr(PVM pVM, RTGCPTR pAddrGC);
     424PATMR3DECL(RTGCPTR32) PATMR3QueryPatchGCPtr(PVM pVM, RTGCPTR32 pAddrGC);
    425425
    426426/**
     
    440440 * @param   pAddrGC     GC pointer
    441441 */
    442 PATMR3DECL(R3PTRTYPE(void *)) PATMR3GCPtrToHCPtr(PVM pVM, RTGCPTR pAddrGC);
     442PATMR3DECL(R3PTRTYPE(void *)) PATMR3GCPtrToHCPtr(PVM pVM, RTGCPTR32 pAddrGC);
    443443
    444444
     
    460460 * @param   pNewEip     GC pointer to new instruction
    461461 */
    462 PATMR3DECL(int) PATMR3HandleTrap(PVM pVM, PCPUMCTX pCtx, RTGCPTR pEip, RTGCPTR *ppNewEip);
     462PATMR3DECL(int) PATMR3HandleTrap(PVM pVM, PCPUMCTX pCtx, RTGCPTR32 pEip, RTGCPTR *ppNewEip);
    463463
    464464/**
     
    479479 *
    480480 */
    481 PATMR3DECL(int) PATMR3PatchWrite(PVM pVM, RTGCPTR GCPtr, uint32_t cbWrite);
     481PATMR3DECL(int) PATMR3PatchWrite(PVM pVM, RTGCPTR32 GCPtr, uint32_t cbWrite);
    482482
    483483/**
     
    488488 * @param   addr        GC address of the page to flush
    489489 */
    490 PATMR3DECL(int) PATMR3FlushPage(PVM pVM, RTGCPTR addr);
     490PATMR3DECL(int) PATMR3FlushPage(PVM pVM, RTGCPTR32 addr);
    491491
    492492/**
     
    509509 * @note    returns failure if patching is not allowed or possible
    510510 */
    511 PATMR3DECL(int) PATMR3InstallPatch(PVM pVM, RTGCPTR pInstrGC, uint64_t flags);
     511PATMR3DECL(int) PATMR3InstallPatch(PVM pVM, RTGCPTR32 pInstrGC, uint64_t flags);
    512512
    513513/**
     
    519519 * @param   flags       Patch flags
    520520 */
    521 PATMR3DECL(int) PATMR3AddHint(PVM pVM, RTGCPTR pInstrGC, uint32_t flags);
     521PATMR3DECL(int) PATMR3AddHint(PVM pVM, RTGCPTR32 pInstrGC, uint32_t flags);
    522522
    523523/**
     
    541541 *
    542542 */
    543 PATMR3DECL(RTGCPTR) PATMR3PatchToGCPtr(PVM pVM, RTGCPTR pPatchGC, PATMTRANSSTATE *pEnmState);
     543PATMR3DECL(RTGCPTR32) PATMR3PatchToGCPtr(PVM pVM, RTGCPTR32 pPatchGC, PATMTRANSSTATE *pEnmState);
    544544
    545545/**
     
    551551 *
    552552 */
    553 PATMR3DECL(RTGCPTR) PATMR3GuestGCPtrToPatchGCPtr(PVM pVM, RCPTRTYPE(uint8_t*) pInstrGC);
     553PATMR3DECL(RTGCPTR32) PATMR3GuestGCPtrToPatchGCPtr(PVM pVM, RCPTRTYPE(uint8_t*) pInstrGC);
    554554
    555555/**
     
    563563 *
    564564 */
    565 PATMR3DECL(int) PATMR3QueryOpcode(PVM pVM, RTGCPTR pInstrGC, uint8_t *pByte);
     565PATMR3DECL(int) PATMR3QueryOpcode(PVM pVM, RTGCPTR32 pInstrGC, uint8_t *pByte);
    566566
    567567/**
     
    575575 *
    576576 */
    577 PATMR3DECL(int) PATMR3DisablePatch(PVM pVM, RTGCPTR pInstrGC);
     577PATMR3DECL(int) PATMR3DisablePatch(PVM pVM, RTGCPTR32 pInstrGC);
    578578
    579579
     
    588588 *
    589589 */
    590 PATMR3DECL(int) PATMR3EnablePatch(PVM pVM, RTGCPTR pInstrGC);
     590PATMR3DECL(int) PATMR3EnablePatch(PVM pVM, RTGCPTR32 pInstrGC);
    591591
    592592
     
    601601 *
    602602 */
    603 PATMR3DECL(int) PATMR3RemovePatch(PVM pVM, RTGCPTR pInstrGC);
     603PATMR3DECL(int) PATMR3RemovePatch(PVM pVM, RTGCPTR32 pInstrGC);
    604604
    605605
     
    612612 * @param   pConflictGC Guest context pointer to check
    613613 */
    614 PATMR3DECL(int) PATMR3DetectConflict(PVM pVM, RTGCPTR pInstrGC, RTGCPTR pConflictGC);
     614PATMR3DECL(int) PATMR3DetectConflict(PVM pVM, RTGCPTR32 pInstrGC, RTGCPTR32 pConflictGC);
    615615
    616616
     
    622622 * @param   pInstrGC    Guest context pointer to instruction
    623623 */
    624 PATMR3DECL(bool) PATMR3HasBeenPatched(PVM pVM, RTGCPTR pInstrGC);
     624PATMR3DECL(bool) PATMR3HasBeenPatched(PVM pVM, RTGCPTR32 pInstrGC);
    625625
    626626
     
    634634 *
    635635 */
    636 PATMR3DECL(int) PATMInstallSpinlockPatch(PVM pVM, RTGCPTR pCallAcquireSpinlockGC, uint32_t cbAcquireSpinlockCall);
     636PATMR3DECL(int) PATMInstallSpinlockPatch(PVM pVM, RTGCPTR32 pCallAcquireSpinlockGC, uint32_t cbAcquireSpinlockCall);
    637637
    638638
     
    645645 *
    646646 */
    647 PATMR3DECL(bool) PATMIsSpinlockAcquire(PVM pVM, RTGCPTR pCallTargetGC);
     647PATMR3DECL(bool) PATMIsSpinlockAcquire(PVM pVM, RTGCPTR32 pCallTargetGC);
    648648
    649649/**
     
    655655 *
    656656 */
    657 PATMR3DECL(bool) PATMIsSpinlockRelease(PVM pVM, RTGCPTR pCallTargetGC);
     657PATMR3DECL(bool) PATMIsSpinlockRelease(PVM pVM, RTGCPTR32 pCallTargetGC);
    658658
    659659/**
     
    665665 *
    666666 */
    667 PATMR3DECL(bool) PATMIsSpinlockReleasePatch(PVM pVM, RTGCPTR pCallTargetGC);
     667PATMR3DECL(bool) PATMIsSpinlockReleasePatch(PVM pVM, RTGCPTR32 pCallTargetGC);
    668668
    669669/** @} */
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