Changeset 4046 for branches


Ignore:
Timestamp:
Aug 19, 2000, 4:37:21 PM (25 years ago)
Author:
bird
Message:

More bugs corrected.
It's working now!

Location:
branches
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • branches/GRACE/src/win32k/dev16/probkrnl.c

    r4018 r4046  
    1 /* $Id: probkrnl.c,v 1.20.4.5 2000-08-15 07:03:23 bird Exp $
     1/* $Id: probkrnl.c,v 1.20.4.6 2000-08-19 14:36:53 bird Exp $
    22 *
    33 * Description:   Autoprobes the os2krnl file and os2krnl[*].sym files.
     
    109109    {FALSE, -1, 12, "_ldrOpenPath",         -1,  -1,  -1,  -1, EPT_PROC32},        /* 18 */
    110110    {FALSE, -1, 12, "_LDRClearSem",         -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 19 */
    111     {FALSE, -1, 17, "_KSEMRequestMutex",    -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 20 */
    112     {FALSE, -1,  7, "_LdrSem",              -1,  -1,  -1,  -1, EPT_VARIMPORT32},   /* 21 */
    113     {FALSE, -1,  9, "_TKSuBuff",            -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 22 */
    114     {FALSE, -1,  9, "_TKFuBuff",            -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 23 */
    115     {FALSE, -1, 11, "_TKFuBufLen",          -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 24 */
    116     {FALSE, -1, 21, "_ldrValidateMteHandle",-1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 25 */
    117     {FALSE, -1,  8, "_pTCBCur",             -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 26 */
    118     {FALSE, -1,  9, "_pPTDACur",            -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 27 */
    119     {FALSE, -1, 10, "ptda_start",           -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 28 */
    120     {FALSE, -1, 12, "ptda_environ",         -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 29 */
    121     {FALSE, -1, 11, "ptda_module",          -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 29 */
     111    {FALSE, -1, 17, "_KSEMRequestMutex",    -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 20  */
     112    {FALSE, -1, 17, "_KSEMReleaseMutex",    -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 21  */
     113    {FALSE, -1,  7, "_LdrSem",              -1,  -1,  -1,  -1, EPT_VARIMPORT32},   /* 22 */
     114    {FALSE, -1,  9, "_TKSuBuff",            -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 23 */
     115    {FALSE, -1,  9, "_TKFuBuff",            -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 24 */
     116    {FALSE, -1, 11, "_TKFuBufLen",          -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 25 */
     117    {FALSE, -1, 21, "_ldrValidateMteHandle",-1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 26 */
     118    {FALSE, -1,  8, "_pTCBCur",             -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 27 */
     119    {FALSE, -1,  9, "_pPTDACur",            -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 28 */
     120    {FALSE, -1, 10, "ptda_start",           -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 29 */
     121    {FALSE, -1, 12, "ptda_environ",         -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 30 */
     122    {FALSE, -1, 11, "ptda_module",          -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 31 */
    122123
    123124};
     
    16611662        int         i;
    16621663
    1663         printf16("/* $Id: probkrnl.c,v 1.20.4.5 2000-08-15 07:03:23 bird Exp $\n"
     1664        printf16("/* $Id: probkrnl.c,v 1.20.4.6 2000-08-19 14:36:53 bird Exp $\n"
    16641665                 "*\n"
    16651666                 "* Autogenerated kernel symbol database.\n"
  • branches/GRACE/src/win32k/dev32/d32init.c

    r4025 r4046  
    1 /* $Id: d32init.c,v 1.19.4.5 2000-08-17 08:23:32 bird Exp $
     1/* $Id: d32init.c,v 1.19.4.6 2000-08-19 14:37:04 bird Exp $
    22 *
    33 * d32init.c - 32-bits init routines.
     
    11551155        0,                              /* 28 */
    11561156        0,                              /* 29 */
    1157         0                               /* 30 */
     1157        0,                              /* 30 */
     1158        0                               /* 31 */
    11581159    };
    11591160    int i;
     
    14271428        {(unsigned)fakeLDRClearSem,         1},
    14281429        {(unsigned)fakeKSEMRequestMutex,    1},
     1430        {(unsigned)fakeKSEMReleaseMutex,    1},
    14291431        {(unsigned)&fakeLDRSem,             3},
    14301432        {(unsigned)fakeTKSuBuff,            1},
  • branches/GRACE/src/win32k/include/LdrCalls.h

    r4017 r4046  
    1 /* $Id: LdrCalls.h,v 1.3.4.2 2000-08-15 06:16:04 bird Exp $
     1/* $Id: LdrCalls.h,v 1.3.4.3 2000-08-19 14:37:09 bird Exp $
    22 *
    33 * Prototypes for the loader overrided function.
     
    176176
    177177/**
    178  * LDRGetSem - Requests the loader semaphore..
     178 * LDRRequestSem - Requests the loader semaphore..
    179179 * @returns   NO_ERROR if succesfully.
    180180 *            OS2 errorcode on failure. (ERROR_INTERRUPT?)
    181181 */
    182 #define LDRGetSem()   KSEMRequestMutex((HKMTX)pLdrSem, (ULONG)-1)
     182#define LDRRequestSem()   KSEMRequestMutex((HKMTX)pLdrSem, (ULONG)-1)
    183183
    184184
  • branches/GRACE/src/win32k/include/ldr.h

    r3987 r4046  
    1 /* $Id: ldr.h,v 1.5.4.2 2000-08-11 02:26:06 bird Exp $
     1/* $Id: ldr.h,v 1.5.4.3 2000-08-19 14:37:07 bird Exp $
    22 *
    33 * ldr - Our loader "subsystem" public header file.
     
    218218#define CCHFILENAME     261             /* This is defined in mytkExecPgm.asm too. */
    219219#define CCHARGUMENTS   1536             /* This is defined in mytkExecPgm.asm too. */
     220extern char         fLdrSemTaken;
    220221extern const char   fTkExecPgm;
    221222extern char         achTkExecPgmFilename[CCHFILENAME];
  • branches/GRACE/src/win32k/include/probkrnl.h

    r4018 r4046  
    1 /* $Id: probkrnl.h,v 1.13.4.3 2000-08-15 07:03:25 bird Exp $
     1/* $Id: probkrnl.h,v 1.13.4.4 2000-08-19 14:37:10 bird Exp $
    22 *
    33 * Include file for ProbKrnl.
     
    1616*   Defined Constants And Macros                                               *
    1717*******************************************************************************/
    18 #define NBR_OF_KRNLIMPORTS      31      /* When this is changed make sure to   */
     18#define NBR_OF_KRNLIMPORTS      32      /* When this is changed make sure to   */
    1919                                        /* update the arrays in d32init.c and  */
    2020                                        /* probkrnl.c */
  • branches/GRACE/src/win32k/include/test.h

    r4025 r4046  
    1 /* $Id: test.h,v 1.1.4.2 2000-08-17 08:23:33 bird Exp $
     1/* $Id: test.h,v 1.1.4.3 2000-08-19 14:37:11 bird Exp $
    22 *
    33 * Definitions and declarations for test moduls.
     
    9696ULONG LDRCALL fakeLDRClearSem(void);
    9797ULONG KRNLCALL fakeKSEMRequestMutex(HKMTX hkmtx, ULONG ulTimeout);
     98ULONG KRNLCALL fakeKSEMReleaseMutex(HKMTX hkmtx);
    9899extern HKMTX        fakeLDRSem;
    99100ULONG KRNLCALL   fakeTKFuBuff(PVOID pv, PVOID pvUsr, ULONG cb, ULONG fl);
  • branches/GRACE/src/win32k/ldr/myldrOpen.cpp

    r4025 r4046  
    1 /* $Id: myldrOpen.cpp,v 1.10.4.3 2000-08-17 08:23:33 bird Exp $
     1/* $Id: myldrOpen.cpp,v 1.10.4.4 2000-08-19 14:37:15 bird Exp $
    22 *
    33 * myldrOpen - ldrOpen.
     
    1818#define INCL_OS2KRNL_IO
    1919#define INCL_OS2KRNL_TCB
     20#define INCL_OS2KRNL_SEM
    2021
    2122/*******************************************************************************
     
    115116        {
    116117            kprintf(("myldrOpen-%d: rmalloc(640) failed\n", cNesting));
    117             return NO_ERROR;
     118            goto semcleanup;
    118119        }
    119120
     
    639640    #endif
    640641
     642semcleanup:
     643    /*
     644     * We have to clean the smaphore which was taken by mytkExecPgm here
     645     * because we might not return before the new child is finsished
     646     * executing.
     647     * It is not risk in releasing the semphore here since it's taken
     648     * three times now. First by tkExecPgm then by LDROpenExe.
     649     */
     650    if (isLdrStateExecPgm() && fLdrSemTaken)
     651    {
     652        KSEMReleaseMutex((HKMTX)pLdrSem);
     653        fLdrSemTaken = 0;
     654    }
     655
    641656    /** @sketch
    642657     *  Return rc.
  • branches/GRACE/src/win32k/pe2lx/pe2lx.cpp

    r3988 r4046  
    1 /* $Id: pe2lx.cpp,v 1.18.4.2 2000-08-11 02:26:59 bird Exp $
     1/* $Id: pe2lx.cpp,v 1.18.4.3 2000-08-19 14:37:18 bird Exp $
    22 *
    33 * Pe2Lx class implementation. Ring 0 and Ring 3
     
    13061306ULONG  Pe2Lx::openPath(PCHAR pachModname, USHORT cchModname, ldrlv_t *pLdrLv, PULONG pfl) /* (ldrOpenPath) */
    13071307{
    1308     #if 0 //def RING0
     1308    #ifdef RING0
     1309    #if 1
     1310    return ldrOpenPath(pachModname, cchModname, pLdrLv, pfl);
     1311    #else
     1312
    13091313
    13101314    /* These defines sets the order the paths and pathlists are examined. */
     
    15531557
    15541558    return ldrOpenPath(pachModname, cchModname, pLdrLv, pfl);
     1559    #endif
    15551560    #else
    15561561    NOREF(pachModname);
  • branches/GRACE/src/win32k/test/fake.c

    r3982 r4046  
    1 /* $Id: fake.c,v 1.1.4.1 2000-08-11 02:21:09 bird Exp $
     1/* $Id: fake.c,v 1.1.4.2 2000-08-19 14:37:21 bird Exp $
    22 *
    33 * Fake stubs for the ldr and kernel functions we imports or overloads.
     
    739739    return NO_ERROR;
    740740}
     741
     742
     743/**
     744 * KSEMReleaseMutex faker.
     745 * @returns   NO_ERROR
     746 * @param     hkmtx
     747 * @param     ulTimeout
     748 * @status    completely implemented.
     749 * @remark
     750 */
     751ULONG KRNLCALL fakeKSEMReleaseMutex(HKMTX hkmtx)
     752{
     753    printf("fakeKSEMReleaseMutex:           hkmtx = %p, usage count = %d, rc = %d\n",
     754           hkmtx, *(PLONG)hkmtx, NO_ERROR);
     755
     756    if ((*(PLONG)hkmtx) == 0)
     757        kprintf(("fakeKSEMReleaseMutex: sempahore is 0 allready\n"));
     758    else
     759        (*(PLONG)hkmtx)--;
     760
     761    return NO_ERROR;
     762}
     763
    741764
    742765
  • branches/GRACE/src/win32k/win32k.vpj

    r4025 r4046  
    11[COMPILER]
    22MACRO=odin32_maketagfile();\n
    3 FILTEREXPANSION=1 1 1 0 0 0 1 0 1 0 0 0 0 1
     3FILTEREXPANSION=1 1 1 0 0 0 0 0 1 0 0 0 0 1
    44compile=concur|capture|clear|:Compile:&Compile,nmake %n.obj
    55make=concur|capture|clear|:Build:&Build,nmake
     
    145145[ASSOCIATION]
    146146[STATE]
    147 SCREEN: 1600 1200 176 176 1244 800 0 0 M 0 0 0 0 1275 898
     147SCREEN: 1600 1200 312 376 1244 800 0 0 M 0 0 0 0 1307 825
    148148CWD: H:\CODING\WORK\ODIN32\src\win32k
    149149BUFFER: BN="F:\VSLICK40\OS2\vrestore.slk"
    150150BI: MA=1 254 1  TABS=1 9  WWS=3 IWT=0 ST=0 IN=0 BW=0 US=0 RO=0 SE=0 SN=0 BIN=0 MN=Fundamental   HM=0 MF=1
    151151VIEW: LN=.0 CL=1 LE=0 CX=0 CY=1 WI=5 BI=22 HT=0 HN=0 HF=0 HC=4
    152 BUFFER: BN="H:\coding\work\odin32\src\win32k\libconv.c"
     152BUFFER: BN="H:\CODING\WORK\ODIN32\src\win32k\test\win32ktst.c"
     153BI: MA=1 74 1  TABS=1 5  WWS=1 IWT=0 ST=0 IN=2 BW=0 US=32000 RO=0 SE=1 SN=0 BIN=0 MN=C  HM=0 MF=872
     154VIEW: LN=.33849 CL=40 LE=0 CX=39 CY=30 WI=5 BI=17 HT=0 HN=0 HF=0 HC=4
     155BUFFER: BN="H:\CODING\WORK\ODIN32\src\win32k\ldr\myldrOpen.cpp"
    153156BI: MA=1 74 1  TABS=1 5  WWS=1 IWT=0 ST=0 IN=2 BW=0 US=32000 RO=0 SE=1 SN=0 BIN=0 MN=C  HM=0 MF=0
    154 VIEW: LN=.11148 CL=33 LE=0 CX=32 CY=37 WI=5 BI=17 HT=0 HN=0 HF=0 HC=4
    155 BUFFER: BN="H:\CODING\WORK\ODIN32\src\win32k\dev16\probkrnl.c"
    156 BI: MA=1 74 1  TABS=1 5  WWS=1 IWT=0 ST=0 IN=2 BW=0 US=32000 RO=0 SE=1 SN=0 BIN=0 MN=C  HM=0 MF=0
    157 VIEW: LN=.5619 CL=30 LE=0 C CY=1 WI=5 BI=9 HT=0 HN=0 HF=0 HC=4
     157VIEW: LN=.11154 C CY=1 WI=5 BI=9 HT=0 HN=0 HF=0 HC=4
    158158BUFFER: BN="H:\CODING\WORK\ODIN32\src\win32k\test\win32ktst.c"
    159159BI: MA=1 74 1  TABS=1 5  WWS=1 IWT=0 ST=0 IN=2 BW=0 US=32000 RO=0 SE=1 SN=0 BIN=0 MN=C  HM=0 MF=872
     
    171171
    172172
    173 
     173
  • branches/Grace/src/win32k/ldr/calltab.asm

    r4018 r4046  
    1 ; $Id: calltab.asm,v 1.12.4.2 2000-08-15 07:03:25 bird Exp $
     1; $Id: calltab.asm,v 1.12.4.3 2000-08-19 14:37:13 bird Exp $
    22;
    33; callTab - Call back again table - table with entry for each function or
     
    4444    public _LDRClearSem@0
    4545    public _KSEMRequestMutex@8
     46    public _KSEMReleaseMutex@4
    4647
    4748    public pLDRSem
     
    206207
    207208; 21
     209_KSEMReleaseMutex@4 PROC NEAR
     210    db MAXSIZE_PROLOG dup(0cch)
     211_KSEMReleaseMutex@4 ENDP
     212
     213; 22
    208214pLDRSem          dd  0
    209215LDRSem_offObject dd  0
     
    212218    db (MAXSIZE_PROLOG - 14) dup(0cch)
    213219
    214 ; 22
     220; 23
    215221_TKSuBuff@16 PROC NEAR
    216222    db MAXSIZE_PROLOG dup(0cch)
    217223_TKSuBuff@16 ENDP
    218224
    219 ; 23
     225; 24
    220226_TKFuBuff@16 PROC NEAR
    221227    db MAXSIZE_PROLOG dup(0cch)
    222228_TKFuBuff@16 ENDP
    223229
    224 ; 24
     230; 25
    225231_TKFuBufLen@20 PROC NEAR
    226232    db MAXSIZE_PROLOG dup(0cch)
    227233_TKFuBufLen@20 ENDP
    228234
    229 ;25
     235; 26
    230236_ldrValidateMteHandle@4 PROC NEAR
    231237    db MAXSIZE_PROLOG dup(0cch)
    232238_ldrValidateMteHandle@4 ENDP
    233239
    234 ; 26
     240; 27
    235241ppTCBCur           dd  0
    236242pTCBCur_offObject  dd  0
     
    239245    db (MAXSIZE_PROLOG - 14) dup(0cch)
    240246
    241 ; 27
     247; 28
    242248ppPTDACur          dd  0
    243249pPTDACur_offObject dd  0
     
    246252    db (MAXSIZE_PROLOG - 14) dup(0cch)
    247253
    248 ; 28
     254; 29
    249255pptda_start          dd  0
    250256ptda_start_offObject dd  0
     
    253259    db (MAXSIZE_PROLOG - 14) dup(0cch)
    254260
    255 ; 29
     261; 30
    256262pptda_environ          dd  0
    257263ptda_environ_offObject dd  0
     
    260266    db (MAXSIZE_PROLOG - 14) dup(0cch)
    261267
    262 ; 30
     268; 31
    263269pptda_module          dd  0
    264270ptda_module_offObject dd  0
  • branches/Grace/src/win32k/ldr/myLDRQAppType.cpp

    r3834 r4046  
    1 /* $Id: myLDRQAppType.cpp,v 1.3.4.1 2000-07-16 22:43:35 bird Exp $
     1/* $Id: myLDRQAppType.cpp,v 1.3.4.2 2000-08-19 14:37:14 bird Exp $
    22 *
    33 * _myLDRQAppType - _LDRQAppType overload.
     
    4747    kprintf(("myLDRQAppType: entry\n"));
    4848
    49     rc = LDRGetSem();
     49    rc = LDRRequestSem();
    5050    if (rc != NO_ERROR)
    5151    {
  • branches/Grace/src/win32k/ldr/mytkExecPgm.asm

    r4025 r4046  
    1 ; $Id: mytkExecPgm.asm,v 1.10.4.2 2000-08-17 08:23:34 bird Exp $
     1; $Id: mytkExecPgm.asm,v 1.10.4.3 2000-08-19 14:37:16 bird Exp $
    22;
    33; mytkExecPgm - tkExecPgm overload
     
    8484    public tkExecPgmCopyEnv
    8585
     86    public fLdrSemTaken
    8687    public fTkExecPgm
    8788    public achTkExecPgmFilename
     
    100101; (and you'll have to be behind the loader semaphore of course!)
    101102DATA16 SEGMENT
     103fLdrSemTaken            db 0            ; 0 - Loader Semaphore not taken
     104                                        ; 1 - Loader semaphore is taken and will be freed at exit.
    102105fTkExecPgm              db 0            ; 0 - achTkExecPgmFilename and achTkExecPgmArguments is INVALID
    103106                                        ; 1 - achTkExecPgmFilename and achTkExecPgmArguments is VALID.
     
    223226
    224227    push    0ffffffffh                  ; Wait indefinitely.
    225     push    dword ptr eax               ; LDRSem handle.
     228    push    eax                         ; LDRSem handle.
    226229    call    near ptr FLAT:_KSEMRequestMutex@8
    227230    or      eax, eax                    ; Check if failed.
    228231    jnz     tkepgm_backout              ; Backout on failure.
     232    mov     fLdrSemTaken, 1             ; Marks that the loader semaphore is taken
    229233
    230234
     
    313317    push    cs                          ; Problem calling far into the calltab segement.
    314318    call    near ptr FLAT:_g_tkExecPgm
    315     pushfd
    316 
    317     ;
    318     ; Clear loader semaphore.
    319     ;
     319    pushfd                              ; preserve flags
    320320    push    eax                         ; preserve result.
    321321    push    ecx                         ; preserve ecx just in case
     
    324324    mov     ds, ax
    325325    mov     es, ax
    326     ASSUME  ds:FLAT, es:FLAT
    327     call    near ptr FLAT:_LDRClearSem@0
    328     pop     edx                         ; restore edx
    329     pop     ecx                         ; restore ecx
    330     pop     eax                         ; restore result.
     326    ASSUME  ds:FLAT, es:FLAT            ; both ds and es are now FLAT
    331327
    332328    ;
     
    338334
    339335    ;
     336    ; Clear loader semaphore.
     337    ;
     338    cmp     fLdrSemTaken, 0             ; is the semaphore still taken?
     339    je      tkepgm_callbehindret        ; jmp if not taken.
     340    mov     fLdrSemTaken, 0             ; Loader semaphore is not taken any longer!
     341    call    near ptr FLAT:_LDRClearSem@0
     342
     343    ;
    340344    ; Restore ds and es (probably unecessary but...) and Return
    341345    ;
     346tkepgm_callbehindret:
    342347    push    dword ptr [ebp + SegFilename]
    343348    pop     ds
    344349    push    dword ptr [ebp + SegEnv]
    345350    pop     es
    346     popfd
     351    pop     edx                         ; restore edx
     352    pop     ecx                         ; restore ecx
     353    pop     eax                         ; restore result.
     354    popfd                               ; restore flags
    347355    leave
    348356    retf
Note: See TracChangeset for help on using the changeset viewer.