Ignore:
Timestamp:
Oct 27, 1999, 4:03:01 AM (26 years ago)
Author:
bird
Message:

Corrections to make win32k work.
(And now it does work, at least at my test machine...)

Location:
trunk/src/win32k/include
Files:
1 added
12 edited

Legend:

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

    r847 r1467  
    1 /* $Id: OS2Krnl.h,v 1.1 1999-09-06 02:19:57 bird Exp $
     1/* $Id: OS2Krnl.h,v 1.2 1999-10-27 02:02:55 bird Exp $
    22 *
    33 * OS/2 kernel structures, typedefs and macros.
     
    1010#pragma pack(1)
    1111
    12 #ifndef RING0_DEBUG_IN_RING3
    13     typedef USHORT SFN,*PSFN;         /* system file number */
     12#ifdef RING0
     13    typedef USHORT SFN, *PSFN;         /* system file number */
    1414#else
    1515    #define SFN HFILE
  • trunk/src/win32k/include/asmutils.h

    r847 r1467  
    1 /* $Id: asmutils.h,v 1.1 1999-09-06 02:19:57 bird Exp $
     1/* $Id: asmutils.h,v 1.2 1999-10-27 02:02:55 bird Exp $
    22 *
    33 * Assembly utilities.
     
    2929extern void __stdcall memmov(void *p, signed int off, unsigned int len);
    3030
    31 #ifdef _OS2Krnl_h_
    32 extern PMTE _System GetOS2KrnlMTE(void);
    33 #endif
    34 
    3531#ifdef __cplusplus
    3632}
  • trunk/src/win32k/include/cout.h

    r847 r1467  
    1 /* $Id: cout.h,v 1.1 1999-09-06 02:19:57 bird Exp $
     1/* $Id: cout.h,v 1.2 1999-10-27 02:02:55 bird Exp $
    22 *
    33 * cout - cout replacement.
     
    66 *
    77 */
     8
     9#error("Not used! Use kprintf/dprintf!")
    810
    911#ifndef _cout_h_
  • trunk/src/win32k/include/dev16.h

    r847 r1467  
    1 /* $Id: dev16.h,v 1.1 1999-09-06 02:19:57 bird Exp $
     1/* $Id: dev16.h,v 1.2 1999-10-27 02:02:56 bird Exp $
    22 * dev16 - 16-bit specific. Should not be used in 32-bit C/C++.
    33 *
     
    4242#define D16_IOCTL_VERIFYPROCTAB     0x42
    4343
    44 
    4544/**
    46  * Regards goes to Matthieu Willm for this!
     45 * Regards goes to Matthieu Willm for (parts of) this!
    4746 */
     47#ifdef INCL_16
     48    typedef void FAR * FPVOID;
     49#else
     50    typedef ULONG FPVOID;
     51#endif
    4852typedef struct _DosTable /* dt */
    4953{
    5054    UCHAR  cul;             /* count of entries (dwords) in this table.*/
    51     ULONG  notinterestingAtAll;
     55    FPVOID fph_HardError;
     56    FPVOID fph_UCase;
     57    ULONG  UnknownOrReserved1;
     58    ULONG  UnknownOrReserved2;
     59    ULONG  UnknownOrReserved3;
     60    FPVOID fph_MemMapAlias;
     61    FPVOID fph_MemUnmapAlias;
     62    FPVOID fph_GoProtAll;
     63    FPVOID fph_GoRealAll;
     64    FPVOID fph_doshlp_RedirDev;
     65    ULONG  UnknownOrReserved4;
     66    ULONG  UnknownOrReserved5;
     67    FPVOID fph_SFFromSFN;
     68    FPVOID fph_SegGetInfo;
     69    FPVOID fph_AsgCheckDrive;
     70    ULONG  UnknownOrReserved6;
     71    ULONG  UnknownOrReserved7;
    5272} DOSTABLE, FAR *PDOSTABLE , NEAR *NPDOSTABLE;
    5373
     
    5575{
    5676    UCHAR  cul;             /* count of entries (dwords) in this table.*/
    57     ULONG  notinteresting0;
    58     ULONG  notinteresting1;
    59     ULONG  notinteresting2;
    60     ULONG  notinteresting3;
    61     ULONG  notinteresting4;
    62     ULONG  notinteresting5;
    63     ULONG  notinteresting6;
    64     ULONG  notinteresting7;
    65     ULONG  notinteresting8;
     77    FPVOID fpErrMap24;
     78    FPVOID fpErrMap24End;
     79    FPVOID fpErr_Table_24;
     80    FPVOID fpCDSAddr;
     81    FPVOID fpGDT_RDR1;
     82    FPVOID fpInterrupLevel;
     83    FPVOID fp_cInDos;
     84    ULONG  UnknownOrReserved1;
     85    ULONG  UnknownOrReserved2;
    6686    ULONG  R0FlatCS;
    6787    ULONG  R0FlatDS;
    68     ULONG  TKSSBase;
    69     ULONG  notinterestingC;
    70     ULONG  notinterestingD;
    71     ULONG  notinterestingE;
    72     ULONG  notinterestingF;
    73     ULONG  ReserveVM;
    74     ULONG  notinterestingH;
    75     ULONG  notinterestingI;
     88    LIN    pTKSSBase;
     89    LIN    pintSwitchStack;
     90    LIN    pprivatStack;
     91    FPVOID fpPhysDiskTablePtr;
     92    LIN    pforceEMHandler;
     93    LIN    pReserveVM;
     94    LIN    p_pgpPageDir;
     95    ULONG  UnknownOrReserved3;
    7696} DOSTABLE2, FAR *PDOSTABLE2 , NEAR *NPDOSTABLE2;
    7797
     
    89109 */
    90110USHORT NEAR CallR0Init32(LIN pRpInit);
    91 
     111USHORT NEAR CallGetOTEs32(ULONG addressOTEBuf);
     112USHORT NEAR CallVerifyProcTab32(void);
    92113
    93114/*
  • trunk/src/win32k/include/dev32.h

    r1269 r1467  
    1 /* $Id: dev32.h,v 1.2 1999-10-14 01:16:49 bird Exp $
     1/* $Id: dev32.h,v 1.3 1999-10-27 02:02:56 bird Exp $
    22 *
    33 * dev32 - header file for 32-bit part of the driver.
     
    4848 * Function prototypes.
    4949 */
    50 #ifndef __cplusplus
     50#if !defined(__cplusplus) && defined(RING0)
    5151USHORT _loadds _Far32 _Pascal R0Init32(RP32INIT *pRpInit);
    5252USHORT _loadds _Far32 _Pascal GetOTEs32(PKRNLOBJTABLE pOTEBuf);
    5353USHORT _loadds _Far32 _Pascal VerifyProcTab32(void);
    5454#endif
     55#ifdef _OS2Krnl_h_
     56PMTE _System GetOS2KrnlMTE(void); /* (devfirst.asm) */
     57#endif
     58
    5559
    5660/*
    5761 * Global variables
    5862 */
    59 extern ULONG TKSSBase32;
     63extern PULONG pulTKSSBase32;
    6064
    6165/*
    62  * Macros
     66 * SSToDS( stack pointer )
     67 *
     68 * In RING-0 this translates pointers to stack memory in the
     69 * Stack Segment (SS) to pointers to stack memory in the
     70 * Data Segment (DS). SS is 16-bit compatible, DS is 32-bit flat.
     71 * It is vitally important to use this macro whenever creating
     72 * a pointer to stack memory which don't implies that is a pointer
     73 * relative to SS. For example when passing the pointer to an stack
     74 * variable into an function call; like the addToModule calls.
     75 *
     76 * @returns    32-bit FLAT stack pointer.
    6377 */
    64 #define SSToDS(a)   ((PVOID)((ULONG)(a) + TKSSBase32))
     78#ifdef RING0
     79    #define SSToDS(a)   ((PVOID)((ULONG)(a) + *pulTKSSBase32))
     80#else
     81    #define SSToDS(a)   ((PVOID)(a))
     82#endif
    6583
    6684#ifdef __cplusplus
  • trunk/src/win32k/include/devSegDf.inc

    r847 r1467  
    1 ; $Id: devSegDf.inc,v 1.1 1999-09-06 02:19:58 bird Exp $
     1; $Id: devSegDf.inc,v 1.2 1999-10-27 02:02:56 bird Exp $
    22;
    33; Segment definitions for win32k.sys.
     
    2424CODE32 ends
    2525
    26 CALLTAB segment dword public 'CODE' use32
     26CALLTAB segment dword public 'DATA' use32
    2727CALLTAB ends
    2828
  • trunk/src/win32k/include/ldr.h

    r1269 r1467  
    1 /* $Id: ldr.h,v 1.2 1999-10-14 01:16:49 bird Exp $
     1/* $Id: ldr.h,v 1.3 1999-10-27 02:02:56 bird Exp $
    22 *
    33 * ldr - loader header file.
     
    1414        extern BOOL fQAppType;
    1515
    16         /***************************************************************/
    17         /* handle state - Array of handle states. Four state per byte! */
    18         /***************************************************************/
     16        /*
     17         * handle state - Array of handle states. Eight state per byte!
     18         */
    1919        #define MAX_FILE_HANDLES 0x10000
    2020
     
    3131
    3232
    33         /**************/
    34         /* PE handles */
    35         /**************/
    36         typedef struct _PENode
     33        /*
     34         * Module struct.
     35         */
     36        typedef struct _Module
    3737        {
    38             /* linking stuff */
    39             struct _PENode *left;
    40             struct _PENode *right;
     38            AVLNODECORE     coreKey;    /* Key is hFile. */
     39            AVLNODECORE     coreMTE;    /* Key is pMTE. */
    4140
    42             /* key */
    43             SFN hFile;                      /* system file number or file handle if you prefer that */
     41            SFN             hFile;      /* System file number or file handle if you prefer that. */
     42            PMTE            pMTE;       /* Pointer to MTE if we got one - NULL is allowed. */
    4443
    45             /* misc */
    46             PMTE pMTE;                      /* pointer to MTE if we got one - may be NULL */
     44            ULONG           fFlags;     /* Flags. Flags if coreMte is in use and what Data contains. */
     45            union
     46            {
     47                Pe2Lx *     pPe2Lx;     /* Pointer to a Pe2Lx object. (Win32 executables) */
     48                #if 0
     49                Elf2Lx *    pElf2Lx;    /* Pointer to a Elf2Lx object. (ELF executables) */
     50                Script *    pScript;    /* Pointer to a Script object. (Shell scripts) */
     51                Pe *        pPe;        /* Pointer to a Pe object. (Ring3 loader) */
     52                #endif
     53                void *      pv;
     54            } Data;                     /* Pointer to data. Currently it's allways a Pe2Lx object! */
     55        } MODULE, *PMODULE;
    4756
    48             /* Pe2Lx object */
    49             Pe2Lx *pPe2Lx;
    50         } PENODE, *PPENODE;
     57        #define MOD_FLAGS_IN_MTETREE    0x00000010 /* The node is present in the MTE-tree. */
     58        #define MOD_TYPE_MASK           0x0000000F /* Type mask. */
     59        #define MOD_TYPE_PE2LX          0x00000001 /* Pe2Lx module. */
     60        #define MOD_TYPE_ELF2LX         0x00000002 /* Elf2Lx module. */
     61        #define MOD_TYPE_SCRIPT         0x00000003 /* Script module. */
     62        #define MOD_TYPE_PE             0x00000004 /* Pe module. */
    5163
    52         #define SIZEOF_NODE (sizeof(NODE))
    5364
    54         ULONG       insertNode(PPENODE pNode);
    55         ULONG       deleteNode(SFN key);        /* removes from tree and freeNode */
    56         PPENODE     getNodePtr(SFN key);
    57         PPENODE     findNodePtr(const char *pszFilename);
    58         ULONG       depthPE(void);
    59         PPENODE     allocateNode(void);
    60         ULONG       freeNode(PPENODE pNode);    /* don't remove from tree! */
     65        /*
     66         * Modules operations.
     67         */
     68        PMODULE     getModuleBySFN(SFN hFile);
     69        PMODULE     getModuleByMTE(PMTE pMTE);
     70        PMODULE     getModuleByFilename(PCSZ pszFilename);
    6171
    62         /* if sequential insertion - this will give a lower tree. */
    63         /* testing shows that 3 gives best results for 27 to 134 nodes */
    64         #define ROTATION 3
    65         #define AdjustKey(a) ((USHORT)(a << 16-ROTATION) | (USHORT)(a >> ROTATION) )
    66         #define UnAdjustKey(a) ((USHORT)(a >> 16-ROTATION) | (USHORT)(a << ROTATION) )
     72        ULONG       addModule(SFN hFile, PMTE pMTE, ULONG fFlags, void *pData);
     73        ULONG       removeModule(SFN hFile);
    6774
    6875    #endif
     76
    6977    /*************/
    7078    /* functions */
  • trunk/src/win32k/include/log.h

    r1269 r1467  
    1 /* $Id: log.h,v 1.2 1999-10-14 01:16:50 bird Exp $
     1/* $Id: log.h,v 1.3 1999-10-27 02:02:56 bird Exp $
    22 *
    33 * log - C-style logging - kprintf.
     
    55 *
    66 * Copyright (c) 1998-1999 knut st. osmundsen
     7 *
     8 * Project Odin Software License can be found in LICENSE.TXT
    79 *
    810 */
     
    1517#endif
    1618
     19/*
     20 * COM-Port port numbers.
     21 */
    1722#define OUTPUT_COM1 0x3f8
    1823#define OUTPUT_COM2 0x2f8
     24
    1925
    2026/*
     
    2632    #include "vprintf.h"
    2733    #define kprintf(a)          printf a
    28     #define kernel_printf(a)    printf a, printf("\n") /* obsolete */
    2934#else
    3035    #define kprintf(a)          (void)0
    31     #define kernel_printf(a)    (void)0
    3236#endif
    3337
  • trunk/src/win32k/include/malloc.h

    r1269 r1467  
    1 /* $Id: malloc.h,v 1.2 1999-10-14 01:16:50 bird Exp $
     1/* $Id: malloc.h,v 1.3 1999-10-27 02:02:57 bird Exp $
    22 *
    33 * Heap.
     
    4646#define MAXPTR _uHeapMaxPtr
    4747
    48 #define HEAP_SIZE 0x00600000U /* 10MB of heap */
     48/*#define HEAP_SIZE 0x00600000U*/ /* 10MB of heap */
     49#define HEAP_SIZE 0x100000U /* 1MB of heap */
    4950
    5051/* HeapPointer assert - old ones... */
  • trunk/src/win32k/include/options.h

    r847 r1467  
    1 /* $Id: options.h,v 1.1 1999-09-06 02:19:59 bird Exp $
     1/* $Id: options.h,v 1.2 1999-10-27 02:02:57 bird Exp $
     2 *
    23 * Options.
    34 *
    45 * Copyright (c) 1998-1999 knut st. osmundsen
     6 *
     7 * Project Odin Software License can be found in LICENSE.TXT
    58 *
    69 */
     
    912#define _options_h_
    1013
     14/*******************************************************************************
     15*   Defined Constants And Macros                                               *
     16*******************************************************************************/
    1117/* fKernel */
    1218#define KF_UNI      0x00000000UL
    1319#define KF_SMP      0x00000001UL
    1420
     21/* Set defaults. */
     22#define SET_OPTIONS_TO_DEFAULT(o)            \
     23            o.fQuiet         = 0;            \
     24            o.usCom          = OUTPUT_COM2;  \
     25            o.fLogging       = 0;            \
     26            o.ulBuild        = ~0;           \
     27            o.fKernel        = KF_UNI;       \
     28            o.usVerMajor     = ~0;           \
     29            o.usVerMinor     = ~0;
    1530
     31
     32/*******************************************************************************
     33*   Structures and Typedefs                                                    *
     34*******************************************************************************/
    1635/** Option struct */
    1736struct options
     
    3958    /** @cat Options affecting the generated LX executable */
    4059    //******************************************************/
    41     int noExeTIBFix;        /* ask win32k for initstuff (win32k only) */
    42     int AlignSections;      /* don't align sections */
    43     //int TIBFixObject;       /* make a TIBFix object - AlignSections = 0 */
    44 
    45     int lxoffset;           /* if true use the fixed LXOFFSET if not ulPEOffset */
    46     int ourstub;            /* our DOS stub or the one from the PE-file */
     60    /* none yet... */
    4761};
    4862
    4963
    50 extern struct options options;
    51 
    52 #define SET_OPTIONS_TO_DEFAULT(o)            \
    53             o.fQuiet         = 0;            \
    54             o.usCom          = OUTPUT_COM2;  \
    55             o.fLogging       = 0;            \
    56             o.ulBuild        = 8259;         \
    57             o.fKernel        = KF_UNI;       \
    58             o.usVerMajor     = 20;           \
    59             o.usVerMinor     = 30;           \
    60             o.noExeTIBFix    = 0;            \
    61             o.AlignSections  = 1;            \
    62             o.lxoffset       = 0;            \
    63             o.ourstub        = 0
    64 
    65 
    66 #define SET_OPTIONS_WIN32K(o)                \
    67             SET_OPTIONS_TO_DEFAULT(o)
    68 
    69 #define SET_OPTIONS_WIN32K_SAFE(o)           \
    70             SET_OPTIONS_TO_DEFAULT(o);       \
    71             o.noExeTIBFix    = 0;            \
    72             o.AlignSections  = 1
    73 
    74 
    75 #define SET_OPTIONS_PE2LX(o)                 \
    76             SET_OPTIONS_TO_DEFAULT(o);       \
    77             o.fLogging       = 1;            \
    78             o.noExeTIBFix    = 0;            \
    79             o.AlignSections  = 1;            \
    80             o.lxoffset       = 0;            \
    81             o.ourstub        = 0
     64/*******************************************************************************
     65*   Global Variables                                                           *
     66*******************************************************************************/
     67extern struct options options; /* defined in d32globals.c */
    8268
    8369#endif
  • trunk/src/win32k/include/pe2lx.h

    r1270 r1467  
    1 /* $Id: pe2lx.h,v 1.4 1999-10-14 01:17:55 bird Exp $
     1/* $Id: pe2lx.h,v 1.5 1999-10-27 02:02:57 bird Exp $
    22 *
    33 * Pe2Lx class declarations. Ring 0 and Ring 3
     
    1717*   Defined Constants And Macros                                               *
    1818*******************************************************************************/
    19 /*
    20  * RING3 wrappings for RING0 constructs.
    21  */
    22 #ifdef RING3
    23     typedef HFILE SFN;      /* System File Number. (OS2Krnl.h) */
    24     typedef PVOID PMTE;     /* Pointer to Module Table Entry. (OS2Krnl.h) */
    25 #endif
    26 
    2719/*
    2820 * Misc
  • trunk/src/win32k/include/probkrnl.h

    r847 r1467  
    1 /* $Id: probkrnl.h,v 1.1 1999-09-06 02:19:59 bird Exp $
     1/* $Id: probkrnl.h,v 1.2 1999-10-27 02:02:57 bird Exp $
    22 *
    33 * Include file for ProbKrnl.
     
    5757extern unsigned long int _usVerMinor;       /* 'usVerMinor'      in PrbKrnl.c */
    5858
     59#ifdef INCL_16 /* 16-bit only */
     60int ProbeKernel(PRPINITIN pReqPack);
     61#endif
    5962
    6063#endif
Note: See TracChangeset for help on using the changeset viewer.