You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(64) |
Oct
(438) |
Nov
(183) |
Dec
|
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
(132) |
May
(466) |
Jun
(366) |
Jul
(392) |
Aug
(31) |
Sep
(18) |
Oct
|
Nov
|
Dec
|
|
From: <pos...@ne...> - 2002-05-08 20:18:38
|
¾È³çÇϽʴϱî? ¼ö½ÅÀÚ: genius123@netsgo.comÀÇ ¸ÞÀÏ ÁÖ¼Ò°¡ Á¤È®ÇÏÁö ¾Ê¾Æ ¸ÞÀÏÀ» º¸³¾ ¼ö ¾ø½À´Ï´Ù. ¸ÞÀÏ ÁÖ¼Ò¸¦ È®ÀÎÇϽŠÈÄ ´Ù½Ã º¸³»½Ã±â ¹Ù¶ø´Ï´Ù. °í¸¿½À´Ï´Ù. ------------------------------------------------------------------------ Receiver:gen...@ne... No such user |
|
From: <pos...@ne...> - 2002-05-08 20:17:26
|
¾È³çÇϽʴϱî? ¼ö½ÅÀÚ: genius123@netsgo.comÀÇ ¸ÞÀÏ ÁÖ¼Ò°¡ Á¤È®ÇÏÁö ¾Ê¾Æ ¸ÞÀÏÀ» º¸³¾ ¼ö ¾ø½À´Ï´Ù. ¸ÞÀÏ ÁÖ¼Ò¸¦ È®ÀÎÇϽŠÈÄ ´Ù½Ã º¸³»½Ã±â ¹Ù¶ø´Ï´Ù. °í¸¿½À´Ï´Ù. ------------------------------------------------------------------------ Receiver:gen...@ne... No such user |
|
From: <pos...@ne...> - 2002-05-08 20:14:04
|
¾È³çÇϽʴϱî? ¼ö½ÅÀÚ: genius123@netsgo.comÀÇ ¸ÞÀÏ ÁÖ¼Ò°¡ Á¤È®ÇÏÁö ¾Ê¾Æ ¸ÞÀÏÀ» º¸³¾ ¼ö ¾ø½À´Ï´Ù. ¸ÞÀÏ ÁÖ¼Ò¸¦ È®ÀÎÇϽŠÈÄ ´Ù½Ã º¸³»½Ã±â ¹Ù¶ø´Ï´Ù. °í¸¿½À´Ï´Ù. ------------------------------------------------------------------------ Receiver:gen...@ne... No such user |
|
From: <pos...@ne...> - 2002-05-08 20:12:44
|
¾È³çÇϽʴϱî? ¼ö½ÅÀÚ: genius123@netsgo.comÀÇ ¸ÞÀÏ ÁÖ¼Ò°¡ Á¤È®ÇÏÁö ¾Ê¾Æ ¸ÞÀÏÀ» º¸³¾ ¼ö ¾ø½À´Ï´Ù. ¸ÞÀÏ ÁÖ¼Ò¸¦ È®ÀÎÇϽŠÈÄ ´Ù½Ã º¸³»½Ã±â ¹Ù¶ø´Ï´Ù. °í¸¿½À´Ï´Ù. ------------------------------------------------------------------------ Receiver:gen...@ne... No such user |
|
From: <pos...@ne...> - 2002-05-08 20:08:59
|
¾È³çÇϽʴϱî? ¼ö½ÅÀÚ: genius123@netsgo.comÀÇ ¸ÞÀÏ ÁÖ¼Ò°¡ Á¤È®ÇÏÁö ¾Ê¾Æ ¸ÞÀÏÀ» º¸³¾ ¼ö ¾ø½À´Ï´Ù. ¸ÞÀÏ ÁÖ¼Ò¸¦ È®ÀÎÇϽŠÈÄ ´Ù½Ã º¸³»½Ã±â ¹Ù¶ø´Ï´Ù. °í¸¿½À´Ï´Ù. ------------------------------------------------------------------------ Receiver:gen...@ne... No such user |
|
From: <pos...@ne...> - 2002-05-08 20:08:51
|
¾È³çÇϽʴϱî? ¼ö½ÅÀÚ: genius123@netsgo.comÀÇ ¸ÞÀÏ ÁÖ¼Ò°¡ Á¤È®ÇÏÁö ¾Ê¾Æ ¸ÞÀÏÀ» º¸³¾ ¼ö ¾ø½À´Ï´Ù. ¸ÞÀÏ ÁÖ¼Ò¸¦ È®ÀÎÇϽŠÈÄ ´Ù½Ã º¸³»½Ã±â ¹Ù¶ø´Ï´Ù. °í¸¿½À´Ï´Ù. ------------------------------------------------------------------------ Receiver:gen...@ne... No such user |
|
From: <pos...@ne...> - 2002-05-08 20:01:00
|
¾È³çÇϽʴϱî? ¼ö½ÅÀÚ: genius123@netsgo.comÀÇ ¸ÞÀÏ ÁÖ¼Ò°¡ Á¤È®ÇÏÁö ¾Ê¾Æ ¸ÞÀÏÀ» º¸³¾ ¼ö ¾ø½À´Ï´Ù. ¸ÞÀÏ ÁÖ¼Ò¸¦ È®ÀÎÇϽŠÈÄ ´Ù½Ã º¸³»½Ã±â ¹Ù¶ø´Ï´Ù. °í¸¿½À´Ï´Ù. ------------------------------------------------------------------------ Receiver:gen...@ne... No such user |
|
From: <pos...@ne...> - 2002-05-08 19:39:28
|
¾È³çÇϽʴϱî? ¼ö½ÅÀÚ: genius123@netsgo.comÀÇ ¸ÞÀÏ ÁÖ¼Ò°¡ Á¤È®ÇÏÁö ¾Ê¾Æ ¸ÞÀÏÀ» º¸³¾ ¼ö ¾ø½À´Ï´Ù. ¸ÞÀÏ ÁÖ¼Ò¸¦ È®ÀÎÇϽŠÈÄ ´Ù½Ã º¸³»½Ã±â ¹Ù¶ø´Ï´Ù. °í¸¿½À´Ï´Ù. ------------------------------------------------------------------------ Receiver:gen...@ne... No such user |
|
From: <pos...@ne...> - 2002-05-08 19:38:58
|
¾È³çÇϽʴϱî? ¼ö½ÅÀÚ: genius123@netsgo.comÀÇ ¸ÞÀÏ ÁÖ¼Ò°¡ Á¤È®ÇÏÁö ¾Ê¾Æ ¸ÞÀÏÀ» º¸³¾ ¼ö ¾ø½À´Ï´Ù. ¸ÞÀÏ ÁÖ¼Ò¸¦ È®ÀÎÇϽŠÈÄ ´Ù½Ã º¸³»½Ã±â ¹Ù¶ø´Ï´Ù. °í¸¿½À´Ï´Ù. ------------------------------------------------------------------------ Receiver:gen...@ne... No such user |
|
From: <pos...@ne...> - 2002-05-08 19:35:26
|
¾È³çÇϽʴϱî? ¼ö½ÅÀÚ: genius123@netsgo.comÀÇ ¸ÞÀÏ ÁÖ¼Ò°¡ Á¤È®ÇÏÁö ¾Ê¾Æ ¸ÞÀÏÀ» º¸³¾ ¼ö ¾ø½À´Ï´Ù. ¸ÞÀÏ ÁÖ¼Ò¸¦ È®ÀÎÇϽŠÈÄ ´Ù½Ã º¸³»½Ã±â ¹Ù¶ø´Ï´Ù. °í¸¿½À´Ï´Ù. ------------------------------------------------------------------------ Receiver:gen...@ne... No such user |
|
From: Phillip S. <ps...@cf...> - 2002-05-08 19:32:55
|
It should not be possible to delete a section while a page is being faulted in from it, because when the section is mapped, the section object should be referenced, thus preventing it from being freed. The fault doesn't need to reference the section, because it is referenced as soon as it is mapped. At 04:16 PM 5/8/2002 +0100, you wrote: >Ok, thanks for the explanation. I don't think this fixes all the problems >of this type: for example MmNotPresentFaultSectionView doesn't even >reference the section so it could be freed by the time it returns after >waiting for the page operation. The fix I was considering was to check for >pending page operations on a unmap/process exit and either wait for them >to complete or abandon freeing section pages that are about to be used in >another process. |
|
From: <pos...@ne...> - 2002-05-08 19:27:46
|
¾È³çÇϽʴϱî? ¼ö½ÅÀÚ: genius123@netsgo.comÀÇ ¸ÞÀÏ ÁÖ¼Ò°¡ Á¤È®ÇÏÁö ¾Ê¾Æ ¸ÞÀÏÀ» º¸³¾ ¼ö ¾ø½À´Ï´Ù. ¸ÞÀÏ ÁÖ¼Ò¸¦ È®ÀÎÇϽŠÈÄ ´Ù½Ã º¸³»½Ã±â ¹Ù¶ø´Ï´Ù. °í¸¿½À´Ï´Ù. ------------------------------------------------------------------------ Receiver:gen...@ne... No such user |
|
From: Jason F. <jas...@ya...> - 2002-05-08 19:00:56
|
Right now I'm talking to Phillip about moving our lists to a server hosted by someone he knows. We could then change the mx record of reactos.com so that we could have ros...@re... again. Although I must say these changes really improve the usability of these lists... so is the consensus that we should stay (and I'll continue work on getting the other lists up on sf) or go (and proceed with changing the mx record)? - Jason --- David Welch <we...@cw...> wrote: > Hi, > > I've set the mailing list to reply to list by default as people > wanted and > also removed the limit on message sizes. > > Rex: Is there any chance of the cvs commit mail messages being > restored > soon? There is a reactos-cvs-commit mailing list set up at > sourceforge for > them to be sent to. > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We > supply > the hardware. You get the recognition. Email Us: > ban...@so... > _______________________________________________ > reactos-kernel mailing list > rea...@li... > https://lists.sourceforge.net/lists/listinfo/reactos-kernel __________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com |
|
From: David W. <we...@cw...> - 2002-05-08 18:41:20
|
Hi, I've set the mailing list to reply to list by default as people wanted and also removed the limit on message sizes. Rex: Is there any chance of the cvs commit mail messages being restored soon? There is a reactos-cvs-commit mailing list set up at sourceforge for them to be sent to. |
|
From: Jason F. <jas...@ya...> - 2002-05-08 18:04:40
|
Hey all I finally imported reactos.org into cvs (cvs co reactos.org). Unfortunately I accidentally imported all my compiled template files too!! If you check it out, remove everything in the templates_c directory (but leave the directory itself there). There's an install.txt, but it's bound to be lacking, so just mail me with any queries. It's very much a work in progress... but give it a spin. - Jason __________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com |
|
From: Casper H. <ch...@us...> - 2002-05-08 17:03:55
|
Made PICE compile with GCC 3.2.
Support multiple debug targets at the same time.
E.g. to use both serial logging on COM1 and GDB remote debugging on COM2
use:
/DEBUGPORT=COM1 /COM2 /DEBUGPORT=GDB
Index: apps/pice/loader/main.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/pice/loader/main.c,v
retrieving revision 1.8
diff -u -p -r1.8 main.c
--- apps/pice/loader/main.c 15 Jan 2002 04:35:13 -0000 1.8
+++ apps/pice/loader/main.c 8 May 2002 16:54:19 -0000
@@ -226,9 +226,11 @@ void process_stabs(
SymbolFileHeader.ulOffsetToSrcFiles = sizeof(PICE_SYMBOLFILE_HEADER)+sectionHeadersSize+nGlobalLen+nGlobalStrLen+nStabLen+nStrLen;
SymbolFileHeader.ulNumberOfSrcFiles = ulCurrentSrcFile;
- printf("sectionHeaderSize: %ld, nGlobalLen: %ld, nGlobalStrLen: %ld, nStabLen: %ld,
- nStrLen: %ld, ulCurrentSrcFile: %ld, ulOffsetToStabs: %ld \n", sectionHeadersSize, nGlobalLen, nGlobalStrLen,
+ printf("sectionHeaderSize: %ld, nGlobalLen: %ld, nGlobalStrLen: %ld, nStabLen: %ld, "
+ "nStrLen: %ld, ulCurrentSrcFile: %ld, ulOffsetToStabs: %ld\n",
+ sectionHeadersSize, nGlobalLen, nGlobalStrLen,
nStabLen, nStrLen, ulCurrentSrcFile, SymbolFileHeader.ulOffsetToStabs);
+
WriteFile(fileout,&SymbolFileHeader,sizeof(PICE_SYMBOLFILE_HEADER),&wrote, NULL);
WriteFile(fileout,section,sectionHeadersSize,&wrote, NULL);
WriteFile(fileout,pGlobals,nGlobalLen,&wrote, NULL);
Index: apps/pice/module/bp.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/pice/module/bp.c,v
retrieving revision 1.5
diff -u -p -r1.5 bp.c
--- apps/pice/module/bp.c 30 Jan 2002 20:42:04 -0000 1.5
+++ apps/pice/module/bp.c 8 May 2002 16:54:19 -0000
@@ -694,11 +694,11 @@ void RevirtualizeBreakpointsForModule(PD
// NewInt3Handler()
//
//*************************************************************************
-__asm__ ("
-NewInt3Handler:
- pushl $" STR(REASON_INT3) "
- // call debugger loop
- jmp NewInt31Handler
+__asm__ ("\n\t \
+NewInt3Handler:\n\t \
+ pushl $" STR(REASON_INT3) "\n\t \
+ // call debugger loop\n\t \
+ jmp NewInt31Handler\n\t \
");
Index: apps/pice/module/dblflt.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/pice/module/dblflt.c,v
retrieving revision 1.3
diff -u -p -r1.3 dblflt.c
--- apps/pice/module/dblflt.c 14 Jan 2002 22:04:08 -0000 1.3
+++ apps/pice/module/dblflt.c 8 May 2002 16:54:19 -0000
@@ -59,31 +59,31 @@ void HandleDoubleFault(FRAME* ptr)
// NewDblFltHandler()
//
//*************************************************************************
-__asm__ ("
-NewDblFltHandler:
- pushfl
- cli
- cld
- pushal
- pushl %ds
-
- // setup default data selectors
- movw %ss,%ax
- movw %ax,%ds
-
- // get frame ptr
- lea 40(%esp),%eax
- pushl %eax
- call _HandleDoubleFault
- addl $4,%esp
-
- popl %ds
- popal
- popfl
- // remove error code from stack and replace with reason code
- movl $" STR(REASON_DOUBLE_FAULT) ",(%esp)
- // call debugger loop
- jmp NewInt31Handler");
+__asm__ (" \
+NewDblFltHandler:\n\t \
+ pushfl\n\t \
+ cli;\n\t \
+ cld;\n\t \
+ pushal;\n\t \
+ pushl %ds;\n\t \
+\n\t \
+ // setup default data selectors\n\t \
+ movw %ss,%ax\n\t \
+ movw %ax,%ds\n\t \
+\n\t \
+ // get frame ptr\n\t \
+ lea 40(%esp),%eax\n\t \
+ pushl %eax\n\t \
+ call _HandleDoubleFault\n\t \
+ addl $4,%esp\n\t \
+\n\t \
+ popl %ds\n\t \
+ popal\n\t \
+ popfl\n\t \
+ // remove error code from stack and replace with reason code\n\t \
+ movl $" STR(REASON_DOUBLE_FAULT) ",(%esp)\n\t \
+ // call debugger loop\n\t \
+ jmp NewInt31Handler\n\t");
//*************************************************************************
Index: apps/pice/module/gpfault.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/pice/module/gpfault.c,v
retrieving revision 1.5
diff -u -p -r1.5 gpfault.c
--- apps/pice/module/gpfault.c 30 Jan 2002 20:42:04 -0000 1.5
+++ apps/pice/module/gpfault.c 8 May 2002 16:54:19 -0000
@@ -59,30 +59,30 @@ void HandleGPFault(FRAME* ptr)
// NewGPFaultHandler()
//
//*************************************************************************
-__asm__ ("
-NewGPFaultHandler:
- pushfl
- cli
- cld
- pushal
- pushl %ds
-
- // setup default data selectors
- movw %ss,%ax
- movw %ax,%ds
-
- // get frame ptr
- lea 40(%esp),%eax
- pushl %eax
- call _HandleGPFault
- addl $4,%esp
-
- popl %ds
- popal
- popfl
- // remove error code from stack and replace with reason code
- movl $" STR(REASON_GP_FAULT) ",(%esp)
- // call debugger loop
+__asm__ ("\n\t \
+NewGPFaultHandler:\n\t \
+ pushfl\n\t \
+ cli\n\t \
+ cld\n\t \
+ pushal\n\t \
+ pushl %ds\n\t \
+\n\t \
+ // setup default data selectors\n\t \
+ movw %ss,%ax\n\t \
+ movw %ax,%ds\n\t \
+\n\t \
+ // get frame ptr\n\t \
+ lea 40(%esp),%eax\n\t \
+ pushl %eax\n\t \
+ call _HandleGPFault\n\t \
+ addl $4,%esp\n\t \
+\n\t \
+ popl %ds\n\t \
+ popal\n\t \
+ popfl\n\t \
+ // remove error code from stack and replace with reason code\n\t \
+ movl $" STR(REASON_GP_FAULT) ",(%esp)\n\t \
+ // call debugger loop\n\t \
jmp NewInt31Handler");
Index: apps/pice/module/init.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/pice/module/init.c,v
retrieving revision 1.7
diff -u -p -r1.7 init.c
--- apps/pice/module/init.c 26 Jan 2002 05:17:45 -0000 1.7
+++ apps/pice/module/init.c 8 May 2002 16:54:20 -0000
@@ -249,9 +249,9 @@ BOOLEAN InitPICE(void)
CurrentEIP = (ULONG)RealIsr;
CurrentDS = CurrentSS = GLOBAL_DATA_SEGMENT;
- __asm__("
- mov %%esp,%%eax
- mov %%eax,_CurrentESP
+ __asm__("\n\t \
+ mov %%esp,%%eax\n\t \
+ mov %%eax,_CurrentESP\n\t \
":::"eax");
@@ -259,13 +259,13 @@ BOOLEAN InitPICE(void)
Ver(NULL);
// disable HW breakpoints
- __asm__("
- xorl %%eax,%%eax
- mov %%eax,%%dr6
- mov %%eax,%%dr7
- mov %%dr0,%%eax
- mov %%dr1,%%eax
- mov %%dr2,%%eax
+ __asm__("\n\t \
+ xorl %%eax,%%eax\n\t \
+ mov %%eax,%%dr6\n\t \
+ mov %%eax,%%dr7\n\t \
+ mov %%dr0,%%eax\n\t \
+ mov %%dr1,%%eax\n\t \
+ mov %%dr2,%%eax\n\t \
mov %%dr3,%%eax"
:::"eax"
);
@@ -290,12 +290,12 @@ BOOLEAN InitPICE(void)
DPRINT((0,"about to do initial break...\n"));
// simulate an initial break
- __asm__("
- pushfl
- pushl %cs
- pushl $initialreturnpoint
- pushl $" STR(REASON_CTRLF) "
- jmp NewInt31Handler
+ __asm__("\n\t \
+ pushfl\n\t \
+ pushl %cs\n\t \
+ pushl $initialreturnpoint\n\t \
+ pushl $" STR(REASON_CTRLF) "\n\t \
+ jmp NewInt31Handler\n\t \
initialreturnpoint:");
}
else
Index: apps/pice/module/parse.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/pice/module/parse.c,v
retrieving revision 1.15
diff -u -p -r1.15 parse.c
--- apps/pice/module/parse.c 10 Feb 2002 02:01:31 -0000 1.15
+++ apps/pice/module/parse.c 8 May 2002 16:54:22 -0000
@@ -2029,8 +2029,8 @@ COMMAND_PROTOTYPE(Ver)
COMMAND_PROTOTYPE(Hboot)
{
// nudge the reset line through keyboard controller
- __asm__("
- movb $0xFE,%al
+ __asm__("\n\t \
+ movb $0xFE,%al\n\t \
outb %al,$0x64");
// never gets here
return TRUE;
Index: apps/pice/module/patch.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/pice/module/patch.c,v
retrieving revision 1.10
diff -u -p -r1.10 patch.c
--- apps/pice/module/patch.c 10 Feb 2002 20:21:40 -0000 1.10
+++ apps/pice/module/patch.c 8 May 2002 16:54:22 -0000
@@ -101,12 +101,12 @@ BOOLEAN PiceKbdIsr (
bEnterNow=TRUE;
bControl=FALSE;
// simulate an initial break
- __asm__("
- pushfl
- pushl %cs
- pushl $returnpoint
- pushl $" STR(REASON_CTRLF) "
- jmp NewInt31Handler
+ __asm__("\n\t \
+ pushfl\n\t \
+ pushl %cs\n\t \
+ pushl $returnpoint\n\t \
+ pushl $" STR(REASON_CTRLF) "\n\t \
+ jmp NewInt31Handler\n\t \
returnpoint:");
*pByte = 0x1d | 0x80 | 0x7f;
bForward=TRUE;
Index: apps/pice/module/pgflt.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/pice/module/pgflt.c,v
retrieving revision 1.10
diff -u -p -r1.10 pgflt.c
--- apps/pice/module/pgflt.c 30 Jan 2002 20:42:04 -0000 1.10
+++ apps/pice/module/pgflt.c 8 May 2002 16:54:22 -0000
@@ -290,71 +290,71 @@ ULONG HandlePageFault(FRAME* ptr)
// NewIntEHandler()
//
//*************************************************************************
-__asm__ ("
-NewIntEHandler:
- pushfl
- cli
- cld
- pushal
- pushl %ds
-
- // setup default data selectors
- movw %ss,%ax
- movw %ax,%ds
-
- /*
- * Load the PCR selector.
- */
- movl %fs, %eax
- movl %eax, _OLD_PCR
- movl _PCR_SEL, %eax
- movl %eax, %fs
-
- // get frame ptr
- lea 40(%esp),%eax
- pushl %eax
- call _HandlePageFault
- addl $4,%esp
-
- pushl %eax
- movl _OLD_PCR, %eax
- movl %eax, %fs
- popl %eax
-
- cmpl $0,%eax
- je call_old_inte_handler
-
- cmpl $2,%eax
- je call_handler_unknown_reason
-
- popl %ds
- popal
- popfl
- // remove error code. will be restored later when we call
- // original handler again.
- addl $4,%esp
- // call debugger loop
- pushl $" STR(REASON_PAGEFAULT) "
- jmp NewInt31Handler
-
-call_old_inte_handler:
- popl %ds
- popal
- popfl
- // chain to old handler
- .byte 0x2e
- jmp *_OldIntEHandler
-
-call_handler_unknown_reason:
- popl %ds
- popal
- popfl
- // remove error code. will be restored later when we call
- // original handler again.
- addl $4,%esp
- // call debugger loop
- pushl $" STR(REASON_INTERNAL_ERROR) "
- jmp NewInt31Handler
+__asm__ ("\n\t \
+NewIntEHandler:\n\t \
+ pushfl\n\t \
+ cli\n\t \
+ cld\n\t \
+ pushal\n\t \
+ pushl %ds\n\t \
+\n\t \
+ // setup default data selectors\n\t \
+ movw %ss,%ax\n\t \
+ movw %ax,%ds\n\t \
+\n\t \
+ /*\n\t \
+ * Load the PCR selector.\n\t \
+ */\n\t \
+ movl %fs, %eax\n\t \
+ movl %eax, _OLD_PCR\n\t \
+ movl _PCR_SEL, %eax\n\t \
+ movl %eax, %fs\n\t \
+\n\t \
+ // get frame ptr\n\t \
+ lea 40(%esp),%eax\n\t \
+ pushl %eax\n\t \
+ call _HandlePageFault\n\t \
+ addl $4,%esp\n\t \
+\n\t \
+ pushl %eax\n\t \
+ movl _OLD_PCR, %eax\n\t \
+ movl %eax, %fs\n\t \
+ popl %eax\n\t \
+\n\t \
+ cmpl $0,%eax\n\t \
+ je call_old_inte_handler\n\t \
+\n\t \
+ cmpl $2,%eax\n\t \
+ je call_handler_unknown_reason\n\t \
+\n\t \
+ popl %ds\n\t \
+ popal\n\t \
+ popfl\n\t \
+ // remove error code. will be restored later when we call\n\t \
+ // original handler again.\n\t \
+ addl $4,%esp\n\t \
+ // call debugger loop\n\t \
+ pushl $" STR(REASON_PAGEFAULT) "\n\t \
+ jmp NewInt31Handler\n\t \
+\n\t \
+call_old_inte_handler:\n\t \
+ popl %ds\n\t \
+ popal\n\t \
+ popfl\n\t \
+ // chain to old handler\n\t \
+ .byte 0x2e\n\t \
+ jmp *_OldIntEHandler\n\t \
+\n\t \
+call_handler_unknown_reason:\n\t \
+ popl %ds\n\t \
+ popal\n\t \
+ popfl\n\t \
+ // remove error code. will be restored later when we call\n\t \
+ // original handler again.\n\t \
+ addl $4,%esp\n\t \
+ // call debugger loop\n\t \
+ pushl $" STR(REASON_INTERNAL_ERROR) "\n\t \
+ jmp NewInt31Handler\n\t \
");
Index: apps/pice/module/shell.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/pice/module/shell.c,v
retrieving revision 1.9
diff -u -p -r1.9 shell.c
--- apps/pice/module/shell.c 10 Feb 2002 20:21:40 -0000 1.9
+++ apps/pice/module/shell.c 8 May 2002 16:54:23 -0000
@@ -439,17 +439,17 @@ void DebuggerShell(void)
ulLastLineDisplayedOffset = 0;
PrintRingBuffer(wWindow[OUTPUT_WINDOW].cy-1);
// setup a safe stack for parsing
- __asm__ __volatile__("
- movl %2,%%eax
- movl %%esp,%%ebx
- mov %%ebx,%0
- leal _aulNewStack,%%ebx
- addl $0x1FFF0,%%ebx
- movl %%ebx,%%esp
- pushl $0
- pushl %%eax
- call _Parse
- movl %0,%%ebx
+ __asm__ __volatile__("\n\t \
+ movl %2,%%eax\n\t \
+ movl %%esp,%%ebx\n\t \
+ mov %%ebx,%0\n\t \
+ leal _aulNewStack,%%ebx\n\t \
+ addl $0x1FFF0,%%ebx\n\t \
+ movl %%ebx,%%esp\n\t \
+ pushl $0\n\t \
+ pushl %%eax\n\t \
+ call _Parse\n\t \
+ movl %0,%%ebx\n\t \
movl %%ebx,%%esp"
:"=m" (ulOldStack)
:"m" (ulOldStack),"m" (ucCommandBuffer)
@@ -528,17 +528,17 @@ void DebuggerShell(void)
PrintRingBuffer(wWindow[OUTPUT_WINDOW].cy-1);
// setup a safe stack for parsing
- __asm__ __volatile__("
- movl %2,%%eax
- movl %%esp,%%ebx
- mov %%ebx,%0
- leal _aulNewStack,%%ebx
- addl $0x1FFF0,%%ebx
- movl %%ebx,%%esp
- pushl $1
- pushl %%eax
- call _Parse
- movl %0,%%ebx
+ __asm__ __volatile__("\n\t \
+ movl %2,%%eax\n\t \
+ movl %%esp,%%ebx\n\t \
+ mov %%ebx,%0\n\t \
+ leal _aulNewStack,%%ebx\n\t \
+ addl $0x1FFF0,%%ebx\n\t \
+ movl %%ebx,%%esp\n\t \
+ pushl $1\n\t \
+ pushl %%eax\n\t \
+ call _Parse\n\t \
+ movl %0,%%ebx\n\t \
movl %%ebx,%%esp"
:"=m" (ulOldStack)
:"m" (ulOldStack),"m" (ucCommandBuffer)
@@ -1138,11 +1138,11 @@ void RealIsr(ULONG dwReasonForBreak)
DPRINT((0,"REASON_HARDWARE_BP\n"));
// disable HW breakpoints
- __asm__("
- movl %%dr6,%%eax
- movl %%eax,%0
- xorl %%eax,%%eax
- movl %%eax,%%dr6
+ __asm__("\n\t \
+ movl %%dr6,%%eax\n\t \
+ movl %%eax,%0\n\t \
+ xorl %%eax,%%eax\n\t \
+ movl %%eax,%%dr6\n\t \
movl %%eax,%%dr7"
:"=m" (ulReason)
:
@@ -1399,32 +1399,32 @@ void RealIsr(ULONG dwReasonForBreak)
DPRINT((0,"RealIsr(): saving registers\n"));
// save the extended regs
__asm__ __volatile__
- ("
- pushl %eax
- movw %es,%ax
- movw %ax,_CurrentES
- //movw %fs,%ax
- //movw %ax,_CurrentFS
- movw %gs,%ax
- movw %ax,_CurrentGS
- movl %dr0,%eax
- movl %eax,_CurrentDR0
- movl %dr1,%eax
- movl %eax,_CurrentDR1
- movl %dr2,%eax
- movl %eax,_CurrentDR2
- movl %dr3,%eax
- movl %eax,_CurrentDR3
- movl %dr6,%eax
- movl %eax,_CurrentDR6
- movl %dr7,%eax
- movl %eax,_CurrentDR7
- movl %cr0,%eax
- movl %eax,_CurrentCR0
- movl %cr2,%eax
- movl %eax,_CurrentCR2
- movl %cr3,%eax
- movl %eax,_CurrentCR3
+ ("\n\t \
+ pushl %eax\n\t \
+ movw %es,%ax\n\t \
+ movw %ax,_CurrentES\n\t \
+ //movw %fs,%ax\n\t \
+ //movw %ax,_CurrentFS\n\t \
+ movw %gs,%ax\n\t \
+ movw %ax,_CurrentGS\n\t \
+ movl %dr0,%eax\n\t \
+ movl %eax,_CurrentDR0\n\t \
+ movl %dr1,%eax\n\t \
+ movl %eax,_CurrentDR1\n\t \
+ movl %dr2,%eax\n\t \
+ movl %eax,_CurrentDR2\n\t \
+ movl %dr3,%eax\n\t \
+ movl %eax,_CurrentDR3\n\t \
+ movl %dr6,%eax\n\t \
+ movl %eax,_CurrentDR6\n\t \
+ movl %dr7,%eax\n\t \
+ movl %eax,_CurrentDR7\n\t \
+ movl %cr0,%eax\n\t \
+ movl %eax,_CurrentCR0\n\t \
+ movl %cr2,%eax\n\t \
+ movl %eax,_CurrentCR2\n\t \
+ movl %cr3,%eax\n\t \
+ movl %eax,_CurrentCR3\n\t \
popl %eax"
);
@@ -1464,174 +1464,174 @@ common_return_point:
}
-__asm__(".global NewInt31Handler
-NewInt31Handler:
- cli
- cld
-
- pushl %eax
- pushl %ds
-
- movw %ss,%ax
- mov %ax,%ds
-
- mov 0x4(%esp),%eax
- movl %eax,_CurrentEAX
- movl %ebx,_CurrentEBX
- movl %ecx,_CurrentECX
- movl %edx,_CurrentEDX
- movl %esi,_CurrentESI
- movl %edi,_CurrentEDI
- movl %ebp,_CurrentEBP
- movl (%esp),%eax
- movw %ax,_CurrentDS
-
- // test for V86 mode
- testl $0x20000,5*4(%esp)
- jz notV86
-
- int $0x03
-
-notV86:
- // test if stack switched (ring3->ring0 transition)
- // stack is switched if orig. SS is not global kernel code segment
- movl 4*4(%esp),%eax
- cmpw $" STR(GLOBAL_CODE_SEGMENT) ",%ax
- je notswitched
-
- // switched stack
- movl 6*4(%esp),%eax
- mov %eax,_CurrentESP
- mov 7*4(%esp),%eax
- movzwl %ax,%eax
- mov %ax,_CurrentSS
- jmp afterswitch
-
-notswitched:
- // didn't switch stack
- movl %esp,_CurrentESP
- addl $24,_CurrentESP
- movw %ss,%ax
- movzwl %ax,%eax
- mov %ax,_CurrentSS
-
-afterswitch:
- // save EIP
- mov 3*4(%esp),%eax
- mov %eax,_CurrentEIP
- //save CS
- mov 4*4(%esp),%eax
- movzwl %ax,%eax
- movw %ax,_CurrentCS
- // save flags
- movl 5*4(%esp),%eax
- andl $0xFFFFFEFF,%eax
- movl %eax,_CurrentEFL
-
- pushal
-
- // get reason code
- mov 0x28(%esp),%ebx
-
- /*
- * Load the PCR selector.
- */
-
- movl %fs, %eax
- movl %eax, _OLD_PCR
- movl _PCR_SEL, %eax
- movl %eax, %fs
-
- // setup a large work stack
- movl %esp,%eax
- movl %eax,_ulRealStackPtr
-
- pushl %ebx
- call _RealIsr
- addl $4,%esp
-
- pushl %eax
- movl _OLD_PCR, %eax
- movl %eax, %fs
- popl %eax
-
- // restore all regs
- popal
-
- // do an EOI to IRQ controller (because we definitely pressed some key)
- // TODO: SMP APIC support
- movb $0x20,%al
- outb %al,$0x20
-
- popl %ds
- popl %eax
-
- // remove reason code
- addl $4,%esp
-
- // make EAX available
- pushl %eax
-
- // modify or restore EFLAGS
- .byte 0x2e
- mov _CurrentEFL,%eax
- mov %eax,3*4(%esp)
- .byte 0x2e
- movzwl _CurrentCS,%eax
- mov %eax,2*4(%esp)
- .byte 0x2e
- mov _CurrentEIP,%eax
- mov %eax,1*4(%esp)
-
- // restore EAX
- popl %eax
-
- // do we need to call old INT1 handler
- .byte 0x2e
- cmp $0,_dwCallOldInt1Handler
- je do_iret2
-
- // call INT3 handler
- .byte 0x2e
- jmp *_OldInt1Handler
-
-do_iret2:
- // do we need to call old INT3 handler
- .byte 0x2e
- cmp $0,_dwCallOldInt3Handler
- je do_iret1
-
- // call INT3 handler
- .byte 0x2e
- jmp *_OldInt3Handler
-
-do_iret1:
- // do we need to call old pagefault handler
- .byte 0x2e
- cmp $0,_dwCallOldIntEHandler
- je do_iret3
-
- // call old pagefault handler
- .byte 0x2e
- pushl _error_code
- .byte 0x2e
- jmp *_OldIntEHandler
-
-do_iret3:
- // do we need to call old general protection fault handler
- .byte 0x2e
- cmp $0,_dwCallOldGPFaultHandler
- je do_iret
-
- // call old pagefault handler
- .byte 0x2e
- pushl _error_code
- .byte 0x2e
- jmp *_OldGPFaultHandler
-
-do_iret:
- //ei
- //int3
+__asm__(".global NewInt31Handler\n\t \
+NewInt31Handler:\n\t \
+ cli\n\t \
+ cld\n\t \
+\n\t \
+ pushl %eax\n\t \
+ pushl %ds\n\t \
+\n\t \
+ movw %ss,%ax\n\t \
+ mov %ax,%ds\n\t \
+\n\t \
+ mov 0x4(%esp),%eax\n\t \
+ movl %eax,_CurrentEAX\n\t \
+ movl %ebx,_CurrentEBX\n\t \
+ movl %ecx,_CurrentECX\n\t \
+ movl %edx,_CurrentEDX\n\t \
+ movl %esi,_CurrentESI\n\t \
+ movl %edi,_CurrentEDI\n\t \
+ movl %ebp,_CurrentEBP\n\t \
+ movl (%esp),%eax\n\t \
+ movw %ax,_CurrentDS\n\t \
+\n\t \
+ // test for V86 mode\n\t \
+ testl $0x20000,5*4(%esp)\n\t \
+ jz notV86\n\t \
+\n\t \
+ int $0x03\n\t \
+\n\t \
+notV86:\n\t \
+ // test if stack switched (ring3->ring0 transition)\n\t \
+ // stack is switched if orig. SS is not global kernel code segment\n\t \
+ movl 4*4(%esp),%eax\n\t \
+ cmpw $" STR(GLOBAL_CODE_SEGMENT) ",%ax\n\t \
+ je notswitched\n\t \
+\n\t \
+ // switched stack\n\t \
+ movl 6*4(%esp),%eax\n\t \
+ mov %eax,_CurrentESP\n\t \
+ mov 7*4(%esp),%eax\n\t \
+ movzwl %ax,%eax\n\t \
+ mov %ax,_CurrentSS\n\t \
+ jmp afterswitch\n\t \
+\n\t \
+notswitched:\n\t \
+ // didn't switch stack\n\t \
+ movl %esp,_CurrentESP\n\t \
+ addl $24,_CurrentESP\n\t \
+ movw %ss,%ax\n\t \
+ movzwl %ax,%eax\n\t \
+ mov %ax,_CurrentSS\n\t \
+\n\t \
+afterswitch:\n\t \
+ // save EIP\n\t \
+ mov 3*4(%esp),%eax\n\t \
+ mov %eax,_CurrentEIP\n\t \
+ //save CS\n\t \
+ mov 4*4(%esp),%eax\n\t \
+ movzwl %ax,%eax\n\t \
+ movw %ax,_CurrentCS\n\t \
+ // save flags\n\t \
+ movl 5*4(%esp),%eax\n\t \
+ andl $0xFFFFFEFF,%eax\n\t \
+ movl %eax,_CurrentEFL\n\t \
+\n\t \
+ pushal\n\t \
+\n\t \
+ // get reason code\n\t \
+ mov 0x28(%esp),%ebx\n\t \
+\n\t \
+ /*\n\t \
+ * Load the PCR selector.\n\t \
+ */\n\t \
+\n\t \
+ movl %fs, %eax\n\t \
+ movl %eax, _OLD_PCR\n\t \
+ movl _PCR_SEL, %eax\n\t \
+ movl %eax, %fs\n\t \
+\n\t \
+ // setup a large work stack\n\t \
+ movl %esp,%eax\n\t \
+ movl %eax,_ulRealStackPtr\n\t \
+\n\t \
+ pushl %ebx\n\t \
+ call _RealIsr\n\t \
+ addl $4,%esp\n\t \
+\n\t \
+ pushl %eax\n\t \
+ movl _OLD_PCR, %eax\n\t \
+ movl %eax, %fs\n\t \
+ popl %eax\n\t \
+\n\t \
+ // restore all regs\n\t \
+ popal\n\t \
+\n\t \
+ // do an EOI to IRQ controller (because we definitely pressed some key)\n\t \
+ // TODO: SMP APIC support\n\t \
+ movb $0x20,%al\n\t \
+ outb %al,$0x20\n\t \
+\n\t \
+ popl %ds\n\t \
+ popl %eax\n\t \
+\n\t \
+ // remove reason code\n\t \
+ addl $4,%esp\n\t \
+\n\t \
+ // make EAX available\n\t \
+ pushl %eax\n\t \
+\n\t \
+ // modify or restore EFLAGS\n\t \
+ .byte 0x2e\n\t \
+ mov _CurrentEFL,%eax\n\t \
+ mov %eax,3*4(%esp)\n\t \
+ .byte 0x2e\n\t \
+ movzwl _CurrentCS,%eax\n\t \
+ mov %eax,2*4(%esp)\n\t \
+ .byte 0x2e\n\t \
+ mov _CurrentEIP,%eax\n\t \
+ mov %eax,1*4(%esp)\n\t \
+\n\t \
+ // restore EAX\n\t \
+ popl %eax\n\t \
+\n\t \
+ // do we need to call old INT1 handler\n\t \
+ .byte 0x2e\n\t \
+ cmp $0,_dwCallOldInt1Handler\n\t \
+ je do_iret2\n\t \
+\n\t \
+ // call INT3 handler\n\t \
+ .byte 0x2e\n\t \
+ jmp *_OldInt1Handler\n\t \
+\n\t \
+do_iret2:\n\t \
+ // do we need to call old INT3 handler\n\t \
+ .byte 0x2e\n\t \
+ cmp $0,_dwCallOldInt3Handler\n\t \
+ je do_iret1\n\t \
+\n\t \
+ // call INT3 handler\n\t \
+ .byte 0x2e\n\t \
+ jmp *_OldInt3Handler\n\t \
+\n\t \
+do_iret1:\n\t \
+ // do we need to call old pagefault handler\n\t \
+ .byte 0x2e\n\t \
+ cmp $0,_dwCallOldIntEHandler\n\t \
+ je do_iret3\n\t \
+\n\t \
+ // call old pagefault handler\n\t \
+ .byte 0x2e\n\t \
+ pushl _error_code\n\t \
+ .byte 0x2e\n\t \
+ jmp *_OldIntEHandler\n\t \
+\n\t \
+do_iret3:\n\t \
+ // do we need to call old general protection fault handler\n\t \
+ .byte 0x2e\n\t \
+ cmp $0,_dwCallOldGPFaultHandler\n\t \
+ je do_iret\n\t \
+\n\t \
+ // call old pagefault handler\n\t \
+ .byte 0x2e\n\t \
+ pushl _error_code\n\t \
+ .byte 0x2e\n\t \
+ jmp *_OldGPFaultHandler\n\t \
+\n\t \
+do_iret:\n\t \
+ //ei\n\t \
+ //int3\n\t \
iretl ");
//
@@ -1639,18 +1639,18 @@ do_iret:
//
// IDTs keyboard IRQ points here
//
-__asm__ ("
-NewGlobalInt31Handler:
- .byte 0x2e
- cmpb $0,_bEnterNow
- jne dotheenter
-
- // chain to old handler
- .byte 0x2e
- jmp *_OldGlobalInt31Handler
-
-dotheenter:
- pushl $" STR(REASON_CTRLF) "
+__asm__ ("\n\t \
+NewGlobalInt31Handler:\n\t \
+ .byte 0x2e\n\t \
+ cmpb $0,_bEnterNow\n\t \
+ jne dotheenter\n\t \
+\n\t \
+ // chain to old handler\n\t \
+ .byte 0x2e\n\t \
+ jmp *_OldGlobalInt31Handler\n\t \
+\n\t \
+dotheenter:\n\t \
+ pushl $" STR(REASON_CTRLF) "\n\t \
jmp NewInt31Handler "
);
Index: apps/pice/module/syscall.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/pice/module/syscall.c,v
retrieving revision 1.4
diff -u -p -r1.4 syscall.c
--- apps/pice/module/syscall.c 14 Jan 2002 22:04:08 -0000 1.4
+++ apps/pice/module/syscall.c 8 May 2002 16:54:23 -0000
@@ -156,39 +156,39 @@ void CSyscallHandler(FRAME_SYSCALL* ptr,
*/
}
-__asm__ ("
-NewSyscallHandler:
- // save used regs
- pushfl
- cli
- cld
- pushal
- pushl %ds
-
- // push the syscall number
- pushl %ebx
- pushl %eax
-
- // frame ptr
- lea 48(%esp),%eax
- pushl %eax
-
- // setup default data selectors
- movw %ss,%ax
- movw %ax,%ds
-
- call _CSyscallHandler
-
- // remove pushed params
- add $12,%esp
-
- // restore used regs
- popl %ds
- popal
- popfl
-
- // chain to old handler
- .byte 0x2e
+__asm__ ("\n\t \
+NewSyscallHandler:\n\t \
+ // save used regs\n\t \
+ pushfl\n\t \
+ cli\n\t \
+ cld\n\t \
+ pushal\n\t \
+ pushl %ds\n\t \
+\n\t \
+ // push the syscall number\n\t \
+ pushl %ebx\n\t \
+ pushl %eax\n\t \
+\n\t \
+ // frame ptr\n\t \
+ lea 48(%esp),%eax\n\t \
+ pushl %eax\n\t \
+\n\t \
+ // setup default data selectors\n\t \
+ movw %ss,%ax\n\t \
+ movw %ax,%ds\n\t \
+\n\t \
+ call _CSyscallHandler\n\t \
+\n\t \
+ // remove pushed params\n\t \
+ add $12,%esp\n\t \
+\n\t \
+ // restore used regs\n\t \
+ popl %ds\n\t \
+ popal\n\t \
+ popfl\n\t \
+\n\t \
+ // chain to old handler\n\t \
+ .byte 0x2e\n\t \
jmp *_OldSyscallHandler");
void InstallSyscallHook(void)
Index: apps/pice/module/trace.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/pice/module/trace.c,v
retrieving revision 1.4
diff -u -p -r1.4 trace.c
--- apps/pice/module/trace.c 31 Jan 2002 05:30:06 -0000 1.4
+++ apps/pice/module/trace.c 8 May 2002 16:54:23 -0000
@@ -60,21 +60,21 @@ BOOLEAN InstallTraceHook(void)
//this asm function must be at least second in the file. otherwise gcc does not
//generate correct code.
-__asm__("
-NewInt1Handler:
- pushl %eax
- movl %dr6,%eax
- testl $(1<<14),%eax
- jz exceptionnotsinglestep
-
- popl %eax
- pushl $" STR(REASON_SINGLESTEP) "
- jmp NewInt31Handler
-
-exceptionnotsinglestep:
- popl %eax
- pushl $" STR(REASON_HARDWARE_BP) "
- jmp NewInt31Handler
+__asm__("\n\t \
+NewInt1Handler:\n\t \
+ pushl %eax\n\t \
+ movl %dr6,%eax\n\t \
+ testl $(1<<14),%eax\n\t \
+ jz exceptionnotsinglestep\n\t \
+\n\t \
+ popl %eax\n\t \
+ pushl $" STR(REASON_SINGLESTEP) "\n\t \
+ jmp NewInt31Handler\n\t \
+\n\t \
+exceptionnotsinglestep:\n\t \
+ popl %eax\n\t \
+ pushl $" STR(REASON_HARDWARE_BP) "\n\t \
+ jmp NewInt31Handler\n\t \
");
void DeInstallTraceHook(void)
Index: apps/pice/module/utils.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/pice/module/utils.c,v
retrieving revision 1.19
diff -u -p -r1.19 utils.c
--- apps/pice/module/utils.c 10 Feb 2002 20:21:40 -0000 1.19
+++ apps/pice/module/utils.c 8 May 2002 16:54:24 -0000
@@ -812,8 +812,8 @@ ULONG GetLinearAddress(USHORT Segment,UL
{
DPRINT((0,"GetLinearAddress(): Segment is in LDT\n"));
// get LDT selector
- __asm__("
- sldt %%ax
+ __asm__("\n\t \
+ sldt %%ax\n\t \
mov %%ax,%0"
:"=m" (Segment));
if(Segment)
@@ -900,12 +900,12 @@ void SetHardwareBreakPoint(ULONG ulAddre
DPRINT((0,"mask = %x\n",mask));
__asm__ __volatile__
- ("
- xorl %%eax,%%eax
- mov %%eax,%%dr6
- mov %%dr7,%%eax
- orl %0,%%eax
- mov %%eax,%%dr7
+ ("\n\t \
+ xorl %%eax,%%eax\n\t \
+ mov %%eax,%%dr6\n\t \
+ mov %%dr7,%%eax\n\t \
+ orl %0,%%eax\n\t \
+ mov %%eax,%%dr7\n\t \
"
:
:"m" (mask)
@@ -915,9 +915,9 @@ void SetHardwareBreakPoint(ULONG ulAddre
{
case 0:
__asm__ __volatile__
- ("
- mov %0,%%eax
- mov %%eax,%%dr0
+ ("\n\t \
+ mov %0,%%eax\n\t \
+ mov %%eax,%%dr0\n\t \
"
:
:"m" (ulAddress)
@@ -925,9 +925,9 @@ void SetHardwareBreakPoint(ULONG ulAddre
break;
case 1:
__asm__ __volatile__
- ("
- mov %0,%%eax
- mov %%eax,%%dr1
+ ("\n\t \
+ mov %0,%%eax\n\t \
+ mov %%eax,%%dr1\n\t \
"
:
:"m" (ulAddress)
@@ -935,9 +935,9 @@ void SetHardwareBreakPoint(ULONG ulAddre
break;
case 2:
__asm__ __volatile__
- ("
- mov %0,%%eax
- mov %%eax,%%dr2
+ ("\n\t \
+ mov %0,%%eax\n\t \
+ mov %%eax,%%dr2\n\t \
"
:
:"m" (ulAddress)
@@ -945,9 +945,9 @@ void SetHardwareBreakPoint(ULONG ulAddre
break;
case 3:
__asm__ __volatile__
- ("
- mov %0,%%eax
- mov %%eax,%%dr3
+ ("\n\t \
+ mov %0,%%eax\n\t \
+ mov %%eax,%%dr3\n\t \
"
:
:"m" (ulAddress)
@@ -971,11 +971,11 @@ PULONG LinAddr[4]={&LinAddr0,&LinAddr1,&
ENTER_FUNC();
// cancel all debug activity
- __asm__("
- pushl %eax
- xorl %eax,%eax
- mov %eax,%dr6
- mov %eax,%dr7
+ __asm__("\n\t \
+ pushl %eax\n\t \
+ xorl %eax,%eax\n\t \
+ mov %eax,%dr6\n\t \
+ mov %eax,%dr7\n\t \
popl %eax");
// build DR7 mask
for(mask=0,i=0;i<4;i++)
@@ -990,20 +990,20 @@ PULONG LinAddr[4]={&LinAddr0,&LinAddr1,&
}
if(mask)
{
- __asm__("
- pushl %%eax
- movl %0,%%eax
- andl $0x000000FF,%%eax
- orl $0x300,%%eax
- mov %%eax,%%dr7
- mov %1,%%eax
- mov %%eax,%%dr0
- mov %2,%%eax
- mov %%eax,%%dr1
- mov %3,%%eax
- mov %%eax,%%dr2
- mov %4,%%eax
- mov %%eax,%%dr3
+ __asm__("\n\t \
+ pushl %%eax\n\t \
+ movl %0,%%eax\n\t \
+ andl $0x000000FF,%%eax\n\t \
+ orl $0x300,%%eax\n\t \
+ mov %%eax,%%dr7\n\t \
+ mov %1,%%eax\n\t \
+ mov %%eax,%%dr0\n\t \
+ mov %2,%%eax\n\t \
+ mov %%eax,%%dr1\n\t \
+ mov %3,%%eax\n\t \
+ mov %%eax,%%dr2\n\t \
+ mov %4,%%eax\n\t \
+ mov %%eax,%%dr3\n\t \
popl %%eax"
:
:"m" (mask),"m" (LinAddr0),"m" (LinAddr1),"m" (LinAddr2),"m" (LinAddr3));
@@ -1630,8 +1630,8 @@ void InvalidateLB(void)
ENTER_FUNC();
__asm__ __volatile__
(
- "wbinvd
- mov %%cr3,%%ecx
+ "wbinvd\n\t \
+ mov %%cr3,%%ecx\n\t \
mov %%ecx,%%cr3"
:::"ecx"
);
Index: hal/hal/hal.c
===================================================================
RCS file: /CVS/ReactOS/reactos/hal/hal/hal.c,v
retrieving revision 1.2
diff -u -p -r1.2 hal.c
--- hal/hal/hal.c 23 Jan 2002 23:39:24 -0000 1.2
+++ hal/hal/hal.c 8 May 2002 16:54:25 -0000
@@ -598,6 +598,18 @@ KdPortGetByte(
BOOLEAN
STDCALL
+KdPortGetByteEx(
+ PKD_PORT_INFORMATION PortInformation,
+ PUCHAR ByteRecieved)
+{
+ UNIMPLEMENTED;
+
+ return TRUE;
+}
+
+
+BOOLEAN
+STDCALL
KdPortInitialize(
PKD_PORT_INFORMATION PortInformation,
DWORD Unknown1,
@@ -620,9 +632,31 @@ KdPortPollByte(
}
+BOOLEAN
+STDCALL
+KdPortPollByteEx(
+ PKD_PORT_INFORMATION PortInformation,
+ PUCHAR ByteRecieved)
+{
+ UNIMPLEMENTED;
+
+ return TRUE;
+}
+
+
VOID
STDCALL
KdPortPutByte(
+ UCHAR ByteToSend)
+{
+ UNIMPLEMENTED;
+}
+
+
+VOID
+STDCALL
+KdPortPutByteEx(
+ PKD_PORT_INFORMATION PortInformation,
UCHAR ByteToSend)
{
UNIMPLEMENTED;
Index: hal/hal/hal.def
===================================================================
RCS file: /CVS/ReactOS/reactos/hal/hal/hal.def,v
retrieving revision 1.3
diff -u -p -r1.3 hal.def
--- hal/hal/hal.def 2 May 2002 23:45:31 -0000 1.3
+++ hal/hal/hal.def 8 May 2002 16:54:25 -0000
@@ -60,9 +60,13 @@ IoFreeMapRegisters@12
IoMapTransfer@24
KdComPortInUse DATA
KdPortGetByte@4
+KdPortGetByteEx@8
KdPortInitialize@12
+KdPortInitializeEx@12
KdPortPollByte@4
+KdPortPollByteEx@8
KdPortPutByte@4
+KdPortPutByteEx@8
KdPortRestore@0
KdPortSave@0
KdPortDisableInterrupts@0
Index: hal/hal/hal.edf
===================================================================
RCS file: /CVS/ReactOS/reactos/hal/hal/hal.edf,v
retrieving revision 1.3
diff -u -p -r1.3 hal.edf
--- hal/hal/hal.edf 2 May 2002 23:45:31 -0000 1.3
+++ hal/hal/hal.edf 8 May 2002 16:54:25 -0000
@@ -60,9 +60,13 @@ IoFreeMapRegisters=IoFreeMapRegisters@12
IoMapTransfer=IoMapTransfer@24
KdComPortInUse DATA
KdPortGetByte=KdPortGetByte@4
+KdPortGetByteEx=KdPortGetByteEx@8
KdPortInitialize=KdPortInitialize@12
+KdPortInitializeEx=KdPortInitializeEx@12
KdPortPollByte=KdPortPollByte@4
+KdPortPollByteEx=KdPortPollByteEx@8
KdPortPutByte=KdPortPutByte@4
+KdPortPutByteEx=KdPortPutByteEx@8
KdPortRestore=KdPortRestore@0
KdPortSave=KdPortSave@0
KdPortDisableInterrupts=KdPortDisableInterrupts@0
Index: hal/halx86/kdbg.c
===================================================================
RCS file: /CVS/ReactOS/reactos/hal/halx86/kdbg.c,v
retrieving revision 1.3
diff -u -p -r1.3 kdbg.c
--- hal/halx86/kdbg.c 23 Jan 2002 23:39:24 -0000 1.3
+++ hal/halx86/kdbg.c 8 May 2002 16:54:25 -0000
@@ -263,6 +263,95 @@ KdPortInitialize (
}
+/* HAL.KdPortInitializeEx */
+BOOLEAN
+STDCALL
+KdPortInitializeEx (
+ PKD_PORT_INFORMATION PortInformation,
+ DWORD Unknown1,
+ DWORD Unknown2
+ )
+{
+ ULONG BaseArray[5] = {0, 0x3F8, 0x2F8, 0x3E8, 0x2E8};
+ PUCHAR ComPortBase;
+ char buffer[80];
+ ULONG divisor;
+ BYTE lcr;
+
+ if (PortInformation->BaudRate == 0)
+ {
+ PortInformation->BaudRate = DEFAULT_BAUD_RATE;
+ }
+
+ if (PortInformation->ComPort == 0)
+ {
+ return FALSE;
+ }
+ else
+ {
+ if (KdpDoesComPortExist ((PUCHAR)BaseArray[PortInformation->ComPort]))
+ {
+ ComPortBase = (PUCHAR)BaseArray[PortInformation->ComPort];
+ PortInformation->BaseAddress = (ULONG)ComPortBase;
+#ifndef NDEBUG
+ sprintf (buffer,
+ "\nSerial port COM%ld found at 0x%lx\n",
+ PortInformation->ComPort,
+ (ULONG)ComPortBase];
+ HalDisplayString (buffer);
+#endif /* NDEBUG */
+ }
+ else
+ {
+ sprintf (buffer,
+ "\nKernel Debugger: Serial port not found!!!\n\n");
+ HalDisplayString (buffer);
+ return FALSE;
+ }
+ }
+
+ /*
+ * set baud rate and data format (8N1)
+ */
+
+ /* turn on DTR and RTS */
+ WRITE_PORT_UCHAR (SER_MCR(ComPortBase), SR_MCR_DTR | SR_MCR_RTS);
+
+ /* set DLAB */
+ lcr = READ_PORT_UCHAR (SER_LCR(ComPortBase)) | SR_LCR_DLAB;
+ WRITE_PORT_UCHAR (SER_LCR(ComPortBase), lcr);
+
+ /* set baud rate */
+ divisor = 115200 / PortInformation->BaudRate;
+ WRITE_PORT_UCHAR (SER_DLL(ComPortBase), divisor & 0xff);
+ WRITE_PORT_UCHAR (SER_DLM(ComPortBase), (divisor >> 8) & 0xff);
+
+ /* reset DLAB and set 8N1 format */
+ WRITE_PORT_UCHAR (SER_LCR(ComPortBase),
+ SR_LCR_CS8 | SR_LCR_ST1 | SR_LCR_PNO);
+
+ /* read junk out of the RBR */
+ lcr = READ_PORT_UCHAR (SER_RBR(ComPortBase));
+
+#ifndef NDEBUG
+
+ /*
+ * print message to blue screen
+ */
+ sprintf (buffer,
+ "\nKernel Debugger: COM%ld (Port 0x%lx) BaudRate %ld\n\n",
+ PortInformation->ComPort,
+ (ULONG)ComPortBase,
+ PortInformation->BaudRate);
+
+ HalDisplayString (buffer);
+
+#endif /* NDEBUG */
+
+ return TRUE;
+}
+
+
/* HAL.KdPortGetByte */
BOOLEAN
STDCALL
@@ -283,6 +372,26 @@ KdPortGetByte (
}
+/* HAL.KdPortGetByteEx */
+BOOLEAN
+STDCALL
+KdPortGetByteEx (
+ PKD_PORT_INFORMATION PortInformation,
+ PUCHAR ByteRecieved
+ )
+{
+ PUCHAR ComPortBase = (PUCHAR)PortInformation->BaseAddress;
+
+ if ((READ_PORT_UCHAR (SER_LSR(ComPortBase)) & SR_LSR_DR))
+ {
+ *ByteRecieved = READ_PORT_UCHAR (SER_RBR(ComPortBase));
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+
/* HAL.KdPortPollByte */
BOOLEAN
STDCALL
@@ -302,6 +411,27 @@ KdPortPollByte (
}
+/* HAL.KdPortPollByteEx */
+BOOLEAN
+STDCALL
+KdPortPollByteEx (
+ PKD_PORT_INFORMATION PortInformation,
+ PUCHAR ByteRecieved
+ )
+{
+ PUCHAR ComPortBase = (PUCHAR)PortInformation->BaseAddress;
+
+ while ((READ_PORT_UCHAR (SER_LSR(ComPortBase)) & SR_LSR_DR) == 0)
+ ;
+
+ *ByteRecieved = READ_PORT_UCHAR (SER_RBR(ComPortBase));
+
+ return TRUE;
+}
+
+
+
+
/* HAL.KdPortPutByte */
VOID
STDCALL
@@ -316,6 +446,22 @@ KdPortPutByte (
;
WRITE_PORT_UCHAR (SER_THR(PortBase), ByteToSend);
+}
+
+/* HAL.KdPortPutByteEx */
+VOID
+STDCALL
+KdPortPutByteEx (
+ PKD_PORT_INFORMATION PortInformation,
+ UCHAR ByteToSend
+ )
+{
+ PUCHAR ComPortBase = (PUCHAR)PortInformation->BaseAddress;
+
+ while ((READ_PORT_UCHAR (SER_LSR(ComPortBase)) & SR_LSR_TBE) == 0)
+ ;
+
+ WRITE_PORT_UCHAR (SER_THR(ComPortBase), ByteToSend);
}
Index: include/ddk/kdfuncs.h
===================================================================
RCS file: /CVS/ReactOS/reactos/include/ddk/kdfuncs.h,v
retrieving revision 1.5
diff -u -p -r1.5 kdfuncs.h
--- include/ddk/kdfuncs.h 23 Jan 2002 23:39:24 -0000 1.5
+++ include/ddk/kdfuncs.h 8 May 2002 16:54:25 -0000
@@ -24,26 +24,60 @@ KdPortInitialize (
DWORD Unknown1,
DWORD Unknown2
);
+
+BOOLEAN
+STDCALL
+KdPortInitializeEx (
+ PKD_PORT_INFORMATION PortInformation,
+ DWORD Unknown1,
+ DWORD Unknown2
+ );
+
BOOLEAN
STDCALL
KdPortGetByte (
PUCHAR ByteRecieved
);
+
+BOOLEAN
+STDCALL
+KdPortGetByteEx (
+ PKD_PORT_INFORMATION PortInformation,
+ PUCHAR ByteRecieved
+ );
+
BOOLEAN
STDCALL
KdPortPollByte (
PUCHAR ByteRecieved
);
+
+BOOLEAN
+STDCALL
+KdPortPollByteEx (
+ PKD_PORT_INFORMATION PortInformation,
+ PUCHAR ByteRecieved
+ );
+
VOID
STDCALL
KdPortPutByte (
UCHAR ByteToSend
);
+
+VOID
+STDCALL
+KdPortPutByteEx (
+ PKD_PORT_INFORMATION PortInformation,
+ UCHAR ByteToSend
+ );
+
VOID
STDCALL
KdPortRestore (
VOID
);
+
VOID
STDCALL
KdPortSave (
Index: ntoskrnl/include/internal/kd.h
===================================================================
RCS file: /CVS/ReactOS/reactos/ntoskrnl/include/internal/kd.h,v
retrieving revision 1.6
diff -u -p -r1.6 kd.h
--- ntoskrnl/include/internal/kd.h 9 Feb 2002 18:41:23 -0000 1.6
+++ ntoskrnl/include/internal/kd.h 8 May 2002 16:54:28 -0000
@@ -8,18 +8,18 @@
#include <internal/ke.h>
-typedef enum
-{
- NoDebug = 0,
- GdbDebug,
- PiceDebug,
- ScreenDebug,
- SerialDebug,
- BochsDebug,
- FileLogDebug
-} DEBUG_TYPE;
+#define KD_DEBUG_DISABLED 0x00
+#define KD_DEBUG_GDB 0x01
+#define KD_DEBUG_PICE 0x02
+#define KD_DEBUG_SCREEN 0x04
+#define KD_DEBUG_SERIAL 0x08
+#define KD_DEBUG_BOCHS 0x10
+#define KD_DEBUG_FILELOG 0x20
-extern DEBUG_TYPE KdDebugType;
+extern ULONG KdDebugState;
+
+KD_PORT_INFORMATION GdbPortInfo;
+KD_PORT_INFORMATION LogPortInfo;
typedef enum _KD_CONTINUE_TYPE
{
Index: ntoskrnl/include/internal/ldr.h
===================================================================
RCS file: /CVS/ReactOS/reactos/ntoskrnl/include/internal/ldr.h,v
retrieving revision 1.14
diff -u -p -r1.14 ldr.h
--- ntoskrnl/include/internal/ldr.h 23 Jan 2002 23:39:25 -0000 1.14
+++ ntoskrnl/include/internal/ldr.h 8 May 2002 16:54:28 -0000
@@ -13,6 +13,11 @@
#include <ntdll/ldr.h>
#include <internal/module.h>
+#define KERNEL_MODULE_NAME L"ntoskrnl.exe"
+#define HAL_MODULE_NAME L"hal.dll"
+#define MODULE_ROOT_NAME L"\\Modules\\"
+#define FILESYSTEM_ROOT_NAME L"\\FileSystem\\"
+
NTSTATUS
LdrLoadDriver (
PUNICODE_STRING Filename,
Index: ntoskrnl/kd/gdbstub.c
===================================================================
RCS file: /CVS/ReactOS/reactos/ntoskrnl/kd/gdbstub.c,v
retrieving revision 1.4
diff -u -p -r1.4 gdbstub.c
--- ntoskrnl/kd/gdbstub.c 5 May 2002 14:57:44 -0000 1.4
+++ ntoskrnl/kd/gdbstub.c 8 May 2002 16:54:28 -0000
@@ -87,6 +87,7 @@
#include <internal/kd.h>
#include <internal/ke.h>
#include <internal/ps.h>
+#include <internal/ldr.h>
#define NDEBUG
#include <internal/debug.h>
@@ -1205,7 +1206,7 @@ GspBreakIn(PKINTERRUPT Interrupt,
DPRINT ("Break In\n");
DoBreakIn = FALSE;
- while (KdPortGetByte (&Value))
+ while (KdPortGetByteEx (&GdbPortInfo, &Value))
{
if (Value == 0x03)
DoBreakIn = TRUE;
@@ -1243,6 +1244,8 @@ KdGdbStubInit(ULONG Phase)
if (Phase == 0)
{
+ DbgPrint("Module 'hal.dll' loaded at 0x%.08x.\n", LdrHalBase);
+
GspInitialized = TRUE;
GspRunThread = PsGetCurrentThread();
GspDbgThread = PsGetCurrentThread();
Index: ntoskrnl/kd/kdebug.c
===================================================================
RCS file: /CVS/ReactOS/reactos/ntoskrnl/kd/kdebug.c,v
retrieving revision 1.35
diff -u -p -r1.35 kdebug.c
--- ntoskrnl/kd/kdebug.c 2 May 2002 23:45:32 -0000 1.35
+++ ntoskrnl/kd/kdebug.c 8 May 2002 16:54:28 -0000
@@ -37,9 +37,12 @@ KdDebuggerNotPresent = TRUE; /* EXPORTE
static BOOLEAN KdpBreakPending = FALSE;
-DEBUG_TYPE KdDebugType = NoDebug;
+ULONG KdDebugState = KD_DEBUG_DISABLED;
ULONG KdpPortIrq = 0;
+KD_PORT_INFORMATION GdbPortInfo;
+KD_PORT_INFORMATION LogPortInfo;
+
/* PRIVATE FUNCTIONS ********************************************************/
static VOID
@@ -69,14 +72,18 @@ KdInitSystem(ULONG Reserved,
DbgRDebugInit();
#endif
- /* set debug port default values */
+ /* Set debug port default values */
PortInfo.ComPort = DEFAULT_DEBUG_PORT;
PortInfo.BaudRate = DEFAULT_DEBUG_BAUD_RATE;
KdpPortIrq = DEFAULT_DEBUG_COM2_IRQ;
- /* parse kernel command line */
+ /* Set serial log port default values */
+ LogPortInfo.ComPort = DEFAULT_DEBUG_PORT;
+ LogPortInfo.BaudRate = DEFAULT_DEBUG_BAUD_RATE;
+
+ /* Parse kernel command line */
- /* check for 'DEBUGPORT' */
+ /* Check for 'DEBUGPORT' */
p1 = (PCHAR)LoaderBlock->CommandLine;
while (p1 && (p2 = strchr(p1, '/')))
{
@@ -91,25 +98,30 @@ KdInitSystem(ULONG Reserved,
{
p2 += 6;
KdDebuggerEnabled = TRUE;
- KdDebugType = ScreenDebug;
+ KdDebugState |= KD_DEBUG_SCREEN;
}
else if (!_strnicmp(p2, "BOCHS", 5))
{
p2 += 5;
KdDebuggerEnabled = TRUE;
- KdDebugType = BochsDebug;
+ KdDebugState |= KD_DEBUG_BOCHS;
}
else if (!_strnicmp(p2, "GDB", 3))
{
p2 += 3;
KdDebuggerEnabled = TRUE;
- KdDebugType = GdbDebug;
+ KdDebugState |= KD_DEBUG_GDB;
+
+ /* Reset port information to defaults */
+ RtlMoveMemory(&GdbPortInfo, &PortInfo, sizeof(KD_PORT_INFORMATION));
+ PortInfo.ComPort = DEFAULT_DEBUG_PORT;
+ PortInfo.BaudRate = DEFAULT_DEBUG_BAUD_RATE;
}
else if (!_strnicmp(p2, "PICE", 4))
{
p2 += 4;
KdDebuggerEnabled = TRUE;
- KdDebugType = PiceDebug;
+ KdDebugState |= KD_DEBUG_PICE;
}
else if (!_strnicmp(p2, "COM", 3))
{
@@ -117,47 +129,55 @@ KdInitSystem(ULONG Reserved,
Value = (ULONG)atol(p2);
if (Value > 0 && Value < 5)
{
- PrintString("\n COM2 found\n\n");
KdDebuggerEnabled = TRUE;
- KdDebugType = SerialDebug;
- PortInfo.ComPort = Value;
+ KdDebugState |= KD_DEBUG_SERIAL;
+ LogPortInfo.ComPort = Value;
}
}
else if (!_strnicmp(p2, "FILE", 4))
{
p2 += 4;
KdDebuggerEnabled = TRUE;
- KdDebugType = FileLogDebug;
+ KdDebugState |= KD_DEBUG_FILELOG;
}
}
}
else if (!_strnicmp(p2, "DEBUG", 5))
{
p2 += 5;
- /* Check that KdDebugType equals NoDebug so we don't override any set KdDebugType */
- if (KdDebugType == NoDebug)
- {
- KdDebuggerEnabled = TRUE;
- KdDebugType = SerialDebug;
- }
+ KdDebuggerEnabled = TRUE;
+ KdDebugState |= KD_DEBUG_SERIAL;
}
else if (!_strnicmp(p2, "NODEBUG", 7))
{
p2 += 7;
KdDebuggerEnabled = FALSE;
- KdDebugType = NoDebug;
+ KdDebugState = KD_DEBUG_DISABLED;
}
else if (!_strnicmp(p2, "CRASHDEBUG", 10))
{
p2 += 10;
KdDebuggerEnabled = FALSE;
- KdDebugType = NoDebug;
+ KdDebugState = KD_DEBUG_DISABLED;
}
else if (!_strnicmp(p2, "BREAK", 5))
{
p2 += 5;
KdpBreakPending = TRUE;
}
+ else if (!_strnicmp(p2, "COM", 3))
+ {
+ p2 += 3;
+ if (*p2 != '=')
+ {
+ p2++;
+ Value = (ULONG)atol(p2);
+ if (Value > 0 && Value < 5)
+ {
+ PortInfo.ComPort = Value;
+ }
+ }
+ }
else if (!_strnicmp(p2, "BAUDRATE", 8))
{
p2 += 8;
@@ -166,11 +186,9 @@ KdInitSystem(ULONG Reserved,
p2++;
Value = (ULONG)atol(p2);
if (Value > 0)
- {
- KdDebuggerEnabled = TRUE;
- KdDebugType = SerialDebug;
- PortInfo.BaudRate = Value;
- }
+ {
+ PortInfo.BaudRate = Value;
+ }
}
else if (!_strnicmp(p2, "IRQ", 3))
{
@@ -181,8 +199,6 @@ KdInitSystem(ULONG Reserved,
Value = (ULONG)atol(p2);
if (Value > 0)
{
- KdDebuggerEnabled = TRUE;
- KdDebugType = SerialDebug;
KdpPortIrq = Value;
}
}
@@ -191,60 +207,41 @@ KdInitSystem(ULONG Reserved,
p1 = p2;
}
- /* print some information */
+ /* Print some information */
if (KdDebuggerEnabled == TRUE)
{
- switch (KdDebugType)
- {
- case NoDebug:
- break;
-
- case GdbDebug:
- PrintString("\n GDB debugging enabled\n\n");
- break;
-
- case PiceDebug:
+ if (KdDebugState & KD_DEBUG_GDB)
+ PrintString("\n GDB debugging enabled. COM%ld %ld Baud\n\n",
+ GdbPortInfo.ComPort, GdbPortInfo.BaudRate);
+
+ if (KdDebugState & KD_DEBUG_PICE)
PrintString("\n Private ICE debugger enabled\n\n");
- break;
- case ScreenDebug:
- //PrintString("\n Screen debugging enabled\n\n");
- break;
+ if (KdDebugState & KD_DEBUG_SCREEN)
+ PrintString("\n Screen debugging enabled\n\n");
- case BochsDebug:
+ if (KdDebugState & KD_DEBUG_BOCHS)
PrintString("\n Bochs debugging enabled\n\n");
- break;
- case SerialDebug:
- PrintString("\n Serial debugging enabled: COM%ld %ld Baud\n\n",
- PortInfo.ComPort, PortInfo.BaudRate);
- break;
+ if (KdDebugState & KD_DEBUG_SERIAL)
+ PrintString("\n Serial debugging enabled. COM%ld %ld Baud\n\n",
+ LogPortInfo.ComPort, LogPortInfo.BaudRate);
- case FileLogDebug:
+ if (KdDebugState & KD_DEBUG_FILELOG)
PrintString("\n File log debugging enabled\n\n");
- break;
- }
}
- /* initialize debug port */
+ /* Perform any initialization nescessary */
if (KdDebuggerEnabled == TRUE)
{
- switch (KdDebugType)
- {
- case SerialDebug:
- case GdbDebug:
- KdPortInitialize(&PortInfo,
- 0,
- 0);
- break;
+ if (KdDebugState & KD_DEBUG_GDB)
+ KdPortInitializeEx(&GdbPortInfo, 0, 0);
- case FileLogDebug:
- DebugLogInit();
- break;
+ if (KdDebugState & KD_DEBUG_SERIAL)
+ KdPortInitializeEx(&LogPortInfo, 0, 0);
- default:
- break;
- }
+ if (KdDebugState & KD_DEBUG_FILELOG)
+ DebugLogInit();
}
}
@@ -252,9 +249,9 @@ KdInitSystem(ULONG Reserved,
VOID
KdInit1(VOID)
{
- /* Initialize kernel debugger */
- if (KdDebuggerEnabled == TRUE &&
- KdDebugType == GdbDebug)
+ /* Initialize kernel debugger (phase 0) */
+ if ((KdDebuggerEnabled == TRUE) &&
+ (KdDebugState & KD_DEBUG_GDB))
{
KdGdbStubInit(0);
}
@@ -263,15 +260,16 @@ KdInit1(VOID)
VOID KdInit2(VOID)
{
- if (KdDebuggerEnabled == TRUE &&
- KdDebugType == GdbDebug)
+ /* Initialize kernel debugger (phase 1) */
+ if ((KdDebuggerEnabled == TRUE) &&
+ (KdDebugState & KD_DEBUG_GDB))
{
KdGdbStubInit(1);
}
}
VOID
-KdDebugPrint (LPSTR Message)
+KdSerialDebugPrint (LPSTR Message)
{
PCHAR pch = (PCHAR) Message;
@@ -279,56 +277,50 @@ KdDebugPrint (LPSTR Message)
{
if (*pch == '\n')
{
- KdPortPutByte ('\r');
+ KdPortPutByteEx (&LogPortInfo, '\r');
}
- KdPortPutByte (*pch);
+ KdPortPutByteEx (&LogPortInfo, *pch);
pch++;
}
}
-ULONG
-KdpPrintString(PANSI_STRING String)
+
+VOID
+KdBochsDebugPrint(IN LPSTR Message)
{
- PCH pch = String->Buffer;
+ while (*Message != 0)
+ {
+ if (*Message == '\n')
+ {
+ WRITE_PORT_UCHAR((PUCHAR)BOCHS_LOGGER_PORT, '\r');
+ }
+ WRITE_PORT_UCHAR((PUCHAR)BOCHS_LOGGER_PORT, *Message);
+ Message++;
+ }
+}
- switch (KdDebugType)
- {
- case NoDebug:
- break;
- case GdbDebug:
- KdGdbDebugPrint(pch);
- break;
+ULONG
+KdpPrintString(PANSI_STRING String)
+{
+ PCH pch = String->Buffer;
- case PiceDebug:
- break;
+ if (KdDebugState & KD_DEBUG_GDB)
+ KdGdbDebugPrint(pch);
- case ScreenDebug:
- HalDisplayString(pch);
- break;
+ if (KdDebugState & KD_DEBUG_SCREEN)
+ HalDisplayString(pch);
- case SerialDebug:
- KdDebugPrint(pch);
- break;
+ if (KdDebugState & KD_DEBUG_SERIAL)
+ KdSerialDebugPrint(pch);
- case BochsDebug:
- while (*pch != 0)
- {
- if (*pch == '\n')
- {
- WRITE_PORT_UCHAR((PUCHAR)BOCHS_LOGGER_PORT, '\r');
- }
- WRITE_PORT_UCHAR((PUCHAR)BOCHS_LOGGER_PORT, *pch);
- pch++;
- }
- break;
+ if (KdDebugState & KD_DEBUG_BOCHS)
+ KdBochsDebugPrint(pch);
- case FileLogDebug:
- DebugLogWrite(pch);
- break;
- }
+ if (KdDebugState & KD_DEBUG_FILELOG)
+ DebugLogWrite(pch);
- return((ULONG)String->Length);
+ return((ULONG)String->Length);
}
/* PUBLIC FUNCTIONS *********************************************************/
@@ -338,7 +330,7 @@ KdpPrintString(PANSI_STRING String)
BOOLEAN STDCALL
KdPollBreakIn(VOID)
{
- if ((!KdDebuggerEnabled) || (KdDebugType != SerialDebug))
+ if ((!KdDebuggerEnabled) || (!(KdDebugState & KD_DEBUG_SERIAL)))
return FALSE;
return KdpBreakPending;
}
@@ -427,7 +419,7 @@ KdSystemDebugControl(ULONG Code)
VOID
KdPutChar(UCHAR Value)
{
- KdPortPutByte (Value);
+ KdPortPutByteEx (&GdbPortInfo, Value);
}
@@ -436,7 +428,7 @@ KdGetChar(VOID)
{
UCHAR Value;
- while (!KdPortGetByte (&Value));
+ while (!KdPortGetByteEx (&GdbPortInfo, &Value));
return Value;
}
Index: ntoskrnl/ke/catch.c
===================================================================
RCS file: /CVS/ReactOS/reactos/ntoskrnl/ke/catch.c,v
retrieving revision 1.19
diff -u -p -r1.19 catch.c
--- ntoskrnl/ke/catch.c 2 May 2002 23:45:33 -0000 1.19
+++ ntoskrnl/ke/catch.c 8 May 2002 16:54:29 -0000
@@ -271,7 +271,7 @@ KiDispatchException(PEXCEPTION_RECORD Ex
/* PreviousMode == KernelMode */
- if (!KdDebuggerEnabled || KdDebugType != GdbDebug)
+ if ((!KdDebuggerEnabled) || (!(KdDebugState & KD_DEBUG_GDB)))
{
/* FIXME: Get ExceptionNr and CR2 */
KeBugCheckWithTf (KMODE_EXCEPTION_NOT_HANDLED, 0, 0, 0, 0, Tf);
Index: ntoskrnl/ldr/loader.c
===================================================================
RCS file: /CVS/ReactOS/reactos/ntoskrnl/ldr/loader.c,v
retrieving revision 1.102
diff -u -p -r1.102 loader.c
--- ntoskrnl/ldr/loader.c 2 May 2002 23:45:33 -0000 1.102
+++ ntoskrnl/ldr/loader.c 8 May 2002 16:54:31 -0000
@@ -44,13 +44,6 @@
#define NDEBUG
#include <internal/debug.h>
-/* MACROS ********************************************************************/
-
-#define KERNEL_MODULE_NAME L"ntoskrnl.exe"
-#define HAL_MODULE_NAME L"hal.dll"
-#define MODULE_ROOT_NAME L"\\Modules\\"
-#define FILESYSTEM_ROOT_NAME L"\\FileSystem\\"
-
/* GLOBALS *******************************************************************/
LIST_ENTRY ModuleListHead;
@@ -896,7 +889,6 @@ VOID LdrLoadAutoConfigDrivers (VOID)
{
#ifdef KDBG
-
NTSTATUS Status;
UNICODE_STRING ModuleName;
PMODULE_OBJECT ModuleObject;
@@ -930,7 +922,7 @@ VOID LdrLoadAutoConfigDrivers (VOID)
*/
LdrLoadAutoConfigDriver( L"keyboard.sys" );
- if (KdDebugType == PiceDebug)
+ if ((KdDebuggerEnabled) && (KdDebugState & KD_DEBUG_PICE))
{
/*
* Private ICE debugger
@@ -1167,7 +1159,7 @@ LdrLoadModule(PUNICODE_STRING Filename)
return NULL;
}
CHECKPOINT;
-
+
/* Load driver into memory chunk */
Status = NtReadFile(FileHandle,
0, 0, 0,
@@ -1860,6 +1852,14 @@ LdrPEProcessModule(PVOID ModuleLoadBase,
CreatedModuleObject->TextSection = ModuleTextSection;
*ModuleObject = CreatedModuleObject;
+
+ DPRINT("Loading Module %wZ...\n", FileName);
+
+ if ((KdDebuggerEnabled == TRUE) && (KdDebugState & KD_DEBUG_GDB))
+ {
+ DbgPrint("Module %wZ loaded at 0x%.08x.\n",
+ FileName, CreatedModuleObject->Base);
+ }
return STATUS_SUCCESS;
}
|
|
From: <we...@cw...> - 2002-05-08 15:16:18
|
Quoting Hartmut Birr <har...@te...>: > > If two processes have a not present fault within the same address range, > there is called MmNotPresentFaultSectionView. The first get the pageop > and handles the fault. The second use this page, if the event in the pageop > is signaled. If the first process terminate before the second can map the > page, than is the page unmapped and not longer valid. There occurs a bug > check within the following call to MmReferencePage. If gcc uses piping, > there are started three processes within a short time and two of them > does also exit at the same time. The page fault occurs within msvcrt.dll when > __atexit_ptr is accessed from exit. The faulting address is __atexit_ptr. > The first fix was to init this variable within DllMain but the real > problem is in MmNotPresentFaultSectionView. > Ok, thanks for the explanation. I don't think this fixes all the problems of this type: for example MmNotPresentFaultSectionView doesn't even reference the section so it could be freed by the time it returns after waiting for the page operation. The fix I was considering was to check for pending page operations on a unmap/process exit and either wait for them to complete or abandon freeing section pages that are about to be used in another process. |
|
From: Hartmut B. <har...@te...> - 2002-05-08 08:19:52
|
> -----Ursprungliche Nachricht----- > Von: David Welch [SMTP:we...@cw...] > Gesendet am: Mittwoch, 8. Mai 2002 09:57 > An: rea...@li... > Betreff: Re: [ros-kernel] CVS commit: ReactOS > > On Wed, May 08, 2002 at 12:52:36AM +0200, Hartmut Birr wrote: > > Fixed a bug in MmNotPresentFaultSectionView. > > > Could you explain the reason for this change. If two processes have a not present fault within the same address range, there is called MmNotPresentFaultSectionView. The first get the pageop and handles the fault. The second use this page, if the event in the pageop is signaled. If the first process terminate before the second can map the page, than is the page unmapped and not longer valid. There occurs a bug check within the following call to MmReferencePage. If gcc uses piping, there are started three processes within a short time and two of them does also exit at the same time. The page fault occurs within msvcrt.dll when __atexit_ptr is accessed from exit. The faulting address is __atexit_ptr. The first fix was to init this variable within DllMain but the real problem is in MmNotPresentFaultSectionView. - Hartmut |
|
From: David W. <we...@cw...> - 2002-05-08 06:55:56
|
On Wed, May 08, 2002 at 12:52:36AM +0200, Hartmut Birr wrote: > Fixed a bug in MmNotPresentFaultSectionView. > Could you explain the reason for this change. |
|
From: Steven E. <ste...@ya...> - 2002-05-08 04:41:52
|
Hola Eric, I had to email the list cause I dont have your email in front of me. Sorry I havent gotten back to you, I've been a little slammed. I like the autorun installer you have started, can you send me the code you have so far and I will play with it a little. I need to learn some more win32 programming anyway with the wine stuff I've been working on. Thanks Steven __________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com |
|
From: Hartmut B. <har...@te...> - 2002-05-07 23:10:51
|
services\storage\scsiport\scsiport.c: Removed reseting of IrpFlags in ScsiPortDispatchScsi. |
|
From: Hartmut B. <har...@te...> - 2002-05-07 23:02:47
|
cmd\cmd.c: Opened files for redirection inheritable. Printed error messages in main to stderr. If the output is redirected, the error message isn't printed in the redirection. - Hartmut |
|
From: Hartmut B. <har...@te...> - 2002-05-07 22:53:22
|
include\msvcrt\fcntl.h: Added O_NOINHERIT. lib\kernel32\file\create.c: Added handling for lpSecurityAttributes (for inheritable handles) in CreateFileW. lib\kernel32\file\file.c: Do not call NtFlushBuffersFile for console handles. lib\kernel32\file\pipe.c: Added handling for lpSecurityAttributes (for inheitable handles) in CreatePipe. lib\kernel32\misc\console.c: Fixed return value in CloseConsoleHandle. lib\kernel32\misc\handle.c: Added basic support for console handles in DuplicateHandle. lib\kernel32\process\create.c: Added support for piping. lib\kernel32\process\proc.c: Added csrss notification in ExitProcess. lib\msvcrt\stdio\popen.c: Started piping implementation. Fixed the command line for popen. lib\msvcrt\io\dup.c: lib\msvcrt\io\open.c: lib\msvcrt\io\pipe.c: lib\msvcrt\io\setmode.c: lib\msvcrt\misc\dllmain.c: lib\msvcrt\process\spawnve.c: lib\msvcrt\sys_stat\fstat.c: Started piping implementation. lib\msvcrt\io\read.c: Added handling for pipe closing. lib\msvcrt\process\_system.c: Fixed the command line. ntoskrnl\ke\kthread.c: Lock/unlock address space in KeReleasThread. ntoskrnl\mm\mdl.c: Fixed a wrong index in MmProbeAndLockPages. ntoskrnl\mm\section.c: Fixed a memory leakage in MmCreateImageSection. Fixed a bug in MmNotPresentFaultSectionView. Removed some wrong calls to ObDereferenceObject in MmMapViewOfSection. ntoskrnl\mm\virtual.c Lock address space at returning in MmNotPresentFaultVirtualMemory. ntoskrnl\ob\handle.c: Added testing for inheritable objects in NtDuplicateObject/ObCreateHandleTable. Modified ObCreateHandleTable. The target handle table has now the same layout as the source table. ntoskrnl\ob\object.c: Added testing for inheritable objects/handles. services/fs/np/create.c: Modified closing of pipes. services/fs/np/npfs.h: services/fs/np/rw.c: Modified reading of pipes. Fixed some bugs. services/fs/cdfs/volinfo.c: Fixed return value in CdfsGetFsSizeInformation. subsys\csrss\api\conio.c: Create console active event inheritable. subsys\csrss\api\handle.c: Fixed the range test for handles in CsrGetObject/CsrReleaseObject. subsys\csrss\api\process.c: Implemented CsrTerminateProcess. - Hartmut |
|
From: Jason F. <jas...@ya...> - 2002-05-07 16:56:15
|
cvs update: bochs docs in rosdocs Added docs on getting and using ReactOS under Bochs. - Jason __________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com |
|
From: Hartmut B. <har...@te...> - 2002-05-06 21:08:06
|
Hi, I think, I have found the problem. The problem is in ScsiPortDispatchScsi (scsiport.c line 713). This function resets the IrpFlags. IrpFlags is used within the last interrupt for a transfer. The queued DPC use this flag for irp completion and starting the next request. If ScsiPortDispatch is called befor the DPC is called, IrpFlags is cleared and the DCP doesn't complet the request and queue the next. The disk stack hangs. I doesn't know why this only occurs with the new irq code. - Hartmut |