Changeset 20072


Ignore:
Timestamp:
Dec 19, 2002, 2:49:11 AM (22 years ago)
Author:
bird
Message:

Just big commit.

Location:
tags/trunk/src/win32k/kKrnlLib
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/include/OS2Krnl.h

    r20058 r20072  
    1 /* $Id: OS2Krnl.h,v 1.4 2002-12-16 02:25:06 bird Exp $
     1/* $Id: OS2Krnl.h,v 1.5 2002-12-19 01:49:06 bird Exp $
    22 *
    33 * OS/2 kernel structures, typedefs and macros.
     
    3030
    3131
     32/*******************************************************************************
     33*   Header Files                                                               *
     34*******************************************************************************/
    3235/*
    3336 * "OS2KDefs.h"
    3437 */
     38/* NOASM */
     39#include <os2def.h>
     40/* ASM */
    3541#if !defined(OS2_INCLUDED)
    3642    /* when used with h2inc.exe */
     
    4248#endif
    4349
     50
     51/*******************************************************************************
     52*   Defined Constants And Macros                                               *
     53*******************************************************************************/
    4454/* undefine everything defined below to quite compiler */
    4555#undef  PAGESIZE
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/include/krnlPrivate.h

    r20058 r20072  
    1 /* $Id: krnlPrivate.h,v 1.4 2002-12-16 02:25:07 bird Exp $
     1/* $Id: krnlPrivate.h,v 1.5 2002-12-19 01:49:06 bird Exp $
    22 *
    3  * Private header file for the krnl*.c* files.
     3 * Private header file for the krnl part.
    44 *
    5  * Copyright (c) 2001 knut st. osmundsen (kosmunds@csc.com)
     5 * Copyright (c) 2001-2003 knut st. osmundsen <bird@anduin.net>
    66 *
    7  * Project Odin Software License can be found in LICENSE.TXT
     7 *
     8 * This file is part of kKrnlLib.
     9 *
     10 * kKrnlLib is free software; you can redistribute it and/or modify
     11 * it under the terms of the GNU General Public License as published by
     12 * the Free Software Foundation; either version 2 of the License, or
     13 * (at your option) any later version.
     14 *
     15 * kKrnlLib is distributed in the hope that it will be useful,
     16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     18 * GNU General Public License for more details.
     19 *
     20 * You should have received a copy of the GNU General Public License
     21 * along with kKrnlLib; if not, write to the Free Software
     22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    823 *
    924 */
     
    3449extern OTE                      KKL_ObjTab[4];                  /* calltaba.asm */
    3550extern OTE                      KKL_ObjTab_DosCalls[20];        /* calltaba.asm */
     51extern PMTE                     pKrnlMTE;                       /* krnlInit.c */
     52extern PSMTE                    pKrnlSMTE;                      /* krnlInit.c */
     53extern POTE                     pKrnlOTE;                       /* krnlInit.c */
     54extern int                      cKernelObjects;                 /* krnlInit.c */
    3655#endif
    3756extern char                     KKL_ResNameTab[1];              /* calltaba.asm */
     
    4463
    4564
     65
    4666/*******************************************************************************
    4767*   Functions                                                                  *
    4868*******************************************************************************/
    49 extern void _Optlink    LockedWrite(unsigned long ulAddr, unsigned char chOpcode, unsigned long ulDword);
    50 extern int  _Optlink    MakeCalltab16CodeSegment(void);
     69extern void _Optlink    krnlLockedWrite(unsigned long ulAddr, unsigned char chOpcode, unsigned long ulDword);
     70extern int  _System     krnlMakeCalltab16CodeSegment(void);
    5171extern int              krnlLoadKernelSym(void);
    52 extern int              krnlLoadKernelSymFile(const char *pszFilename);
     72extern int              krnlVerifyImportTab(void);
     73#ifdef _OS2KLDR_H_
     74extern int              krnlLoadKernelSymFile(const char *pszFilename, POTE paOTEs, int cOTEs);
     75extern PMTE _System     krnlGetOS2KrnlMTE(void);
     76#endif
     77extern int              krnlInterpretProlog32(char *pach);
     78extern int              krnlInterpretProlog16(char *pach);
     79
    5380
    5481#endif
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/kKrnlLib.def

    r18303 r20072  
    1515    DATA16_CONST        class 'FAR_DATA'
    1616    DATA16_GLOBAL       class 'FAR_DATA'
    17     DATA16_INIT         class 'FAR_DATA'
    18     DATA16_INIT_BSS     class 'FAR_DATA'
    19     DATA16_INIT_CONST   class 'FAR_DATA'
     17    DATA16_END          class 'FAR_DATA'
    2018
    2119    CODE16              class 'CODE'
    2220    CODE16_IOSEG        class 'CODE'
    23     CODE16_INIT         class 'CODE'
     21    CODE16_END          class 'CODE'
    2422
    2523    LOGDATA_16BIT       class 'LOGDATA_16BIT'
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/src/Extract.mak

    r20058 r20072  
    1 # $Id: Extract.mak,v 1.11 2002-12-16 02:24:27 bird Exp $
     1# $Id: Extract.mak,v 1.12 2002-12-19 01:49:07 bird Exp $
    22
    33#
     
    2727
    2828TARGET_OBJS =\
     29$(PATH_TARGET)\Extract.$(EXT_OBJ)\
    2930$(PATH_TARGET)\Extract32.$(EXT_OBJ)\
    3031$(PATH_TARGET)\krnlPrologs.$(EXT_OBJ)\
    3132$(PATH_TARGET)\krnlImportTable.$(EXT_OBJ)\
     33$(PATH_TARGET)\krnlLoadKernelSymFile.$(EXT_OBJ)\
    3234
    3335TARGET_LIBS =\
    3436$(LIB_OS)\
    35 $(LIB_C_NRE)\
     37$(LIB_C_OBJ)\
    3638
    3739#
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/src/Extract32.c

    r18610 r20072  
    1 /* $Id: Extract32.c,v 1.1 2002-03-10 02:45:48 bird Exp $
    2  *
    3  * 32-bit Extract Routines.
     1/* $Id: Extract32.c,v 1.2 2002-12-19 01:49:07 bird Exp $
     2 *
    43 * This is used to get opcodes for a kernel.
    5  *
    6  * Copyright (c) 2001 knut st. osmundsen (kosmunds@csc.com)
    7  *
    8  * Project Odin Software License can be found in LICENSE.TXT
     4 * (Was 32bit part of mixed program, now everything is 32-bit.)
     5 *
     6 * Copyright (c) 2001-2003 knut st. osmundsen <bird@anduin.net>
     7 *
     8 *
     9 * This file is part of kKrnlLib.
     10 *
     11 * kKrnlLib is free software; you can redistribute it and/or modify
     12 * it under the terms of the GNU General Public License as published by
     13 * the Free Software Foundation; either version 2 of the License, or
     14 * (at your option) any later version.
     15 *
     16 * kKrnlLib is distributed in the hope that it will be useful,
     17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     19 * GNU General Public License for more details.
     20 *
     21 * You should have received a copy of the GNU General Public License
     22 * along with kKrnlLib; if not, write to the Free Software
     23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    924 *
    1025 */
     
    2641#define SSToDS(a) ((void*)(a))
    2742
     43
     44/*******************************************************************************
     45*   Header Files                                                               *
     46*******************************************************************************/
     47#include <kLib/format/LXexe.h>
     48
    2849#define INCL_BASE
     50#include <os2.h>
    2951#define INCL_OS2KRNL_ALL
    30 #define FOR_EXEHDR          1           /* OBJEXEC */
    31 #define DWORD   ULONG                   /* exe386.h */
    32 #define WORD    USHORT
    33 
    34 /*******************************************************************************
    35 *   Header Files                                                               *
    36 *******************************************************************************/
    37 #include <os2.h>
    38 #include <exe386.h>
     52#include "os2krnl.h"
     53
     54#include "krnlImportTable.h"
     55#include "krnlPrivate.h"
    3956
    4057#include <stdio.h>
    4158#include <string.h>
    4259
    43 #include "devSegDf.h"
    44 #include "dev32.h"
    45 #include "Probkrnl.h"
    46 #include "os2krnl.h"
    4760
    4861
     
    135148*******************************************************************************/
    136149int             cObjects = 14;
    137 OTE             aKrnlOTE[24];
     150OTE             aKrnlOTE[42];
    138151HMODULE         hmodKrnl = NULLHANDLE;
    139152
     
    142155*   Internal Functions                                                         *
    143156*******************************************************************************/
    144 void _rmem_init(void);
    145157int  kernelInit(int iTest, int argc, char **argv);
    146158
     
    152164    /* from OS/2 Toolkit v4.5 */
    153165    APIRET APIENTRY DosQuerySysState(ULONG EntityList, ULONG EntityLevel, PID pid,
    154                                     TID tid, PVOID pDataBuf, ULONG cbBuf);
     166                                     TID tid, PVOID pDataBuf, ULONG cbBuf);
    155167    #define QS_MTE         0x0004
    156168#endif
    157 
    158 
    159 
    160 /**
    161  * Initiates the 32-bit C-runtime library.
    162  */
    163 void _Far16 _Cdecl Init32bitCrt(void)
    164 {
    165     _rmem_init();
    166 }
    167169
    168170
     
    181183 *          Assumes that Init32bitCrt is called.
    182184 */
    183 USHORT _Far16 _Cdecl GetOpcodes(char * _Seg16 pszKrnlFile16, unsigned short cSymObjects)
     185int GetOpcodes(char * pszKrnlFile, unsigned cSymObjects)
    184186{
    185     USHORT  rc = 0;
    186     char *  pszKrnlFile = pszKrnlFile16;
     187    int  rc = 0;
    187188    char *  argv[4] = {NULL, NULL, NULL, NULL};
    188189    argv[2] = pszKrnlFile;
     
    214215                if (aImportTab[i].offObject >= aKrnlOTE[iObj].ote_size)
    215216                {
    216                     sprintf(pszKrnlFile, "Func %d offset out of object %d (0x%x >= 0x%x)\n",
     217                    fprintf(stderr, "Func %d offset out of object %d (0x%x >= 0x%x)\n",
    217218                            i, aImportTab[i].offObject, aKrnlOTE[iObj].ote_size);
    218219                    rc = 1;
     
    225226                if ((aKrnlOTE[iObj].ote_flags & (OBJBIGDEF | OBJEXEC)) == (OBJBIGDEF | OBJEXEC))
    226227                {   /* 32-bit */
    227                     cb = interpretFunctionProlog32((char*)aKrnlOTE[iObj].ote_base + aImportTab[i].offObject);
     228                    cb = krnlInterpretProlog32((char*)aKrnlOTE[iObj].ote_base + aImportTab[i].offObject);
    228229                }
    229230                else if ((aKrnlOTE[iObj].ote_flags & (OBJBIGDEF | OBJEXEC)) == (OBJEXEC))
    230231                {   /* 16-bit */
    231                     cb = interpretFunctionProlog16((char*)aKrnlOTE[iObj].ote_base + aImportTab[i].offObject);
     232                    cb = krnlInterpretProlog16((char*)aKrnlOTE[iObj].ote_base + aImportTab[i].offObject);
    232233                }
    233234                else
    234235                {
    235                     sprintf(pszKrnlFile, "Func %d isn't in a code segment.\n", i);
     236                    fprintf(stderr, "Func %d isn't in a code segment.\n", i);
    236237                    rc = 2;
    237238                    break;
     
    240241                if (cb < 5)
    241242                {
    242                     sprintf(pszKrnlFile, "Func %d unknown prolog (obj=0x%x off=0x%x)\n",
     243                    fprintf(stderr, "Func %d unknown prolog (obj=0x%x off=0x%x)\n",
    243244                            i, iObj, aImportTab[i].offObject);
    244245                    rc = 3;
     
    254255        else
    255256        {
    256             sprintf(pszKrnlFile, "Invalid object count (%d != %d)\n",
     257            fprintf(stderr, "Invalid object count (%d != %d)\n",
    257258                    cObjects, aImportTab[0].iObject + 1);
    258259            rc = 4;
     
    312313        if (argc < 3)
    313314        {
    314             printf("Missing parameter!\n");
     315            fprintf(stderr, "Missing parameter!\n");
    315316            return FALSE;
    316317        }
     
    323324    if (DosScanEnv("TMP", &pszTmp) != NO_ERROR || pszTmp == NULL)
    324325    {
    325         printf("Environment variable TMP is not set.\n");
     326        fprintf(stderr, "Environment variable TMP is not set.\n");
    326327        return FALSE;
    327328    }
     
    341342    {
    342343        if (rc != ERROR_FILE_NOT_FOUND && rc != ERROR_PATH_NOT_FOUND)
    343             printf("Failed to copy %s to %s. rc=%d\n", pszSrcName, szName, rc);
     344            fprintf(stderr, "Failed to copy %s to %s. rc=%d\n", pszSrcName, szName, rc);
    344345        return FALSE;
    345346    }
     
    349350        )
    350351    {
    351         printf("Failed to set attributes for %s.\n", szName);
     352        fprintf(stderr, "Failed to set attributes for %s.\n", szName);
    352353        return FALSE;
    353354    }
     
    364365    if (rc != NO_ERROR)
    365366    {
    366         printf("Failed to open temporary kernel file. rc = %d\n", rc);
     367        fprintf(stderr, "Failed to open temporary kernel file. rc = %d\n", rc);
    367368        return FALSE;
    368369    }
     
    371372    {
    372373        DosClose(hFile);
    373         printf("Failed to read LX header from temporary kernel file.\n");
     374        fprintf(stderr, "Failed to read LX header from temporary kernel file.\n");
    374375        return FALSE;
    375376    }
     
    378379    {
    379380        DosClose(hFile);
    380         printf("Failed to read LX header from temporary kernel file (2).\n");
     381        fprintf(stderr, "Failed to read LX header from temporary kernel file (2).\n");
    381382        return FALSE;
    382383    }
     
    388389    {
    389390        DosClose(hFile);
    390         printf("Failed to write patched LX header to temporary kernel file.\n");
     391        fprintf(stderr, "Failed to write patched LX header to temporary kernel file.\n");
    391392        return FALSE;
    392393    }
     
    399400    if (rc != NO_ERROR && (rc != ERROR_INVALID_PARAMETER && hmodKrnl == NULLHANDLE))
    400401    {
    401         printf("Failed to load OS/2 kernel image %s.");
     402        fprintf(stderr, "Failed to load OS/2 kernel image %s.");
    402403        return FALSE;
    403404    }
     
    409410    if (rc != NO_ERROR)
    410411    {
    411         printf("DosQuerySysState failed with rc=%d.\n", rc);
     412        fprintf(stderr, "DosQuerySysState failed with rc=%d.\n", rc);
    412413        return FALSE;
    413414    }
     
    452453    if (pLrec == NULL)
    453454    {
    454         printf("DosQuerySysState(os2krnl): not found\n");
     455        fprintf(stderr, "DosQuerySysState(os2krnl): not found\n");
    455456        return FALSE;
    456457    }
    457458    if (pLrec->pObjInfo == NULL)
    458459    {
    459         printf("DosQuerySysState(os2krnl): no object info\n");
     460        fprintf(stderr, "DosQuerySysState(os2krnl): no object info\n");
    460461        return FALSE;
    461462    }
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/src/Makefile

    r20058 r20072  
    1 # $Id: Makefile,v 1.12 2002-12-16 02:24:27 bird Exp $
     1# $Id: Makefile,v 1.13 2002-12-19 01:49:07 bird Exp $
    22
    33#
     
    4545$(PATH_TARGET)\env.$(EXT_OBJ)\
    4646$(PATH_TARGET)\krnlInit.$(EXT_OBJ)\
     47$(PATH_TARGET)\krnlImportTable.$(EXT_OBJ)\
     48$(PATH_TARGET)\krnlLoadKernelSym.$(EXT_OBJ)\
     49$(PATH_TARGET)\krnlLoadKernelSymFile.$(EXT_OBJ)\
    4750$(PATH_TARGET)\krnlLockedWrite.$(EXT_OBJ)\
    4851$(PATH_TARGET)\krnlOverloading.$(EXT_OBJ)\
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/src/devFirst.asm

    r20058 r20072  
    1 ; $Id: devFirst.asm,v 1.3 2002-12-16 02:24:28 bird Exp $
     1; $Id: devFirst.asm,v 1.4 2002-12-19 01:49:07 bird Exp $
    22;
    33; DevFirst - entrypoint, helper code, and segment definitions.
     
    5353    public _CallR0Addr32bit
    5454    public _SSToDS_16a
    55     public GetOS2KrnlMTE
     55    public krnlGetOS2KrnlMTE
     56    public krnlMakeCalltab16CodeSegment
    5657    public x86DisableWriteProtect
    5758    public x86RestoreWriteProtect
    58     public MakeCalltab16CodeSegment
    5959    public _GetR0InitPtr
    6060    public _GetVerifyImportTab32Ptr
     
    301301;;
    302302; Gets the a 32-bit flat pointer to the OS/2 Kernel MTE.
    303 ; @cproto    extern PMTE _System GetOS2KrnlMTE(void);
     303; @cproto    extern PMTE _System krnlGetOS2KrnlMTE(void);
    304304; @returns   Pointer to kernel MTE.
    305305; @status    completely implemented.
    306306; @author    knut st. osmundsen
    307 GetOS2KrnlMTE PROC NEAR
     307krnlGetOS2KrnlMTE PROC NEAR
    308308    push    es
    309309
     
    318318    pop     es
    319319    ret
    320 GetOS2KrnlMTE ENDP
     320krnlGetOS2KrnlMTE ENDP
    321321
    322322
     
    389389; @uses     eax
    390390; @author   knut st. osmundsen (kosmunds@csc.com)
    391 MakeCalltab16CodeSegment proc near
     391krnlMakeCalltab16CodeSegment proc near
    392392    ASSUME  ds:FLAT, ss:nothing
    393393    xor     eax, eax
     
    440440mccs_ret:
    441441    ret
    442 MakeCalltab16CodeSegment endp
     442krnlMakeCalltab16CodeSegment endp
    443443
    444444
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/src/extract.c

    r20058 r20072  
    1 /* $Id: extract.c,v 1.4 2002-12-16 02:24:28 bird Exp $
     1/* $Id: extract.c,v 1.5 2002-12-19 01:49:08 bird Exp $
    22 *
    33 * SymDB32 entry generator.
     
    5959*   Global Variables                                                           *
    6060*******************************************************************************/
    61 /* Result from GetKernelInfo/ReadOS2Krnl. */
    62 extern unsigned char    cObjects;
    63 extern POTE             paKrnlOTEs;
     61/* Statistics. */
    6462unsigned long           cbSize;
    6563unsigned long           cbAllSize;
    6664
    67 /* dummy replacement for SymDB.c */
    68 KRNLDBENTRY aKrnlSymDB[] = {{0}};
    6965
    7066/*******************************************************************************
     
    7268*******************************************************************************/
    7369int      processFile(const char *pszFilename);
    74 
    75 
    76 /*******************************************************************************
    77 *   External Functions                                                         *
    78 *******************************************************************************/
    79 /* Workers */
    80 extern int  ProbeSymFile(const char *pszFilename);
    81 extern int  GetOpcodes(const char *pszKrnlFile, unsigned int cSymObjects);
     70extern int GetOpcodes(char * pszKrnlFile, unsigned cSymObjects); /* extract32.c */
    8271
    8372
     
    127116        )
    128117    {
    129         fprintf(stderr, "invalid filename: %s\n", pszFilename);
     118        fprintf(stderr, "invalid filename: %s (%s)\n", psz, pszFilename);
    130119        return 2;
    131120    }
     
    134123     * Probe kernelfile
    135124     */
    136     rc = ProbeSymFile(pszFilename);
     125    rc = krnlLoadKernelSymFile(pszFilename, NULL, 0);
    137126
    138127
     
    231220    }
    232221    else
    233         fprintf(stderr, "ProbeSymFile failed with rc=%d\n", rc);
     222        fprintf(stderr, "krnlLoadKernelSymFile failed with rc=0x%x (%d)\n", rc, rc);
    234223
    235224    return rc;
     
    255244     * Set paKrnlOTEs to point to an zeroed array of OTEs.
    256245     */
    257     static KRNLINFO KrnlInfo = {0};
    258     paKrnlOTEs = &KrnlInfo.aObjects[0];
    259246    cbAllSize = cbSize = 0;
    260247
     
    309296        int             i;
    310297
    311         printf(";/* $Id: extract.c,v 1.4 2002-12-16 02:24:28 bird Exp $\n"
     298        printf(";/* $Id: extract.c,v 1.5 2002-12-19 01:49:08 bird Exp $\n"
    312299               ";*\n"
    313300               ";* Autogenerated kernel symbol database.\n"
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/src/krnlInit.c

    r20058 r20072  
    1 /* $Id: krnlInit.c,v 1.3 2002-12-16 02:24:29 bird Exp $
     1/* $Id: krnlInit.c,v 1.4 2002-12-19 01:49:08 bird Exp $
    22 *
    33 * Init the OS2 Kernel facilities; identify it, find symbols, import table.
     
    2525
    2626#ifndef NOFILEID
    27 static const char szFileId[] = "$Id: krnlInit.c,v 1.3 2002-12-16 02:24:29 bird Exp $";
     27static const char szFileId[] = "$Id: krnlInit.c,v 1.4 2002-12-19 01:49:08 bird Exp $";
    2828#endif
    2929
     
    4141*   Header Files                                                               *
    4242*******************************************************************************/
    43 #include <kLib/format/LXexe.h>
    4443#include <kLib/kTypes.h>
    4544#include <kLib/kDevHlp.h>
    46 
    47 #define INCL_DOSERRORS
    48 #define INCL_NOPMAPI
    49 #include <os2.h>
     45#include <kLib/format/LXexe.h>
     46
     47#include <os2def.h>
    5048#include <string.h>
    5149
     
    5957#include "kKrnlLib.h"
    6058
    61 #include "dev1632.h"
    62 #include "dev32.h"
    63 #include "ProbKrnl.h"
    64 #include "ProbKrnlErrors.h"
     59#include "devErrors.h"
     60#include "krnlImportTable.h"
    6561#include "krnlPrivate.h"
    6662
     
    8076PSMTE       pKrnlSMTE = NULL;           /* Initiated by krnlGetKernelInfo */
    8177POTE        pKrnlOTE = NULL;            /* Initiated by krnlGetKernelInfo */
    82 ULONG       cKernelObjects = 0;         /* Initiated by krnlGetKernelInfo */
     78int         cKernelObjects = 0;         /* Initiated by krnlGetKernelInfo */
    8379
    8480extern char callTab[1];
     
    9086int         krnlGetKernelInfo(void);
    9187int         krnlLookupKernel(void);
    92 int         krnlVerifyImportTab(void);
    9388
    9489int         krnlInitImports(void);
     
    168163    /* Find the kernel OTE table */
    169164#ifndef R3TST
    170     pKrnlMTE = GetOS2KrnlMTE();
     165    pKrnlMTE = krnlGetOS2KrnlMTE();
    171166#else
    172167    pKrnlMTE = GetOS2KrnlMTETst();
     
    177172        if (pKrnlSMTE != NULL)
    178173        {
    179             if (pKrnlSMTE->smte_objcnt <= MAXKRNLOBJECTS)
     174            if (pKrnlSMTE->smte_objcnt <= 42)
    180175            {
    181176                pKrnlOTE = pKrnlSMTE->smte_objtab;
     
    320315        rc = ERROR_D32_GETOS2KRNL_FAILED;
    321316
    322     if (rc != NO_ERROR)
     317    if (!rc)
    323318        kprintf(("krnlGetKernelInfo: failed. rc = %d\n", rc));
    324319
     
    494489                if (EPT32BitEntry(aImportTab[i]))
    495490                {
    496                     cb = interpretFunctionProlog32((char*)aImportTab[i].ulAddress);
     491                    cb = krnlInterpretProlog32((char*)aImportTab[i].ulAddress);
    497492                    cbmax = OVERLOAD32_ENTRY - 5; /* 5 = Size of the jump instruction */
    498493                }
    499494                else
    500495                {
    501                     cb = interpretFunctionProlog16((char*)aImportTab[i].ulAddress);
     496                    cb = krnlInterpretProlog16((char*)aImportTab[i].ulAddress);
    502497                    cbmax = OVERLOAD16_ENTRY - 5; /* 5 = Size of the jump instruction */
    503498                }
     
    530525    }
    531526
    532     KLOGEXIT(NO_ERROR);
    533     return NO_ERROR;
     527    KLOGEXIT(0);
     528    return 0;
    534529}
    535 
    536 
    537 
    538 
    539 
    540 
    541 /**
    542  * Initiates the exported functions and MTE.
    543  * @returns 0 on success.
    544  *          -1 on failure.
    545  */
    546 int krnlInit2(void)
    547 {
    548     KLOGENTRY0("int");
    549     int rc = krnlInitExports();
    550     KLOGEXIT(rc);
    551     return rc;
    552 }
    553 
    554530
    555531
     
    624600            case EPT_PROC32:
    625601            {
    626                 cb = interpretFunctionProlog32((char*)aImportTab[i].ulAddress);
     602                cb = krnlInterpretProlog32((char*)aImportTab[i].ulAddress);
    627603                aImportTab[i].cbProlog = (char)cb;
    628604                if (   cb >= 5                      /* 5(1st): size of jump instruction in the function prolog which jumps to my overloading function */
     
    676652            case EPT_PROCH16:
    677653            {
    678                 cb = interpretFunctionProlog16((char*)aImportTab[i].ulAddress);
     654                cb = krnlInterpretProlog16((char*)aImportTab[i].ulAddress);
    679655                aImportTab[i].cbProlog = (char)cb;
    680656                if (   cb >= 5                          /* 5:      size of a 16:16 jump which jumps to my overloading function */
     
    767743     */
    768744    #ifndef R3TST
    769     if (MakeCalltab16CodeSegment())
    770     {
    771         kprintf(("MakeCalltab16CodeSegment failed\n"));
     745    if (krnlMakeCalltab16CodeSegment())
     746    {
     747        kprintf(("krnlMakeCalltab16CodeSegment failed\n"));
    772748        INT3();
    773749    }
    774750    #endif
    775751
    776     KLOGEXIT(NO_ERROR);
    777     return NO_ERROR;
     752    KLOGEXIT(0);
     753    return 0;
    778754}
    779755
     
    841817}
    842818#endif
     819
     820
     821/**
     822 * Initiates the exported functions and MTE.
     823 * @returns 0 on success.
     824 *          -1 on failure.
     825 */
     826int krnlInit2(void)
     827{
     828    KLOGENTRY0("int");
     829    int rc = krnlInitExports();
     830    KLOGEXIT(rc);
     831    return rc;
     832}
    843833
    844834
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/src/krnlLoadKernelSym.c

    r20056 r20072  
    1 /* $Id: krnlLoadKernelSym.c,v 1.1 2002-12-16 02:23:32 bird Exp $
     1/* $Id: krnlLoadKernelSym.c,v 1.2 2002-12-19 01:49:08 bird Exp $
    22 *
    33 * Description:   Autoprobes the os2krnl file and os2krnl[*].sym files.
     
    3636#define NOFUNCTIONNAME
    3737#ifndef NOFILEID
    38 static const char szFileId[] = "$Id: krnlLoadKernelSym.c,v 1.1 2002-12-16 02:23:32 bird Exp $";
     38static const char szFileId[] = "$Id: krnlLoadKernelSym.c,v 1.2 2002-12-19 01:49:08 bird Exp $";
    3939#endif
    4040
     
    4646#include <kLib/kDevHlp.h>
    4747#include <kLib/kLog.h>
     48#include "devErrors.h"
     49#include "options.h"
    4850#include "krnlImportTable.h"
     51#define INCL_OS2KRNL_LDR
     52#include "OS2Krnl.h"
    4953#include "krnlPrivate.h"
    50 #include "devErrors.h"
    5154
    52 #include "options.h"
    53 //#include "kKLkernel.h"
     55
    5456
    5557#include <string.h>
     
    101103    int         rc;
    102104    int         i;
    103     int         n;
    104105    PGINFOSEG   pGIS;
    105106    char        chBootDrive;
     
    123124    if (szSymbolFile[0] != '\0')
    124125    {
    125         rc = krnlLoadKernelSymFile(szSymbolFile);
     126        rc = krnlLoadKernelSymFile(szSymbolFile, pKrnlOTE, cKernelObjects);
    126127        if (!rc)
    127         {
    128             //verify the loaded symfile.
    129             //fixme
    130         }
     128            rc = krnlVerifyImportTab();
    131129
    132130        if (rc)
     
    138136        }
    139137    }
     138
     139    /*
     140     * Try the know locations.
     141     */
    140142    else
    141143    {
    142         /*
    143          * Try the know locations.
    144          */
    145144        rc = ERROR_PROB_SYM_FILE_NOT_FOUND;
    146145        for (i = 0; apszSym[i] != NULL; i++)
    147146        {
    148             int rc2 = krnlLoadKernelSymFile(apszSym[i]);
     147            int rc2 = krnlLoadKernelSymFile(apszSym[i], pKrnlOTE, cKernelObjects);
    149148            if (!rc2)
    150149            {
    151                 //verify the loaded symfile.
    152                 //fixme
    153                 if (rc == ERROR_PROB_SYM_FILE_NOT_FOUND)
     150                rc2 = krnlVerifyImportTab();
     151                if (!rc || rc == ERROR_PROB_SYM_FILE_NOT_FOUND)
    154152                {
    155153                    strcpy(szSymbolFile, apszSym[i]);
    156154                    rc = rc2;
     155                    if (!rc)
     156                        break;
    157157                }
    158158            }
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/src/krnlLoadKernelSymFile.c

    r20057 r20072  
    1 /* $Id: krnlLoadKernelSymFile.c,v 1.1 2002-12-16 02:23:43 bird Exp $
     1/* $Id: krnlLoadKernelSymFile.c,v 1.2 2002-12-19 01:49:08 bird Exp $
    22 *
    33 * Loads one kernel file into the import table.
     
    2424 */
    2525
     26#define NOFUNCTIONNAME
    2627#ifndef NOFILEID
    27 static const char szFileId[] = "$Id: krnlLoadKernelSymFile.c,v 1.1 2002-12-16 02:23:43 bird Exp $";
     28static const char szFileId[] = "$Id: krnlLoadKernelSymFile.c,v 1.2 2002-12-19 01:49:08 bird Exp $";
    2829#endif
    29 
    30 
    31 /*******************************************************************************
    32 *   Defined Constants And Macros                                               *
    33 *******************************************************************************/
    34 /* "@#IBM:14.039#@    os2krnl... "*/
    35 /* "@#IBM:8.264#@    os2krnl... "*/
    36 #define KERNEL_ID_STRING_LENGTH  42
    37 #define KERNEL_READ_SIZE        512
    38 
    3930
    4031
     
    4233*   Header Files                                                               *
    4334*******************************************************************************/
     35#include <kLib/kTypes.h>
     36#include <kLib/kLog.h>
    4437#include <kLib/format/SYMdbg.h>
    4538#include "krnlImportTable.h"
    46 
    47 #include "os2krnl.h"                    /* must be included before dev1632.h! */
    48 #include "ProbKrnl.h"
    49 #include "ProbKrnlErrors.h"
    50 #include "dev16.h"
    51 #include "dev1632.h"
    52 #include "kkLlog.h"
    53 #include "options.h"
    54 #include "kKLInitHlp.h"
    55 #include "kKLkernel.h"
    56 #include "d16vprintf.h"
    57 #include "d16crt.h"
    58 
    59 
    60 /*******************************************************************************
    61 *   Global Variables                                                           *
    62 *******************************************************************************/
    63 /*
    64  * private data
    65  */
    66 static char *apszSym[] =
    67 {
    68     {"c:\\os2krnl.sym"},                              /* usual for debugkernel */
    69     {"c:\\os2\\pdpsi\\pmdf\\warp4\\os2krnlr.sym"},    /* warp 4 */
    70     {"c:\\os2\\pdpsi\\pmdf\\warp4\\os2krnld.sym"},    /* warp 4 */
    71     {"c:\\os2\\pdpsi\\pmdf\\warp4\\os2krnlb.sym"},    /* warp 4 */
    72     {"c:\\os2\\pdpsi\\pmdf\\warp45_u\\os2krnlr.sym"}, /* warp 45 */
    73     {"c:\\os2\\pdpsi\\pmdf\\warp45_u\\os2krnld.sym"}, /* warp 45 */
    74     {"c:\\os2\\pdpsi\\pmdf\\warp45_u\\os2krnlb.sym"}, /* warp 45 */
    75     {"c:\\os2\\pdpsi\\pmdf\\warp45_s\\os2krnlr.sym"}, /* warp 45 */
    76     {"c:\\os2\\pdpsi\\pmdf\\warp45_s\\os2krnld.sym"}, /* warp 45 */
    77     {"c:\\os2\\pdpsi\\pmdf\\warp45_s\\os2krnlb.sym"}, /* warp 45 */
    78     {"c:\\os2\\system\\pmdf\\os2krnlr.sym"},          /* warp 3 ?*/
    79     {"c:\\os2\\system\\pmdf\\os2krnld.sym"},          /* warp 3 ?*/
    80     {"c:\\os2\\system\\pmdf\\os2krnlb.sym"},          /* warp 3 ?*/
    81     {"c:\\os2\\system\\trace\\os2krnl.sym"},          /* warp 3 ?*/
    82     {"c:\\os2krnlr.sym"},                             /* custom */
    83     {"c:\\os2krnlb.sym"},                             /* custom */
    84     {"c:\\os2krnld.sym"},                             /* custom */
    85     NULL
    86 };
    87 
    88 /* Location of PMDF list of custom directories */
    89 static char szPmdfVers[] =
    90     {"c:\\os2\\pdpsi\\pmdf\\pmdfvers.lst"};
    91 
    92 
    93 /*******************************************************************************
    94 *   Internal Functions                                                         *
    95 *******************************************************************************/
    96 /* Workers */
    97 int      LookupKrnlEntry(unsigned short usBuild, unsigned short fKernel, unsigned char cObjects);
    98 int      VerifyPrologs(void);
    99 int      ProbeSymFile(const char *pszFilename);
    100 int      GetKernelInfo(void);
    101 
    102 /* Ouput */
    103 void     ShowResult(int rc);
    104 
    105 /* Others used while debugging in R3. */
    106 int      VerifyKernelVer(void);
    107 int      ReadOS2Krnl(char *pszFilename);
    108 int      ReadOS2Krnl2(HFILE hKrnl, unsigned long  cbKrnl);
    109 
    110 
    111 
    112 /*******************************************************************************
    113 *   Implementation of Internal Helper Functions                                *
    114 *******************************************************************************/
    115 
    116 
    117 /*******************************************************************************
    118 *   Implementation Of The Important Functions                                  *
    119 *******************************************************************************/
    120 /**
    121  * Checks if this kernel is within the kernel symbol database.
    122  * If an entry for the kernel is found, the data is copied from the
    123  * database entry to aImportTab.
    124  * @returns   NO_ERROR on succes (0)
    125  *            1 if not found.
    126  *            Error code on error.
    127  * @param     usBuild       Build level.
    128  * @param     fKernel       Kernel (type) flags. (KF_* from options.h)
    129  * @param     cObjects      Count of object in the running kernel.
    130  * @sketch    Loop thru the table.
    131  * @status    completely implemented.
    132  * @author    knut st. osmundsen (knut.stange.osmundsen@mynd.no)
    133  */
    134 int LookupKrnlEntry(unsigned short usBuild, unsigned short fKernel, unsigned char cObjects)
    135 {
    136 #ifdef DB_16BIT
    137     int i;
    138 
    139     /*
    140      * Loop tru the DB entries until a NULL pointer is found.
    141      */
    142     for (i = 0; aKrnlSymDB[i].usBuild != 0; i++)
    143     {
    144         if (   aKrnlSymDB[i].usBuild  == usBuild
    145             && aKrnlSymDB[i].fKernel  == fKernel
    146             && aKrnlSymDB[i].cObjects == cObjects)
    147         {   /* found matching entry! */
    148             int j;
    149             int rc;
    150             PKRNLDBENTRY pEntry = &aKrnlSymDB[i];
    151 
    152             dprintf(("LookUpKrnlEntry - found entry for this kernel!\n"));
    153             kstrcpy(szSymbolFile, "kKrnlLib Symbol Database");
    154 
    155             /*
    156              * Copy symbol data from the DB to aImportTab.
    157              */
    158             for (j = 0; j < NBR_OF_KRNLIMPORTS; j++)
    159             {
    160                 aImportTab[j].offObject  = pEntry->aSyms[j].offObject;
    161                 aImportTab[j].iObject    = pEntry->aSyms[j].iObject;
    162                 aImportTab[j].chOpcode   = pEntry->aSyms[j].chOpcode;
    163                 aImportTab[j].ulAddress  = paKrnlOTEs[pEntry->aSyms[j].iObject].ote_base
    164                                            + pEntry->aSyms[j].offObject;
    165                 aImportTab[j].usSel      = paKrnlOTEs[pEntry->aSyms[j].iObject].ote_sel;
    166                 aImportTab[j].fFound     = (char)((aImportTab[j].offObject != 0xFFFFFFFFUL) ? 1 : 0);
    167 
    168                 dprintf(("  %-3d addr=0x%08lx off=0x%08lx  %s\n",
    169                          j, aImportTab[j].ulAddress, aImportTab[j].offObject,
    170                          aImportTab[j].achName));
    171             }
    172 
    173             /* Verify prologs*/
    174             rc = VerifyPrologs();
    175 
    176             /* set sym name on success or complain on error */
    177             if (rc != 0)
    178             {
    179                 printf16("Warning: The kKrnlLib Symbol Database entry found.\n"
    180                          "         But, VerifyPrologs() returned rc=0x%x and ordinal=%d\n", rc,
    181                          iProc < NBR_OF_KRNLIMPORTS ? aImportTab[iProc].iOrdinal : 0xffff);
    182                 DosSleep(3000);
    183             }
    184 
    185             return rc;
    186         }
    187     }
    188 
    189     /* not found */
    190     return ERROR_PROB_SYMDB_KRNL_NOT_FOUND;
    191 #else
    192 
    193     static LKE32PARAM   lke32Param;
    194     APIRET          rc;
    195     KKLR0INITPARAM  param;
    196     KKLR0INITDATA   data;
    197 
    198     lke32Param.usBuild  = usBuild;
    199     lke32Param.fKernel  = fKernel;
    200     lke32Param.cObjects = cObjects;
    201 
    202     param.pfn = GetLookupKrnlEntry32Ptr();
    203     param.ulParam = (ULONG)((USHORT)&lke32Param) + DATA16Base;
    204     rc = DoDevIOCtl(&param, &data);
    205     if (rc == NO_ERROR)
    206     {
    207         if (!data.ulRc)
    208             kstrcpy(szSymbolFile, "kKrnlLib Symbol Database");
    209         else
    210         {
    211             /* set the appropriate return values. */
    212             rc = (USHORT)data.ulRc;
    213             iProc = ((PUSHORT)&data.ulRc)[1];
    214         }/* else success */
    215     }
    216     /* else: complaining has been done */
    217 
    218     return rc;
    219 
    220 #endif
    221 }
    222 
    223 
    224 /**
    225  * Verifies the that the addresses in aImportTab are valid.
    226  * This is done at Ring-0 of course.
    227  * @returns     NO_ERROR (ie. 0) on success. iProc = -1
    228  *              The appropriate OS/2 or kKrnlLib return code on success. iProc
    229  *              is set to the failing procedure (if appliable).
    230  */
    231 int VerifyPrologs(void)
    232 {
    233 #if !defined(EXTRACT) && !defined(MKCALLTAB)
    234     APIRET          rc;
    235     KKLR0INITPARAM  param;
    236     KKLR0INITDATA   data;
    237     HFILE           hDev0 = 0;
    238     USHORT          usAction = 0;
    239 
    240     /* Set the failing procedure number to -1. */
    241     iProc = -1;
    242 
    243 
    244     param.pfn = GetVerifyImportTab32Ptr();
    245     param.ulParam = 0;
    246     rc = DoDevIOCtl(&param, &data);
    247     if (rc == NO_ERROR)
    248     {
    249         if (data.ulRc != NO_ERROR)
    250         {
    251             /* set the appropriate return values. */
    252             rc = (USHORT)data.ulRc;
    253             iProc = ((PUSHORT)&data.ulRc)[1];
    254         }/* else success */
    255     }
    256     /* else: complaining has been done */
    257 
    258     return rc;
    259 #else
    260     return 0;
    261 #endif
    262 }
     39#include "devErrors.h"
     40#include <os2def.h>
     41#define INCL_OS2KRNL_LDR
     42#include "os2krnl.h"
     43
     44#include <stdio.h>
     45#include <string.h>
     46
    26347
    26448
     
    27054 * @remark    Error codes starts at -50.
    27155 */
    272 int ProbeSymFile(const char * pszFilename)
     56int krnlLoadKernelSymFile(const char *pszFilename, POTE paOTEs, int cOTEs)
    27357{
    274     HFILE          hSym;                /* Filehandle */
     58    //HFILE          hSym;                /* Filehandle */
     59    FILE*          hSym;                /* Filehandle */
    27560    int            cLeftToFind;         /* Symbols left to find */
    27661    unsigned long  iSeg;                /* Outer search loop:  Segment number */
     
    30590     * Now read header and display it.
    30691     */
    307     rc = fread(&MapDef, sizeof(MAPDEF), 1, hSym);
     92    rc = fread(SSToDS(&MapDef), sizeof(MAPDEF), 1, hSym);
    30893    if (!rc)
    30994    {   /* oops! read failed, close file and fail. */
     
    31297    }
    31398    achBuffer[0] = MapDef.achModName[0];
    314     fread(&achBuffer[1], 1, MapDef.cbModName, hSym);
     99    fread(SSToDS(&achBuffer[1]), 1, MapDef.cbModName, hSym);
    315100    achBuffer[MapDef.cbModName] = '\0';
    316101    dprintf(("*Module name: %s\n", achBuffer));
    317     dprintf(("*Segments: %d\n*MaxSymbolLength: %d\n", MapDef.cSegs, MapDef.cbMaxSym));
    318     dprintf(("*ppNextMap: 0x%x\n", MapDef.ppNextMap ));
     102    dprintf(("*Segments:    %d\n*MaxSymbolLength: %d\n", MapDef.cSegs, MapDef.cbMaxSym));
     103    dprintf(("*ppNextMap:   0x%x\n", MapDef.ppNextMap ));
    319104
    320105
     
    322107     * Verify that the modulename of the symbol file is OS2KRNL.
    323108     */
    324     if (MapDef.cbModName == 7 && kstrncmp(achBuffer, "OS2KRNL", 7) != 0)
     109    if (MapDef.cbModName == 7 && strncmp(SSToDS(&achBuffer[0]), "OS2KRNL", 7) != 0)
    325110    {   /* modulename was not OS2KRNL, fail. */
    326111        dprintf(("Modulename verify failed\n"));
     
    333118     * Verify that the number of segments is equal to the number objects in OS2KRNL.
    334119     */
    335     #if !defined(EXTRACT) && !defined(MKCALLTAB)
    336     if (MapDef.cSegs != cObjects)
     120    if (!cOTEs && MapDef.cSegs != cOTEs)
    337121    {   /* incorrect count of segments. */
    338122        dprintf(("Segment No. verify failed\n"));
     
    340124        return ERROR_PROB_SYM_SEGS_NE_OBJS;
    341125    }
    342     #endif /* !EXTRACT && !MKCALLTAB */
    343126
    344127
     
    374157    for (iSeg = 0; iSeg < MapDef.cSegs; iSeg++, offSegment = NEXTSEGDEFOFFSET(SegDef))
    375158    {
    376         int     fSegEPTBitType;         /* Type of segment, 16 or 32 bit, expressed in EPT_XXBIT flags */
    377159        int     fCode;                  /* Set if this is a code segment, else clear. */
    378160
     
    385167            return ERROR_PROB_SYM_SEG_DEF_SEEK;
    386168        }
    387         rc = fread(&SegDef, sizeof(SEGDEF), 1, hSym);
     169        rc = fread(SSToDS(&SegDef), sizeof(SEGDEF), 1, hSym);
    388170        if (!rc)
    389171        {   /* Failed to read the segment definition, fail! */
     
    396178         */
    397179        achBuffer[0] = SegDef.achSegName[0];
    398         fread(&achBuffer[1], 1, SegDef.cbSegName, hSym);
     180        fread(SSToDS(&achBuffer[1]), 1, SegDef.cbSegName, hSym);
    399181        achBuffer[SegDef.cbSegName] = '\0';
    400182        dprintf(("Segment %.2li Flags=0x%02x cSymbols=0x%04x Name=%s\n",
     
    402184
    403185        /*
    404          * Determin segment bit type.
     186         * Code segment?
    405187         */
    406         fSegEPTBitType = SEG32BitSegment(SegDef) ? EPT_32BIT : EPT_16BIT;
    407         fCode = kstrstr(achBuffer, "CODE") != NULL;
     188        fCode = strstr(achBuffer, "CODE") != NULL;
    408189
    409190        /*
     
    428209                continue;
    429210            }
    430             rc = fread(&offSym, sizeof(unsigned short int), 1, hSym);
     211            rc = fread(SSToDS(&offSym), sizeof(offSym), 1, hSym);
    431212            if (!rc)
    432213            {   /* Symboloffset read failed, try read next symbol. */
     
    445226             * Read symbol and symbolname.
    446227             */
    447             if (SegDef.bFlags & 0x01)
    448                 rc = fread(&SymDef32, sizeof(SYMDEF32), 1, hSym);
     228            if (SEG32BitSegment(SegDef))
     229            {
     230                rc = fread(SSToDS(&SymDef32), sizeof(SYMDEF32), 1, hSym);
     231                achBuffer[0] = SymDef32.achSymName[0];
     232                cchName      = SymDef32.cbSymName;
     233            }
    449234            else
    450                 rc = fread(&SymDef16, sizeof(SYMDEF16), 1, hSym);
     235            {
     236                rc = fread(SSToDS(&SymDef16), sizeof(SYMDEF16), 1, hSym);
     237                achBuffer[0] = SymDef16.achSymName[0];
     238                cchName      = SymDef16.cbSymName;
     239            }
    451240            if (!rc)
    452241            {   /* Symbol read failed, try read next symbol */
     
    454243                continue;
    455244            }
    456             achBuffer[0] = (SegDef.bFlags & 0x01) ? SymDef32.achSymName[0] : SymDef16.achSymName[0];
    457             cchName = (SegDef.bFlags & 0x01) ? SymDef32.cbSymName : SymDef16.cbSymName;
    458             rc = fread(&achBuffer[1], 1, cchName, hSym);
     245            rc = fread(SSToDS(&achBuffer[1]), 1, cchName, hSym);
    459246            if (!rc)
    460247            {   /* Symbol read failed, try read next symbol */
     
    473260                    && (pImport->fType & EPT_VAR ? !fCode : fCode)         /* Don't look for code in a data segment */
    474261                    && pImport->cchName == cchName                         /* Equal name length */
    475                     && kstrncmp(pImport->achName, achBuffer, cchName) == 0 /* Equal name */
     262                    && strncmp(pImport->achName, SSToDS(&achBuffer[0]), cchName) == 0 /* Equal name */
    476263                    )
    477264                {   /* Symbol was found */
    478                     pImport->offObject = (SegDef.bFlags & 0x01 ? SymDef32.wSymVal : SymDef16.wSymVal);
    479                     pImport->ulAddress = pImport->offObject + paKrnlOTEs[iSeg].ote_base;
     265                    pImport->offObject = SEG32BitSegment(SegDef) ? SymDef32.wSymVal : SymDef16.wSymVal;
    480266                    pImport->iObject   = (unsigned char)iSeg;
    481                     pImport->usSel     = paKrnlOTEs[iSeg].ote_sel;
    482                     dprintf(("debug: base=%lx, size=%lx iSeg=%d\n", paKrnlOTEs[iSeg].ote_base, paKrnlOTEs[iSeg].ote_size, iSeg));
     267                    pImport->ulAddress = pImport->offObject + (paOTEs ? paOTEs[iSeg].ote_base : 0);
     268                    pImport->usSel     = (unsigned short)(paOTEs ? paOTEs[iSeg].ote_sel : 0);
    483269
    484270                    /* Paranoia test! */
    485                     #if !defined(EXTRACT) && !defined(MKCALLTAB)
    486                     if (pImport->offObject < paKrnlOTEs[iSeg].ote_size)
     271                    if (!paOTEs || pImport->offObject < paOTEs[iSeg].ote_size)
    487272                    {
    488273                        pImport->fFound = TRUE;
     
    494279                    else/* test failed, continue on next symbol*/
    495280                        dprintf(("Error: Paranoia test failed for %s\n", pImport->achName));;
    496                     #else
    497                     pImport->fFound = TRUE;
    498                     cLeftToFind--;
    499                     #endif /* !EXTRACT */
    500281                    break;
    501282                }
     
    520301
    521302    /*
    522      * Verify function prologs and return.
    523      */
    524     return VerifyPrologs();
     303     * Symbols successfully loaded.
     304     */
     305    return 0;
    525306}
    526307
    527 
    528 /**
    529  * Get kernelinformation (OTEs (object table entries), build, type, debug...)
    530  * @returns 0 on success.
    531  *              ulKernelBuild, fchType, fDebug, cObjects and paKrnlOTEs is set on successful return.
    532  *          Not 0 on error.
    533  */
    534 int   GetKernelInfo(void)
    535 {
    536 #if !defined(EXTRACT) && !defined(MKCALLTAB) /* This IOCtl is not available after inittime! */
    537     static KRNLINFO DATA16_INIT KrnlInfo = {0};
    538     APIRET          rc;
    539     KKLR0INITPARAM  param;
    540     KKLR0INITDATA   data;
    541 
    542     /*
    543      * Issue an IOCtl to kKrnlHlp to query kernel information.
    544      */
    545     param.pfn = GetGetKernelInfo32Ptr();
    546     param.ulParam = (ULONG)((USHORT)&KrnlInfo) + DATA16Base;
    547     rc = DoDevIOCtl(&param, &data);
    548     if (rc == NO_ERROR)
    549     {
    550         if (!data.ulRc)
    551         {
    552             #ifdef DEBUG
    553             unsigned i;
    554             #endif
    555 
    556             /*
    557              * Set the exported parameters
    558              */
    559             ulKernelBuild   = KrnlInfo.ulBuild;
    560             fKernel         = KrnlInfo.fKernel;
    561             cObjects        = KrnlInfo.cObjects;
    562             paKrnlOTEs      = &KrnlInfo.aObjects[0];
    563 
    564             /*
    565              * If debugging probkrnl dump kernel OTEs.
    566              */
    567             #ifdef DEBUG
    568             dprintf(("debug: kernel OTE:\n"));
    569             for (i = 0; i < cObjects; i++)
    570                 dprintf(("debug: no.%2d base=%lx size=%lx sel=%x\n",
    571                          i,
    572                          paKrnlOTEs[i].ote_base,
    573                          paKrnlOTEs[i].ote_size,
    574                          paKrnlOTEs[i].ote_sel));
    575             #endif
    576         }
    577         else
    578             rc = (USHORT)data.ulRc;
    579     }
    580     /*else: complaining has been done */
    581 
    582     return rc;
    583 
    584 #else
    585     return 0;
    586 #endif
    587 }
    588 
    589 
    590 /**
    591  * Shows result of kernelprobing if not quiet or on error.
    592  * @param   rc      Return code.
    593  */
    594 void ShowResult(int rc)
    595 {
    596     int i;
    597 
    598     /*
    599      * Complain even if quiet on error
    600      */
    601     if (!options.fQuiet || rc != NO_ERROR)
    602     {
    603         printf16("\nkKrnlLib - Odin32 Ring-0 Kernel Library. (Built %s %s)\n",
    604                  (NPSZ)szBuildTime, (NPSZ)szBuildDate);
    605 
    606         /*
    607          * kernel stuff
    608          */
    609         printf16("    Kernel Build:     ");
    610         if (rc == NO_ERROR || rc > ERROR_PROB_KRNL_LAST)
    611             printf16("%ld - v%d.%d\n",
    612                      ulKernelBuild, usVerMajor, usVerMinor);
    613         else if (rc >= ERROR_PROB_KRNL_FIRST)
    614             printf16("Kernel probing failed with rc=%d.\n", rc);
    615         else
    616             printf16("Failed before probing kernel.\n");
    617 
    618         /*
    619          * symbol-file
    620          */
    621         printf16("    Using symbolfile: ");
    622         if (rc == NO_ERROR || (rc > ERROR_PROB_SYM_LAST && szSymbolFile[0] != '\0'))
    623             printf16("%s\n", (NPSZ)szSymbolFile);
    624         else if (rc >= ERROR_PROB_SYM_FIRST)
    625             printf16("Failed to find symbolfile!\n");
    626         else
    627             printf16("Failed before searching for symbolfile.\n");
    628 
    629         /*
    630          * function listing
    631          */
    632         if (options.fLogging)/* || rc != NO_ERROR)*/
    633         {
    634             for (i = 0; i < NBR_OF_KRNLIMPORTS; i++)
    635                 if (aImportTab[i].fFound)
    636                     break;
    637 
    638             if (i < NBR_OF_KRNLIMPORTS)
    639             {
    640                 for (i = 0; i < NBR_OF_KRNLIMPORTS; i++)
    641                 {
    642                     printf16("  %-21s at ", aImportTab[i].achName);
    643                     if (aImportTab[i].fFound)
    644                         printf16("0x%08lx%s", aImportTab[i].ulAddress, (i % 2) == 0 ? "" : "\n");
    645                     else
    646                         printf16("not found!%s", (i % 2) == 0 ? "" : "\n");
    647                 }
    648                 if (i % 2) printf16("\n");
    649             }
    650             else
    651                 printf16("Error: No functions was found!\n");
    652         }
    653 
    654         /*
    655          * Display error code.
    656          */
    657         if (rc != NO_ERROR)
    658         {
    659             if (iProc >= 0)
    660                 printf16("Error: ProbeKernel failed with rc=0x%x. ordinal=%d(%s)\n",
    661                          rc,
    662                          iProc < NBR_OF_KRNLIMPORTS ? aImportTab[iProc].iOrdinal : 0xffff,
    663                          iProc < NBR_OF_KRNLIMPORTS ? aImportTab[iProc].achName : "");
    664             else
    665                 printf16("Error: ProbeKernel failed with rc=0x%x.\n", rc);
    666         }
    667     }
    668 }
    669 
    670 
    671 /**
    672  * "main" function.
    673  * Note that the option -Noloader causes nothing to be done.
    674  * @returns   0 on success, something else on error.
    675  * @param     pReqPack  Pointer to init request packet
    676  * @remark
    677  */
    678 /**
    679  * This function will loop thru all possible kernel
    680  * sym files and try match them with the loaded kernel.
    681  *
    682  * @returns 0 on success.
    683  *          The kernel import table contains valid data.
    684  * @returns error code on failure. Upper part contains failed proc.
    685  *          The kernel import table contains invalid data.
    686  * @sketch
    687  * @modifies szSymbolFile, aImportTab.
    688  *
    689  */
    690 int krnlLoadKernelSym(void)
    691 {
    692     int         rc;
    693     int         i;
    694     int         n;
    695     APIRET      rc2;
    696     PGINFOSEG   pGIS;
    697     char        chBootDrive;
    698     HFILE       hPmdfVers;
    699 
    700     /*
    701      * Determin boot drive and update the table.
    702      * Note! Make sure the strings are not readonly const!
    703      */
    704     pGIS = kDH_GetDosVar(DHGETDOSV_SYSINFOSEG, 0);
    705     if (!pGIS)
    706         return ERROR_PROB_KRNL_GIS;
    707     dprintf(("BootDrive: %d\n", pGIS->bootdrive));
    708 
    709     chBootDrive = (char)pGIS->bootdrive + (char)'a' - 1;
    710     for (i = 0; apszSym[i] != NULL; i++)
    711         apszSym[i][0] = chBootDrive;
    712 
    713     /*
    714      * If symfile was specified, we will try read it.
    715      */
    716     rc = 1;
    717     if (szSymbolFile[0] != '\0')
    718     {
    719 
    720         rc = ProbeSymFile(szSymbolFile);
    721         if (rc)
    722         {
    723             printf16("Warning: Invalid symbol file specified. rc=%x ordinal=%d\n"
    724                      "         Tries defaults.\n",
    725                      rc,
    726                      iProc < NBR_OF_KRNLIMPORTS ? aImportTab[iProc].iOrdinal : 0xffff);
    727             szSymbolFile[0] = '\0';
    728             DosSleep(3000);
    729         }
    730     }
    731 
    732         if (rc) /* if user sym failed or don't exists. */
    733         {
    734             /*
    735              * Check database - only if not a debug kernel!
    736              * You usually have a .sym-file when using a debug kernel.
    737              */
    738             if ((fKernel & KF_DEBUG) ||
    739                 (rc = LookupKrnlEntry((unsigned short)ulKernelBuild,
    740                                       (unsigned short)fKernel,
    741                                       cObjects)
    742                  ) != NO_ERROR
    743                 )
    744             {
    745                 /* search on disk */
    746                 i = 0;
    747                 while (apszSym[i] != NULL
    748                        && (rc2 = ProbeSymFile(apszSym[i])) != NO_ERROR
    749                        )
    750                 {
    751                     i++;
    752                     if (rc2 >= ERROR_D32_FIRST)
    753                         rc = rc2;
    754                 }
    755                 if (rc2 == NO_ERROR)
    756                 {
    757                     kstrcpy(szSymbolFile, apszSym[i]);
    758                     rc = NO_ERROR;
    759                 }
    760             }
    761         }
    762 
    763     /* Show the result and set return-value */
    764     dprintf(("rc=%d(0x%x); i=%d; Ordinal=%d\n",
    765              rc, rc, i, iProc < NBR_OF_KRNLIMPORTS ? aImportTab[iProc].iOrdinal : 0xffff));
    766     ShowResult(rc);
    767 
    768     return rc;
    769 }
    770 
    771 
    772 
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/src/krnlLockedWrite.asm

    r18610 r20072  
    1 ; $Id: krnlLockedWrite.asm,v 1.1 2002-03-10 02:45:55 bird Exp $
     1; $Id: krnlLockedWrite.asm,v 1.2 2002-12-19 01:49:09 bird Exp $
    22;
    33; Locked Write functions used by krnlImport to overload
     
    1010    .386p
    1111
    12 ;
    13 ;   Header Files
    14 ;
     12
     13;*******************************************************************************
     14;* Header Files                                                                *
     15;*******************************************************************************
    1516include devSegDf.inc
    1617
    1718
     19;*******************************************************************************
     20;* Exported Symbols                                                            *
     21;*******************************************************************************
     22public krnlLockedWrite
    1823
    1924
     
    3136; @uses     eax, edx, ecx
    3237; @author   knut st. osmundsen (kosmunds@csc.com)
    33 LockedWrite proc near
     38krnlLockedWrite proc near
    3439    push    ebx                         ; Save ebx accoring to _Optlink.
    3540    pushfd                              ; Save flags so we restore interrupts correctly.
     
    6671    xor     eax, eax                    ; How could we fail?
    6772    ret
    68 LockedWrite endp
     73krnlLockedWrite endp
    6974
    7075
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/src/krnlOverloading.c

    r18694 r20072  
    1 /* $Id: krnlOverloading.c,v 1.2 2002-03-31 19:01:16 bird Exp $
    2  *
    3  * Overloading routines.
    4  *
    5  * Copyright (c) 2001 knut st. osmundsen (kosmunds@csc.com)
    6  *
    7  * Project Odin Software License can be found in LICENSE.TXT
    8  *
    9  */
     1/* $Id: krnlOverloading.c,v 1.3 2002-12-19 01:49:09 bird Exp $
     2 *
     3 * Interfaces for overloading kernel routines.
     4 *
     5 * Copyright (c) 2001-2001 knut st. osmundsen <bird@anduin.net>
     6 *
     7 *
     8 * This file is part of kKrnlLib.
     9 *
     10 * kKrnlLib is free software; you can redistribute it and/or modify
     11 * it under the terms of the GNU General Public License as published by
     12 * the Free Software Foundation; either version 2 of the License, or
     13 * (at your option) any later version.
     14 *
     15 * kKrnlLib is distributed in the hope that it will be useful,
     16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     18 * GNU General Public License for more details.
     19 *
     20 * You should have received a copy of the GNU General Public License
     21 * along with kKrnlLib; if not, write to the Free Software
     22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     23 *
     24 */
     25
    1026#ifndef NOFILEID
    11 static const char szFileId[] = "$Id: krnlOverloading.c,v 1.2 2002-03-31 19:01:16 bird Exp $";
     27static const char szFileId[] = "$Id: krnlOverloading.c,v 1.3 2002-12-19 01:49:09 bird Exp $";
    1228#endif
    1329
     
    1632*   Header Files                                                               *
    1733*******************************************************************************/
    18 #define INCL_DOSERRORS
    19 #define INCL_NOPMAPI
    20 #include <os2.h>
     34#include <kLib/kTypes.h>
    2135
    2236#define INCL_OS2KRNL_ALL
     
    2842#include "kKrnlLib.h"
    2943
    30 #include "devSegDf.h"
    31 #include "dev32.h"
    32 #include "ProbKrnl.h"
     44#include "krnlImportTable.h"
    3345#include "krnlPrivate.h"
    3446
     
    187199 * @author  knut st. osmundsen (kosmunds@csc.com)
    188200 */
    189 BOOL kKLOverload32(ULONG ulFuncAddr, ULONG ulOverloaderAddr)
    190 {
    191     KLOGENTRY2("BOOL","ULONG ulFuncAddr, ULONG ulOverloaderAddr", ulFuncAddr, ulOverloaderAddr);
     201KBOOL kKLOverload32(ULONG ulFuncAddr, ULONG ulOverloaderAddr)
     202{
     203    KLOGENTRY2("KBOOL","ULONG ulFuncAddr, ULONG ulOverloaderAddr", ulFuncAddr, ulOverloaderAddr);
    192204    int     iFunc;
    193205
     
    220232     * Overload the function.
    221233     */
    222     LockedWrite(ulFuncAddr, 0xe9, ulOverloaderAddr - ulFuncAddr + 5);
     234    krnlLockedWrite(ulFuncAddr, 0xe9, ulOverloaderAddr - ulFuncAddr + 5);
    223235
    224236    IMPORT_UNLOCK();
     
    239251 * @author  knut st. osmundsen (kosmunds@csc.com)
    240252 */
    241 BOOL kKLRestore32(ULONG ulFuncAddr, ULONG ulOverloaderAddr)
    242 {
    243     KLOGENTRY2("BOOL","ULONG ulFuncAddr, ULONG ulOverloaderAddr", ulFuncAddr, ulOverloaderAddr);
     253KBOOL kKLRestore32(ULONG ulFuncAddr, ULONG ulOverloaderAddr)
     254{
     255    KLOGENTRY2("KBOOL","ULONG ulFuncAddr, ULONG ulOverloaderAddr", ulFuncAddr, ulOverloaderAddr);
    244256    int     iFunc;
    245257    char *  pchOrgProlog;
     
    289301     * Restore function prolog.
    290302     */
    291     LockedWrite(ulFuncAddr, *pchOrgProlog, *(unsigned long *)(void*)(pchOrgProlog + 1));
     303    krnlLockedWrite(ulFuncAddr, *pchOrgProlog, *(unsigned long *)(void*)(pchOrgProlog + 1));
    292304
    293305    IMPORT_UNLOCK();
     
    306318 * @author  knut st. osmundsen (kosmunds@csc.com)
    307319 */
    308 BOOL kKLOverload16(ULONG ulFuncFarAddr, ULONG ulOverloaderFarAddr)
    309 {
    310     KLOGENTRY2("BOOL","ULONG ulFuncFarAddr, ULONG ulOverloaderFarAddr", ulFuncFarAddr, ulOverloaderFarAddr);
     320KBOOL kKLOverload16(ULONG ulFuncFarAddr, ULONG ulOverloaderFarAddr)
     321{
     322    KLOGENTRY2("KBOOL","ULONG ulFuncFarAddr, ULONG ulOverloaderFarAddr", ulFuncFarAddr, ulOverloaderFarAddr);
    311323    int     iFunc;
    312324
     
    340352     * Overload the function.
    341353     */
    342     LockedWrite(aImportTab[iFunc].ulAddress, 0xea, ulOverloaderFarAddr);
     354    krnlLockedWrite(aImportTab[iFunc].ulAddress, 0xea, ulOverloaderFarAddr);
    343355
    344356    IMPORT_UNLOCK();
     
    358370 * @remark  Currently not supported.
    359371 */
    360 BOOL kKLRestore16(ULONG ulFuncFarAddr, ULONG ulOverloaderFarAddr)
    361 {
    362     KLOGENTRY2("BOOL","ULONG ulFuncFarAddr, ULONG ulOverloaderFarAddr", ulFuncFarAddr, ulOverloaderFarAddr);
     372KBOOL kKLRestore16(ULONG ulFuncFarAddr, ULONG ulOverloaderFarAddr)
     373{
     374    KLOGENTRY2("KBOOL","ULONG ulFuncFarAddr, ULONG ulOverloaderFarAddr", ulFuncFarAddr, ulOverloaderFarAddr);
    363375    int     iFunc;
    364376    char *  pchOrgProlog;
     
    410422     * Restore function prolog.
    411423     */
    412     LockedWrite(aImportTab[iFunc].ulAddress, *pchOrgProlog, *(unsigned long *)(void*)(pchOrgProlog + 1));
     424    krnlLockedWrite(aImportTab[iFunc].ulAddress, *pchOrgProlog, *(unsigned long *)(void*)(pchOrgProlog + 1));
    413425
    414426    IMPORT_UNLOCK();
     
    428440 * @remark  Currently not supported.
    429441 */
    430 BOOL kKLOverload16H(ULONG ulFuncFarAddr, ULONG ulOverloaderFarAddr)
    431 {
    432     KLOGENTRY2("BOOL","ULONG ulFuncFarAddr, ULONG ulOverloaderFarAddr", ulFuncFarAddr, ulOverloaderFarAddr);
     442KBOOL kKLOverload16H(ULONG ulFuncFarAddr, ULONG ulOverloaderFarAddr)
     443{
     444    KLOGENTRY2("KBOOL","ULONG ulFuncFarAddr, ULONG ulOverloaderFarAddr", ulFuncFarAddr, ulOverloaderFarAddr);
    433445    kprintf(("not supported currently\n"));
    434446    KNOREF(ulFuncFarAddr);
     
    438450}
    439451
     452
    440453/**
    441454 * Restores a overloaded hybrid 16-bit function.
     
    447460 * @remark  Currently not supported.
    448461 */
    449 BOOL kKLRestore16H(ULONG ulFuncFarAddr, ULONG ulOverloaderFarAddr)
    450 {
    451     KLOGENTRY2("BOOL","ULONG ulFuncFarAddr, ULONG ulOverloaderFarAddr", ulFuncFarAddr, ulOverloaderFarAddr);
     462KBOOL kKLRestore16H(ULONG ulFuncFarAddr, ULONG ulOverloaderFarAddr)
     463{
     464    KLOGENTRY2("KBOOL","ULONG ulFuncFarAddr, ULONG ulOverloaderFarAddr", ulFuncFarAddr, ulOverloaderFarAddr);
    452465    kprintf(("not supported currently\n"));
    453466    KNOREF(ulFuncFarAddr);
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/src/krnlPrologs.c

    r20058 r20072  
    1 /* $Id: krnlPrologs.c,v 1.2 2002-12-16 02:24:29 bird Exp $
     1/* $Id: krnlPrologs.c,v 1.3 2002-12-19 01:49:09 bird Exp $
    22 *
    33 * krnlPrologs - Kernel Prolog Recognizer.
     
    2525
    2626#ifndef NOFILEID
    27 static const char szFileId[] = "$Id: krnlPrologs.c,v 1.2 2002-12-16 02:24:29 bird Exp $";
     27static const char szFileId[] = "$Id: krnlPrologs.c,v 1.3 2002-12-19 01:49:09 bird Exp $";
    2828#endif
    2929
     
    118118 * @param     pach       Pointer to prolog.
    119119 */
    120 int interpretFunctionProlog32(char *pach)
     120int krnlInterpretProlog32(char *pach)
    121121{
    122122    KLOGENTRY1("int","char * pach", pach);
     
    440440 * @param     pach       Pointer to prolog.
    441441 */
    442 int interpretFunctionProlog16(char *pach)
     442int krnlInterpretProlog16(char *pach)
    443443{
    444444    KLOGENTRY1("int","char * pach", pach);
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/src/krnlStubs.c

    r18610 r20072  
    1 /* $Id: krnlStubs.c,v 1.1 2002-03-10 02:45:56 bird Exp $
     1/* $Id: krnlStubs.c,v 1.2 2002-12-19 01:49:09 bird Exp $
    22 *
    33 * krnlStubs - Stubs for not-required (NR) imported functions and variables.
    44 *
    5  * Copyright (c) 2000-2001 knut st. osmundsen (kosmunds@csc.com)
     5 * Copyright (c) 2000-2003 knut st. osmundsen <bird@anduin.net>
    66 *
    7  * Project Odin Software License can be found in LICENSE.TXT
     7 *
     8 * This file is part of kKrnlLib.
     9 *
     10 * kKrnlLib is free software; you can redistribute it and/or modify
     11 * it under the terms of the GNU General Public License as published by
     12 * the Free Software Foundation; either version 2 of the License, or
     13 * (at your option) any later version.
     14 *
     15 * kKrnlLib is distributed in the hope that it will be useful,
     16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     18 * GNU General Public License for more details.
     19 *
     20 * You should have received a copy of the GNU General Public License
     21 * along with kKrnlLib; if not, write to the Free Software
     22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    823 *
    924 */
     25
    1026#ifndef NOFILEID
    11 static const char szFileId[] = "$Id: krnlStubs.c,v 1.1 2002-03-10 02:45:56 bird Exp $";
     27static const char szFileId[] = "$Id: krnlStubs.c,v 1.2 2002-12-19 01:49:09 bird Exp $";
    1228#endif
    1329
     
    1632*   Header Files                                                               *
    1733*******************************************************************************/
    18 #define INCL_DOSERRORS
    19 #define INCL_NOPMAPI
    20 #include <os2.h>
    21 
    2234#define INCL_OS2KRNL_ALL
    2335#define INCL_OS2KRNL_LDR
     
    2739#define INCL_KKL_LOG
    2840#include "kKrnlLib.h"
    29 
    30 
    31 PSZ SECCALL     nopSecPathFromSFN(SFN hFile);
    3241
    3342
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/src/krnlWrappers.asm

    r18720 r20072  
    1 ; $Id: krnlWrappers.asm,v 1.1 2002-04-01 12:33:28 bird Exp $
     1; $Id: krnlWrappers.asm,v 1.2 2002-12-19 01:49:09 bird Exp $
    22;
    33; Wrappers - assembly wrappers for kernel function which have been changed radically.
    44;
    5 ; Copyright (c) 2000-2002 knut st. osmundsen (bird@anduin.net)
     5; Copyright (c) 2000-2003 knut st. osmundsen <bird@anduin.net>
    66;
    7 ; Project Odin Software License can be found in LICENSE.TXT
     7;
     8; This file is part of kKrnlLib.
     9;
     10; kKrnlLib is free software; you can redistribute it and/or modify
     11; it under the terms of the GNU General Public License as published by
     12; the Free Software Foundation; either version 2 of the License, or
     13; (at your option) any later version.
     14;
     15; kKrnlLib is distributed in the hope that it will be useful,
     16; but WITHOUT ANY WARRANTY; without even the implied warranty of
     17; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     18; GNU General Public License for more details.
     19;
     20; You should have received a copy of the GNU General Public License
     21; along with kKrnlLib; if not, write to the Free Software
     22; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     23;
    824;
    925    .386p
    1026
    11 ;
    12 ; Include files
    13 ;
    14     include devsegdf.inc
     27;*******************************************************************************
     28;* Header Files                                                                *
     29;*******************************************************************************
     30include devsegdf.inc
    1531
    16 ;
    17 ; Exported symbols
    18 ;
    19     public _ldrOpenPath@20
    2032
    21 ;
    22 ; Externs
    23 ;
    24     extrn _ldrOpenPath_wrapped:PROC            ; calltab entry
    25     extrn _ulKernelBuild:DWORD
     33;*******************************************************************************
     34;* Exported Symbols                                                            *
     35;*******************************************************************************
     36public _ldrOpenPath@20
     37
     38
     39;*******************************************************************************
     40;* Global Variables                                                            *
     41;*******************************************************************************
     42extrn _ldrOpenPath_wrapped:PROC         ; calltab entry
     43extrn _ulKernelBuild:DWORD
    2644
    2745
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/tools/Makefile

    r19631 r20072  
    1 # $Id: Makefile,v 1.3 2002-08-22 02:09:43 bird Exp $
     1# $Id: Makefile,v 1.4 2002-12-19 01:49:10 bird Exp $
    22
    33#
     
    1717#
    1818TARGET_NAME     = clfix
    19 TARGET_PUBNAME  = $(PATH_TOOLS)\$(TARGET_NAME).$(TARGET_EXT)
     19TARGET_PUB_DIR  = $(PATH_TOOLS)
    2020TARGET_NEEDED   = 1
    2121ALL_INCLUDES    = -I../include
    22 POSTMAKEFILES   = ignore.mak libconv.mak
     22POSTMAKEFILES_NEEDED   = ignore.mak libconv.mak
    2323
    2424#
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/tools/ignore.mak

    r19634 r20072  
    1 # $Id: ignore.mak,v 1.4 2002-08-22 03:07:50 bird Exp $
     1# $Id: ignore.mak,v 1.5 2002-12-19 01:49:10 bird Exp $
    22
    33#
     
    1818#
    1919TARGET_NAME     = ignore
    20 TARGET_PUBNAME  = $(PATH_TOOLS)\$(TARGET_NAME).$(TARGET_EXT)
     20TARGET_PUB_DIR  = $(PATH_TOOLS)
    2121TARGET_NEEDED   = 1
    2222ALL_INCLUDES    = -I../include
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/tools/kDevTest/kDevTest.vpj

    r19855 r20072  
    2525[ASSOCIATION]
    2626[STATE]
    27 SCREEN: 1600 1280 880 21 1094 1233 0 0 M 0 0 0 0 1591 953
    28 CWD: G:\Odin32\Tree\src\win32k\kKrnlLib\tools\kDevTest
    29 BUFFER: BN="F:\VSLICK40\OS2\vrestore.slk"
    30 BI: 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
    31 VIEW: LN=.0 CL=1 LE=0 CX=0 CY=1 WI=5 BI=4 HT=0 HN=0 HF=0 HC=4
    32 BUFFER: BN="G:\odin32\tree\src\win32k\kKrnlLib\tools\kDevTest\kdtDevHelp.asm"
    33 BI: MA=1 74 1  TABS=1 5  WWS=1 IWT=0 ST=0 IN=1 BW=0 US=32000 RO=0 SE=1 SN=0 BIN=0 MN=Assembly   HM=0 MF=872
    34 VIEW: LN=.16763 CL=5 LE=0 CX=4 CY=40 WI=5 BI=19 HT=0 HN=0 HF=0 HC=4
    35 WINDOW: 0 -4 1073 645 -1 -1 M  WF=0 WT=2 "System VIO,12,0,1"
    36 BUFFER: BN="G:\odin32\tree\src\win32k\kKrnlLib\tools\kDevTest\kdtDevHelp.asm"
    37 VIEW: LN=.18570 CL=2 LE=0 CX=1 CY=40 WI=88 BI=19 HT=0 HN=0 HF=0 HC=4
     27SCREEN: 1600 1280 501 31 1094 1233 0 0 N 0 0 0 0 1077 928
     28CWD: G:\src\mozilla\tree
     29BUFFER: BN="G:\kBuild\tree\src\kShell\kShell.c"
     30BI: MA=1 74 1  TABS=1 9  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=864
     31VIEW: LN=.0 CL=1 LE=0 CX=0 CY=1 WI=5 BI=19 HT=0 HN=0 HF=0 HC=4
     32WINDOW: 0 -4 726 629 -1 -1 M  WF=0 WT=2 "System VIO,12,0,1"
     33BUFFER: BN="G:\kBuild\tree\src\kShell\kShell.c"
     34VIEW: LN=.13450 CL=1 LE=0 CX=0 CY=40 WI=88 BI=19 HT=0 HN=0 HF=0 HC=4
    3835FILEHIST: 9
    39 G:\UNIMAC\TREE\GPL\DevInitBase.c
    40 G:\UNIMAC\TREE\GPL\hello.s
    41 G:\UNIMAC\TREE\make\setup.os2debvac308.mk
    42 G:\UNIMAC\TREE\GPL\DevHelp32\DH32GetDOSVar.asm
    43 G:\UNIMAC\TREE\GPL\DevStackA.asm
    44 G:\UNIMAC\TREE\GPL\DevStrategyA.asm
    45 G:\UNIMAC\TREE\ChangeLog
    46 G:\odin32\tree\src\win32k\kKrnlLib\tools\kDevTest\kdtDevHelp.asm
    47 f:\ddk\april02\base\inc\devhlp.inc
     36G:\php\tree\ChangeLog.OS2
     37G:\kTaskMgr\Tree\Generic\src\kLib\files
     38G:\kBuild\tree\doc\docdesign.c
     39G:\kBuild\tree\doc\kmkdocs.c
     40G:\kBuild\tree\src\kmk\kShell\kShell.c
     41G:\kBuild\tree\src\kmk\kShell\kShell.h
     42G:\kBuild\tree\src\kShell\kShellMain.c
     43G:\kBuild\tree\src\kShell\kShell.h
     44G:\kBuild\tree\src\kShell\kShell.c
    4845PRINTER: 2
    4946PRINTER: 2
  • TabularUnified tags/trunk/src/win32k/kKrnlLib/tools/libconv.mak

    r19631 r20072  
    1 # $Id: libconv.mak,v 1.3 2002-08-22 02:09:44 bird Exp $
     1# $Id: libconv.mak,v 1.4 2002-12-19 01:49:10 bird Exp $
    22
    33#
     
    1717#
    1818TARGET_NAME     = libconv
    19 TARGET_PUBNAME  = $(PATH_TOOLS)\$(TARGET_NAME).$(TARGET_EXT)
     19TARGET_PUB_DIR  = $(PATH_TOOLS)
    2020TARGET_NEEDED   = 1
    2121ALL_INCLUDES    = -I../include
Note: See TracChangeset for help on using the changeset viewer.