Index: /trunk/include/VBox/cpum.h
===================================================================
--- /trunk/include/VBox/cpum.h	(revision 9222)
+++ /trunk/include/VBox/cpum.h	(revision 9223)
@@ -930,5 +930,5 @@
  *
  */
-DECLASM(void) CPUMGCCallGuestTrapHandler(PCPUMCTXCORE pRegFrame, uint32_t selCS, RTGCPTR32 pHandler, uint32_t eflags, uint32_t selSS, RTGCPTR32 pEsp);
+DECLASM(void) CPUMGCCallGuestTrapHandler(PCPUMCTXCORE pRegFrame, uint32_t selCS, RTRCPTR pHandler, uint32_t eflags, uint32_t selSS, RTRCPTR pEsp);
 
 /**
Index: /trunk/include/iprt/asmdefs.mac
===================================================================
--- /trunk/include/iprt/asmdefs.mac	(revision 9222)
+++ /trunk/include/iprt/asmdefs.mac	(revision 9223)
@@ -449,4 +449,21 @@
 
 
+;; @def RTRCPTR_DEF
+; The pesudo-instruction used to declare an initialized pointer variable in the raw mode context.
+%define RTRCPTR_DEF    dd
+
+;; @def RTRCPTR_RES
+; The pesudo-instruction used to declare (=reserve space for) an uninitialized pointer
+; variable of the raw mode context.
+%define RTRCPTR_RES    resd
+
+;; @def RTRCPTR_PRE
+; The memory operand prefix used for a pointer in the raw mode context.
+%define RTRCPTR_PRE    dword
+
+;; @def RTRCPTR_CB
+; The size in bytes of a pointer in the raw mode context.
+%define RTRCPTR_CB     4
+
 
 ;; @def RT_CCPTR_DEF
@@ -464,8 +481,8 @@
 
 %ifdef IN_GC
- %define RTCCPTR_DEF        RTGCPTR_DEF
- %define RTCCPTR_RES        RTGCPTR_RES
- %define RTCCPTR_PRE        RTGCPTR_PRE
- %define RTCCPTR_CB         RTGCPTR_CB
+ %define RTCCPTR_DEF        RTRCPTR_DEF
+ %define RTCCPTR_RES        RTRCPTR_RES
+ %define RTCCPTR_PRE        RTRCPTR_PRE
+ %define RTCCPTR_CB         RTRCPTR_CB
 %else
  %ifdef IN_RING0
Index: /trunk/include/iprt/cdefs.h
===================================================================
--- /trunk/include/iprt/cdefs.h	(revision 9222)
+++ /trunk/include/iprt/cdefs.h	(revision 9223)
@@ -237,11 +237,11 @@
 
 /** @def RCPTRTYPE
- * Declare a pointer which is used in GC but appears in structure(s) used by
- * both HC and GC. The main purpose is to make sure structures have the same
+ * Declare a pointer which is used in the raw mode context but appears in structure(s) used by
+ * both HC and RC. The main purpose is to make sure structures have the same
  * size when built for different architectures.
  *
- * @param   GCType  The GC type.
- */
-#define RCPTRTYPE(GCType)       CTXTYPE(GCType, RTGCPTR32, RTGCPTR32)
+ * @param   RCType  The RC type.
+ */
+#define RCPTRTYPE(RCType)       CTXTYPE(RCType, RTRCPTR, RTRCPTR)
 
 /** @def R3R0PTRTYPE
Index: /trunk/include/iprt/types.h
===================================================================
--- /trunk/include/iprt/types.h	(revision 9222)
+++ /trunk/include/iprt/types.h	(revision 9223)
@@ -891,4 +891,28 @@
 /** @} */
 
