- Timestamp:
- Aug 24, 2000, 3:36:29 AM (25 years ago)
- Location:
- branches
- Files:
-
- 5 edited
-
GRACE/src/win32k/pe2lx/pe2lx.cpp (modified) (6 diffs)
-
GRACE/src/win32k/test/fake.c (modified) (5 diffs)
-
Grace/src/win32k/ldr/mytkExecPgm.asm (modified) (2 diffs)
-
Grace/src/win32k/ldr/mytkStartProcess.asm (modified) (4 diffs)
-
Grace/src/win32k/test/fakea.asm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/GRACE/src/win32k/pe2lx/pe2lx.cpp
r4068 r4076 1 /* $Id: pe2lx.cpp,v 1.18.4. 6 2000-08-22 03:00:22bird Exp $1 /* $Id: pe2lx.cpp,v 1.18.4.7 2000-08-24 01:36:26 bird Exp $ 2 2 * 3 3 * Pe2Lx class implementation. Ring 0 and Ring 3 … … 1328 1328 #ifdef RING0 1329 1329 #if 1 1330 initOdin32Path(); 1330 1331 return ldrOpenPath(pachModname, cchModname, pLdrLv, pfl); 1331 1332 #else … … 4696 4697 BOOL Pe2Lx::initOdin32Path() 4697 4698 { 4698 #if 04699 #ifdef RING0 4699 4700 APIRET rc; 4700 4701 PMTE pMTE; … … 4708 4709 */ 4709 4710 pMTE = NULL; 4710 rc = ldrFindModule("KERNEL32", 8, CLASS_GLOBAL, &pMTE);4711 rc = ldrFindModule("KERNEL32", 8, CLASS_GLOBAL, (PPMTE)SSToDS(&pMTE)); 4711 4712 if (rc == NO_ERROR && pMTE != NULL && pMTE->mte_swapmte != NULL) 4712 4713 { … … 4744 4745 ul = options.fNoLoader; 4745 4746 options.fNoLoader = TRUE; 4746 rc = ldrOpenPath("KERNEL32", 8, &lv, &ful); 4747 lv.lv_class = CLASS_GLOBAL; 4748 rc = ldrOpenPath("KERNEL32", 8, (ldrlv_t*)SSToDS(&lv), (PULONG)SSToDS(&ful)); 4747 4749 options.fNoLoader = ul; 4748 4750 if (rc == NO_ERROR) … … 4754 4756 * We'll close the file handle first of course. 4755 4757 */ 4758 rc = setOdin32Path(ldrpFileNameBuf); 4756 4759 ldrClose(lv.lv_sfn); 4757 return setOdin32Path(ldrpFileNameBuf);4760 return rc; 4758 4761 } 4759 4762 -
branches/GRACE/src/win32k/test/fake.c
r4073 r4076 1 /* $Id: fake.c,v 1.1.4. 3 2000-08-23 04:25:45bird Exp $1 /* $Id: fake.c,v 1.1.4.4 2000-08-24 01:36:29 bird Exp $ 2 2 * 3 3 * Fake stubs for the ldr and kernel functions we imports or overloads. … … 858 858 else 859 859 { 860 fRc = (hkmtx->debug.ksem_Owner != usSlot);860 fRc = (hkmtx->debug.ksem_Owner == usSlot); 861 861 if (pcusNest) 862 862 *pcusNest = hkmtx->debug.ksem_cusNest; … … 1041 1041 1042 1042 printf("tkExecPgmWorker: execFlag = %d, pArg = %p, pEnv = %p, pszFilename = %s\n", execFlag, pArg, pEnv, pszFilename); 1043 1044 /* 1045 * Take loader semaphore. 1046 */ 1047 rc = KSEMRequestMutex(&fakeLDRSem, KSEM_INDEFINITE_WAIT); 1048 if (rc != NO_ERROR) 1049 { 1050 return rc; 1051 } 1043 1052 1044 1053 /* … … 1744 1753 PMTE KRNLCALL fakeldrASMpMTEFromHandle(HMTE hMTE) 1745 1754 { 1746 hMTE = hMTE; 1755 PMTE pMte = (PMTE)hMTE; 1756 1757 pMte += 10; //just do something! 1758 1747 1759 return NULL; 1748 1760 } … … 1750 1762 ULONG LDRCALL fakeldrFindModule(PCHAR pachFilename, USHORT cchFilename, USHORT usClass, PPMTE ppMTE) 1751 1763 { 1764 APIRET rc = NO_ERROR; 1752 1765 usClass = usClass; 1753 1766 cchFilename = cchFilename; 1754 1767 pachFilename = pachFilename; 1755 1768 *ppMTE = NULL; 1756 return NO_ERROR;1757 } 1758 1759 1769 return rc; 1770 } 1771 1772 -
branches/Grace/src/win32k/ldr/mytkExecPgm.asm
r4068 r4076 1 ; $Id: mytkExecPgm.asm,v 1.10.4. 5 2000-08-22 03:00:21bird Exp $1 ; $Id: mytkExecPgm.asm,v 1.10.4.6 2000-08-24 01:36:25 bird Exp $ 2 2 ; 3 3 ; mytkExecPgm - tkExecPgm overload … … 337 337 push eax ; Push address of usage count pointer. 338 338 push pLdrSem ; Push pointer to loader semaphore ( = handle). 339 call _KSEMQueryMutex@8339 call near ptr FLAT:_KSEMQueryMutex@8 340 340 or eax, eax ; Check return code. (1 = our / free; 0 = not our but take) 341 je tkepgm_callbehindret ; jmp if not taken by us (FALSE).342 341 pop eax ; Pops usage count. 342 je tkepgm_callbehindret ; jmp if not taken by us (rc=FALSE). 343 343 or eax, eax ; Check usage count. 344 344 jz tkepgm_callbehindret ; jmp if 0 (=free). -
branches/Grace/src/win32k/ldr/mytkStartProcess.asm
r4073 r4076 1 ; $Id: mytkStartProcess.asm,v 1.1.2. 3 2000-08-23 04:25:44bird Exp $1 ; $Id: mytkStartProcess.asm,v 1.1.2.4 2000-08-24 01:36:26 bird Exp $ 2 2 ; 3 3 ; tkStartProcess overloader. Needed to clear the loader semaphore … … 72 72 ; @remark 73 73 mytkStartProcess PROC NEAR 74 ASSUME CS:CODE32,DS:FLAT, ES:NOTHING, SS:NOTHING74 ASSUME DS:FLAT, ES:NOTHING, SS:NOTHING 75 75 76 76 ; … … 88 88 push eax ; Push address of usage count pointer. 89 89 push pLdrSem ; Push pointer to loader semaphore ( = handle). 90 call _KSEMQueryMutex@890 call near ptr FLAT:_KSEMQueryMutex@8 91 91 or eax, eax ; Check return code. (1 = our / free; 0 = not our but take) 92 jz mtksp_ret ; jmp if not taken by us (FALSE).93 92 pop eax ; Pops usage count. 93 jz mtksp_ret ; jmp if not taken by us (rc=FALSE). 94 94 or eax, eax ; Check usage count. 95 95 jz mtksp_ret ; jmp if 0 (=free). … … 105 105 pop ecx 106 106 pop eax 107 jmp _tkStartProcess107 jmp near ptr FLAT:_tkStartProcess 108 108 mytkStartProcess ENDP 109 109 -
branches/Grace/src/win32k/test/fakea.asm
r4073 r4076 1 ; $Id: fakea.asm,v 1.1.4. 3 2000-08-23 04:25:46bird Exp $1 ; $Id: fakea.asm,v 1.1.4.4 2000-08-24 01:36:29 bird Exp $ 2 2 ; 3 3 ; Fake assembly imports. … … 305 305 push ebp 306 306 mov ebp, esp 307 308 ;309 ; Take loader semaphore.310 ;311 push 0ffffffffh312 push offset fakeLDRSem313 call _fakeKSEMRequestMutex@8314 or eax, eax315 jnz ftkep_ret2316 307 317 308 ;
Note:
See TracChangeset
for help on using the changeset viewer.
