Index: /trunk/src/VBox/Runtime/testcase/tstLdr-4.cpp
===================================================================
--- /trunk/src/VBox/Runtime/testcase/tstLdr-4.cpp	(revision 74858)
+++ /trunk/src/VBox/Runtime/testcase/tstLdr-4.cpp	(revision 74859)
@@ -40,6 +40,27 @@
 #include <iprt/string.h>
 
+#include <VBox/sup.h>
+
+
+/*********************************************************************************************************************************
+*   Global Variables                                                                                                             *
+*********************************************************************************************************************************/
+static SUPGLOBALINFOPAGE g_MyGip = { SUPGLOBALINFOPAGE_MAGIC, SUPGLOBALINFOPAGE_VERSION, SUPGIPMODE_INVARIANT_TSC, 42 };
+static PSUPGLOBALINFOPAGE g_pMyGip = &g_MyGip;
 
 extern "C" DECLEXPORT(int) DisasmTest1(void);
+
+
+static DECLCALLBACK(int) testEnumSegment(RTLDRMOD hLdrMod, PCRTLDRSEG pSeg, void *pvUser)
+{
+    uint32_t *piSeg = (uint32_t *)pvUser;
+    RTPrintf("  Seg#%02u: %RTptr LB %RTptr %s\n"
+             "     link=%RTptr LB %RTptr align=%RTptr fProt=%#x offFile=%RTfoff\n"
+             , *piSeg, pSeg->RVA, pSeg->cbMapped, pSeg->pszName,
+             pSeg->LinkAddress, pSeg->cb, pSeg->Alignment, pSeg->fProt, pSeg->offFile);
+    *piSeg += 1;
+    RT_NOREF(hLdrMod);
+    return VINF_SUCCESS;
+}
 
 
@@ -80,6 +101,12 @@
     else if (!strcmp(pszSymbol, "MyPrintf")             || !strcmp(pszSymbol, "_MyPrintf"))
         *pValue = (uintptr_t)RTPrintf;
+    else if (!strcmp(pszSymbol, "SUPR0Printf")          || !strcmp(pszSymbol, "_SUPR0Printf"))
+        *pValue = (uintptr_t)RTPrintf;
     else if (!strcmp(pszSymbol, "SomeImportFunction")   || !strcmp(pszSymbol, "_SomeImportFunction"))
         *pValue = (uintptr_t)0;
+    else if (!strcmp(pszSymbol, "g_pSUPGlobalInfoPage") || !strcmp(pszSymbol, "_g_pSUPGlobalInfoPage"))
+        *pValue = (uintptr_t)&g_pMyGip;
+    else if (!strcmp(pszSymbol, "g_SUPGlobalInfoPage")  || !strcmp(pszSymbol, "_g_SUPGlobalInfoPage"))
+        *pValue = (uintptr_t)&g_MyGip;
     else
     {
@@ -189,4 +216,6 @@
             DECLCALLBACKPTR(int, pfnDisasmTest1)(void) = (DECLCALLBACKPTR(int, RT_NOTHING)(void))(uintptr_t)Value; /* eeeh. */
             RTPrintf("tstLdr-4: pfnDisasmTest1=%p / add-symbol-file %s %#x\n", pfnDisasmTest1, pszFilename, aLoads[i].pvBits);
+            uint32_t iSeg = 0;
+            RTLdrEnumSegments(aLoads[i].hLdrMod, testEnumSegment, &iSeg);
 
             /* call the test function. */
Index: /trunk/src/VBox/Runtime/testcase/tstLdrDisasmTest.cpp
===================================================================
--- /trunk/src/VBox/Runtime/testcase/tstLdrDisasmTest.cpp	(revision 74858)
+++ /trunk/src/VBox/Runtime/testcase/tstLdrDisasmTest.cpp	(revision 74859)
@@ -37,9 +37,9 @@
 #include <VBox/dis.h>
 #include <VBox/disopcode.h>
+#include <VBox/sup.h>
 #include <iprt/string.h>
 
-#if defined(IN_RING0) && !defined(RT_OS_WINDOWS) /* Too lazy to make import libs. */
-extern "C" DECLIMPORT(int) MyPrintf(const char *pszFormat, ...);
-# define MY_PRINTF(a) MyPrintf a
+#if defined(IN_RING0)
+# define MY_PRINTF(a) SUPR0Printf a
 #else
 # define MY_PRINTF(a) do {} while (0)
@@ -116,4 +116,18 @@
     MY_PRINTF(("DisasmTest1: %p\n", &DisasmTest1));
 
+#if defined(IN_RING0)
+    MY_PRINTF(("GIP: g_pSUPGlobalInfoPage=%p\n", g_pSUPGlobalInfoPage));
+    MY_PRINTF(("GIP: magic=%#x version=%#x mode=%d cCpus=%d\n", g_pSUPGlobalInfoPage->u32Magic, g_pSUPGlobalInfoPage->u32Version,
+               g_pSUPGlobalInfoPage->u32Mode, g_pSUPGlobalInfoPage->cCpus));
+    if (g_pSUPGlobalInfoPage->u32Magic != SUPGLOBALINFOPAGE_MAGIC)
+        return 0xc001;
+    if (g_pSUPGlobalInfoPage->u32Version != SUPGLOBALINFOPAGE_VERSION)
+        return 0xc002;
+    if (g_pSUPGlobalInfoPage->u32Mode != SUPGIPMODE_INVARIANT_TSC)
+        return 0xc003;
+    if (g_pSUPGlobalInfoPage->cCpus != 42)
+        return 0xc004;
+#endif
+
     memset(&Cpu, 0, sizeof(Cpu));
 