+/** @defgroup grp_rt_types_rc  Raw mode Context Basic Types
+ * @ingroup grp_rt_types
+ * @{
+ */
+
+/** Raw mode context pointer; a 32 bits guest context pointer
+ * Keep in mind that this type is an unsigned integer in
+ * HC and void pointer in GC.
+ */
+#ifdef IN_GC
+typedef void *          RTRCPTR;
+#else
+typedef uint32_t        RTRCPTR;
+#endif
+/** Pointer to a raw mode context pointer. */
+typedef RTRCPTR        *PRTRCPTR;
+/** Pointer to a const raw mode context pointer. */
+typedef const RTRCPTR  *PCRTRCPTR;
+/** @def NIL_RTGCPTR 
+ * NIL RC pointer.
+ */
+#define NIL_RTRCPTR    ((RTRCPTR)0)
+/** @} */
+
 
 /** @defgroup grp_rt_types_cc  Current Context Basic Types
Index: /trunk/src/VBox/VMM/TRPMInternal.h
===================================================================
--- /trunk/src/VBox/VMM/TRPMInternal.h	(revision 9222)
+++ /trunk/src/VBox/VMM/TRPMInternal.h	(revision 9223)
@@ -152,8 +152,8 @@
     /** Temporary Hypervisor trap handlers.
      * NULL means default action. */
-    RTGCPTR32       aTmpTrapHandlers[256];
+    RCPTRTYPE(void *) aTmpTrapHandlers[256];
 
     /** GC Pointer to the IDT shadow area (aIdt) placed in Hypervisor memory arena. */
-    RTGCPTR32       GCPtrIdt;
+    RCPTRTYPE(void *) GCPtrIdt;
     /** Current (last) Guest's IDTR. */
     VBOXIDTR        GuestIdtr;
@@ -163,5 +163,5 @@
 
     /** Checked trap & interrupt handler array */
-    RTGCPTR32       aGuestTrapHandler[256];
+    RCPTRTYPE(void *) aGuestTrapHandler[256];
 
     /** GC: The number of times writes to the Guest IDT were detected. */
Index: /trunk/src/VBox/VMM/TRPMInternal.mac
===================================================================
--- /trunk/src/VBox/VMM/TRPMInternal.mac	(revision 9222)
+++ /trunk/src/VBox/VMM/TRPMInternal.mac	(revision 9223)
@@ -52,11 +52,11 @@
     .aIdt               resd 512
     .au32IdtPatched     resd 8
-    .aTmpTrapHandlers   RTGCPTR32_RES 256
+    .aTmpTrapHandlers   RTRCPTR_RES 256
 
-    .GCPtrIdt           RTGCPTR32_RES 1
+    .GCPtrIdt           RTRCPTR_RES 1
     .GuestIdtr          resb 6
     .au8Padding         resb 2
 
-    .aGuestTrapHandler  resd 256
+    .aGuestTrapHandler  RTRCPTR_RES 256
 
     .StatGCWriteGuestIDTFault  resb STAMCOUNTER_size
Index: /trunk/src/VBox/VMM/VMMAll/TRPMAll.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/TRPMAll.cpp	(revision 9222)
+++ /trunk/src/VBox/VMM/VMMAll/TRPMAll.cpp	(revision 9223)
@@ -694,5 +694,5 @@
                         STAM_PROFILE_ADV_STOP(&pVM->trpm.s.aStatGCTraps[iOrgTrap], o);
 
-                    CPUMGCCallGuestTrapHandler(pRegFrame, GuestIdte.Gen.u16SegSel | 1, pVM->trpm.s.aGuestTrapHandler[iGate], eflags.u32, ss_r0, (RTGCPTR32)esp_r0);
+                    CPUMGCCallGuestTrapHandler(pRegFrame, GuestIdte.Gen.u16SegSel | 1, pVM->trpm.s.aGuestTrapHandler[iGate], eflags.u32, ss_r0, (RTRCPTR)esp_r0);
                     /* does not return */
 #else
Index: /trunk/src/VBox/VMM/VMMGC/TRPMGC.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMGC/TRPMGC.cpp	(revision 9222)
+++ /trunk/src/VBox/VMM/VMMGC/TRPMGC.cpp	(revision 9223)
@@ -69,5 +69,5 @@
      * Install handler.
      */
-    pVM->trpm.s.aTmpTrapHandlers[iTrap] = (RTGCPTR32)(RTGCUINTPTR)pfnHandler;
+    pVM->trpm.s.aTmpTrapHandlers[iTrap] = (RTRCPTR)pfnHandler;
     return VINF_SUCCESS;
 }
