Implemented Int 0x15/0xc0: BIOS - GET CONFIG and some other BIOS

data.
This commit is contained in:
Andreas Mohr 1999-01-24 09:32:10 +00:00 committed by Alexandre Julliard
parent 94e4485bff
commit a7894d9311
5 changed files with 47 additions and 12 deletions

View File

@ -15,7 +15,9 @@
extern int DOSCONF_ReadConfig(void);
/* msdos/dosmem.c */
extern HANDLE16 DOSMEM_BiosSeg;
extern HANDLE16 DOSMEM_BiosDataSeg;
extern HANDLE16 DOSMEM_BiosSysSeg;
extern DWORD DOSMEM_CollateTable;
extern DWORD DOSMEM_ErrorCall;

View File

@ -138,9 +138,9 @@ BOOL32 WINAPI MAIN_KernelInit(HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvR
SET_ENTRY_POINT( 195, 0xc0000 ); /* KERNEL.195: __C000H */
SET_ENTRY_POINT( 179, 0xd0000 ); /* KERNEL.179: __D000H */
SET_ENTRY_POINT( 190, 0xe0000 ); /* KERNEL.190: __E000H */
SET_ENTRY_POINT( 173, 0xf0000 ); /* KERNEL.173: __ROMBIOS */
SET_ENTRY_POINT( 194, 0xf0000 ); /* KERNEL.194: __F000H */
NE_SetEntryPoint( hModule, 193, DOSMEM_BiosSeg ); /* KERNEL.193: __0040H */
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 */
#undef SET_ENTRY_POINT
}

View File

@ -65,7 +65,7 @@ static BOOL32 INSTR_ReplaceSelector( SIGCONTEXT *context, WORD *sel )
static WORD sys_timer = 0;
if (!sys_timer)
sys_timer = CreateSystemTimer( 55, DOSMEM_Tick );
*sel = DOSMEM_BiosSeg;
*sel = DOSMEM_BiosDataSeg;
return TRUE;
}
return FALSE; /* Can't replace selector, crashdump */

View File

@ -18,7 +18,8 @@
#include "task.h"
#include "debug.h"
HANDLE16 DOSMEM_BiosSeg; /* BIOS data segment at 0x40:0 */
HANDLE16 DOSMEM_BiosDataSeg; /* BIOS data segment at 0x40:0 */
HANDLE16 DOSMEM_BiosSysSeg; /* BIOS ROM segment at 0xf000:0 */
#pragma pack(1)
@ -199,13 +200,16 @@ static void DOSMEM_InitDPMI(void)
}
/***********************************************************************
* DOSMEM_FillBiosSegment
* DOSMEM_FillBiosSegments
*
* Fill the BIOS data segment with dummy values.
*/
static void DOSMEM_FillBiosSegment(void)
static void DOSMEM_FillBiosSegments(void)
{
pBiosData = (BIOSDATA *)GlobalLock16( DOSMEM_BiosSeg );
BYTE *pBiosSys = (BYTE *)GlobalLock16( DOSMEM_BiosSysSeg );
BYTE *pBiosROMTable = pBiosSys+0xe6f5;
pBiosData = (BIOSDATA *)GlobalLock16( DOSMEM_BiosDataSeg );
/* Clear all unused values */
memset( pBiosData, 0, sizeof(*pBiosData) );
@ -229,6 +233,23 @@ static void DOSMEM_FillBiosSegment(void)
pBiosData->NbHardDisks = 2;
pBiosData->KbdBufferStart = 0x1e;
pBiosData->KbdBufferEnd = 0x3e;
/* fill ROM configuration table (values from Award) */
*(WORD *)(pBiosROMTable)= 0x08; /* number of bytes following */
*(pBiosROMTable+0x2) = 0xfc; /* model */
*(pBiosROMTable+0x3) = 0x01; /* submodel */
*(pBiosROMTable+0x4) = 0x00; /* BIOS revision */
*(pBiosROMTable+0x5) = 0x74; /* feature byte 1 */
*(pBiosROMTable+0x6) = 0x00; /* feature byte 2 */
*(pBiosROMTable+0x7) = 0x00; /* feature byte 3 */
*(pBiosROMTable+0x8) = 0x00; /* feature byte 4 */
*(pBiosROMTable+0x9) = 0x00; /* feature byte 5 */
/* BIOS date string */
strcpy((char *)pBiosSys+0xfff5, "13/01/99");
/* BIOS ID */
*(pBiosSys+0xfffe) = 0xfc;
}
/***********************************************************************
@ -353,10 +374,12 @@ BOOL32 DOSMEM_Init(HMODULE16 hModule)
WARN(dosmem, "Could not allocate DOS memory.\n" );
return FALSE;
}
DOSMEM_BiosSeg = GLOBAL_CreateBlock(GMEM_FIXED,DOSMEM_dosmem+0x400,0x100,
0, FALSE, FALSE, FALSE, NULL );
DOSMEM_BiosDataSeg = GLOBAL_CreateBlock(GMEM_FIXED,DOSMEM_dosmem+0x400,
0x100, 0, FALSE, FALSE, FALSE, NULL );
DOSMEM_BiosSysSeg = GLOBAL_CreateBlock(GMEM_FIXED,DOSMEM_dosmem+0xf0000,
0x10000, 0, FALSE, FALSE, FALSE, NULL );
DOSMEM_FillIsrTable(0);
DOSMEM_FillBiosSegment();
DOSMEM_FillBiosSegments();
DOSMEM_InitMemory(0);
DOSMEM_InitCollateTable();
DOSMEM_InitErrorTable();

View File

@ -21,6 +21,16 @@ void WINAPI INT_Int15Handler( CONTEXT *context )
RESET_CFLAG(context);
break;
case 0xc0: /* GET CONFIGURATION */
if (ISV86(context)) /* real */
ES_reg(context) = 0xf000;
else
ES_reg(context) = DOSMEM_BiosSysSeg;
BX_reg(context) = 0xe6f5;
AH_reg(context) = 0x0;
RESET_CFLAG(context);
break;
default:
INT_BARF( context, 0x15 );
}