Hi,
I suggest the following changes to the current implementation:
1.) Replace the PUSHA in the trap entry code, by a series of MOVs to the
correct stack positions. The same for the trap exit code.
KiTrapFrameFromPushaStack can be removed then. This would result in more
clear, less complex and faster code, with only a few additional
assembly instructions in the trap entry macro. The exit could be done
either by normal call/return or by a jmp to an exit handler.
2.) Segements should be fixed up before entering C code, as not doing so
may introduce possible compiler dependend breakages. It's also much
cleaner and there's no reason to do the same stuff later in inline
assembly instead of direcly in the asm entry point.
The resulting code might looks something like this:
/* Allocate KTRAP_FRAME */
sub esp, KTRAP_FRAME_LENGTH - 10 * 4
/* Save integer registers */
mov [esp + KTRAP_FRAME_EBP], ebp
mov [esp + KTRAP_FRAME_EBX], ebx
mov [esp + KTRAP_FRAME_ESI], esi
mov [esp + KTRAP_FRAME_EDI], edi
mov [esp + KTRAP_FRAME_EAX], eax
mov [esp + KTRAP_FRAME_ECX], ecx
mov [esp + KTRAP_FRAME_EDX], edx
mov [esp + KTRAP_FRAME_EBX], ebx
/* Save segment regs */
mov [esp + KTRAP_FRAME_SEGDS], ds
mov [esp + KTRAP_FRAME_SEGES], es
/* Fixup segment regs */
mov ax, KGDT_R3_DATA | RPL_MASK
mov ds, ax
mov es, ax
Timo
dreimer(a)svn.reactos.org wrote:
> URL: http://svn.reactos.org/svn/reactos?rev=45050&view=rev
FYI, I already have a change like this ready for some months, see
http://reactos.colinfinck.de/files/Other_Stuff/Clean.cmd
I won't commit it though, because after a suggestion from KJK, I agree that
it would be the best if RosBE's basic clean logic goes into the Makefile
itself and RosBE's clean scripts only call "make rosbe-clean" (or whatever
it'll be called) afterwards.
Then no RosBE clean script would ever need to care about the environment
variables for object and output pathes again. We would stop duplicating
logic in the Makefile and in RosBE and a simple "clean" would always operate
on the same tree as a "make" by design.
This is another change that should be finished before we release RosBE 1.5,
because it'll break compatibility with older revisions (just like the new
toolchain will do), and I want to avoid doing this too often.
Best regards,
Colin
\o/
<3 <3 <3
dreimer(a)svn.reactos.org schrieb:
> Author: dreimer
> Date: Mon Jan 11 22:22:52 2010
> New Revision: 45050
>
> URL: http://svn.reactos.org/svn/reactos?rev=45050&view=rev
> Log:
> Ok, last time I delete my built main tree while playing with clean in a branch!
> Now clean cleans the branch you are in!
>
>
What do you all think about developer's email in source code? Is
there a need for it at all there?
WBR,
Aleksey.
On Jan 10, 2010, at 1:43 AM, ekohl(a)svn.reactos.org wrote:
> Author: ekohl
> Date: Sat Jan 9 23:43:16 2010
> New Revision: 45020
>
> URL: http://svn.reactos.org/svn/reactos?rev=45020&view=rev
> Log:
> Removed outdated email addresses.
> Modified: trunk/reactos/ntoskrnl/ke/queue.c
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/
> queue.c?rev=45020&r1=45019&r2=45020&view=diff
> ======================================================================
> ========
> --- trunk/reactos/ntoskrnl/ke/queue.c [iso-8859-1] (original)
> +++ trunk/reactos/ntoskrnl/ke/queue.c [iso-8859-1] Sat Jan 9
> 23:43:16 2010
> @@ -5,7 +5,7 @@
> * PURPOSE: Implements kernel queues
> * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org)
> * Gunnar Dalsnes
> - * Eric Kohl (ekohl(a)rz-online.de)
> + * Eric Kohl
> */
On 21:03 Fri 01 Jan , ros-arm-bringup(a)svn.reactos.org wrote:
> Author: ros-arm-bringup
> Date: Fri Jan 1 22:03:22 2010
> New Revision: 44861
>
> Modified: trunk/reactos/ntoskrnl/include/internal/i386/asmmacro.S
> @@ -87,18 +87,47 @@
> //
> // @name UNHANDLED_PATH
> //
> -// This macro TODO
> +// This macro prints out that the current code path is not expected yet
> //
> // @param None
> //
> // @remark None.
> //
> -.macro UNHANDLED_PATH
> +.macro UNHANDLED_PATH Reason
> +
> + /* Push reason */
> + push offset 1f
> +
> /* Get EIP */
> call $+5
>
> /* Print debug message */
> push offset _UnhandledMsg
> + call _DbgPrint
> + add esp, 12
> +
> + /* Loop indefinitely */
> + jmp $
> +
> +1:
> + .asciz \Reason
I think, this should be:
.asciz "\Reason"
I don't know why, but this line (both variants) doesn't compile for me
with RosBE 1.4.2 (Linux):
ntoskrnl/ke/i386/trap.s: Assembler messages:
ntoskrnl/ke/i386/trap.s:290: Error: junk at end of line, first unrecognized character is `o'
ntoskrnl/ke/i386/trap.s:290: Error: junk at end of line, first unrecognized character is `j'
ntoskrnl/ke/i386/trap.s:290: Error: junk at end of line, first unrecognized character is `o'
ntoskrnl/ke/i386/trap.s:425: Error: junk at end of line, first unrecognized character is `j'
ntoskrnl/ke/i386/trap.s:425: Error: junk at end of line, first unrecognized character is `j'
ntoskrnl/ke/i386/trap.s:425: Error: junk at end of line, first unrecognized character is `j'
ntoskrnl/ke/i386/trap.s:439: Error: junk at end of line, first unrecognized character is `j'
ntoskrnl/ke/i386/trap.s:439: Error: junk at end of line, first unrecognized character is `j'
ntoskrnl/ke/i386/trap.s:439: Error: junk at end of line, first unrecognized character is `j'
ntoskrnl/ke/i386/trap.s:467: Error: junk at end of line, first unrecognized character is `A'
ntoskrnl/ke/i386/trap.s:1677: Error: junk at end of line, first unrecognized character is `R'
ntoskrnl/ke/i386/trap.s:1677: Error: junk at end of line, first unrecognized character is `j'
ntoskrnl/ke/i386/trap.s:1677: Error: junk at end of line, first unrecognized character is `R'
ntoskrnl/ke/i386/trap.s:2415: Error: junk at end of line, first unrecognized character is `c'
ntoskrnl/ke/i386/trap.s:2594: Error: junk at end of line, first unrecognized character is `m'
make: *** [obj-i386/ntoskrnl/ke/i386/trap_ntoskrnl.o] Error 1
--
Alexander Potashev
Public Notice:
First and last warning! You do not have my permission to switch from
GPL unless it is LGPL! I've coded most of all parts of the project and
hold the copyrights with other developers from this project. We have a
primary copyright to GPL, take it or leave it! I've imported other
projects code into ReactOS and kept and respected their copyrights!
Flamed baited by wine for forgetting to pass on copyrights as well and
having to recommit them back into code! If it is good for me it is
good for you!
If you have a problem with this I will have my people contact your
people! You have my email address!
James
martinf(a)svn.reactos.org wrote:
> -#if defined(__STDC_WANT_SECURE_LIB__) && defined(_MS_VER) // secure CRT functions using VS 2005
> +#ifdef __STDC_WANT_SECURE_LIB__
> if (_tfopen_s(&_pfile, path, mode) != 0)
Hi Martin,
This change will break the build, reactos now has partial but not full support for secure CRT functions.
__STDC_WANT_SECURE_LIB__ is now defined in our build headers, but some areas are missing, _wfopen_s being one of these.
I added the '&& defined(_MS_VER)' check to get around this for our build env until we support it.
Regards,
Ged.