- Timestamp:
- Feb 11, 2001, 4:27:25 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/test/fake.c
r5086 r5110 1 /* $Id: fake.c,v 1. 7 2001-02-10 11:11:48bird Exp $1 /* $Id: fake.c,v 1.8 2001-02-11 15:27:25 bird Exp $ 2 2 * 3 3 * Fake stubs for the ldr and kernel functions we imports or overloads. … … 101 101 0xDEAD 102 102 }; 103 104 105 /* 106 * More fake variables. 107 */ 108 ULONG fakeSMcDFInuse; 109 ULONG fakesmFileSize; 110 ULONG fakeSMswapping; 111 ULONG fakesmcBrokenDF; 112 ULONG fakepgPhysPages; 113 ULONG fakeSMcInMemFile; 114 ULONG fakeSMCFGMinFree; 115 ULONG fakesmcGrowFails; 116 ULONG fakePGSwapEnabled; 117 ULONG fakepgcPageFaults; 118 ULONG fakeSMCFGSwapSize; 119 ULONG fakepgResidentPages; 120 ULONG fakepgSwappablePages; 121 ULONG fakepgDiscardableInmem; 122 ULONG fakepgDiscardablePages; 123 ULONG fakeSMMinFree; 124 ULONG fakepgcPageFaultsActive; 125 ULONG fakepgPhysMax; 126 ULONG fakeVirtualAddressLimit; 127 128 VMAH fakeahvmShr; 129 VMAH fakeahvmSys; 130 VMAH fakeahvmhShr; 131 103 132 104 133 … … 166 195 rc = DosQueryHeaderInfo(NULLHANDLE, 0, szLibPath, sizeof(szLibPath), QHINF_LIBPATH); 167 196 rc = DosQueryExtLIBPATH(szEndLibPath, END_LIBPATH); 197 198 if (_usFakeVerMinor < 45) 199 fakeVirtualAddressLimit = 0xFFFFFFFF; 200 else 201 fakeVirtualAddressLimit = 0x80000000; 202 203 204 if (fakeVirtualAddressLimit != 0xFFFFFFFF) 205 { /* high memory supported */ 206 fakeahvmSys.ah_laddrMax = 0xFFFE0000; 207 fakeahvmSys.ah_laddrMin = 0x80000000; 208 fakeahvmShr.ah_laddrMin = 0x08000000; 209 fakeahvmhShr.ah_laddrMin = 0x70000000; 210 } 211 else 212 { /* high memory not supported */ 213 fakeahvmSys.ah_laddrMax = 0xFFFE0000; 214 fakeahvmSys.ah_laddrMin = 0x40000000; 215 fakeahvmShr.ah_laddrMin = 0x08000000; 216 fakeahvmhShr.ah_laddrMin = 0xffffffff; 217 } 168 218 169 219 rc = rc; … … 2015 2065 } 2016 2066 2067 2068 /** 2069 * Returns the number of bytes of physical memory available. 2070 */ 2071 ULONG KRNLCALL fakePGPhysAvail(void) 2072 { 2073 DUMMY(); 2074 printf("fakePGPhysAvail - returns 0x234563\n"); 2075 return 0x234563; 2076 } 2077 2078 2079 /** 2080 * Returns the number of pageframes currently in use. 2081 */ 2082 ULONG KRNLCALL fakePGPhysPresent(void) 2083 { 2084 DUMMY(); 2085 printf("fakePGPhysPresent - returns 0x123534\n"); 2086 return 0x123534; 2087 } 2088 2089 2090 /** 2091 * This function seems to find the top of the private arena. 2092 * And for high arena kernels (AURORA and W3SMP?) it is modified 2093 * to calc the top of the high private arena, given flFlag = 4. 2094 * -- 2095 * This function is really intented for resizing / recaling the size of 2096 * the shared arena(s). But, it's useful for finding the highest used 2097 * private arena(s). 2098 * @param flFlags VMRSBF_* flags. 2099 * @param pulSentinelAddress Pointer to return variable (optional). 2100 */ 2101 VOID KRNLCALL fakevmRecalcShrBound( 2102 ULONG flFlags, 2103 PULONG pulSentinelAddress) 2104 { 2105 ULONG ulRet; 2106 DUMMY(); 2107 2108 if ((flFlags & 6) == 0) 2109 { /* shared tiled memory */ 2110 ulRet = 128*1024*1024; 2111 } 2112 else 2113 { 2114 ulRet = 0x2c000000; 2115 if (_usFakeVerMinor < 45) /* bad emulation for Warp 3 SMP - FIXME */ 2116 printf("fakePGPhysPresent - error: bad flags for non-highmem OS/2 versionn"); 2117 } 2118 2119 if (pulSentinelAddress) 2120 *pulSentinelAddress = ulRet; 2121 2122 printf("fakePGPhysPresent - returns %x - flFlags=0x%02x, pulSentinelAddress=0x%08x\n", 2123 ulRet, flFlags, pulSentinelAddress); 2124 2125 return; 2126 } 2127 2128
Note:
See TracChangeset
for help on using the changeset viewer.