Commit 80fc23a9 authored by Alexandre Julliard's avatar Alexandre Julliard

Set selector 0000H base to 0xf0000 until the first 64K are

unprotected.
parent 353962d5
......@@ -57,13 +57,13 @@ static BOOL process_attach(void)
DOSMEM_MapDosToLinear(addr), 0x10000, hModule, \
FALSE, FALSE, FALSE ))
SET_ENTRY_POINT( 183, 0x00000 ); /* KERNEL.183: __0000H */
SET_ENTRY_POINT( 174, 0xa0000 ); /* KERNEL.174: __A000H */
SET_ENTRY_POINT( 181, 0xb0000 ); /* KERNEL.181: __B000H */
SET_ENTRY_POINT( 182, 0xb8000 ); /* KERNEL.182: __B800H */
SET_ENTRY_POINT( 195, 0xc0000 ); /* KERNEL.195: __C000H */
SET_ENTRY_POINT( 179, 0xd0000 ); /* KERNEL.179: __D000H */
SET_ENTRY_POINT( 190, 0xe0000 ); /* KERNEL.190: __E000H */
NE_SetEntryPoint( hModule, 183, DOSMEM_0000H ); /* KERNEL.183: __0000H */
NE_SetEntryPoint( hModule, 173, DOSMEM_BiosSysSeg ); /* KERNEL.173: __ROMBIOS */
NE_SetEntryPoint( hModule, 193, DOSMEM_BiosDataSeg ); /* KERNEL.193: __0040H */
NE_SetEntryPoint( hModule, 194, DOSMEM_BiosSysSeg ); /* KERNEL.194: __F000H */
......
......@@ -122,6 +122,7 @@ typedef struct
#include "poppack.h"
extern WORD DOSMEM_0000H;
extern WORD DOSMEM_BiosDataSeg;
extern WORD DOSMEM_BiosSysSeg;
extern BIOSDATA * DOSMEM_BiosData();
......
......@@ -28,8 +28,9 @@
DEFAULT_DEBUG_CHANNEL(dosmem);
DECLARE_DEBUG_CHANNEL(selector);
HANDLE16 DOSMEM_BiosDataSeg; /* BIOS data segment at 0x40:0 */
HANDLE16 DOSMEM_BiosSysSeg; /* BIOS ROM segment at 0xf000:0 */
WORD DOSMEM_0000H; /* segment at 0:0 */
WORD DOSMEM_BiosDataSeg; /* BIOS data segment at 0x40:0 */
WORD DOSMEM_BiosSysSeg; /* BIOS ROM segment at 0xf000:0 */
DWORD DOSMEM_CollateTable;
......@@ -484,6 +485,8 @@ BOOL DOSMEM_Init(BOOL dos_init)
{
setup_dos_mem( dos_init );
DOSMEM_0000H = GLOBAL_CreateBlock( GMEM_FIXED, DOSMEM_biosdata - 0x400,
0x10000, 0, FALSE, FALSE, FALSE );
DOSMEM_BiosDataSeg = GLOBAL_CreateBlock(GMEM_FIXED,DOSMEM_biosdata,
0x100, 0, FALSE, FALSE, FALSE );
DOSMEM_BiosSysSeg = GLOBAL_CreateBlock(GMEM_FIXED,DOSMEM_dosmem+0xf0000,
......@@ -509,6 +512,7 @@ BOOL DOSMEM_Init(BOOL dos_init)
/* copy the BIOS area down to 0x400 */
memcpy( DOSMEM_dosmem + 0x400, DOSMEM_biosdata, 0x100 );
DOSMEM_biosdata = DOSMEM_dosmem + 0x400;
SetSelectorBase( DOSMEM_0000H, 0 );
SetSelectorBase( DOSMEM_BiosDataSeg, 0x400 );
}
/* interrupt table is at addr 0, so only do this when setting up DOS mode */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment