Changeset 4227 for trunk/src


Ignore:
Timestamp:
Sep 8, 2000, 11:34:12 PM (25 years ago)
Author:
bird
Message:

Experimenting with ldrSetVMflags. Page alignment possible.

Location:
trunk/src/win32k
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/win32k/dev16/probkrnl.c

    r4222 r4227  
    1 /* $Id: probkrnl.c,v 1.24 2000-09-08 15:29:01 bird Exp $
     1/* $Id: probkrnl.c,v 1.25 2000-09-08 21:34:09 bird Exp $
    22 *
    33 * Description:   Autoprobes the os2krnl file and os2krnl[*].sym files.
     
    134134    {FALSE, -1, 16, "_ldrpFileNameBuf",     -1,  -1,  -1,  -1, EPT_VARIMPORT32},   /* 40 */
    135135    {FALSE, -1, 14, "SecPathFromSFN",       -1,  -1,  -1,  -1, EPT_PROCIMPORTNR32},/* 41 */
    136 
     136#if 0/* experimenting...*/
     137    {FALSE, -1, 14, "_ldrSetVMflags",       -1,  -1,  -1,  -1, EPT_PROC32},        /* 42 */
     138#endif
    137139};
    138140
  • trunk/src/win32k/dev32/d32init.c

    r4185 r4227  
    1 /* $Id: d32init.c,v 1.22 2000-09-04 16:40:49 bird Exp $
     1/* $Id: d32init.c,v 1.23 2000-09-08 21:34:10 bird Exp $
    22 *
    33 * d32init.c - 32-bits init routines.
     
    12181218        0,                              /* 39 */
    12191219        0,                              /* 40 */
    1220         (unsigned)nopSecPathFromSFN,    /* 41 */
     1220        (unsigned)nopSecPathFromSFN     /* 41 */
     1221        #if 0 /* experimenting */
     1222        ,(unsigned)myldrSetVMflags,      /* 42 */
     1223        #endif
    12211224    };
    12221225    int i;
     
    15171520        {(unsigned)&fakeldrpFileNameBuf,    3},
    15181521        {(unsigned)&fakeSecPathFromSFN,     3}
     1522        #if 0 /* experimenting */
     1523        ,{(unsigned)&fakeldrSetVMflags,      1}
     1524        #endif
    15191525    };
    15201526    int i;
  • trunk/src/win32k/include/LdrCalls.h

    r4164 r4227  
    1 /* $Id: LdrCalls.h,v 1.4 2000-09-02 21:08:02 bird Exp $
     1/* $Id: LdrCalls.h,v 1.5 2000-09-08 21:34:11 bird Exp $
    22 *
    33 * Prototypes for the loader overrided function.
     
    224224
    225225/**
     226 * Sets the VM flags for an executable object.
     227 * @returns     void
     228 * @param       pMTE        Pointer to the module table entry.
     229 * @param       flObj       LX Object flags.
     230 * @param       pflFlags1   Pointer to the flFlags1 of VMAllocMem (out).
     231 * @param       pflFlags2   Pointer to the flFlags2 of VMAllocMem (out).
     232 */
     233extern VOID LDRCALL  ldrSetVMflags( /* retd  0x10 */
     234    PMTE        pMTE,               /* ebp + 0x08 */
     235    ULONG       flObj,              /* ebp + 0x0c */
     236    PULONG      pflFlags1,          /* ebp + 0x10 */
     237    PULONG      pflFlags2           /* ebp + 0x14 */
     238    );
     239
     240VOID LDRCALL myldrSetVMflags(PMTE pMTE, ULONG flObj, PULONG pflFlags1, PULONG pflFlags2);
     241
     242
     243/**
    226244 * Pointer to the loader filename buffer.
    227245 * Upon return from ldrOpen (and ldrOpenPath which calls ldrOpen) this is
  • trunk/src/win32k/include/OS2KVM.h

    r4164 r4227  
    1 /* $Id: OS2KVM.h,v 1.5 2000-09-02 21:08:00 bird Exp $
     1/* $Id: OS2KVM.h,v 1.6 2000-09-08 21:34:11 bird Exp $
    22 *
    33 * OS/2 kernel VM functions.
     
    1313#define _OS2KVM_h_
    1414
     15
    1516/*******************************************************************************
    1617*   Defined Constants And Macros                                               *
    1718*******************************************************************************/
     19
     20/*                                            v8086.h */
     21#define VM_PG_W            0x00000002      /* VPMPG_W       - Page Writeable. */
     22#define VM_PG_U            0x00000004      /* VPMPG_U       - Page User Mode Accessible.*/
     23#define VM_PG_X            0x00000008      /* VPMPG_X       - Page Executable. */
     24#define VM_PG_R            0x00000010      /* VPMPG_R       - Page Readable. */
     25#define VM_PG_RESERVED     0x00001000      /* VPMPG_RESERVED- Reservered */
     26
     27/*                                            vpmx2.h */
     28#define VM_PG_SWAPPABLE    0x00000000      /* Swappable */
     29
     30
     31
    1832/*
    1933 * VMAlloc flFlag1 guessings
    2034 */
    21 #define VMA_CONTIG          0x00000001  /* VMDHA_CONTIG */
    22 #define VMA_WRITE           0x00000002  /* PAG_WRITE and OB_WRITE */
    23 #define VMA_USER            0x00000004  /* OB_USER */
    24 #define VMA_EXECUTE         0x00000008  /* PAG_EXECUTE and OB_READ !! */
    25 #define VMA_READ            0x00000010  /* PAG_READ and OB_EXEC !! */
    26 #define VMA_LOWMEM          0x00000020  /* OB_LOWMEM < 1MB physical */
    27 #define VMA_GUARD           0x00000040  /* PAG_GUARD and VMDHA_16M and OB_GUARD */
     35#define VMA_CONTIG          0x00000001UL  /* VMDHA_CONTIG */
     36#define VMA_WRITE           VM_PG_W     /* PAG_WRITE and OB_WRITE */
     37#define VMA_USER            VM_PG_U     /* OB_USER */
     38#define VMA_EXECUTE         VM_PG_X     /* PAG_EXECUTE and OB_READ !! */
     39#define VMA_READ            VM_PG_R     /* PAG_READ and OB_EXEC !! */
     40#define VMA_LOWMEM          0x00000020UL  /* OB_LOWMEM < 1MB physical */
     41#define VMA_GUARD           0x00000040UL  /* PAG_GUARD and VMDHA_16M and OB_GUARD */
    2842#if 0
    29 #define VMA_RESIDENT        0x00000080  /* OB_RESIDENT */
    30 #define VMA_ZEROINIT        0x00000100  /* OB_ZEROINIT */
    31 #define VMA_PHYS            0x00000200  /* VMDHA_PHYS */
    32 #define VMA_FIXED           0x00000400  /* VMDHA_FIXED and OB_SHARED */
     43#define VMA_RESIDENT        0x00000080UL  /* OB_RESIDENT */
     44#define VMA_ZEROINIT        0x00000100UL  /* OB_ZEROINIT */
     45#define VMA_PHYS            0x00000200UL  /* VMDHA_PHYS */
     46#define VMA_FIXED           0x00000400UL  /* VMDHA_FIXED and OB_SHARED */
    3347#else
    34 #define VMA_ZEROFILL        0x00000080
    35 #define VMA_SWAPONWRITE     0x00000100
    36 #define VMA_UVIRT           0x00000200  /* VMDHA_PHYS */
    37 #define VMA_RESIDENT        0x00000400  /* VMDHA_FIXED and OB_SHARED */
     48#define VMA_ZEROFILL        0x00000080UL
     49#define VMA_SWAPONWRITE     0x00000100UL
     50#define VMA_UVIRT           0x00000200UL  /* VMDHA_PHYS */
     51#define VMA_RESIDENT        0x00000400UL  /* VMDHA_FIXED and OB_SHARED */
    3852#endif
    39 #define VMA_DISCARDABLE     0x00000800  /* discarable object */
    40 #define VMA_SHARE           0x00001000  /* OBJSHARE and OBJEXEC (which implies shared) */
    41 #define VMA_PROTECTED       0x00004000  /* PAG_PROTECTED */
    42 #define VMA_LOWMEM2         0x00010000  /* OB_LOWMEM */
    43 #define VMA_VDM             0x00040000  /* VDM */
    44 #define VMA_DECOMMIT        0x00080000  /* PAG_DECOMMIT */
    45 #define VMA_TILE            0x00400000  /* OBJ_TILE */
    46 #define VMA_SELALLOC        0x00400000  /* Allocates selector */
    47 #define VMA_SHRINKABLE      0x00800000  /* OB_SHRINKABLE */
    48 #define VMA_HUGH            0x01000000  /* OB_HUGH */
     53#define VMA_DISCARDABLE     0x00000800UL  /* discarable object */
     54#define VMA_SHARE           0x00001000UL  /* OBJSHARE and OBJEXEC (which implies shared) */
     55#define VMA_PROTECTED       0x00004000UL  /* PAG_PROTECTED */
     56#define VMA_LOWMEM2         0x00010000UL  /* OB_LOWMEM */
     57#define VMA_VDM             0x00040000UL  /* (VPMVMAC_VDM)    VDM allocation */
     58#define VMA_DECOMMIT        0x00080000UL  /* PAG_DECOMMIT */
     59#define VMA_TILE            0x00400000UL  /* OBJ_TILE */
     60#define VMA_SELALLOC        0x00400000UL  /* Allocates selector */
     61#define VMA_SHRINKABLE      0x00800000UL  /* OB_SHRINKABLE */
     62#define VMA_HUGH            0x01000000UL  /* OB_HUGH */
    4963
    50 #define VMA_ARENASHARED     0x04000000  /* Shared Arena */
    51 #define VMA_ARENASYSTEM     0x00000000  /* System Arena */
    52 #define VMA_ARENAPRIVATE    0x02000000  /* Private Arena */
    53 #define VMA_ARENAHEAP       0x06000000  /* Heap Arena */
    54 #define VMA_ARENAHIGHA      0x00008000  /* High shared arena (Warp >= fp13) */
     64#define VMA_ARENASHARED     0x04000000UL  /* Shared Arena */
     65#define VMA_ARENASYSTEM     0x00000000UL  /* System Arena */
     66#define VMA_ARENAPRIVATE    0x02000000UL  /* (VPMVMAC_ARENAPRV) Private Arena */
     67#define VMA_ARENAHEAP       0x06000000UL  /* Heap Arena */
     68#define VMA_ARENAHIGHA      0x00008000UL  /* High shared arena (Warp >= fp13) */
    5569#define VMA_ARENAHIGH   (options.ulBuild >= MERLINFP13 ? VMA_ARENAHIGHA : 0UL)
    56 #define VMA_ARENAMASKW      0x06000000  /* Warp < fp13 Arena Mask */
    57 #define VMA_ARENAMASKA      0x06008000  /* Aurora Arena Mask */
     70#define VMA_ARENAMASKW      0x06000000UL  /* Warp < fp13 Arena Mask */
     71#define VMA_ARENAMASKA      0x06008000UL  /* Aurora Arena Mask */
    5872#define VMA_ARENAMASK   (options.ulBuild >= MERLINFP13 ? VMA_ARENAMASKA : VMA_ARENAMASKW)
    5973
    60 #define VMA_LOCMASK         0xC0000000  /* Location mask */
    61 #define VMA_LOCSPECIFIC     0x80000000  /* Specific location */
    62 #define VMA_LOCABOVE        0x40000000  /* Above or equal to specified location */
    63 #define VMA_LOCANY          0x00000000  /* Anywhere */
     74#define VMA_ALIGNPAGE       0x18000000UL  /* (VPMVMAC_ALIGNPAGE)      Page alignment */
     75
     76#define VMA_LOCMASK         0xC0000000UL  /* Location mask */
     77#define VMA_LOCSPECIFIC     0x80000000UL  /* (VPMVMAC_LOCSPECIFIC)    Specific location */
     78#define VMA_LOCABOVE        0x40000000UL  /* (VPMVMAC_LOCABOVE)       Above or equal to specified location */
     79#define VMA_LOCANY          0x00000000UL  /* Anywhere */
    6480
    6581
     
    6884 * VMAlloc flFlags2 guessings
    6985 */
    70 #define VMAF2_WRITE         0x00000002 /* PAG_WRITE */
     86#if 0 /*???*/
     87#define VDHAM_FIXED         0x0000UL
     88#define VDHAM_SWAPPABLE     0x0001UL
     89#define VPMVMFM_VDM         0x00000004UL  /* Request on behalf of VDM */
     90#endif
     91
     92#define VMAF2_WRITE         0x00000002UL  /* PAG_WRITE */
     93
    7194
    7295
  • trunk/src/win32k/include/test.h

    r4164 r4227  
    1 /* $Id: test.h,v 1.2 2000-09-02 21:08:04 bird Exp $
     1/* $Id: test.h,v 1.3 2000-09-08 21:34:11 bird Exp $
    22 *
    33 * Definitions and declarations for test moduls.
     
    4545    PVOID   pvPTDA
    4646    );
     47ULONG LDRCALL fakeldrSetVMflags(
     48    PMTE        pMTE,
     49    ULONG       flObj,
     50    PULONG      pflFlags1,
     51    PULONG      pflFlags2
     52    );
     53
    4754APIRET KRNLCALL fakeIOSftOpen(
    4855    PSZ pszFilename,
  • trunk/src/win32k/ldr/calltab.asm

    r4164 r4227  
    1 ; $Id: calltab.asm,v 1.13 2000-09-02 21:08:06 bird Exp $
     1; $Id: calltab.asm,v 1.14 2000-09-08 21:34:12 bird Exp $
    22;
    33; callTab - Call back again table - table with entry for each function or
     
    359359SecPathFromSFN ENDP
    360360
     361; 42
     362_ldrSetVMflags@16 PROC NEAR
     363    db MAXSIZE_PROLOG dup(0cch)
     364_ldrSetVMflags@16 ENDP
    361365
    362366CALLTAB ENDS
  • trunk/src/win32k/test/fake.c

    r4164 r4227  
    1 /* $Id: fake.c,v 1.2 2000-09-02 21:08:20 bird Exp $
     1/* $Id: fake.c,v 1.3 2000-09-08 21:34:12 bird Exp $
    22 *
    33 * Fake stubs for the ldr and kernel functions we imports or overloads.
     
    313313
    314314    return NO_ERROR;
     315}
     316
     317
     318/**
     319 * Sets the VM flags for an executable object.
     320 * @returns     void
     321 * @param       pMTE        Pointer to the module table entry.
     322 * @param       flObj       LX Object flags.
     323 * @param       pflFlags1   Pointer to the flFlags1 of VMAllocMem (out).
     324 * @param       pflFlags2   Pointer to the flFlags2 of VMAllocMem (out).
     325 */
     326ULONG LDRCALL fakeldrSetVMflags(
     327    PMTE        pMTE,
     328    ULONG       flObj,
     329    PULONG      pflFlags1,
     330    PULONG      pflFlags2
     331    )
     332{
     333    *pflFlags1 = 0;
     334    *pflFlags2 = 0;
     335    flObj = flObj;
     336    pMTE = pMTE;
    315337}
    316338
Note: See TracChangeset for help on using the changeset viewer.