mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Further fixes
svn path=/trunk/; revision=1730
This commit is contained in:
parent
c2d9004a56
commit
99a644a366
8 changed files with 56 additions and 47 deletions
|
@ -2,5 +2,5 @@ file ntoskrnl/ntoskrnl.nostrip.exe
|
|||
#add-symbol-file lib/ntdll/ntdll.dll 0x77f61000
|
||||
#add-symbol-file apps/exp/exp.exe 0x401000
|
||||
#add-symbol-file subsys/csrss/csrss.exe 0x401000
|
||||
add-symbol-file subsys/smss/smss.exe 0x401000
|
||||
#add-symbol-file subsys/smss/smss.exe 0x401000
|
||||
break exp.c:254
|
||||
|
|
|
@ -55,3 +55,5 @@ int main (void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -121,10 +121,14 @@ VOID VGAResetDevice(OUT PSTATUS_BLOCK StatusBlock)
|
|||
OBJECT_ATTRIBUTES Attr;
|
||||
UNICODE_STRING Name;
|
||||
NTSTATUS Status;
|
||||
VIDEO_X86_BIOS_ARGUMENTS vxba;
|
||||
VP_STATUS vps;
|
||||
|
||||
CHECKPOINT;
|
||||
Event = 0;
|
||||
setMode( Mode3 );
|
||||
// setMode( Mode3 );
|
||||
vxba.Eax = 0x0003;
|
||||
vps = VideoPortInt10(NULL, &vxba);
|
||||
RtlInitUnicodeString( &Name, L"\\TextConsoleRefreshEvent" );
|
||||
InitializeObjectAttributes( &Attr, &Name, 0, 0, 0 );
|
||||
Status = NtOpenEvent( &Event, STANDARD_RIGHTS_ALL, &Attr );
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: Makefile,v 1.25 2001/03/18 19:35:12 dwelch Exp $
|
||||
# $Id: Makefile,v 1.26 2001/03/25 18:56:12 dwelch Exp $
|
||||
#
|
||||
# ReactOS Operating System
|
||||
#
|
||||
|
@ -17,9 +17,10 @@ OBJECTS_PATH = objects
|
|||
|
||||
ASFLAGS = -Iinclude
|
||||
CFLAGS = -Iinclude -D__NTOSKRNL__ -DDBG -g -Wall -Werror
|
||||
# -DDBGPRINT_FILE_LOG
|
||||
# -W -Wpointer-arith -Wconversion -Wstrict-prototypes -Wundef \
|
||||
# -Wmissing-prototypes -Wshadow\
|
||||
#CFLAGS += -DDBGPRINT_FILE_LOG
|
||||
#CFLAGS = -DDBGPRINT_FILE_LOG
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: dlog.c,v 1.1 2001/02/16 18:32:20 dwelch Exp $
|
||||
/* $Id: dlog.c,v 1.2 2001/03/25 18:56:12 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -25,6 +25,7 @@
|
|||
static CHAR DebugLog[DEBUGLOG_SIZE];
|
||||
static ULONG DebugLogStart;
|
||||
static ULONG DebugLogEnd;
|
||||
static ULONG DebugLogCount;
|
||||
static KSPIN_LOCK DebugLogLock;
|
||||
static ULONG DebugLogOverflow;
|
||||
static HANDLE DebugLogThreadHandle;
|
||||
|
@ -42,9 +43,10 @@ VOID
|
|||
DebugLogInit(VOID)
|
||||
{
|
||||
KeInitializeSpinLock(&DebugLogLock);
|
||||
DebugLogStart = -1;
|
||||
DebugLogStart = 0;
|
||||
DebugLogEnd = 0;
|
||||
DebugLogOverflow = 0;
|
||||
DebugLogCount = 0;
|
||||
KeInitializeSemaphore(&DebugLogSem, 0, 255);
|
||||
}
|
||||
|
||||
|
@ -53,7 +55,7 @@ DebugLogThreadMain(PVOID Context)
|
|||
{
|
||||
KIRQL oldIrql;
|
||||
IO_STATUS_BLOCK Iosb;
|
||||
CHAR Buffer[256];
|
||||
static CHAR Buffer[256];
|
||||
ULONG WLen;
|
||||
|
||||
for (;;)
|
||||
|
@ -64,7 +66,7 @@ DebugLogThreadMain(PVOID Context)
|
|||
FALSE,
|
||||
NULL);
|
||||
KeAcquireSpinLock(&DebugLogLock, &oldIrql);
|
||||
while (DebugLogStart != -1)
|
||||
while (DebugLogCount > 0)
|
||||
{
|
||||
if (DebugLogStart > DebugLogEnd)
|
||||
{
|
||||
|
@ -72,10 +74,7 @@ DebugLogThreadMain(PVOID Context)
|
|||
memcpy(Buffer, &DebugLog[DebugLogStart], WLen);
|
||||
DebugLogStart =
|
||||
(DebugLogStart + WLen) % DEBUGLOG_SIZE;
|
||||
if (DebugLogStart == DebugLogEnd)
|
||||
{
|
||||
DebugLogStart = -1;
|
||||
}
|
||||
DebugLogCount = DebugLogCount - WLen;
|
||||
KeReleaseSpinLock(&DebugLogLock, oldIrql);
|
||||
NtWriteFile(DebugLogFile,
|
||||
NULL,
|
||||
|
@ -93,10 +92,7 @@ DebugLogThreadMain(PVOID Context)
|
|||
memcpy(Buffer, &DebugLog[DebugLogStart], WLen);
|
||||
DebugLogStart =
|
||||
(DebugLogStart + WLen) % DEBUGLOG_SIZE;
|
||||
if (DebugLogStart == DebugLogEnd)
|
||||
{
|
||||
DebugLogStart = -1;
|
||||
}
|
||||
DebugLogCount = DebugLogCount - WLen;
|
||||
KeReleaseSpinLock(&DebugLogLock, oldIrql);
|
||||
NtWriteFile(DebugLogFile,
|
||||
NULL,
|
||||
|
@ -168,34 +164,40 @@ DebugLogInit2(VOID)
|
|||
|
||||
KeAcquireSpinLock(&DebugLogLock, &oldIrql);
|
||||
|
||||
if (DebugLogEnd == DebugLogStart)
|
||||
if (DebugLogCount == DEBUGLOG_SIZE)
|
||||
{
|
||||
DebugLogOverflow++;
|
||||
KeReleaseSpinLock(&DebugLogLock, oldIrql);
|
||||
KeReleaseSemaphore(&DebugLogSem, IO_NO_INCREMENT, 1, FALSE);
|
||||
if (oldIrql < DISPATCH_LEVEL)
|
||||
{
|
||||
KeReleaseSemaphore(&DebugLogSem, IO_NO_INCREMENT, 1, FALSE);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (DebugLogStart == -1)
|
||||
{
|
||||
DebugLogStart = DebugLogEnd;
|
||||
}
|
||||
|
||||
while ((*String) != 0)
|
||||
{
|
||||
DebugLog[DebugLogEnd] = *String;
|
||||
String++;
|
||||
if (((DebugLogEnd + 1) % DEBUGLOG_SIZE) == DebugLogStart)
|
||||
DebugLogCount++;
|
||||
if (DebugLogCount == DEBUGLOG_SIZE)
|
||||
{
|
||||
DebugLogOverflow++;
|
||||
KeReleaseSpinLock(&DebugLogLock, oldIrql);
|
||||
KeReleaseSemaphore(&DebugLogSem, IO_NO_INCREMENT, 1, FALSE);
|
||||
if (oldIrql < DISPATCH_LEVEL)
|
||||
{
|
||||
KeReleaseSemaphore(&DebugLogSem, IO_NO_INCREMENT, 1, FALSE);
|
||||
}
|
||||
return;
|
||||
}
|
||||
DebugLogEnd = (DebugLogEnd + 1) % DEBUGLOG_SIZE;
|
||||
}
|
||||
|
||||
KeReleaseSpinLock(&DebugLogLock, oldIrql);
|
||||
KeReleaseSemaphore(&DebugLogSem, IO_NO_INCREMENT, 1, FALSE);
|
||||
if (oldIrql < DISPATCH_LEVEL)
|
||||
{
|
||||
KeReleaseSemaphore(&DebugLogSem, IO_NO_INCREMENT, 1, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
#else /* not DBGPRINT_FILE_LOG */
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <internal/i386/segment.h>
|
||||
#include <string.h>
|
||||
|
||||
#define NDEBUG
|
||||
//#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
/* GLOBALS *******************************************************************/
|
||||
|
@ -51,8 +51,8 @@ KeV86GPF(PKV86M_TRAP_FRAME VTf, PKTRAP_FRAME Tf)
|
|||
ip = (PUCHAR)((Tf->Cs & 0xFFFF) * 16 + (Tf->Eip & 0xFFFF));
|
||||
sp = (PUSHORT)((Tf->Ss & 0xFFFF) * 16 + (Tf->Esp & 0xFFFF));
|
||||
|
||||
DPRINT("KeV86GPF handling %x at %x:%x ss:sp %x:%x\n",
|
||||
ip[0], Tf->Cs, Tf->Eip, Tf->Ss, Tf->Esp);
|
||||
DPRINT("KeV86GPF handling %x at %x:%x ss:sp %x:%x Flags %x\n",
|
||||
ip[0], Tf->Cs, Tf->Eip, Tf->Ss, Tf->Esp, VTf->regs->Flags);
|
||||
|
||||
switch (ip[0])
|
||||
{
|
||||
|
|
|
@ -71,7 +71,19 @@ _Ki386RetToV86Mode:
|
|||
* Since we are going to fiddle with the stack pointer this must be
|
||||
* a critical section for this processor
|
||||
*/
|
||||
|
||||
/*
|
||||
* Save the old initial stack
|
||||
*/
|
||||
movl _CurrentThread, %esi
|
||||
movl KTHREAD_INITIAL_STACK(%esi), %edi
|
||||
pushl %edi
|
||||
|
||||
/*
|
||||
* We also need to set the stack in the kthread structure
|
||||
*/
|
||||
movl %esp, KTHREAD_INITIAL_STACK(%esi)
|
||||
|
||||
/*
|
||||
* The stack used for handling exceptions from v86 mode in this thread
|
||||
* will be the current stack adjusted so we don't overwrite the
|
||||
|
@ -79,18 +91,6 @@ _Ki386RetToV86Mode:
|
|||
*/
|
||||
movl $_KiTss, %esi
|
||||
movl %esp, KTSS_ESP0(%esi)
|
||||
|
||||
/*
|
||||
* We also need to set the stack in the kthread structure
|
||||
*/
|
||||
movl _CurrentThread, %esi
|
||||
movl KTHREAD_INITIAL_STACK(%esi), %edi
|
||||
movl %esp, KTHREAD_INITIAL_STACK(%esi)
|
||||
|
||||
/*
|
||||
* Save the old initial stack
|
||||
*/
|
||||
pushl %edi
|
||||
|
||||
/*
|
||||
* Create the stack frame for an iret to v86 mode
|
||||
|
|
|
@ -366,17 +366,17 @@ W32kTextOut(HDC hDC,
|
|||
{
|
||||
DC *dc = DC_HandleToPtr(hDC);
|
||||
SURFOBJ *SurfObj = AccessUserObject(dc->Surface);
|
||||
PUNICODE_STRING UString;
|
||||
PANSI_STRING AString;
|
||||
UNICODE_STRING UString;
|
||||
ANSI_STRING AString;
|
||||
|
||||
RtlCreateUnicodeString(UString, (PWSTR)String);
|
||||
RtlUnicodeStringToAnsiString(AString, UString, TRUE);
|
||||
RtlCreateUnicodeString(&UString, (PWSTR)String);
|
||||
RtlUnicodeStringToAnsiString(&AString, &UString, TRUE);
|
||||
|
||||
// For now we're just going to use an internal font
|
||||
grWriteCellString(SurfObj, XStart, YStart, AString->Buffer, 0xffffff);
|
||||
grWriteCellString(SurfObj, XStart, YStart, AString.Buffer, 0xffffff);
|
||||
|
||||
RtlFreeAnsiString(AString);
|
||||
RtlFreeUnicodeString(UString);
|
||||
RtlFreeAnsiString(&AString);
|
||||
RtlFreeUnicodeString(&UString);
|
||||
}
|
||||
|
||||
UINT
|
||||
|
|
Loading…
Reference in a new issue