Changeset 9228 in vbox for trunk/include
- Timestamp:
- May 29, 2008 3:23:15 PM (17 years ago)
- Location:
- trunk/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/patm.h
r9220 r9228 95 95 uint32_t fPIF; 96 96 /* PATM inhibit irq address (used by sti) */ 97 RT GCPTR32GCPtrInhibitInterrupts;97 RTRCPTR GCPtrInhibitInterrupts; 98 98 99 99 /* Scratch room for call patch */ 100 RT GCPTR32GCCallPatchTargetAddr;101 RT GCPTR32GCCallReturnAddr;100 RTRCPTR GCCallPatchTargetAddr; 101 RTRCPTR GCCallReturnAddr; 102 102 103 103 /* Temporary storage for guest registers. */ … … 116 116 { 117 117 // pointer to original guest code instruction (for emulation) 118 RT GCPTR32pNewEIP;118 RTRCPTR pNewEIP; 119 119 // pointer to the next guest code instruction 120 RT GCPTR32pNextInstr;120 RTRCPTR pNextInstr; 121 121 //pointer to the corresponding next instruction in the patch block 122 RT GCPTR32pNextPatchInstr;122 RTRCPTR pNextPatchInstr; 123 123 } PATMTRAPREC, *PPATMTRAPREC; 124 124 … … 195 195 * @param pAddr Guest context address 196 196 */ 197 PATMDECL(bool) PATMIsPatchGCAddr(PVM pVM, RT GCPTR32pAddr);197 PATMDECL(bool) PATMIsPatchGCAddr(PVM pVM, RTRCPTR pAddr); 198 198 199 199 /** … … 203 203 * @param pAddrGC Guest context address 204 204 */ 205 PATMDECL(bool) PATMShouldUseRawMode(PVM pVM, RT GCPTR32pAddrGC);205 PATMDECL(bool) PATMShouldUseRawMode(PVM pVM, RTRCPTR pAddrGC); 206 206 207 207 /** … … 221 221 * @param pCachedData GC pointer to cached data 222 222 */ 223 PATMDECL(int) PATMSetMMIOPatchInfo(PVM pVM, RTGCPHYS GCPhys, RT GCPTR32pCachedData);223 PATMDECL(int) PATMSetMMIOPatchInfo(PVM pVM, RTGCPHYS GCPhys, RTRCPTR pCachedData); 224 224 225 225 … … 233 233 * @param pRelBranchPatch Relative duplicated function address 234 234 */ 235 PATMDECL(int) PATMAddBranchToLookupCache(PVM pVM, RT GCPTR32 pJumpTableGC, RTGCPTR32pBranchTarget, RTGCUINTPTR pRelBranchPatch);235 PATMDECL(int) PATMAddBranchToLookupCache(PVM pVM, RTRCPTR pJumpTableGC, RTRCPTR pBranchTarget, RTGCUINTPTR pRelBranchPatch); 236 236 237 237 … … 256 256 * @param pSize Original instruction size (out, optional) 257 257 */ 258 PATMDECL(bool) PATMIsInt3Patch(PVM pVM, RT GCPTR32pInstrGC, uint32_t *pOpcode, uint32_t *pSize);258 PATMDECL(bool) PATMIsInt3Patch(PVM pVM, RTRCPTR pInstrGC, uint32_t *pOpcode, uint32_t *pSize); 259 259 260 260 … … 310 310 * 311 311 */ 312 PATMGCDECL(int) PATMGCHandleWriteToPatchPage(PVM pVM, PCPUMCTXCORE pRegFrame, RT GCPTR32GCPtr, uint32_t cbWrite);312 PATMGCDECL(int) PATMGCHandleWriteToPatchPage(PVM pVM, PCPUMCTXCORE pRegFrame, RTRCPTR GCPtr, uint32_t cbWrite); 313 313 314 314 /** … … 402 402 * @param pcb Size of the patch memory block 403 403 */ 404 PATMR3DECL(RT GCPTR32) PATMR3QueryPatchMemGC(PVM pVM, uint32_t *pcb);404 PATMR3DECL(RTRCPTR) PATMR3QueryPatchMemGC(PVM pVM, uint32_t *pcb); 405 405 406 406 /** … … 412 412 * @param pPatchAddr Guest context patch address (if true) 413 413 */ 414 PATMR3DECL(bool) PATMR3IsInsidePatchJump(PVM pVM, RT GCPTR32pAddr, PRTGCPTR32 pPatchAddr);414 PATMR3DECL(bool) PATMR3IsInsidePatchJump(PVM pVM, RTRCPTR pAddr, PRTGCPTR32 pPatchAddr); 415 415 416 416 … … 422 422 * @param pAddrGC Guest context address 423 423 */ 424 PATMR3DECL(RT GCPTR32) PATMR3QueryPatchGCPtr(PVM pVM, RTGCPTR32pAddrGC);424 PATMR3DECL(RTRCPTR) PATMR3QueryPatchGCPtr(PVM pVM, RTRCPTR pAddrGC); 425 425 426 426 /** … … 440 440 * @param pAddrGC GC pointer 441 441 */ 442 PATMR3DECL(R3PTRTYPE(void *)) PATMR3GCPtrToHCPtr(PVM pVM, RT GCPTR32pAddrGC);442 PATMR3DECL(R3PTRTYPE(void *)) PATMR3GCPtrToHCPtr(PVM pVM, RTRCPTR pAddrGC); 443 443 444 444 … … 460 460 * @param pNewEip GC pointer to new instruction 461 461 */ 462 PATMR3DECL(int) PATMR3HandleTrap(PVM pVM, PCPUMCTX pCtx, RT GCPTR32pEip, RTGCPTR *ppNewEip);462 PATMR3DECL(int) PATMR3HandleTrap(PVM pVM, PCPUMCTX pCtx, RTRCPTR pEip, RTGCPTR *ppNewEip); 463 463 464 464 /** … … 479 479 * 480 480 */ 481 PATMR3DECL(int) PATMR3PatchWrite(PVM pVM, RT GCPTR32GCPtr, uint32_t cbWrite);481 PATMR3DECL(int) PATMR3PatchWrite(PVM pVM, RTRCPTR GCPtr, uint32_t cbWrite); 482 482 483 483 /** … … 488 488 * @param addr GC address of the page to flush 489 489 */ 490 PATMR3DECL(int) PATMR3FlushPage(PVM pVM, RT GCPTR32addr);490 PATMR3DECL(int) PATMR3FlushPage(PVM pVM, RTRCPTR addr); 491 491 492 492 /** … … 509 509 * @note returns failure if patching is not allowed or possible 510 510 */ 511 PATMR3DECL(int) PATMR3InstallPatch(PVM pVM, RT GCPTR32pInstrGC, uint64_t flags);511 PATMR3DECL(int) PATMR3InstallPatch(PVM pVM, RTRCPTR pInstrGC, uint64_t flags); 512 512 513 513 /** … … 519 519 * @param flags Patch flags 520 520 */ 521 PATMR3DECL(int) PATMR3AddHint(PVM pVM, RT GCPTR32pInstrGC, uint32_t flags);521 PATMR3DECL(int) PATMR3AddHint(PVM pVM, RTRCPTR pInstrGC, uint32_t flags); 522 522 523 523 /** … … 541 541 * 542 542 */ 543 PATMR3DECL(RT GCPTR32) PATMR3PatchToGCPtr(PVM pVM, RTGCPTR32pPatchGC, PATMTRANSSTATE *pEnmState);543 PATMR3DECL(RTRCPTR) PATMR3PatchToGCPtr(PVM pVM, RTRCPTR pPatchGC, PATMTRANSSTATE *pEnmState); 544 544 545 545 /** … … 551 551 * 552 552 */ 553 PATMR3DECL(RT GCPTR32) PATMR3GuestGCPtrToPatchGCPtr(PVM pVM, RCPTRTYPE(uint8_t*) pInstrGC);553 PATMR3DECL(RTRCPTR) PATMR3GuestGCPtrToPatchGCPtr(PVM pVM, RCPTRTYPE(uint8_t*) pInstrGC); 554 554 555 555 /** … … 563 563 * 564 564 */ 565 PATMR3DECL(int) PATMR3QueryOpcode(PVM pVM, RT GCPTR32pInstrGC, uint8_t *pByte);565 PATMR3DECL(int) PATMR3QueryOpcode(PVM pVM, RTRCPTR pInstrGC, uint8_t *pByte); 566 566 567 567 /** … … 575 575 * 576 576 */ 577 PATMR3DECL(int) PATMR3DisablePatch(PVM pVM, RT GCPTR32pInstrGC);577 PATMR3DECL(int) PATMR3DisablePatch(PVM pVM, RTRCPTR pInstrGC); 578 578 579 579 … … 588 588 * 589 589 */ 590 PATMR3DECL(int) PATMR3EnablePatch(PVM pVM, RT GCPTR32pInstrGC);590 PATMR3DECL(int) PATMR3EnablePatch(PVM pVM, RTRCPTR pInstrGC); 591 591 592 592 … … 601 601 * 602 602 */ 603 PATMR3DECL(int) PATMR3RemovePatch(PVM pVM, RT GCPTR32pInstrGC);603 PATMR3DECL(int) PATMR3RemovePatch(PVM pVM, RTRCPTR pInstrGC); 604 604 605 605 … … 612 612 * @param pConflictGC Guest context pointer to check 613 613 */ 614 PATMR3DECL(int) PATMR3DetectConflict(PVM pVM, RT GCPTR32 pInstrGC, RTGCPTR32pConflictGC);614 PATMR3DECL(int) PATMR3DetectConflict(PVM pVM, RTRCPTR pInstrGC, RTRCPTR pConflictGC); 615 615 616 616 … … 622 622 * @param pInstrGC Guest context pointer to instruction 623 623 */ 624 PATMR3DECL(bool) PATMR3HasBeenPatched(PVM pVM, RT GCPTR32pInstrGC);624 PATMR3DECL(bool) PATMR3HasBeenPatched(PVM pVM, RTRCPTR pInstrGC); 625 625 626 626 … … 634 634 * 635 635 */ 636 PATMR3DECL(int) PATMInstallSpinlockPatch(PVM pVM, RT GCPTR32pCallAcquireSpinlockGC, uint32_t cbAcquireSpinlockCall);636 PATMR3DECL(int) PATMInstallSpinlockPatch(PVM pVM, RTRCPTR pCallAcquireSpinlockGC, uint32_t cbAcquireSpinlockCall); 637 637 638 638 … … 645 645 * 646 646 */ 647 PATMR3DECL(bool) PATMIsSpinlockAcquire(PVM pVM, RT GCPTR32pCallTargetGC);647 PATMR3DECL(bool) PATMIsSpinlockAcquire(PVM pVM, RTRCPTR pCallTargetGC); 648 648 649 649 /** … … 655 655 * 656 656 */ 657 PATMR3DECL(bool) PATMIsSpinlockRelease(PVM pVM, RT GCPTR32pCallTargetGC);657 PATMR3DECL(bool) PATMIsSpinlockRelease(PVM pVM, RTRCPTR pCallTargetGC); 658 658 659 659 /** … … 665 665 * 666 666 */ 667 PATMR3DECL(bool) PATMIsSpinlockReleasePatch(PVM pVM, RT GCPTR32pCallTargetGC);667 PATMR3DECL(bool) PATMIsSpinlockReleasePatch(PVM pVM, RTRCPTR pCallTargetGC); 668 668 669 669 /** @} */ -
trunk/include/iprt/avl.h
r8245 r9228 162 162 /** @} */ 163 163 164 /** 165 * AVL uint32_t type for the relative offset pointer scheme. 166 */ 167 typedef int32_t AVLOU32; 168 169 typedef uint32_t AVLOU32KEY; 170 171 /** 172 * AVL Core node. 173 */ 174 typedef struct _AVLOU32NodeCore 175 { 176 /** Key value. */ 177 AVLOU32KEY Key; 178 /** Offset to the left leaf node, relative to this field. */ 179 AVLOU32 pLeft; 180 /** Offset to the right leaf node, relative to this field. */ 181 AVLOU32 pRight; 182 /** Height of this tree: max(height(left), height(right)) + 1 */ 183 unsigned char uchHeight; 184 } AVLOU32NODECORE, *PAVLOU32NODECORE; 185 186 /** A offset base tree with uint32_t keys. */ 187 typedef AVLOU32 AVLOU32TREE; 188 /** Pointer to a offset base tree with uint32_t keys. */ 189 typedef AVLOU32TREE *PAVLOU32TREE; 190 191 /** Pointer to an internal tree pointer. 192 * In this case it's a pointer to a relative offset. */ 193 typedef AVLOU32TREE *PPAVLOU32NODECORE; 194 195 /** Callback function for RTAvloU32DoWithAll(). */ 196 typedef DECLCALLBACK(int) AVLOU32CALLBACK(PAVLOU32NODECORE pNode, void *pvUser); 197 /** Pointer to callback function for RTAvloU32DoWithAll(). */ 198 typedef AVLOU32CALLBACK *PAVLOU32CALLBACK; 199 200 RTDECL(bool) RTAvloU32Insert(PAVLOU32TREE pTree, PAVLOU32NODECORE pNode); 201 RTDECL(PAVLOU32NODECORE) RTAvloU32Remove(PAVLOU32TREE pTree, AVLOU32KEY Key); 202 RTDECL(PAVLOU32NODECORE) RTAvloU32Get(PAVLOU32TREE pTree, AVLOU32KEY Key); 203 RTDECL(int) RTAvloU32DoWithAll(PAVLOU32TREE pTree, int fFromLeft, PAVLOU32CALLBACK pfnCallBack, void *pvParam); 204 RTDECL(PAVLOU32NODECORE) RTAvloU32GetBestFit(PAVLOU32TREE ppTree, AVLOU32KEY Key, bool fAbove); 205 RTDECL(PAVLOU32NODECORE) RTAvloU32RemoveBestFit(PAVLOU32TREE ppTree, AVLOU32KEY Key, bool fAbove); 206 RTDECL(int) RTAvloU32Destroy(PAVLOU32TREE pTree, PAVLOU32CALLBACK pfnCallBack, void *pvParam); 207 208 /** @} */ 164 209 165 210 -
trunk/include/iprt/types.h
r9223 r9228 913 913 */ 914 914 #define NIL_RTRCPTR ((RTRCPTR)0) 915 916 typedef int32_t RTRCINTPTR; 917 typedef uint32_t RTRCUINTPTR; 918 915 919 /** @} */ 916 920
Note:
See TracChangeset
for help on using the changeset viewer.