ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
February 2010
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
22 participants
365 discussions
Start a n
N
ew thread
[jcatena] 45421: [ntos] traps, work in progress
by jcatena@svn.reactos.org
Author: jcatena Date: Thu Feb 4 17:35:49 2010 New Revision: 45421 URL:
http://svn.reactos.org/svn/reactos?rev=45421&view=rev
Log: [ntos] traps, work in progress Modified: branches/jcatena-branch/include/ndk/i386/ketypes.h branches/jcatena-branch/ntoskrnl/include/internal/i386/asmmacro.S branches/jcatena-branch/ntoskrnl/include/internal/i386/ke.h branches/jcatena-branch/ntoskrnl/include/internal/trap_x.h branches/jcatena-branch/ntoskrnl/ke/i386/kiinit.c branches/jcatena-branch/ntoskrnl/ke/i386/traphdlr.c branches/jcatena-branch/ntoskrnl/ntoskrnl.sln branches/jcatena-branch/ntoskrnl/ntoskrnl.vcproj branches/jcatena-branch/ntoskrnl/trap/i386/TrapStub.h branches/jcatena-branch/ntoskrnl/trap/i386/trap_asm.h branches/jcatena-branch/ntoskrnl/trap/trap.c branches/jcatena-branch/ntoskrnl/trap/trap.h branches/jcatena-branch/ntoskrnl/trap/trap.vcproj Modified: branches/jcatena-branch/include/ndk/i386/ketypes.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/ndk/i386…
============================================================================== --- branches/jcatena-branch/include/ndk/i386/ketypes.h [iso-8859-1] (original) +++ branches/jcatena-branch/include/ndk/i386/ketypes.h [iso-8859-1] Thu Feb 4 17:35:49 2010 @@ -179,52 +179,52 @@ // typedef struct _KTRAP_FRAME { - ULONG DbgEbp; - ULONG DbgEip; - ULONG DbgArgMark; - ULONG DbgArgPointer; - USHORT TempSegCs; - USHORT RsvTempSegCs; - ULONG TempEsp; - ULONG Dr0; - ULONG Dr1; - ULONG Dr2; - ULONG Dr3; - ULONG Dr6; - ULONG Dr7; - USHORT SegGs; - USHORT RsvSegGs; - USHORT SegEs; - USHORT RsvSegEs; - USHORT SegDs; - USHORT RsvSegDs; - ULONG Edx; - ULONG Ecx; - ULONG Eax; - ULONG PreviousPreviousMode; - struct _EXCEPTION_REGISTRATION_RECORD FAR *ExceptionList; - USHORT SegFs; - USHORT RsvSegFs; - ULONG Edi; - ULONG Esi; - ULONG Ebx; - ULONG Ebp; - ULONG ErrCode; - ULONG Eip; - USHORT SegCs; - USHORT RsvSegCs; - ULONG EFlags; - ULONG HardwareEsp; - ULONG HardwareSegSs; - USHORT V86Es; - USHORT RsvV86Es; - SHORT V86Ds; - USHORT RsvV86Ds; - USHORT V86Fs; - USHORT RsvV86Fs; - USHORT V86Gs; - USHORT RsvV86Gs; -} KTRAP_FRAME, *PKTRAP_FRAME; + ULONG DbgEbp; // 00 + ULONG DbgEip; // 04 + ULONG DbgArgMark; // 08 + ULONG DbgArgPointer; // 0c + USHORT TempSegCs; // 10 + USHORT RsvTempSegCs; // 12 + ULONG TempEsp; // 14 + ULONG Dr0; // 18 + ULONG Dr1; // 1c + ULONG Dr2; // 20 + ULONG Dr3; // 24 + ULONG Dr6; // 28 + ULONG Dr7; // 2c + USHORT SegGs; // 30 + USHORT RsvSegGs; // 32 + USHORT SegEs; // 34 + USHORT RsvSegEs; // 36 + USHORT SegDs; // 38 + USHORT RsvSegDs; // 3a + ULONG Edx; // 3c + ULONG Ecx; // 40 + ULONG Eax; // 44 + ULONG PreviousPreviousMode; // 48 + struct _EXCEPTION_REGISTRATION_RECORD FAR *ExceptionList; // 4c + USHORT SegFs; // 50 + USHORT RsvSegFs; // 52 + ULONG Edi; // 54 + ULONG Esi; // 58 + ULONG Ebx; // 5c + ULONG Ebp; // 60 + ULONG ErrCode; // 64 + ULONG Eip; // 68 + USHORT SegCs; // 6c + USHORT RsvSegCs; // 6e + ULONG EFlags; // 70 + ULONG HardwareEsp; // 74 + ULONG HardwareSegSs; // 78 + USHORT V86Es; // 7c + USHORT RsvV86Es; // 7e + SHORT V86Ds; // 80 + USHORT RsvV86Ds; // 82 + USHORT V86Fs; // 84 + USHORT RsvV86Fs; // 86 + USHORT V86Gs; // 88 + USHORT RsvV86Gs; // 8a +} KTRAP_FRAME, *PKTRAP_FRAME; // 8c // // Defines the Callback Stack Layout for User Mode Callbacks Modified: branches/jcatena-branch/ntoskrnl/include/internal/i386/asmmacro.S URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/include…
============================================================================== --- branches/jcatena-branch/ntoskrnl/include/internal/i386/asmmacro.S [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/include/internal/i386/asmmacro.S [iso-8859-1] Thu Feb 4 17:35:49 2010 @@ -67,7 +67,7 @@ .macro idt Handler, Bits .long \Handler .short \Bits -// .short KGDT_R0_CODE + .short KGDT_R0_CODE .endm // Modified: branches/jcatena-branch/ntoskrnl/include/internal/i386/ke.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/include…
============================================================================== --- branches/jcatena-branch/ntoskrnl/include/internal/i386/ke.h [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/include/internal/i386/ke.h [iso-8859-1] Thu Feb 4 17:35:49 2010 @@ -458,12 +458,13 @@ extern UCHAR KiDebugRegisterTrapOffsets[9]; extern UCHAR KiDebugRegisterContextOffsets[9]; +// !!! // extern VOID __cdecl KiTrap02(VOID); -VOID DECLSPEC_NORETURN KiTrap02(VOID); - +// VOID DECLSPEC_NORETURN KiTrap02(VOID); // extern VOID __cdecl KiTrap08(VOID); // extern VOID __cdecl KiTrap13(VOID); // extern VOID __cdecl KiFastCallEntry(VOID); + extern VOID NTAPI ExpInterlockedPopEntrySListFault(VOID); extern VOID __cdecl CopyParams(VOID); extern VOID __cdecl ReadBatch(VOID); @@ -475,6 +476,7 @@ // // Trap Macros // +#include "trap.h" #include "trap_x.h" // Modified: branches/jcatena-branch/ntoskrnl/include/internal/trap_x.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/include…
============================================================================== --- branches/jcatena-branch/ntoskrnl/include/internal/trap_x.h [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/include/internal/trap_x.h [iso-8859-1] Thu Feb 4 17:35:49 2010 @@ -17,6 +17,10 @@ #define _TRAP_X_ #include <debug.h> +#define DBGTRAP DPRINT1 +// #define DBGTRAPENTRY DPRINT1("\n"); DbgDumpCpu(7|DBG_DUMPCPU_TSS); DPRINT1("TrapFrame=%p:\n", TrapFrame); DbgDumpMem(TrapFrame, 0x80) +// #define DBGTRAPENTRY DPRINT1("\n"); + // !!! temp for testing extern KINTERRUPT *TrapStubInterrupt; @@ -104,6 +108,7 @@ TrapFrame->DbgEbp = TrapFrame->Ebp; } +#if 0 VOID FORCEINLINE KiExitTrapDebugChecks(IN PKTRAP_FRAME TrapFrame, @@ -152,6 +157,8 @@ while (TRUE); } } +#endif + VOID FORCEINLINE @@ -304,6 +311,7 @@ #endif UNREACHABLE; } + VOID FORCEINLINE @@ -356,6 +364,7 @@ UNREACHABLE; } +#if 0 VOID FORCEINLINE DECLSPEC_NORETURN @@ -405,6 +414,7 @@ #endif UNREACHABLE; } +#endif VOID FORCEINLINE @@ -648,6 +658,7 @@ #endif } +#if 0 // // Generic Exit Routine // @@ -659,11 +670,14 @@ // KTRAP_EXIT_SKIP_BITS SkipBits = { .Bits = Skip }; KTRAP_EXIT_SKIP_BITS SkipBits; PULONG ReturnStack; - + + DPRINTT("\n"); + SkipBits.Bits = Skip; /* Debugging checks */ KiExitTrapDebugChecks(TrapFrame, SkipBits); + DPRINTT("DebugChecks r\n"); /* Restore the SEH handler chain */ KeGetPcr()->Tib.ExceptionList = TrapFrame->ExceptionList; @@ -684,7 +698,9 @@ while (TRUE); } - /* Check if this was a V8086 trap */ + DPRINTT("100\n"); + + /* Check if this was a V8086 trap */ if (__builtin_expect(TrapFrame->EFlags & EFLAGS_V86_MASK, 0)) KiTrapReturn(TrapFrame); /* Check if the trap frame was edited */ @@ -710,7 +726,7 @@ * wanted stack, and it uses IRET which allows a new CS to be inputted. * */ - + DPRINTT("edited\n"); /* Set CS that is requested */ TrapFrame->SegCs = TrapFrame->TempSegCs; @@ -730,7 +746,8 @@ /* Check if this is a user trap */ if (__builtin_expect(KiUserTrap(TrapFrame), 1)) /* Ring 3 is where we spend time */ { - /* Check if segments should be restored */ + DPRINTT("user\n"); + /* Check if segments should be restored */ if (!SkipBits.SkipSegments) { /* Restore segments */ @@ -747,7 +764,8 @@ /* Check for system call -- a system call skips volatiles! */ if (__builtin_expect(SkipBits.SkipVolatiles, 0)) /* More INTs than SYSCALLs */ { - /* User or kernel call? */ + DPRINTT("skip vol\n"); + /* User or kernel call? */ KiUserSystemCall(TrapFrame); /* Restore EFLags */ @@ -775,8 +793,11 @@ } /* Return from interrupt */ + DPRINTT("KiTrapReturn"); KiTrapReturn(TrapFrame); -} + DPRINTT("r\n"); +} +#endif // // Virtual 8086 Mode Optimized Trap Exit @@ -912,6 +933,7 @@ KiFillTrapFrameDebug(TrapFrame); } +#if 0 // // Generic Trap Entry // @@ -971,6 +993,7 @@ /* Set debug header */ KiFillTrapFrameDebug(TrapFrame); } +#endif // // Generates a Trap Prolog Stub for the given name Modified: branches/jcatena-branch/ntoskrnl/ke/i386/kiinit.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ke/i386…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ke/i386/kiinit.c [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ke/i386/kiinit.c [iso-8859-1] Thu Feb 4 17:35:49 2010 @@ -11,7 +11,6 @@ #include <ntoskrnl.h> #define NDEBUG #include <debug.h> -// #include "trap_x.h" /* GLOBALS *******************************************************************/ Modified: branches/jcatena-branch/ntoskrnl/ke/i386/traphdlr.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ke/i386…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] Thu Feb 4 17:35:49 2010 @@ -9,7 +9,7 @@ /* INCLUDES *******************************************************************/ #include <ntoskrnl.h> -#define NDEBUG +// #define NDEBUG #include <debug.h> /* GLOBALS ********************************************************************/ @@ -295,6 +295,8 @@ FASTCALL KiTrap00Handler(IN PKTRAP_FRAME TrapFrame) { + DBGTRAPENTRY + /* Save trap frame */ KiEnterTrap(TrapFrame); @@ -315,7 +317,9 @@ FASTCALL KiTrap01Handler(IN PKTRAP_FRAME TrapFrame) { - /* Save trap frame */ + DBGTRAPENTRY + + /* Save trap frame */ KiEnterTrap(TrapFrame); /* Check for VDM trap */ @@ -331,16 +335,15 @@ TrapFrame); } -VOID -DECLSPEC_NORETURN -KiTrap02(VOID) +VOID FASTCALL KiTrap02Handler(KTRAP_FRAME *TrapFrame) { PKTSS Tss, NmiTss; PKTHREAD Thread; PKPROCESS Process; PKGDTENTRY TssGdt; - KTRAP_FRAME TrapFrame; KIRQL OldIrql; + + DBGTRAPENTRY // // In some sort of strange recursion case, we might end up here with the IF @@ -395,31 +398,31 @@ // We just have to go get the values... // RtlZeroMemory(&TrapFrame, sizeof(KTRAP_FRAME)); - TrapFrame.HardwareSegSs = Tss->Ss0; - TrapFrame.HardwareEsp = Tss->Esp0; - TrapFrame.EFlags = Tss->EFlags; - TrapFrame.SegCs = Tss->Cs; - TrapFrame.Eip = Tss->Eip; - TrapFrame.Ebp = Tss->Ebp; - TrapFrame.Ebx = Tss->Ebx; - TrapFrame.Esi = Tss->Esi; - TrapFrame.Edi = Tss->Edi; - TrapFrame.SegFs = Tss->Fs; - TrapFrame.ExceptionList = PCR->Tib.ExceptionList; - TrapFrame.PreviousPreviousMode = -1; - TrapFrame.Eax = Tss->Eax; - TrapFrame.Ecx = Tss->Ecx; - TrapFrame.Edx = Tss->Edx; - TrapFrame.SegDs = Tss->Ds; - TrapFrame.SegEs = Tss->Es; - TrapFrame.SegGs = Tss->Gs; - TrapFrame.DbgEip = Tss->Eip; - TrapFrame.DbgEbp = Tss->Ebp; + TrapFrame->HardwareSegSs = Tss->Ss0; + TrapFrame->HardwareEsp = Tss->Esp0; + TrapFrame->EFlags = Tss->EFlags; + TrapFrame->SegCs = Tss->Cs; + TrapFrame->Eip = Tss->Eip; + TrapFrame->Ebp = Tss->Ebp; + TrapFrame->Ebx = Tss->Ebx; + TrapFrame->Esi = Tss->Esi; + TrapFrame->Edi = Tss->Edi; + TrapFrame->SegFs = Tss->Fs; + TrapFrame->ExceptionList = PCR->Tib.ExceptionList; + TrapFrame->PreviousPreviousMode = -1; + TrapFrame->Eax = Tss->Eax; + TrapFrame->Ecx = Tss->Ecx; + TrapFrame->Edx = Tss->Edx; + TrapFrame->SegDs = Tss->Ds; + TrapFrame->SegEs = Tss->Es; + TrapFrame->SegGs = Tss->Gs; + TrapFrame->DbgEip = Tss->Eip; + TrapFrame->DbgEbp = Tss->Ebp; // // Store the trap frame in the KPRCB // - KiSaveProcessorState(&TrapFrame, NULL); + KiSaveProcessorState(TrapFrame, NULL); // // Call any registered NMI handlers and see if they handled it or not @@ -482,6 +485,8 @@ FASTCALL KiTrap03Handler(IN PKTRAP_FRAME TrapFrame) { + DBGTRAPENTRY + /* Save trap frame */ KiEnterTrap(TrapFrame); @@ -494,6 +499,8 @@ FASTCALL KiTrap04Handler(IN PKTRAP_FRAME TrapFrame) { + DBGTRAPENTRY + /* Save trap frame */ KiEnterTrap(TrapFrame); @@ -514,6 +521,8 @@ FASTCALL KiTrap05Handler(IN PKTRAP_FRAME TrapFrame) { + DBGTRAPENTRY + /* Save trap frame */ KiEnterTrap(TrapFrame); @@ -540,6 +549,8 @@ PUCHAR Instruction; ULONG i; KIRQL OldIrql; + + DBGTRAPENTRY /* Check for V86 GPF */ if (__builtin_expect(KiIsV8086TrapSafe(TrapFrame), 1)) @@ -626,6 +637,8 @@ PFX_SAVE_AREA SaveArea, NpxSaveArea; ULONG Cr0; + DBGTRAPENTRY + /* Save trap frame */ KiEnterTrap(TrapFrame); @@ -732,6 +745,8 @@ FASTCALL KiTrap08Handler(IN PKTRAP_FRAME TrapFrame) { + DBGTRAPENTRY + /* FIXME: Not handled */ KiSystemFatalException(EXCEPTION_DOUBLE_FAULT, TrapFrame); } @@ -741,6 +756,8 @@ FASTCALL KiTrap09Handler(IN PKTRAP_FRAME TrapFrame) { + DBGTRAPENTRY + /* Save trap frame */ KiEnterTrap(TrapFrame); @@ -754,6 +771,8 @@ FASTCALL KiTrap0AHandler(IN PKTRAP_FRAME TrapFrame) { + DBGTRAPENTRY + /* Save trap frame */ KiEnterTrap(TrapFrame); @@ -769,6 +788,8 @@ FASTCALL KiTrap0BHandler(IN PKTRAP_FRAME TrapFrame) { + DBGTRAPENTRY + /* Save trap frame */ KiEnterTrap(TrapFrame); @@ -782,6 +803,8 @@ FASTCALL KiTrap0CHandler(IN PKTRAP_FRAME TrapFrame) { + DBGTRAPENTRY + /* Save trap frame */ KiEnterTrap(TrapFrame); @@ -800,6 +823,8 @@ PUCHAR Instructions; UCHAR Instruction = 0; KIRQL OldIrql; + + DBGTRAPENTRY /* Check for V86 GPF */ if (__builtin_expect(KiIsV8086TrapSafe(TrapFrame), 1)) @@ -1075,6 +1100,8 @@ ULONG_PTR Cr2; NTSTATUS Status; + DBGTRAPENTRY + /* Save trap frame */ KiEnterTrap(TrapFrame); @@ -1127,8 +1154,14 @@ (PVOID)Cr2, TrapFrame->SegCs & MODE_MASK, TrapFrame); - if (Status == STATUS_SUCCESS) KiEoiHelper(TrapFrame); - + DPRINTT("MmAccessFault()=%x\n", Status); + if (Status == STATUS_SUCCESS) + { + // return; // !!! + KiEoiHelper(TrapFrame); + } + DPRINTT("KiEoiHelper r\n"); + /* Check for S-LIST fault */ if (TrapFrame->Eip == (ULONG_PTR)ExpInterlockedPopEntrySListFault) { @@ -1186,6 +1219,8 @@ FASTCALL KiTrap0FHandler(IN PKTRAP_FRAME TrapFrame) { + DBGTRAPENTRY + /* Save trap frame */ KiEnterTrap(TrapFrame); @@ -1201,6 +1236,8 @@ { PKTHREAD Thread; PFX_SAVE_AREA SaveArea; + + DBGTRAPENTRY /* Save trap frame */ KiEnterTrap(TrapFrame); @@ -1227,6 +1264,8 @@ FASTCALL KiTrap11Handler(IN PKTRAP_FRAME TrapFrame) { + DBGTRAPENTRY + /* Save trap frame */ KiEnterTrap(TrapFrame); @@ -1243,6 +1282,8 @@ PKTHREAD Thread; PFX_SAVE_AREA SaveArea; ULONG Cr0, MxCsrMask, Error; + + DBGTRAPENTRY /* Save trap frame */ KiEnterTrap(TrapFrame); @@ -1326,6 +1367,8 @@ FASTCALL KiGetTickCountHandler(IN PKTRAP_FRAME TrapFrame) { + DBGTRAPENTRY + UNIMPLEMENTED; while (TRUE); } @@ -1334,6 +1377,8 @@ FASTCALL KiCallbackReturnHandler(IN PKTRAP_FRAME TrapFrame) { + DBGTRAPENTRY + UNIMPLEMENTED; while (TRUE); } @@ -1343,6 +1388,8 @@ FASTCALL KiRaiseAssertionHandler(IN PKTRAP_FRAME TrapFrame) { + DBGTRAPENTRY + /* Save trap frame */ KiEnterTrap(TrapFrame); @@ -1381,6 +1428,8 @@ PKSERVICE_TABLE_DESCRIPTOR DescriptorTable; ULONG Id, Offset, StackBytes, Result; PVOID Handler; + + DBGTRAPENTRY /* Loop because we might need to try this twice in case of a GUI call */ while (TRUE) @@ -1472,6 +1521,8 @@ IN KPROCESSOR_MODE PreviousPreviousMode, IN USHORT SegFs) { + DBGTRAPENTRY + /* No error code */ TrapFrame->ErrCode = 0; @@ -1513,6 +1564,8 @@ ULONG ServiceNumber = TrapFrame->Eax; PKTHREAD Thread; + DBGTRAPENTRY + /* Fixup segments */ Ke386SetFs(KGDT_R0_PCR); Ke386SetDs(KGDT_R3_DATA | RPL_MASK); @@ -1553,6 +1606,8 @@ USHORT SegFs; PKTHREAD Thread; + DBGTRAPENTRY + /* Save and fixup FS */ SegFs = Ke386GetFs(); Ke386SetFs(KGDT_R0_PCR); @@ -1578,6 +1633,7 @@ /* CPU AND SOFTWARE TRAPS *****************************************************/ +#if 0 KiTrap(KiTrap00, KI_PUSH_FAKE_ERROR_CODE); KiTrap(KiTrap01, KI_PUSH_FAKE_ERROR_CODE); KiTrap(KiTrap03, KI_PUSH_FAKE_ERROR_CODE); @@ -1602,6 +1658,7 @@ KiTrap(KiDebugService, KI_PUSH_FAKE_ERROR_CODE); KiTrap(KiSystemService, KI_PUSH_FAKE_ERROR_CODE | KI_NONVOLATILES_ONLY); KiTrap(KiFastCallEntry, KI_FAST_SYSTEM_CALL); +#endif /* * @implemented Modified: branches/jcatena-branch/ntoskrnl/ntoskrnl.sln URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ntoskrn…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ntoskrnl.sln [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ntoskrnl.sln [iso-8859-1] Thu Feb 4 17:35:49 2010 @@ -3,6 +3,7 @@ # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntoskrnl", "ntoskrnl.vcproj", "{E432D40C-7443-4449-9182-8932E0AEAE99}" ProjectSection(ProjectDependencies) = postProject + {E2A7291E-515F-4BAD-8E82-F77AA0815B47} = {E2A7291E-515F-4BAD-8E82-F77AA0815B47} {33A96973-0632-4142-A411-36B937663234} = {33A96973-0632-4142-A411-36B937663234} {45C60178-D657-45EC-9A99-EEE39C9845BF} = {45C60178-D657-45EC-9A99-EEE39C9845BF} {53C05779-2821-431C-93CC-CDFE6942DE3C} = {53C05779-2821-431C-93CC-CDFE6942DE3C} @@ -70,186 +71,97 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution d|Win32 = d|Win32 - Debug|Win32 = Debug|Win32 r|Win32 = r|Win32 - Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {E432D40C-7443-4449-9182-8932E0AEAE99}.d|Win32.ActiveCfg = d|Win32 {E432D40C-7443-4449-9182-8932E0AEAE99}.d|Win32.Build.0 = d|Win32 - {E432D40C-7443-4449-9182-8932E0AEAE99}.Debug|Win32.ActiveCfg = d|Win32 - {E432D40C-7443-4449-9182-8932E0AEAE99}.Debug|Win32.Build.0 = d|Win32 {E432D40C-7443-4449-9182-8932E0AEAE99}.r|Win32.ActiveCfg = r|Win32 {E432D40C-7443-4449-9182-8932E0AEAE99}.r|Win32.Build.0 = r|Win32 - {E432D40C-7443-4449-9182-8932E0AEAE99}.Release|Win32.ActiveCfg = r|Win32 - {E432D40C-7443-4449-9182-8932E0AEAE99}.Release|Win32.Build.0 = r|Win32 {A4D48188-969A-48AD-A7A8-9A0985EE7A7B}.d|Win32.ActiveCfg = d|Win32 {A4D48188-969A-48AD-A7A8-9A0985EE7A7B}.d|Win32.Build.0 = d|Win32 - {A4D48188-969A-48AD-A7A8-9A0985EE7A7B}.Debug|Win32.ActiveCfg = d|Win32 - {A4D48188-969A-48AD-A7A8-9A0985EE7A7B}.Debug|Win32.Build.0 = d|Win32 {A4D48188-969A-48AD-A7A8-9A0985EE7A7B}.r|Win32.ActiveCfg = r|Win32 {A4D48188-969A-48AD-A7A8-9A0985EE7A7B}.r|Win32.Build.0 = r|Win32 - {A4D48188-969A-48AD-A7A8-9A0985EE7A7B}.Release|Win32.ActiveCfg = r|Win32 - {A4D48188-969A-48AD-A7A8-9A0985EE7A7B}.Release|Win32.Build.0 = r|Win32 {32B0B2D6-5612-40E8-90F5-FB5CB4D76C6E}.d|Win32.ActiveCfg = d|Win32 {32B0B2D6-5612-40E8-90F5-FB5CB4D76C6E}.d|Win32.Build.0 = d|Win32 - {32B0B2D6-5612-40E8-90F5-FB5CB4D76C6E}.Debug|Win32.ActiveCfg = d|Win32 - {32B0B2D6-5612-40E8-90F5-FB5CB4D76C6E}.Debug|Win32.Build.0 = d|Win32 {32B0B2D6-5612-40E8-90F5-FB5CB4D76C6E}.r|Win32.ActiveCfg = r|Win32 {32B0B2D6-5612-40E8-90F5-FB5CB4D76C6E}.r|Win32.Build.0 = r|Win32 - {32B0B2D6-5612-40E8-90F5-FB5CB4D76C6E}.Release|Win32.ActiveCfg = r|Win32 - {32B0B2D6-5612-40E8-90F5-FB5CB4D76C6E}.Release|Win32.Build.0 = r|Win32 {590171C3-2DD0-4790-9BB7-A3601BD548A1}.d|Win32.ActiveCfg = d|Win32 {590171C3-2DD0-4790-9BB7-A3601BD548A1}.d|Win32.Build.0 = d|Win32 - {590171C3-2DD0-4790-9BB7-A3601BD548A1}.Debug|Win32.ActiveCfg = d|Win32 - {590171C3-2DD0-4790-9BB7-A3601BD548A1}.Debug|Win32.Build.0 = d|Win32 {590171C3-2DD0-4790-9BB7-A3601BD548A1}.r|Win32.ActiveCfg = r|Win32 {590171C3-2DD0-4790-9BB7-A3601BD548A1}.r|Win32.Build.0 = r|Win32 - {590171C3-2DD0-4790-9BB7-A3601BD548A1}.Release|Win32.ActiveCfg = r|Win32 - {590171C3-2DD0-4790-9BB7-A3601BD548A1}.Release|Win32.Build.0 = r|Win32 {33A96973-0632-4142-A411-36B937663234}.d|Win32.ActiveCfg = d|Win32 {33A96973-0632-4142-A411-36B937663234}.d|Win32.Build.0 = d|Win32 - {33A96973-0632-4142-A411-36B937663234}.Debug|Win32.ActiveCfg = d|Win32 - {33A96973-0632-4142-A411-36B937663234}.Debug|Win32.Build.0 = d|Win32 {33A96973-0632-4142-A411-36B937663234}.r|Win32.ActiveCfg = r|Win32 {33A96973-0632-4142-A411-36B937663234}.r|Win32.Build.0 = r|Win32 - {33A96973-0632-4142-A411-36B937663234}.Release|Win32.ActiveCfg = r|Win32 - {33A96973-0632-4142-A411-36B937663234}.Release|Win32.Build.0 = r|Win32 {93A5CAA3-5B14-41C4-961A-1D1A93FD9818}.d|Win32.ActiveCfg = d|Win32 {93A5CAA3-5B14-41C4-961A-1D1A93FD9818}.d|Win32.Build.0 = d|Win32 - {93A5CAA3-5B14-41C4-961A-1D1A93FD9818}.Debug|Win32.ActiveCfg = d|Win32 - {93A5CAA3-5B14-41C4-961A-1D1A93FD9818}.Debug|Win32.Build.0 = d|Win32 {93A5CAA3-5B14-41C4-961A-1D1A93FD9818}.r|Win32.ActiveCfg = r|Win32 {93A5CAA3-5B14-41C4-961A-1D1A93FD9818}.r|Win32.Build.0 = r|Win32 - {93A5CAA3-5B14-41C4-961A-1D1A93FD9818}.Release|Win32.ActiveCfg = r|Win32 - {93A5CAA3-5B14-41C4-961A-1D1A93FD9818}.Release|Win32.Build.0 = r|Win32 {A4C0117F-DBB0-4631-A408-D6E4D964E07C}.d|Win32.ActiveCfg = d|Win32 {A4C0117F-DBB0-4631-A408-D6E4D964E07C}.d|Win32.Build.0 = d|Win32 - {A4C0117F-DBB0-4631-A408-D6E4D964E07C}.Debug|Win32.ActiveCfg = d|Win32 - {A4C0117F-DBB0-4631-A408-D6E4D964E07C}.Debug|Win32.Build.0 = d|Win32 {A4C0117F-DBB0-4631-A408-D6E4D964E07C}.r|Win32.ActiveCfg = r|Win32 {A4C0117F-DBB0-4631-A408-D6E4D964E07C}.r|Win32.Build.0 = r|Win32 - {A4C0117F-DBB0-4631-A408-D6E4D964E07C}.Release|Win32.ActiveCfg = r|Win32 - {A4C0117F-DBB0-4631-A408-D6E4D964E07C}.Release|Win32.Build.0 = r|Win32 {8035D0FD-0157-4F0D-845B-DE9CCB48490D}.d|Win32.ActiveCfg = d|Win32 {8035D0FD-0157-4F0D-845B-DE9CCB48490D}.d|Win32.Build.0 = d|Win32 - {8035D0FD-0157-4F0D-845B-DE9CCB48490D}.Debug|Win32.ActiveCfg = d|Win32 - {8035D0FD-0157-4F0D-845B-DE9CCB48490D}.Debug|Win32.Build.0 = d|Win32 {8035D0FD-0157-4F0D-845B-DE9CCB48490D}.r|Win32.ActiveCfg = r|Win32 {8035D0FD-0157-4F0D-845B-DE9CCB48490D}.r|Win32.Build.0 = r|Win32 - {8035D0FD-0157-4F0D-845B-DE9CCB48490D}.Release|Win32.ActiveCfg = r|Win32 - {8035D0FD-0157-4F0D-845B-DE9CCB48490D}.Release|Win32.Build.0 = r|Win32 {7CCF80F4-FCA6-4ED7-8C52-E92B7A1B7116}.d|Win32.ActiveCfg = d|Win32 {7CCF80F4-FCA6-4ED7-8C52-E92B7A1B7116}.d|Win32.Build.0 = d|Win32 - {7CCF80F4-FCA6-4ED7-8C52-E92B7A1B7116}.Debug|Win32.ActiveCfg = d|Win32 - {7CCF80F4-FCA6-4ED7-8C52-E92B7A1B7116}.Debug|Win32.Build.0 = d|Win32 {7CCF80F4-FCA6-4ED7-8C52-E92B7A1B7116}.r|Win32.ActiveCfg = r|Win32 {7CCF80F4-FCA6-4ED7-8C52-E92B7A1B7116}.r|Win32.Build.0 = r|Win32 - {7CCF80F4-FCA6-4ED7-8C52-E92B7A1B7116}.Release|Win32.ActiveCfg = r|Win32 - {7CCF80F4-FCA6-4ED7-8C52-E92B7A1B7116}.Release|Win32.Build.0 = r|Win32 {D4F03490-B3A7-4389-AB68-1DF9EF82D51F}.d|Win32.ActiveCfg = d|Win32 {D4F03490-B3A7-4389-AB68-1DF9EF82D51F}.d|Win32.Build.0 = d|Win32 - {D4F03490-B3A7-4389-AB68-1DF9EF82D51F}.Debug|Win32.ActiveCfg = d|Win32 - {D4F03490-B3A7-4389-AB68-1DF9EF82D51F}.Debug|Win32.Build.0 = d|Win32 {D4F03490-B3A7-4389-AB68-1DF9EF82D51F}.r|Win32.ActiveCfg = r|Win32 {D4F03490-B3A7-4389-AB68-1DF9EF82D51F}.r|Win32.Build.0 = r|Win32 - {D4F03490-B3A7-4389-AB68-1DF9EF82D51F}.Release|Win32.ActiveCfg = r|Win32 - {D4F03490-B3A7-4389-AB68-1DF9EF82D51F}.Release|Win32.Build.0 = r|Win32 {E3324A8B-EE25-43F7-9895-44E3A8083EA3}.d|Win32.ActiveCfg = d|Win32 {E3324A8B-EE25-43F7-9895-44E3A8083EA3}.d|Win32.Build.0 = d|Win32 - {E3324A8B-EE25-43F7-9895-44E3A8083EA3}.Debug|Win32.ActiveCfg = d|Win32 - {E3324A8B-EE25-43F7-9895-44E3A8083EA3}.Debug|Win32.Build.0 = d|Win32 {E3324A8B-EE25-43F7-9895-44E3A8083EA3}.r|Win32.ActiveCfg = r|Win32 {E3324A8B-EE25-43F7-9895-44E3A8083EA3}.r|Win32.Build.0 = r|Win32 - {E3324A8B-EE25-43F7-9895-44E3A8083EA3}.Release|Win32.ActiveCfg = r|Win32 - {E3324A8B-EE25-43F7-9895-44E3A8083EA3}.Release|Win32.Build.0 = r|Win32 {17C7F7C1-6315-4856-9375-39F0B329FA09}.d|Win32.ActiveCfg = d|Win32 {17C7F7C1-6315-4856-9375-39F0B329FA09}.d|Win32.Build.0 = d|Win32 - {17C7F7C1-6315-4856-9375-39F0B329FA09}.Debug|Win32.ActiveCfg = d|Win32 - {17C7F7C1-6315-4856-9375-39F0B329FA09}.Debug|Win32.Build.0 = d|Win32 {17C7F7C1-6315-4856-9375-39F0B329FA09}.r|Win32.ActiveCfg = r|Win32 {17C7F7C1-6315-4856-9375-39F0B329FA09}.r|Win32.Build.0 = r|Win32 - {17C7F7C1-6315-4856-9375-39F0B329FA09}.Release|Win32.ActiveCfg = r|Win32 - {17C7F7C1-6315-4856-9375-39F0B329FA09}.Release|Win32.Build.0 = r|Win32 {F61DDEF4-A045-4AFD-AA0A-FAF6F6F97A21}.d|Win32.ActiveCfg = d|Win32 {F61DDEF4-A045-4AFD-AA0A-FAF6F6F97A21}.d|Win32.Build.0 = d|Win32 - {F61DDEF4-A045-4AFD-AA0A-FAF6F6F97A21}.Debug|Win32.ActiveCfg = d|Win32 - {F61DDEF4-A045-4AFD-AA0A-FAF6F6F97A21}.Debug|Win32.Build.0 = d|Win32 {F61DDEF4-A045-4AFD-AA0A-FAF6F6F97A21}.r|Win32.ActiveCfg = r|Win32 {F61DDEF4-A045-4AFD-AA0A-FAF6F6F97A21}.r|Win32.Build.0 = r|Win32 - {F61DDEF4-A045-4AFD-AA0A-FAF6F6F97A21}.Release|Win32.ActiveCfg = r|Win32 - {F61DDEF4-A045-4AFD-AA0A-FAF6F6F97A21}.Release|Win32.Build.0 = r|Win32 {431D55CC-8FCA-4298-919C-F3214EFDDA60}.d|Win32.ActiveCfg = d|Win32 {431D55CC-8FCA-4298-919C-F3214EFDDA60}.d|Win32.Build.0 = d|Win32 - {431D55CC-8FCA-4298-919C-F3214EFDDA60}.Debug|Win32.ActiveCfg = d|Win32 - {431D55CC-8FCA-4298-919C-F3214EFDDA60}.Debug|Win32.Build.0 = d|Win32 {431D55CC-8FCA-4298-919C-F3214EFDDA60}.r|Win32.ActiveCfg = r|Win32 {431D55CC-8FCA-4298-919C-F3214EFDDA60}.r|Win32.Build.0 = r|Win32 - {431D55CC-8FCA-4298-919C-F3214EFDDA60}.Release|Win32.ActiveCfg = r|Win32 - {431D55CC-8FCA-4298-919C-F3214EFDDA60}.Release|Win32.Build.0 = r|Win32 {45C60178-D657-45EC-9A99-EEE39C9845BF}.d|Win32.ActiveCfg = d|Win32 {45C60178-D657-45EC-9A99-EEE39C9845BF}.d|Win32.Build.0 = d|Win32 - {45C60178-D657-45EC-9A99-EEE39C9845BF}.Debug|Win32.ActiveCfg = d|Win32 - {45C60178-D657-45EC-9A99-EEE39C9845BF}.Debug|Win32.Build.0 = d|Win32 {45C60178-D657-45EC-9A99-EEE39C9845BF}.r|Win32.ActiveCfg = r|Win32 {45C60178-D657-45EC-9A99-EEE39C9845BF}.r|Win32.Build.0 = r|Win32 - {45C60178-D657-45EC-9A99-EEE39C9845BF}.Release|Win32.ActiveCfg = r|Win32 - {45C60178-D657-45EC-9A99-EEE39C9845BF}.Release|Win32.Build.0 = r|Win32 {45E70482-84C8-4846-A1BF-3C7A1BC94335}.d|Win32.ActiveCfg = d|Win32 {45E70482-84C8-4846-A1BF-3C7A1BC94335}.d|Win32.Build.0 = d|Win32 - {45E70482-84C8-4846-A1BF-3C7A1BC94335}.Debug|Win32.ActiveCfg = d|Win32 - {45E70482-84C8-4846-A1BF-3C7A1BC94335}.Debug|Win32.Build.0 = d|Win32 {45E70482-84C8-4846-A1BF-3C7A1BC94335}.r|Win32.ActiveCfg = r|Win32 {45E70482-84C8-4846-A1BF-3C7A1BC94335}.r|Win32.Build.0 = r|Win32 - {45E70482-84C8-4846-A1BF-3C7A1BC94335}.Release|Win32.ActiveCfg = r|Win32 - {45E70482-84C8-4846-A1BF-3C7A1BC94335}.Release|Win32.Build.0 = r|Win32 {33EB04DB-6651-4F5C-9035-807FF1E38842}.d|Win32.ActiveCfg = d|Win32 {33EB04DB-6651-4F5C-9035-807FF1E38842}.d|Win32.Build.0 = d|Win32 - {33EB04DB-6651-4F5C-9035-807FF1E38842}.Debug|Win32.ActiveCfg = d|Win32 - {33EB04DB-6651-4F5C-9035-807FF1E38842}.Debug|Win32.Build.0 = d|Win32 {33EB04DB-6651-4F5C-9035-807FF1E38842}.r|Win32.ActiveCfg = r|Win32 {33EB04DB-6651-4F5C-9035-807FF1E38842}.r|Win32.Build.0 = r|Win32 - {33EB04DB-6651-4F5C-9035-807FF1E38842}.Release|Win32.ActiveCfg = r|Win32 - {33EB04DB-6651-4F5C-9035-807FF1E38842}.Release|Win32.Build.0 = r|Win32 {AEADDBC1-092C-4180-8D34-12CA97CFB497}.d|Win32.ActiveCfg = d|Win32 {AEADDBC1-092C-4180-8D34-12CA97CFB497}.d|Win32.Build.0 = d|Win32 - {AEADDBC1-092C-4180-8D34-12CA97CFB497}.Debug|Win32.ActiveCfg = d|Win32 - {AEADDBC1-092C-4180-8D34-12CA97CFB497}.Debug|Win32.Build.0 = d|Win32 {AEADDBC1-092C-4180-8D34-12CA97CFB497}.r|Win32.ActiveCfg = r|Win32 {AEADDBC1-092C-4180-8D34-12CA97CFB497}.r|Win32.Build.0 = r|Win32 - {AEADDBC1-092C-4180-8D34-12CA97CFB497}.Release|Win32.ActiveCfg = r|Win32 - {AEADDBC1-092C-4180-8D34-12CA97CFB497}.Release|Win32.Build.0 = r|Win32 {53C05779-2821-431C-93CC-CDFE6942DE3C}.d|Win32.ActiveCfg = d|Win32 {53C05779-2821-431C-93CC-CDFE6942DE3C}.d|Win32.Build.0 = d|Win32 - {53C05779-2821-431C-93CC-CDFE6942DE3C}.Debug|Win32.ActiveCfg = d|Win32 - {53C05779-2821-431C-93CC-CDFE6942DE3C}.Debug|Win32.Build.0 = d|Win32 {53C05779-2821-431C-93CC-CDFE6942DE3C}.r|Win32.ActiveCfg = r|Win32 {53C05779-2821-431C-93CC-CDFE6942DE3C}.r|Win32.Build.0 = r|Win32 - {53C05779-2821-431C-93CC-CDFE6942DE3C}.Release|Win32.ActiveCfg = r|Win32 - {53C05779-2821-431C-93CC-CDFE6942DE3C}.Release|Win32.Build.0 = r|Win32 {3D9AC5B7-C29C-46F5-B3D8-C4388F37DB5C}.d|Win32.ActiveCfg = d|Win32 {3D9AC5B7-C29C-46F5-B3D8-C4388F37DB5C}.d|Win32.Build.0 = d|Win32 - {3D9AC5B7-C29C-46F5-B3D8-C4388F37DB5C}.Debug|Win32.ActiveCfg = d|Win32 - {3D9AC5B7-C29C-46F5-B3D8-C4388F37DB5C}.Debug|Win32.Build.0 = d|Win32 {3D9AC5B7-C29C-46F5-B3D8-C4388F37DB5C}.r|Win32.ActiveCfg = r|Win32 {3D9AC5B7-C29C-46F5-B3D8-C4388F37DB5C}.r|Win32.Build.0 = r|Win32 - {3D9AC5B7-C29C-46F5-B3D8-C4388F37DB5C}.Release|Win32.ActiveCfg = r|Win32 - {3D9AC5B7-C29C-46F5-B3D8-C4388F37DB5C}.Release|Win32.Build.0 = r|Win32 {97021AF5-ED87-4AA8-B116-2D53E5D6D528}.d|Win32.ActiveCfg = d|Win32 {97021AF5-ED87-4AA8-B116-2D53E5D6D528}.d|Win32.Build.0 = d|Win32 - {97021AF5-ED87-4AA8-B116-2D53E5D6D528}.Debug|Win32.ActiveCfg = d|Win32 - {97021AF5-ED87-4AA8-B116-2D53E5D6D528}.Debug|Win32.Build.0 = d|Win32 {97021AF5-ED87-4AA8-B116-2D53E5D6D528}.r|Win32.ActiveCfg = r|Win32 {97021AF5-ED87-4AA8-B116-2D53E5D6D528}.r|Win32.Build.0 = r|Win32 - {97021AF5-ED87-4AA8-B116-2D53E5D6D528}.Release|Win32.ActiveCfg = r|Win32 - {97021AF5-ED87-4AA8-B116-2D53E5D6D528}.Release|Win32.Build.0 = r|Win32 {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.d|Win32.ActiveCfg = d|Win32 {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.d|Win32.Build.0 = d|Win32 - {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.Debug|Win32.ActiveCfg = d|Win32 {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.r|Win32.ActiveCfg = r|Win32 {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.r|Win32.Build.0 = r|Win32 - {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.Release|Win32.ActiveCfg = r|Win32 - {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.Release|Win32.Build.0 = r|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Modified: branches/jcatena-branch/ntoskrnl/ntoskrnl.vcproj URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ntoskrn…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ntoskrnl.vcproj [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ntoskrnl.vcproj [iso-8859-1] Thu Feb 4 17:35:49 2010 @@ -63,7 +63,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="mma3.lib mm.lib ke.lib ex.lib se.lib ob.lib ps.lib cm.lib io.lib pnp.lib cc.lib csq.lib cmlib.lib fs.lib rossym.lib wdmguid.lib rt.lib rtl.lib crtnt.lib cpu-i386.lib dbgp.lib kdw.lib hal.lib bootvid.lib kdcom.lib" + AdditionalDependencies="mma3.lib mm.lib $(trapx).lib ke.lib ex.lib se.lib ob.lib ps.lib cm.lib io.lib pnp.lib cc.lib csq.lib cmlib.lib fs.lib rossym.lib wdmguid.lib rt.lib rtl.lib crtnt.lib cpu-i386.lib dbgp.lib kdw.lib hal.lib bootvid.lib kdcom.lib" OutputFile="$(OutDir)/ntoskrnl.exe" AdditionalLibraryDirectories="" IgnoreAllDefaultLibraries="true" @@ -139,7 +139,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="mma3.lib mm.lib ke.lib ex.lib se.lib ob.lib ps.lib cm.lib io.lib pnp.lib cc.lib csq.lib cmlib.lib fs.lib rossym.lib wdmguid.lib rt.lib rtl.lib crtnt.lib cpu-i386.lib dbgp.lib kdw.lib hal.lib bootvid.lib kdcom.lib" + AdditionalDependencies="mma3.lib mm.lib $(trapx).lib ke.lib ex.lib se.lib ob.lib ps.lib cm.lib io.lib pnp.lib cc.lib csq.lib cmlib.lib fs.lib rossym.lib wdmguid.lib rt.lib rtl.lib crtnt.lib cpu-i386.lib dbgp.lib kdw.lib hal.lib bootvid.lib kdcom.lib" OutputFile="$(OutDir)/ntoskrnl.exe" AdditionalLibraryDirectories="" IgnoreAllDefaultLibraries="true" Modified: branches/jcatena-branch/ntoskrnl/trap/i386/TrapStub.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/trap/i3…
============================================================================== --- branches/jcatena-branch/ntoskrnl/trap/i386/TrapStub.h [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/trap/i386/TrapStub.h [iso-8859-1] Thu Feb 4 17:35:49 2010 @@ -47,7 +47,7 @@ #if !(TRAP_STUB_FLAGS & TRAPF_NOSAVESEG) mov KTRAP_FRAME.SegDs[esp], ds mov KTRAP_FRAME.SegEs[esp], es -#if (TRAP_STUB_FLAGS & TRAPF_SAVEFS) +#if !(TRAP_STUB_FLAGS & TRAPF_NOSAVEFS) mov KTRAP_FRAME.SegFs[esp], fs #endif #if !(TRAP_STUB_FLAGS & TRAPF_NOLOADDS) @@ -88,7 +88,7 @@ #if !(TRAP_STUB_FLAGS & TRAPF_NOSAVESEG) mov ds, KTRAP_FRAME.SegDs[esp] mov es, KTRAP_FRAME.SegEs[esp] -#if (TRAP_STUB_FLAGS & TRAPF_SAVEFS) +#if !(TRAP_STUB_FLAGS & TRAPF_NOSAVEFS) mov fs, KTRAP_FRAME.SegFs[esp] #endif #endif @@ -101,10 +101,12 @@ mov edx, KTRAP_FRAME.Eip[esp] add esp, dword ptr offset KTRAP_FRAME.V86Es sti - sysexit + CpuSysExit #endif mov ecx, KTRAP_FRAME.Ecx[esp] mov edx, KTRAP_FRAME.Edx[esp] + + add esp, KTRAP_FRAME_EIP iretd _ASM_END Modified: branches/jcatena-branch/ntoskrnl/trap/i386/trap_asm.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/trap/i3…
============================================================================== --- branches/jcatena-branch/ntoskrnl/trap/i386/trap_asm.h [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/trap/i386/trap_asm.h [iso-8859-1] Thu Feb 4 17:35:49 2010 @@ -1,57 +1,5 @@ -#if 0 -_INLINEF KiTrapStub(HandlerName, Flags) -{ - // alloc stack frame - if (Flags & TRAPF_ERRORCODE) - _ASM sub esp, KTRAP_FRAME.ErrCode - else - _ASM sub esp, KTRAP_FRAME.Eip - // save volatile regs - _ASM mov KTRAP_FRAME.Eax[esp], eax - _ASM mov KTRAP_FRAME.Ecx[esp], ecx - _ASM mov KTRAP_FRAME.Edx[esp], edx - // save ds & es - if (Flags & TRAPF_NOSAVEDSES) - { - _ASM mov KTRAP_FRAME.SegDs[esp], ds - _ASM mov KTRAP_FRAME.SegEs[esp], es - } - // save fs - if (Flags & TRAPF_NOSAVEFS) - _ASM mov KTRAP_FRAME.SegFs[esp], fs - // save non volatile regs - if (Flags & TRAPF_SAVENOVOL) - { - _ASM mov KTRAP_FRAME.Esi[esp], ebp - _ASM mov KTRAP_FRAME.Ebx[esp], ebx - _ASM mov KTRAP_FRAME.Esi[esp], esi - _ASM mov KTRAP_FRAME.Esi[esp], edi - } +_ONCE - // call handler - _ASM mov ecx, esp - _ASM call HandlerName +VOID _NORETURN +KiTrapReturn(IN PKTRAP_FRAME TrapFrame); - // return - if (Flags & TRAPF_NOSAVEDSES) - { - _ASM mov ds, KTRAP_FRAME.SegDs[esp] - _ASM mov es, KTRAP_FRAME.SegEs[esp] - } - if (Flags & TRAPF_NOSAVEFS) - _ASM mov fs, KTRAP_FRAME.SegFs[esp] - if (Flags & TRAPF_SAVENOVOL) - { - _ASM mov KTRAP_FRAME.Esi[esp], ebp - _ASM mov KTRAP_FRAME.Ebx[esp], ebx - _ASM mov KTRAP_FRAME.Esi[esp], esi - _ASM mov KTRAP_FRAME.Esi[esp], edi - } - _ASM mov eax, KTRAP_FRAME.Eax[esp] - _ASM mov ecx, KTRAP_FRAME.Ecx[esp] - _ASM mov edx, KTRAP_FRAME.Edx[esp] - _ASM add esp, KTRAP_FRAME.Eip - _ASM iretd -} -#endif - Modified: branches/jcatena-branch/ntoskrnl/trap/trap.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/trap/tr…
============================================================================== --- branches/jcatena-branch/ntoskrnl/trap/trap.c [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/trap/trap.c [iso-8859-1] Thu Feb 4 17:35:49 2010 @@ -93,10 +93,12 @@ #define TRAP_STUB_FLAGS TRAPF_ERRORCODE #include <TrapStub.h> +#if 0 // 12 MC machine check #define TRAP_STUB_NAME KiTrap12 #define TRAP_STUB_FLAGS 0 #include <TrapStub.h> +#endif // 13 XM simd exception #define TRAP_STUB_NAME KiTrap13 @@ -115,7 +117,7 @@ #define TRAP_STUB_FLAGS 0 #include <TrapStub.h> -#define TRAP_STUB_NAME KiDebugServiceVOID +#define TRAP_STUB_NAME KiDebugService #define TRAP_STUB_FLAGS 0 #include <TrapStub.h> @@ -128,182 +130,12 @@ #define TRAP_STUB_FLAGS TRAPF_FASTSYSCALL #include <TrapStub.h> +#if 0 #define TRAP_STUB_NAME KiInterruptTemplate #define TRAP_STUB_FLAGS TRAPF_VECTOR #include <TrapStub.h> +#endif _NOWARN_POP -/* TRAP EXIT CODE *************************************************************/ -// -// Generic Exit Routine -// -VOID -FASTCALL -KiExitTrap(IN PKTRAP_FRAME TrapFrame, IN UCHAR Skip) -{ - KTRAP_EXIT_SKIP_BITS SkipBits; - PULONG ReturnStack; - - SkipBits.Bits = Skip; - - /* Debugging checks */ - // DPRINTT("DebugChecks\n"); - // KiExitTrapDebugChecks(TrapFrame, SkipBits); - - /* Restore the SEH handler chain */ - KeGetPcr()->Tib.ExceptionList = TrapFrame->ExceptionList; - - /* Check if the previous mode must be restored */ - if (__builtin_expect(!SkipBits.SkipPreviousMode, 0)) /* More INTS than SYSCALLs */ - { - /* Restore it */ - KeGetCurrentThread()->PreviousMode = TrapFrame->PreviousPreviousMode; - } - - /* Check if there are active debug registers */ - if (__builtin_expect(TrapFrame->Dr7 & ~DR7_RESERVED_MASK, 0)) - { - /* Not handled yet */ - DbgPrint("Need Hardware Breakpoint Support!\n"); - DbgBreakPoint(); - while (TRUE); - } - - /* Check if this was a V8086 trap */ - // DPRINTT("V8086\n"); - if (__builtin_expect(TrapFrame->EFlags & EFLAGS_V86_MASK, 0)) - { - // DPRINTT("V8086 r\n"); - // KiTrapReturn(TrapFrame); - return; - } - - /* Check if the trap frame was edited */ - if (__builtin_expect(!(TrapFrame->SegCs & FRAME_EDITED), 0)) - { - /* - * An edited trap frame happens when we need to modify CS and/or ESP but - * don't actually have a ring transition. This happens when a kernelmode - * caller wants to perform an NtContinue to another kernel address, such - * as in the case of SEH (basically, a longjmp), or to a user address. - * - * Therefore, the CPU never saved CS/ESP on the stack because we did not - * get a trap frame due to a ring transition (there was no interrupt). - * Even if we didn't want to restore CS to a new value, a problem occurs - * due to the fact a normal RET would not work if we restored ESP since - * RET would then try to read the result off the stack. - * - * The NT kernel solves this by adding 12 bytes of stack to the exiting - * trap frame, in which EFLAGS, CS, and EIP are stored, and then saving - * the ESP that's being requested into the ErrorCode field. It will then - * exit with an IRET. This fixes both issues, because it gives the stack - * some space where to hold the return address and then end up with the - * wanted stack, and it uses IRET which allows a new CS to be inputted. - * - */ - // DPRINTT("edited\n"); - /* Set CS that is requested */ - TrapFrame->SegCs = TrapFrame->TempSegCs; - - /* First make space on requested stack */ - ReturnStack = (PULONG)(TrapFrame->TempEsp - 12); - TrapFrame->ErrCode = (ULONG_PTR)ReturnStack; - - /* Now copy IRET frame */ - ReturnStack[0] = TrapFrame->Eip; - ReturnStack[1] = TrapFrame->SegCs; - ReturnStack[2] = TrapFrame->EFlags; - - /* Do special edited return */ - // DPRINTT("KiEditedTrapReturn\n"); - // KiEditedTrapReturn(TrapFrame); - return; - } - - /* Check if this is a user trap */ - if (__builtin_expect(KiUserTrap(TrapFrame), 1)) /* Ring 3 is where we spend time */ - { - // DPRINTT("user\n"); - /* Check if segments should be restored */ - if (!SkipBits.SkipSegments) - { - /* Restore segments */ - CpuSetGs(TrapFrame->SegGs); - CpuSetEs(TrapFrame->SegEs); - CpuSetDs(TrapFrame->SegDs); - CpuSetFs(TrapFrame->SegFs); - } - - /* Always restore FS since it goes from KPCR to TEB */ - CpuSetFs(TrapFrame->SegFs); - } - - /* Check for system call -- a system call skips volatiles! */ - if (__builtin_expect(SkipBits.SkipVolatiles, 0)) /* More INTs than SYSCALLs */ - { - // DPRINTT("syscall\n"); - /* Kernel call or user call? */ - if (__builtin_expect(KiUserTrap(TrapFrame), 1)) /* More Ring 3 than 0 */ - { - /* Is SYSENTER supported and/or enabled, or are we stepping code? */ - if (__builtin_expect((KiFastSystemCallDisable) || - (TrapFrame->EFlags & EFLAGS_TF), 0)) - { - /* Exit normally */ - // DPRINTT("normally KiSystemCallTrapReturn\n"); - KiSystemCallTrapReturn(TrapFrame); - } - else - { - /* Restore user FS */ - CpuSetFs(KGDT_R3_TEB | RPL_MASK); - - /* Remove interrupt flag */ - TrapFrame->EFlags &= ~EFLAGS_INTERRUPT_MASK; - __writeeflags(TrapFrame->EFlags); - - /* Exit through SYSEXIT */ - // DPRINTT("sysexit KiSystemCallSysExitReturn\n"); - // KiSystemCallSysExitReturn(TrapFrame); - } - } - else - { - /* Restore EFLags */ - __writeeflags(TrapFrame->EFlags); - - /* Call is kernel, so do a jump back since this wasn't a real INT */ - // DPRINTT("kernel KiSystemCallReturn\n"); - // KiSystemCallReturn(TrapFrame); - } - } - else - { - // DPRINTT("int KiTrapReturn\n"); - /* Return from interrupt */ - // KiTrapReturn(TrapFrame); - } -} - - - -VOID _FASTCALL -KiEoiHelper(IN PKTRAP_FRAME TrapFrame) -{ - // DPRINTT("\n"); - /* Disable interrupts until we return */ - CpuIntDisable(); - - /* Check for APC delivery */ - KiCheckForApcDelivery(TrapFrame); - - /* Now exit the trap for real */ - // DPRINTT("KiExitTrap\n"); - KiExitTrap(TrapFrame, KTE_SKIP_PM_BIT); - UNREACHABLE; -} - - - Modified: branches/jcatena-branch/ntoskrnl/trap/trap.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/trap/tr…
============================================================================== --- branches/jcatena-branch/ntoskrnl/trap/trap.h [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/trap/trap.h [iso-8859-1] Thu Feb 4 17:35:49 2010 @@ -1,6 +1,8 @@ _ONCE -#define DBGTRAPENTRY +#define DBGTRAP DPRINT1 +// #define DBGTRAPENTRY DPRINT1("\n"); DbgDumpCpu(7|DBG_DUMPCPU_TSS); DPRINT1("TrapFrame=%p:\n", TrapFrame); DbgDumpMem(TrapFrame, 0x80) +#define DBGTRAPENTRY DPRINT1("\n"); DbgDumpCpu(7); DPRINT1("TrapFrame=%p:\n", TrapFrame); DbgDumpMem(TrapFrame, sizeof(KTRAP_FRAME)); // TRAP_STUB_FLAGS TrapStub x-macro flags // trap type @@ -9,8 +11,15 @@ #define TRAPF_FASTSYSCALL 4 // options #define TRAPF_NOSAVESEG 0x100 -#define TRAPF_SAVEFS 0x200 +#define TRAPF_NOSAVEFS 0x200 #define TRAPF_SAVENOVOL 0x400 #define TRAPF_NOLOADDS 0x800 #include <trap_asm.h> + +VOID KiTrap02(VOID); + +// temporary +VOID KiExitTrapDebugChecks(IN PKTRAP_FRAME TrapFrame, IN KTRAP_EXIT_SKIP_BITS SkipBits); +VOID KiEnterTrap(IN PKTRAP_FRAME TrapFrame); +VOID KiExitTrap(IN PKTRAP_FRAME TrapFrame, IN UCHAR Skip); Modified: branches/jcatena-branch/ntoskrnl/trap/trap.vcproj URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/trap/tr…
============================================================================== --- branches/jcatena-branch/ntoskrnl/trap/trap.vcproj [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/trap/trap.vcproj [iso-8859-1] Thu Feb 4 17:35:49 2010 @@ -157,9 +157,17 @@ RelativePath=".\trap.c" > </File> + <File + RelativePath=".\TrapExit.c" + > + </File> <Filter Name="i386" > + <File + RelativePath=".\i386\trap_asm.c" + > + </File> </Filter> </Filter> <Filter
14 years, 10 months
1
0
0
0
[evb] 45420: - Fix text output - Allow for more than just one parameter on the bootROM command line (sepearate with commas). - Rdoffset is not hardcoded anymore, but passed on cmdline. Allows using images with different partition offsets.
by evb@svn.reactos.org
Author: evb Date: Thu Feb 4 16:59:22 2010 New Revision: 45420 URL:
http://svn.reactos.org/svn/reactos?rev=45420&view=rev
Log: - Fix text output - Allow for more than just one parameter on the bootROM command line (sepearate with commas). - Rdoffset is not hardcoded anymore, but passed on cmdline. Allows using images with different partition offsets. Modified: trunk/reactos/boot/armllb/envir.c trunk/reactos/boot/armllb/hw/versatile/hwinit.c trunk/reactos/boot/armllb/hw/video.c Modified: trunk/reactos/boot/armllb/envir.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/envir.c?rev=45…
============================================================================== --- trunk/reactos/boot/armllb/envir.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/envir.c [iso-8859-1] Thu Feb 4 16:59:22 2010 @@ -14,7 +14,8 @@ ULONG LlbEnvRamDiskStart; ULONG LlbEnvRamDiskSize; CHAR LlbEnvCmdLine[256]; - +CHAR LlbValueData[32]; + VOID NTAPI LlbEnvParseArguments(IN PATAG Arguments) @@ -105,14 +106,35 @@ NTAPI LlbEnvRead(IN PCHAR ValueName) { - PCHAR ValueData; + PCHAR ValuePointer; + ULONG Length = 0; /* Search for the value name */ - ValueData = strstr(LlbEnvCmdLine, ValueName); - if (ValueData) ValueData += strlen(ValueName) + 1; + ValuePointer = strstr(LlbEnvCmdLine, ValueName); + if (ValuePointer) + { + /* Get the value data and its length */ + ValuePointer += strlen(ValueName) + 1; + if (strchr(ValuePointer, ',')) + { + /* Stop before next parameter */ + Length = strchr(ValuePointer, ',') - ValuePointer; + } + else + { + /* Stop before the string ends */ + Length = strlen(ValuePointer); + } + + /* Copy it */ + strncpy(LlbValueData, ValuePointer, Length); + } + + /* Terminate the data */ + LlbValueData[Length] = ANSI_NULL; /* Return the data */ - return ValueData; + return LlbValueData; } /* EOF */ Modified: trunk/reactos/boot/armllb/hw/versatile/hwinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/hw/versatile/h…
============================================================================== --- trunk/reactos/boot/armllb/hw/versatile/hwinit.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/hw/versatile/hwinit.c [iso-8859-1] Thu Feb 4 16:59:22 2010 @@ -30,6 +30,7 @@ LlbHwLoadOsLoaderFromRam(VOID) { ULONG Base, RootFs, Size; + PCHAR Offset; CHAR CommandLine[64]; /* On versatile, the NAND image is loaded as the RAMDISK */ @@ -40,9 +41,12 @@ /* The OS loader is next, followed by the root file system */ RootFs = Base + 0x80000; // 512 KB (see nandflash) - + + /* Read image offset */ + Offset = LlbEnvRead("rdoffset"); + /* Set parameters for the OS loader */ - sprintf(CommandLine, "rdbase=0x%x rdsize=0x%x rdoffset=%d", RootFs, Size, 32256); + sprintf(CommandLine, "rdbase=0x%x rdsize=0x%x rdoffset=%s", RootFs, Size, Offset); LlbSetCommandLine(CommandLine); /* Return the OS loader base address */ Modified: trunk/reactos/boot/armllb/hw/video.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/hw/video.c?rev…
============================================================================== --- trunk/reactos/boot/armllb/hw/video.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/hw/video.c [iso-8859-1] Thu Feb 4 16:59:22 2010 @@ -351,7 +351,7 @@ /* Amount of characters in a line */ ScreenWidth = LlbHwGetScreenWidth(); - CharsPerLine = ScreenWidth / FONT_HEIGHT; + CharsPerLine = ScreenWidth / 8; /* Handle new line and scrolling */ if (c == '\n')
14 years, 10 months
1
0
0
0
[fireball] 45419: - Update README.WINE.
by fireball@svn.reactos.org
Author: fireball Date: Thu Feb 4 15:49:40 2010 New Revision: 45419 URL:
http://svn.reactos.org/svn/reactos?rev=45419&view=rev
Log: - Update README.WINE. Modified: trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Thu Feb 4 15:49:40 2010 @@ -193,7 +193,7 @@ reactos/base/applications/winhlp32 # Autosync reactos/base/applications/wordpad # Autosync reactos/base/services/rpcss # Synced to Wine-20081105 -reactos/base/system/expand # Out of sync +reactos/base/system/expand # Synced to Wine-1_1_37 reactos/base/system/msiexec # Synced to Wine-1_1_23 reactos/modules/rosapps/winfile # Autosync
14 years, 10 months
1
0
0
0
[fireball] 45418: [base/system/expand] - Update expand utility to Wine-1.1.37. Last update happened 7 years ago and since then it was translated into 20 languages. Sorry to all the translators but the preference is given to a working untranslated version rather than a non-working localized one. See issue #4637 for more details.
by fireball@svn.reactos.org
Author: fireball Date: Thu Feb 4 15:40:36 2010 New Revision: 45418 URL:
http://svn.reactos.org/svn/reactos?rev=45418&view=rev
Log: [base/system/expand] - Update expand utility to Wine-1.1.37. Last update happened 7 years ago and since then it was translated into 20 languages. Sorry to all the translators but the preference is given to a working untranslated version rather than a non-working localized one. See issue #4637 for more details. Removed: trunk/reactos/base/system/expand/lang/ trunk/reactos/base/system/expand/resource.h trunk/reactos/base/system/expand/rsrc.rc Modified: trunk/reactos/base/system/expand/expand.c trunk/reactos/base/system/expand/expand.rbuild trunk/reactos/base/system/expand/expand.rc Modified: trunk/reactos/base/system/expand/expand.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/expand/expand.…
============================================================================== --- trunk/reactos/base/system/expand/expand.c [iso-8859-1] (original) +++ trunk/reactos/base/system/expand/expand.c [iso-8859-1] Thu Feb 4 15:40:36 2010 @@ -1,6 +1,7 @@ /* * Copyright 1997 Victor Schneider * Copyright 2002 Alexandre Julliard + * Copyright 2007 Hans Leidekker * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -14,44 +15,178 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdlib.h> +#define WIN32_LEAN_AND_MEAN + #include <stdio.h> #include <string.h> #include <windows.h> #include <lzexpand.h> -#include <tchar.h> +#include <setupapi.h> -#include "resource.h" +static UINT CALLBACK set_outfile( PVOID context, UINT notification, UINT_PTR param1, UINT_PTR param2 ) +{ + FILE_IN_CABINET_INFO_A *info = (FILE_IN_CABINET_INFO_A *)param1; + char buffer[MAX_PATH]; + char* basename; -int _tmain(int argc, TCHAR *argv[]) + switch (notification) + { + case SPFILENOTIFY_FILEINCABINET: + { + LPSTR outfile = context; + if (outfile[0] != 0) + { + SetLastError( ERROR_NOT_SUPPORTED ); + return FILEOP_ABORT; + } + GetFullPathNameA( info->NameInCabinet, sizeof(buffer), buffer, &basename ); + strcpy( outfile, basename ); + return FILEOP_SKIP; + } + default: return NO_ERROR; + } +} + +static UINT CALLBACK extract_callback( PVOID context, UINT notification, UINT_PTR param1, UINT_PTR param2 ) { - OFSTRUCT SourceOpenStruct1, SourceOpenStruct2; - LONG ret; - HFILE hSourceFile, hDestFile; - TCHAR szMsg[RC_STRING_MAX_SIZE]; + FILE_IN_CABINET_INFO_A *info = (FILE_IN_CABINET_INFO_A *)param1; - if (argc < 2) - { - LoadString( GetModuleHandle(NULL), IDS_Copy, (LPTSTR) szMsg,RC_STRING_MAX_SIZE); - _ftprintf( stderr, szMsg, argv[0] ); - return 1; - } - hSourceFile = LZOpenFile(argv[1], &SourceOpenStruct1, OF_READ); - if (argv[2]) - hDestFile = LZOpenFile(argv[2], &SourceOpenStruct2, OF_CREATE | OF_WRITE); - else - { - TCHAR OriginalName[MAX_PATH]; - GetExpandedName(argv[1], OriginalName); - hDestFile = LZOpenFile(OriginalName, &SourceOpenStruct2, OF_CREATE | OF_WRITE); - } - ret = LZCopy(hSourceFile, hDestFile); - LZClose(hSourceFile); - LZClose(hDestFile); - LoadString( GetModuleHandle(NULL), IDS_FAILS, (LPTSTR) szMsg,RC_STRING_MAX_SIZE); - if (ret <= 0) _ftprintf(stderr,szMsg,ret); - return (ret <= 0); + switch (notification) + { + case SPFILENOTIFY_FILEINCABINET: + { + LPCSTR targetname = context; + + strcpy( info->FullTargetName, targetname ); + return FILEOP_DOIT; + } + default: return NO_ERROR; + } } + +static BOOL option_equal(LPCSTR str1, LPCSTR str2) +{ + if (str1[0] != '/' && str1[0] != '-') + return FALSE; + return !lstrcmpA( str1 + 1, str2 ); +} + +int main(int argc, char *argv[]) +{ + int ret = 0; + char infile[MAX_PATH], outfile[MAX_PATH], actual_name[MAX_PATH]; + char outfile_basename[MAX_PATH], *basename_index; + UINT comp; + + if (argc < 3) + { + fprintf( stderr, "Usage:\n" ); + fprintf( stderr, "\t%s infile outfile\n", argv[0] ); + fprintf( stderr, "\t%s /r infile\n", argv[0] ); + return 1; + } + + if (argc == 3 && (option_equal(argv[1], "R") || option_equal(argv[1], "r"))) + GetFullPathNameA( argv[2], sizeof(infile), infile, NULL ); + else + GetFullPathNameA( argv[1], sizeof(infile), infile, NULL ); + + if (!SetupGetFileCompressionInfoExA( infile, actual_name, sizeof(actual_name), NULL, NULL, NULL, &comp )) + { + fprintf( stderr, "%s: can't open input file %s\n", argv[0], infile ); + return 1; + } + + if (argc == 3 && (option_equal(argv[1], "R") || option_equal(argv[1], "r"))) + { + switch (comp) + { + case FILE_COMPRESSION_MSZIP: + { + outfile_basename[0] = 0; + if (!SetupIterateCabinetA( infile, 0, set_outfile, outfile_basename )) + { + fprintf( stderr, "%s: can't determine original name\n", argv[0] ); + return 1; + } + GetFullPathNameA( infile, sizeof(outfile), outfile, &basename_index ); + *basename_index = 0; + strcat( outfile, outfile_basename ); + break; + } + case FILE_COMPRESSION_WINLZA: + { + GetExpandedNameA( infile, outfile_basename ); + break; + } + default: + { + fprintf( stderr, "%s: can't determine original\n", argv[0] ); + return 1; + } + } + } + else + GetFullPathNameA( argv[2], sizeof(outfile), outfile, NULL ); + + if (!lstrcmpiA( infile, outfile )) + { + fprintf( stderr, "%s: can't expand file to itself\n", argv[0] ); + return 1; + } + + switch (comp) + { + case FILE_COMPRESSION_MSZIP: + { + if (!SetupIterateCabinetA( infile, 0, extract_callback, outfile )) + { + fprintf( stderr, "%s: cabinet extraction failed\n", argv[0] ); + return 1; + } + break; + } + case FILE_COMPRESSION_WINLZA: + { + INT hin, hout; + OFSTRUCT ofin, ofout; + LONG error; + + if ((hin = LZOpenFileA( infile, &ofin, OF_READ )) < 0) + { + fprintf( stderr, "%s: can't open input file %s\n", argv[0], infile ); + return 1; + } + if ((hout = LZOpenFileA( outfile, &ofout, OF_CREATE | OF_WRITE )) < 0) + { + LZClose( hin ); + fprintf( stderr, "%s: can't open output file %s\n", argv[0], outfile ); + return 1; + } + error = LZCopy( hin, hout ); + + LZClose( hin ); + LZClose( hout ); + + if (error < 0) + { + fprintf( stderr, "%s: LZCopy failed, error is %ld\n", argv[0], error ); + return 1; + } + break; + } + default: + { + if (!CopyFileA( infile, outfile, FALSE )) + { + fprintf( stderr, "%s: CopyFileA failed\n", argv[0] ); + return 1; + } + break; + } + } + return ret; +} Modified: trunk/reactos/base/system/expand/expand.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/expand/expand.…
============================================================================== --- trunk/reactos/base/system/expand/expand.rbuild [iso-8859-1] (original) +++ trunk/reactos/base/system/expand/expand.rbuild [iso-8859-1] Thu Feb 4 15:40:36 2010 @@ -3,8 +3,8 @@ <module name="expand" type="win32cui" installbase="system32" installname="expand.exe" > <include base="ReactOS">include/reactos/wine</include> <include base="expand">.</include> - <define name="ANONYMOUSUNIONS" /> <library>lz32</library> + <library>setupapi</library> <library>user32</library> <file>expand.c</file> <file>expand.rc</file> Modified: trunk/reactos/base/system/expand/expand.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/expand/expand.…
============================================================================== --- trunk/reactos/base/system/expand/expand.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/expand/expand.rc [iso-8859-1] Thu Feb 4 15:40:36 2010 @@ -3,5 +3,3 @@ #define REACTOS_STR_INTERNAL_NAME "expand\0" #define REACTOS_STR_ORIGINAL_FILENAME "expand.exe\0" #include <reactos/version.rc> - -#include "rsrc.rc" Removed: trunk/reactos/base/system/expand/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/expand/resourc…
============================================================================== --- trunk/reactos/base/system/expand/resource.h [iso-8859-1] (original) +++ trunk/reactos/base/system/expand/resource.h (removed) @@ -1,10 +1,0 @@ -#ifndef RESOURCE_H__ -#define RESOURCE_H__ - -#define RC_STRING_MAX_SIZE 4096 -#define IDS_Copy 100 -#define IDS_FAILS 101 - -#endif - -/* EOF */ Removed: trunk/reactos/base/system/expand/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/expand/rsrc.rc…
============================================================================== --- trunk/reactos/base/system/expand/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/expand/rsrc.rc (removed) @@ -1,24 +1,0 @@ -#include <windows.h> -#include "resource.h" - -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL - -#include "lang/bg-BG.rc" -#include "lang/cs-CZ.rc" -#include "lang/de-DE.rc" -#include "lang/el-GR.rc" -#include "lang/en-US.rc" -#include "lang/es-ES.rc" -#include "lang/fr-FR.rc" -#include "lang/hu-HU.rc" -#include "lang/id-ID.rc" -#include "lang/it-IT.rc" -#include "lang/ja-JP.rc" -#include "lang/lt-LT.rc" -#include "lang/no-NO.rc" -#include "lang/pl-PL.rc" -#include "lang/pt-BR.rc" -#include "lang/ru-RU.rc" -#include "lang/sv-SE.rc" -#include "lang/th-TH.rc" -#include "lang/uk-UA.rc"
14 years, 10 months
1
0
0
0
[jcatena] 45417: [NTOS] msvc build Update, work in progress
by jcatena@svn.reactos.org
Author: jcatena Date: Thu Feb 4 13:05:14 2010 New Revision: 45417 URL:
http://svn.reactos.org/svn/reactos?rev=45417&view=rev
Log: [NTOS] msvc build Update, work in progress Modified: branches/jcatena-branch/include/ddk/wdm.h branches/jcatena-branch/include/ddk/winddk.h branches/jcatena-branch/include/ndk/i386/asm.h branches/jcatena-branch/include/psdk/winbase.h branches/jcatena-branch/include/psdk/winnt.h branches/jcatena-branch/include/reactos/msc/i386/cpu_c.h branches/jcatena-branch/include/reactos/msc/i386/platf.h branches/jcatena-branch/include/reactos/msc/intrin2.h branches/jcatena-branch/lib/cpu/i386/RegSave.c branches/jcatena-branch/lib/rtl/critical.c branches/jcatena-branch/lib/rtl/timerqueue.c branches/jcatena-branch/ntoskrnl/ex/sysinfo.c branches/jcatena-branch/ntoskrnl/include/internal/i386/asmmacro.S branches/jcatena-branch/ntoskrnl/include/internal/i386/ke.h branches/jcatena-branch/ntoskrnl/include/internal/ke.h branches/jcatena-branch/ntoskrnl/include/internal/trap_x.h branches/jcatena-branch/ntoskrnl/include/ntoskrnl_bld.h branches/jcatena-branch/ntoskrnl/kdbg/kdb.c branches/jcatena-branch/ntoskrnl/ke/i386/cpu.c branches/jcatena-branch/ntoskrnl/ke/i386/exp.c branches/jcatena-branch/ntoskrnl/ke/i386/irqobj.c branches/jcatena-branch/ntoskrnl/ke/i386/kiinit.c branches/jcatena-branch/ntoskrnl/ke/i386/traphdlr.c branches/jcatena-branch/ntoskrnl/ke/ke.vcproj branches/jcatena-branch/ntoskrnl/ntoskrnl.sln branches/jcatena-branch/ntoskrnl/ntoskrnl.vcproj branches/jcatena-branch/ntoskrnl/trap/i386/TrapStub.h branches/jcatena-branch/ntoskrnl/trap/trap.c Modified: branches/jcatena-branch/include/ddk/wdm.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/ddk/wdm.…
============================================================================== --- branches/jcatena-branch/include/ddk/wdm.h [iso-8859-1] (original) +++ branches/jcatena-branch/include/ddk/wdm.h [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -1,3 +1,4 @@ +_ONCE #ifndef _WDMDDK_ #define _WDMDDK_ @@ -365,51 +366,6 @@ #define PF_CHANNELS_ENABLED 16 - -// -// Intrinsics (note: taken from our winnt.h) -// FIXME: 64-bit -// -#if defined(__GNUC__) - -static __inline__ BOOLEAN -InterlockedBitTestAndSet(IN LONG volatile *Base, - IN LONG Bit) -{ -#if defined(_M_IX86) - LONG OldBit; - __asm__ __volatile__("lock " - "btsl %2,%1\n\t" - "sbbl %0,%0\n\t" - :"=r" (OldBit),"+m" (*Base) - :"Ir" (Bit) - : "memory"); - return OldBit; -#else - return (_InterlockedOr(Base, 1 << Bit) >> Bit) & 1; -#endif -} - -static __inline__ BOOLEAN -InterlockedBitTestAndReset(IN LONG volatile *Base, - IN LONG Bit) -{ -#if defined(_M_IX86) - LONG OldBit; - __asm__ __volatile__("lock " - "btrl %2,%1\n\t" - "sbbl %0,%0\n\t" - :"=r" (OldBit),"+m" (*Base) - :"Ir" (Bit) - : "memory"); - return OldBit; -#else - return (_InterlockedAnd(Base, ~(1 << Bit)) >> Bit) & 1; -#endif -} - -#endif - #define BitScanForward _BitScanForward #define BitScanReverse _BitScanReverse Modified: branches/jcatena-branch/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/ddk/wind…
============================================================================== --- branches/jcatena-branch/include/ddk/winddk.h [iso-8859-1] (original) +++ branches/jcatena-branch/include/ddk/winddk.h [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -8452,22 +8452,7 @@ KeLeaveCriticalRegion( VOID); -#ifdef _X86_ - -static __inline -VOID -KeMemoryBarrier( - VOID) -{ - volatile LONG Barrier; -#if defined(__GNUC__) - __asm__ __volatile__ ("xchg %%eax, %0" : : "m" (Barrier) : "%eax"); -#elif defined(_MSC_VER) - __asm xchg [Barrier], eax -#endif -} - -#endif +#define KeMemoryBarrier _MemoryBarrier NTKERNELAPI LONG Modified: branches/jcatena-branch/include/ndk/i386/asm.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/ndk/i386…
============================================================================== --- branches/jcatena-branch/include/ndk/i386/asm.h [iso-8859-1] (original) +++ branches/jcatena-branch/include/ndk/i386/asm.h [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -55,16 +55,16 @@ #ifdef __ASM__ #define RPL_MASK 0x0003 #define MODE_MASK 0x0001 -#define KGDT_R0_CODE (0x8) -#define KGDT_R0_DATA (0x10) -#define KGDT_R3_CODE (0x18) -#define KGDT_R3_DATA (0x20) -#define KGDT_TSS (0x28) -#define KGDT_R0_PCR (0x30) -#define KGDT_R3_TEB (0x38) -#define KGDT_LDT (0x48) -#define KGDT_DF_TSS (0x50) -#define KGDT_NMI_TSS (0x58) +#define KGDT_R0_CODE 0x8 +#define KGDT_R0_DATA 0x10 +#define KGDT_R3_CODE 0x18 +#define KGDT_R3_DATA 0x20 +#define KGDT_TSS 0x28 +#define KGDT_R0_PCR 0x30 +#define KGDT_R3_TEB 0x38 +#define KGDT_LDT 0x48 +#define KGDT_DF_TSS 0x50 +#define KGDT_NMI_TSS 0x58 #endif // Modified: branches/jcatena-branch/include/psdk/winbase.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/psdk/win…
============================================================================== --- branches/jcatena-branch/include/psdk/winbase.h [iso-8859-1] (original) +++ branches/jcatena-branch/include/psdk/winbase.h [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -1849,11 +1849,12 @@ #else // !(defined (_M_AMD64) || defined (_M_IA64)) +#define InterlockedExchange _InterlockedExchange +#define InterlockedCompareExchange _InterlockedCompareExchange + LONG WINAPI InterlockedOr(IN OUT LONG volatile *,LONG); LONG WINAPI InterlockedAnd(IN OUT LONG volatile *,LONG); -LONG WINAPI InterlockedCompareExchange(IN OUT LONG volatile *,LONG,LONG); LONG WINAPI InterlockedDecrement(IN OUT LONG volatile *); -LONG WINAPI InterlockedExchange(IN OUT LONG volatile *,LONG); #if defined(_WIN64) /* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */ #define InterlockedExchangePointer(t,v) \ @@ -1866,7 +1867,7 @@ #define InterlockedExchangePointer(t,v) \ (PVOID)InterlockedExchange((LPLONG)(t),(LONG)(v)) /* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */ - #define InterlockedCompareExchangePointer(d,e,c) \ +#define InterlockedCompareExchangePointer(d,e,c) \ (PVOID)InterlockedCompareExchange((LPLONG)(d),(LONG)(e),(LONG)(c)) #endif LONG WINAPI InterlockedExchangeAdd(IN OUT LONG volatile *,LONG); Modified: branches/jcatena-branch/include/psdk/winnt.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/psdk/win…
============================================================================== --- branches/jcatena-branch/include/psdk/winnt.h [iso-8859-1] (original) +++ branches/jcatena-branch/include/psdk/winnt.h [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -5007,23 +5007,7 @@ /* TODO: Other architectures than X86 */ #if defined(_M_IX86) -#if defined(_MSC_VER) -FORCEINLINE -VOID -MemoryBarrier (VOID) -{ - LONG Barrier; - __asm { xchg Barrier, eax } -} -#else -FORCEINLINE -VOID -MemoryBarrier(VOID) -{ - LONG Barrier; - __asm__ __volatile__("xchgl %%eax, %[Barrier]" : : [Barrier] "m" (Barrier) : "memory"); -} -#endif +#define MemoryBarrier _MemoryBarrier #elif defined (_M_AMD64) #define MemoryBarrier __faststorefence #elif defined(_M_PPC) Modified: branches/jcatena-branch/include/reactos/msc/i386/cpu_c.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/reactos/…
============================================================================== --- branches/jcatena-branch/include/reactos/msc/i386/cpu_c.h [iso-8859-1] (original) +++ branches/jcatena-branch/include/reactos/msc/i386/cpu_c.h [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -7,8 +7,9 @@ // not recognized by inline assembler: // mov eax, cr4 #define CpuMovEaxCr4 _ASM _emit 0x0f _ASM _emit 0x20 _ASM _emit 0xe0 +#define CpuMovCr4Eax _ASM _emit 0x0f _ASM _emit 0x22 _ASM _emit 0xe0 // sysexit -#define CpuSysExit() _ASM _emit 0x0f _ASM _emit 0x35 +#define CpuSysExit _ASM _emit 0x0f _ASM _emit 0x35 // enable / disable int flag #ifndef CPU_PREFER_NOINTRIN @@ -89,6 +90,16 @@ #define CpuSetTr_m(x) _ASM ltr x // get/set crx reg +_INLINEF void CpuGetCr0(i32u x) {_ASM_BEGIN + mov eax, cr0 + _ASM_END} + +_INLINEF void CpuSetCr0(i32u x) {_ASM_BEGIN + mov eax, x + mov cr0, eax + _ASM_END} +#define CpuSetCr0_m(x) _ASM mov cr0, x + _INLINEF void CpuGetCr2(i32u x) {_ASM_BEGIN mov eax, cr2 _ASM_END} @@ -98,6 +109,27 @@ mov cr2, eax _ASM_END} #define CpuSetCr2_m(x) _ASM mov cr2, x + +_INLINEF void CpuGetCr3(i32u x) {_ASM_BEGIN + mov eax, cr3 + _ASM_END} + +_INLINEF void CpuSetCr3(i32u x) {_ASM_BEGIN + mov eax, x + mov cr3, eax + _ASM_END} +#define CpuSetCr3_m(x) _ASM mov cr3, x + +_INLINEF void CpuGetCr4(i32u x) {_ASM_BEGIN + // mov eax, cr4 + CpuMovEaxCr4 + _ASM_END} + +_INLINEF void CpuSetCr4(i32u x) {_ASM_BEGIN + mov eax, x + // mov cr4, eax + CpuMovCr4Eax + _ASM_END} // get/set segment registers _INLINEF i16u CpuGetCs(void) {_ASM_BEGIN Modified: branches/jcatena-branch/include/reactos/msc/i386/platf.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/reactos/…
============================================================================== --- branches/jcatena-branch/include/reactos/msc/i386/platf.h [iso-8859-1] (original) +++ branches/jcatena-branch/include/reactos/msc/i386/platf.h [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -59,9 +59,9 @@ #define _SECTION_CONST(x) __pragma(const_seg(push, x)) #define _SECTION_CONST_END __pragma(const_seg(pop)) +#define _ASM __asm #define _ASM_BEGIN __asm { #define _ASM_END } -#define _ASM __asm #define IN #define OUT @@ -69,6 +69,9 @@ /************************************************************************* utility macros *************************************************************************/ + +// note: double definitions necessary because preprocessor behavior + // token paste #define tokenpaste_(a1, a2) a1##a2 #define tokenpaste(a1, a2) tokenpaste_(a1, a2) @@ -78,7 +81,6 @@ #define sfy(x) sfy_(x) // string literal macros -// double definitions here are necessary because preprocessor behavior #define T16(x) tokenpaste(L, x) #define T8(x) x #ifdef _UNICODE Modified: branches/jcatena-branch/include/reactos/msc/intrin2.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/reactos/…
============================================================================== --- branches/jcatena-branch/include/reactos/msc/intrin2.h [iso-8859-1] (original) +++ branches/jcatena-branch/include/reactos/msc/intrin2.h [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -21,7 +21,7 @@ _INLINEF void _MemoryBarrier(void) { i32 Barrier; - __asm xchg Barrier, eax + _ASM xchg Barrier, eax } i8u _interlockedbittestandset(long volatile *dest, long bit); @@ -52,7 +52,6 @@ return (void *)_InterlockedCompareExchange((long volatile *)dest, (long)exch, (long)comperand); } #endif -#define InterlockedCompareExchangePointer _InterlockedCompareExchange long _InterlockedExchange(volatile long * const Target, const long Value); void * _InterlockedExchangePointer(void * volatile * const Target, void * const Value); Modified: branches/jcatena-branch/lib/cpu/i386/RegSave.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/lib/cpu/i386/Reg…
============================================================================== --- branches/jcatena-branch/lib/cpu/i386/RegSave.c [iso-8859-1] (original) +++ branches/jcatena-branch/lib/cpu/i386/RegSave.c [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -37,7 +37,7 @@ mov eax, cr3 mov CPUR_ALL.c.cr3[ebx], eax // mov eax, cr4 // legal instruction not recognized, msc bug - mov_eax_cr4 + CpuMovEaxCr4 mov CPUR_ALL.c.cr4[ebx], eax sgdt CPUR_ALL.c.gdtr.limit[ebx] sidt CPUR_ALL.c.idtr.limit[ebx] Modified: branches/jcatena-branch/lib/rtl/critical.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/lib/rtl/critical…
============================================================================== --- branches/jcatena-branch/lib/rtl/critical.c [iso-8859-1] (original) +++ branches/jcatena-branch/lib/rtl/critical.c [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -65,7 +65,7 @@ } DPRINT("Created Event: %p \n", hNewEvent); - if ((hEvent = (HANDLE)_InterlockedCompareExchangePointer((PVOID*)&CriticalSection->LockSemaphore, + if ((hEvent = (HANDLE)InterlockedCompareExchangePointer((PVOID*)&CriticalSection->LockSemaphore, (PVOID)hNewEvent, 0))) { @@ -604,7 +604,7 @@ RtlLeaveCriticalSection(PRTL_CRITICAL_SECTION CriticalSection) { #ifndef NDEBUG - HANDLE Thread = (HANDLE)NtCurrentTeb()->Cid.UniqueThread; + HANDLE Thread = (HANDLE)NtCurrentTeb()->ClientId.UniqueThread; /* In win this case isn't checked. However it's a valid check so it should only be performed in debug builds! */ Modified: branches/jcatena-branch/lib/rtl/timerqueue.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/lib/rtl/timerque…
============================================================================== --- branches/jcatena-branch/lib/rtl/timerqueue.c [iso-8859-1] (original) +++ branches/jcatena-branch/lib/rtl/timerqueue.c [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -372,7 +372,7 @@ NTSTATUS status = RtlCreateTimerQueue(&q); if (status == STATUS_SUCCESS) { - PVOID p = _InterlockedCompareExchangePointer( + PVOID p = InterlockedCompareExchangePointer( (void **) &default_timer_queue, q, NULL); if (p) /* Got beat to the punch. */ Modified: branches/jcatena-branch/ntoskrnl/ex/sysinfo.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ex/sysi…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ex/sysinfo.c [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ex/sysinfo.c [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -2023,19 +2023,8 @@ { PAGED_CODE(); -#if defined(_M_IX86) || defined(_M_AMD64) - __wbinvd(); -#elif defined(_M_PPC) - __asm__ __volatile__("tlbsync"); -#elif defined(_M_MIPS) - DPRINT1("NtFlushInstructionCache() is not implemented\n"); - for (;;); -#elif defined(_M_ARM) - __asm__ __volatile__("mov r1, #0; mcr p15, 0, r1, c7, c5, 0"); -#else -#error Unknown architecture -#endif - return STATUS_SUCCESS; + CpuWbinvd(); + return TRUE; } ULONG Modified: branches/jcatena-branch/ntoskrnl/include/internal/i386/asmmacro.S URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/include…
============================================================================== --- branches/jcatena-branch/ntoskrnl/include/internal/i386/asmmacro.S [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/include/internal/i386/asmmacro.S [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -67,7 +67,7 @@ .macro idt Handler, Bits .long \Handler .short \Bits - .short KGDT_R0_CODE +// .short KGDT_R0_CODE .endm // Modified: branches/jcatena-branch/ntoskrnl/include/internal/i386/ke.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/include…
============================================================================== --- branches/jcatena-branch/ntoskrnl/include/internal/i386/ke.h [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/include/internal/i386/ke.h [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -461,9 +461,9 @@ // extern VOID __cdecl KiTrap02(VOID); VOID DECLSPEC_NORETURN KiTrap02(VOID); -extern VOID __cdecl KiTrap08(VOID); -extern VOID __cdecl KiTrap13(VOID); -extern VOID __cdecl KiFastCallEntry(VOID); +// extern VOID __cdecl KiTrap08(VOID); +// extern VOID __cdecl KiTrap13(VOID); +// extern VOID __cdecl KiFastCallEntry(VOID); extern VOID NTAPI ExpInterlockedPopEntrySListFault(VOID); extern VOID __cdecl CopyParams(VOID); extern VOID __cdecl ReadBatch(VOID); @@ -475,7 +475,7 @@ // // Trap Macros // -// #include "trap_x.h" +#include "trap_x.h" // // Returns a thread's FPU save area @@ -666,6 +666,40 @@ return Result; } +VOID +FORCEINLINE +KiCheckForApcDelivery(IN PKTRAP_FRAME TrapFrame) +{ + PKTHREAD Thread; + KIRQL OldIrql; + + /* Check for V8086 or user-mode trap */ + if ((TrapFrame->EFlags & EFLAGS_V86_MASK) || (KiUserTrap(TrapFrame))) + { + /* Get the thread */ + Thread = KeGetCurrentThread(); + while (TRUE) + { + /* Turn off the alerted state for kernel mode */ + Thread->Alerted[KernelMode] = FALSE; + + /* Are there pending user APCs? */ + if (!Thread->ApcState.UserApcPending) break; + + /* Raise to APC level and enable interrupts */ + OldIrql = KfRaiseIrql(APC_LEVEL); + _enable(); + + /* Deliver APCs */ + KiDeliverApc(UserMode, NULL, TrapFrame); + + /* Restore IRQL and disable interrupts once again */ + KfLowerIrql(OldIrql); + _disable(); + } + } +} + NTSTATUS NTAPI PsConvertToGuiThread(VOID); // Modified: branches/jcatena-branch/ntoskrnl/include/internal/ke.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/include…
============================================================================== --- branches/jcatena-branch/ntoskrnl/include/internal/ke.h [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/include/internal/ke.h [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -140,7 +140,6 @@ extern PGDI_BATCHFLUSH_ROUTINE KeGdiFlushUserBatch; extern ULONGLONG BootCycles, BootCyclesEnd; extern ULONG ProcessCount; -extern VOID __cdecl KiInterruptTemplate(VOID); /* MACROS *************************************************************************/ Modified: branches/jcatena-branch/ntoskrnl/include/internal/trap_x.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/include…
============================================================================== --- branches/jcatena-branch/ntoskrnl/include/internal/trap_x.h [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/include/internal/trap_x.h [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -4,9 +4,48 @@ * FILE: ntoskrnl/include/trap_x.h * PURPOSE: Internal Inlined Functions for the Trap Handling Code * PROGRAMMERS: ReactOS Portable Systems Group + !!! this is horrible. Portable? LOL + TODO: + - use macros whenever possible instead of inline assembly + - create needed asm macros in <arch>\<include>, not here + - avoid unnecessary conditional jumps by generating the right prolog + and epilogs for each trap type + - fix dependency of stack frame optimization */ + #ifndef _TRAP_X_ #define _TRAP_X_ + +#include <debug.h> + +// !!! temp for testing +extern KINTERRUPT *TrapStubInterrupt; + +VOID KiFastCallEntry(VOID); +VOID KiTrap08(VOID); +VOID KiTrap13(VOID); + + +VOID +// DECLSPEC_NORETURN +FASTCALL +KiServiceExit(IN PKTRAP_FRAME TrapFrame, + IN NTSTATUS Status); + +VOID +// DECLSPEC_NORETURN +FASTCALL +KiServiceExit2(IN PKTRAP_FRAME TrapFrame); + +VOID +_NORETURN +_FASTCALL +KiSystemServiceHandler(IN PKTRAP_FRAME TrapFrame); + +VOID +_NORETURN +_FASTCALL +KiFastCallEntryHandler(IN PKTRAP_FRAME TrapFrame); // // Debug Macros @@ -68,7 +107,7 @@ VOID FORCEINLINE KiExitTrapDebugChecks(IN PKTRAP_FRAME TrapFrame, - IN KTRAP_STATE_BITS SkipBits) + IN KTRAP_EXIT_SKIP_BITS SkipBits) { /* Make sure interrupts are disabled */ if (__readeflags() & EFLAGS_INTERRUPT_MASK) @@ -122,14 +161,14 @@ KIRQL OldIrql; /* Check if this was a user call */ - if (KiUserMode(TrapFrame)) + if (TrapFrame->SegCs & MODE_MASK) { /* Make sure we are not returning with elevated IRQL */ OldIrql = KeGetCurrentIrql(); if (OldIrql != PASSIVE_LEVEL) { /* Forcibly put us in a sane state */ - KeGetPcr()->CurrentIrql = PASSIVE_LEVEL; + KeGetPcr()->Irql = PASSIVE_LEVEL; _disable(); /* Fail */ @@ -175,7 +214,7 @@ // VOID FORCEINLINE -DECLSPEC_NORETURN +// DECLSPEC_NORETURN /* Do not mark this as DECLSPEC_NORETURN because possibly executing code follows it! */ KiSystemCallReturn(IN PKTRAP_FRAME TrapFrame) { /* Restore nonvolatiles, EAX, and do a "jump" back to the kernel caller */ @@ -203,6 +242,7 @@ "movl %c[e](%%esp), %%edx\n" "addl $%c[v],%%esp\n" /* A WHOLE *KERNEL* frame since we're not IRET'ing */ "jmp *%%edx\n" + ".globl _KiSystemCallExit2\n_KiSystemCallExit2:\n" : : "r"(TrapFrame), [b] "i"(KTRAP_FRAME_EBX), @@ -221,8 +261,8 @@ } VOID -FORCEINLINE DECLSPEC_NORETURN +FORCEINLINE KiSystemCallTrapReturn(IN PKTRAP_FRAME TrapFrame) { /* Regular interrupt exit, but we only restore EAX as a volatile */ @@ -235,12 +275,13 @@ mov ebp, [esp+KTRAP_FRAME_EBP] mov eax, [esp+KTRAP_FRAME_EAX] add esp, KTRAP_FRAME_EIP - iret + iretd _ASM_END #elif defined(__GNUC__) __asm__ __volatile__ ( - "movl %0, %%esp\n" + ".globl _KiSystemCallExit\n_KiSystemCallExit:\n" + "movl %0, %%esp\n" "movl %c[b](%%esp), %%ebx\n" "movl %c[s](%%esp), %%esi\n" "movl %c[i](%%esp), %%edi\n" @@ -282,7 +323,7 @@ mov ecx, [esp+KTRAP_FRAME_ESP] add esp, KTRAP_FRAME_V86_ES sti - sysexit + CpuSysExit _ASM_END #elif defined(__GNUC__) __asm__ __volatile__ @@ -332,7 +373,7 @@ mov edi, [esp+KTRAP_FRAME_EDI] mov ebp, [esp+KTRAP_FRAME_EBP] add esp, KTRAP_FRAME_EIP - iret + iretd _ASM_END #elif defined(__GNUC__) __asm__ __volatile__ @@ -368,6 +409,76 @@ VOID FORCEINLINE DECLSPEC_NORETURN +KiDirectTrapReturn(IN PKTRAP_FRAME TrapFrame) +{ +#if defined(_MSC_VER) + _ASM_BEGIN + mov esp, TrapFrame + add esp, KTRAP_FRAME_EIP + iretd + _ASM_END +#elif defined(__GNUC__) + /* Regular interrupt exit but we're not restoring any registers */ + __asm__ __volatile__ + ( + "movl %0, %%esp\n" + "addl $%c[e],%%esp\n" + "iret\n" + : + : "r"(TrapFrame), + [e] "i"(KTRAP_FRAME_EIP) + : "%esp" + ); +#elif +#error unsupported compiler +#endif + UNREACHABLE; +} + +VOID +FORCEINLINE +DECLSPEC_NORETURN +KiCallReturn(IN PKTRAP_FRAME TrapFrame) +{ + /* Pops a trap frame out of the stack but returns with RET instead of IRET */ +#if defined(_MSC_VER) + _ASM_BEGIN + mov esp, TrapFrame + mov ebx, [esp+KTRAP_FRAME_EBX] + mov esi, [esp+KTRAP_FRAME_ESI] + mov edi, [esp+KTRAP_FRAME_EDI] + mov ebp, [esp+KTRAP_FRAME_EBP] + add esp, KTRAP_FRAME_EIP + ret + _ASM_END +#elif defined(__GNUC__) + __asm__ __volatile__ + ( + "movl %0, %%esp\n" + "movl %c[b](%%esp), %%ebx\n" + "movl %c[s](%%esp), %%esi\n" + "movl %c[i](%%esp), %%edi\n" + "movl %c[p](%%esp), %%ebp\n" + "addl $%c[e],%%esp\n" + "ret\n" + : + : "r"(TrapFrame), + [b] "i"(KTRAP_FRAME_EBX), + [s] "i"(KTRAP_FRAME_ESI), + [i] "i"(KTRAP_FRAME_EDI), + [p] "i"(KTRAP_FRAME_EBP), + [e] "i"(KTRAP_FRAME_EIP) + : "%esp" + ); +#elif +#error unsupported compiler +#endif + UNREACHABLE; +} + +VOID +FORCEINLINE +DECLSPEC_NORETURN KiEditedTrapReturn(IN PKTRAP_FRAME TrapFrame) { /* Regular interrupt exit */ @@ -382,7 +493,7 @@ mov edi, [esp+KTRAP_FRAME_EDI] mov ebp, [esp+KTRAP_FRAME_EBP] add esp, KTRAP_FRAME_ERROR_CODE /* We *WANT* the error code since ESP is there! */ - iret + iretd _ASM_END #elif defined(__GNUC__) __asm__ __volatile__ @@ -417,14 +528,135 @@ } // +// "BOP" code used by VDM and V8086 Mode +// +VOID +FORCEINLINE +KiIssueBop(VOID) +{ +#if defined(_MSC_VER) + _ASM_BEGIN + _emit 0xc4 + _emit 0xc4 + _ASM_END +#elif defined(__GNUC__) + /* Invalid instruction that an invalid opcode handler must trap and handle */ + asm volatile(".byte 0xC4\n.byte 0xC4\n"); +#elif +#error unsupported compiler +#endif +} + +// +// Returns whether or not this is a V86 trap by checking the EFLAGS field. +// +// FIXME: GCC 4.5 Can Improve this with "goto labels" +// +BOOLEAN +FORCEINLINE +KiIsV8086TrapSafe(IN PKTRAP_FRAME TrapFrame) +{ + BOOLEAN Result; + + /* + * The check MUST be done this way, as we guarantee that no DS/ES/FS segment + * is used (since it might be garbage). + * + * Instead, we use the SS segment which is guaranteed to be correct. Because + * operate in 32-bit flat mode, this works just fine. + */ +#if defined(_MSC_VER) + _ASM_BEGIN + test ss:[TrapFrame+KTRAP_FRAME_EFLAGS], EFLAGS_V86_MASK + setnz Result + _ASM_END +#elif defined(__GNUC__) + asm volatile + ( + "testl $%c[f], %%ss:%1\n" + "setnz %0\n" + : "=a"(Result) + : "m"(TrapFrame->EFlags), + [f] "i"(EFLAGS_V86_MASK) + ); +#elif +#error unsupported compiler +#endif + + /* If V86 flag was set */ + return Result; +} + +// +// Returns whether or not this is a user-mode trap by checking the SegCs field. +// +// FIXME: GCC 4.5 Can Improve this with "goto labels" +// +BOOLEAN +FORCEINLINE +KiIsUserTrapSafe(IN PKTRAP_FRAME TrapFrame) +{ + BOOLEAN Result; + + /* + * The check MUST be done this way, as we guarantee that no DS/ES/FS segment + * is used (since it might be garbage). + * + * Instead, we use the SS segment which is guaranteed to be correct. Because + * operate in 32-bit flat mode, this works just fine. + */ +#if defined(_MSC_VER) + _ASM_BEGIN + cmp ss:[TrapFrame+KTRAP_FRAME_CS], KGDT_R0_CODE + setnz Result + _ASM_END +#elif defined(__GNUC__) + asm volatile + ( + "cmp $%c[f], %%ss:%1\n" + "setnz %0\n" + : "=a"(Result) + : "m"(TrapFrame->SegCs), + [f] "i"(KGDT_R0_CODE) + ); +#elif +#error unsupported compiler +#endif + + /* If V86 flag was set */ + return Result; +} + +VOID +FORCEINLINE +KiUserSystemCall(IN PKTRAP_FRAME TrapFrame) +{ + /* + * Kernel call or user call? + * + * This decision is made in inlined assembly because we need to patch + * the relative offset of the user-mode jump to point to the SYSEXIT + * routine if the CPU supports it. The only way to guarantee that a + * relative jnz/jz instruction is generated is to force it with the + * inline assembler. + */ + // !!! + DPRINT1("!!!FIX\n"); +#if 0 + if (TrapFrame->SegCs & 1) + KiSystemCallExit(TrapFrame); +#endif +} + +// // Generic Exit Routine // VOID FORCEINLINE -DECLSPEC_NORETURN KiExitTrap(IN PKTRAP_FRAME TrapFrame, IN UCHAR Skip) { + // KTRAP_EXIT_SKIP_BITS SkipBits = { .Bits = Skip }; KTRAP_EXIT_SKIP_BITS SkipBits; PULONG ReturnStack; @@ -440,7 +672,7 @@ if (__builtin_expect(!SkipBits.SkipPreviousMode, 0)) /* More INTS than SYSCALLs */ { /* Restore it */ - KeGetCurrentThread()->PreviousMode = TrapFrame->PreviousPreviousMode; + KeGetCurrentThread()->PreviousMode = (CCHAR)TrapFrame->PreviousPreviousMode; } /* Check if there are active debug registers */ @@ -515,19 +747,19 @@ /* Check for system call -- a system call skips volatiles! */ if (__builtin_expect(SkipBits.SkipVolatiles, 0)) /* More INTs than SYSCALLs */ { - /* Kernel call or user call? */ - if (__builtin_expect(KiUserTrap(TrapFrame), 1)) /* More Ring 3 than 0 */ + /* User or kernel call? */ + KiUserSystemCall(TrapFrame); + + /* Restore EFLags */ + __writeeflags(TrapFrame->EFlags); + + /* Call is kernel, so do a jump back since this wasn't a real INT */ + KiSystemCallReturn(TrapFrame); + + /* If we got here, this is SYSEXIT: are we stepping code? */ + if (!(TrapFrame->EFlags & EFLAGS_TF)) { - /* Is SYSENTER supported and/or enabled, or are we stepping code? */ - if (__builtin_expect((KiFastSystemCallDisable) || - (TrapFrame->EFlags & EFLAGS_TF), 0)) - { - /* Exit normally */ - KiSystemCallTrapReturn(TrapFrame); - } - else - { - /* Restore user FS */ + /* Restore user FS */ Ke386SetFs(KGDT_R3_TEB | RPL_MASK); /* Remove interrupt flag */ @@ -537,21 +769,13 @@ /* Exit through SYSEXIT */ KiSystemCallSysExitReturn(TrapFrame); } - } - else - { - /* Restore EFLags */ - __writeeflags(TrapFrame->EFlags); - /* Call is kernel, so do a jump back since this wasn't a real INT */ - KiSystemCallReturn(TrapFrame); - } - } - else - { - /* Return from interrupt */ - KiTrapReturn(TrapFrame); - } + /* Exit through IRETD, either due to debugging or due to lack of SYSEXIT */ + KiSystemCallTrapReturn(TrapFrame); + } + + /* Return from interrupt */ + KiTrapReturn(TrapFrame); } // @@ -613,8 +837,7 @@ Ke386SetDs(KGDT_R3_DATA | RPL_MASK); Ke386SetEs(KGDT_R3_DATA | RPL_MASK); - /* Save exception list and bogus previous mode */ - TrapFrame->PreviousPreviousMode = -1; + /* Save exception list */ TrapFrame->ExceptionList = KeGetPcr()->Tib.ExceptionList; /* Clear direction flag */ @@ -636,36 +859,44 @@ FORCEINLINE KiEnterInterruptTrap(IN PKTRAP_FRAME TrapFrame) { - /* Set bogus previous mode */ - TrapFrame->PreviousPreviousMode = -1; - - /* Check for V86 mode */ - if (__builtin_expect(TrapFrame->EFlags & EFLAGS_V86_MASK, 0)) - { - DbgPrint("Need V8086 Interrupt Support!\n"); - while (TRUE); - } - - /* Check if this wasn't kernel code */ - if (__builtin_expect(TrapFrame->SegCs != KGDT_R0_CODE, 1)) /* Ring 3 is more common */ - { - /* Save segments and then switch to correct ones */ + ULONG Ds, Es; + + /* Check for V86 mode, otherwise check for ring 3 code */ + if (__builtin_expect(KiIsV8086TrapSafe(TrapFrame), 0)) + { + /* Set correct segments */ + Ke386SetDs(KGDT_R3_DATA | RPL_MASK); + Ke386SetEs(KGDT_R3_DATA | RPL_MASK); + Ke386SetFs(KGDT_R0_PCR); + + /* Restore V8086 segments into Protected Mode segments */ + TrapFrame->SegFs = TrapFrame->V86Fs; + TrapFrame->SegGs = TrapFrame->V86Gs; + TrapFrame->SegDs = TrapFrame->V86Ds; + TrapFrame->SegEs = TrapFrame->V86Es; + } + else if (__builtin_expect(KiIsUserTrapSafe(TrapFrame), 1)) /* Ring 3 is more common */ + { + /* Save DS/ES and load correct values */ + Es = Ke386GetEs(); + Ds = Ke386GetDs(); + TrapFrame->SegDs = Ds; + TrapFrame->SegEs = Es; + Ke386SetDs(KGDT_R3_DATA | RPL_MASK); + Ke386SetEs(KGDT_R3_DATA | RPL_MASK); + + /* Save FS/GS */ TrapFrame->SegFs = Ke386GetFs(); TrapFrame->SegGs = Ke386GetGs(); - TrapFrame->SegDs = Ke386GetDs(); - TrapFrame->SegEs = Ke386GetEs(); + + /* Set correct FS */ Ke386SetFs(KGDT_R0_PCR); - Ke386SetDs(KGDT_R3_DATA | RPL_MASK); - Ke386SetEs(KGDT_R3_DATA | RPL_MASK); - } + } /* Save exception list and terminate it */ TrapFrame->ExceptionList = KeGetPcr()->Tib.ExceptionList; KeGetPcr()->Tib.ExceptionList = EXCEPTION_CHAIN_END; - - /* No error code */ - TrapFrame->ErrCode = 0; - + /* Clear direction flag */ Ke386ClearDirectionFlag(); @@ -688,7 +919,7 @@ FORCEINLINE KiEnterTrap(IN PKTRAP_FRAME TrapFrame) { - ULONG Ds, Es; + USHORT Ds, Es; /* * We really have to get a good DS/ES first before touching any data. @@ -700,7 +931,8 @@ * as-is, otherwise the optimizer could simply get rid of our DS/ES. * */ - Ds = Ke386GetDs(); + // !!! + Ds = Ke386GetDs(); Es = Ke386GetEs(); Ke386SetDs(KGDT_R3_DATA | RPL_MASK); Ke386SetEs(KGDT_R3_DATA | RPL_MASK); @@ -712,8 +944,7 @@ TrapFrame->SegGs = Ke386GetGs(); Ke386SetFs(KGDT_R0_PCR); - /* Save exception list and bogus previous mode */ - TrapFrame->PreviousPreviousMode = -1; + /* Save exception list */ TrapFrame->ExceptionList = KeGetPcr()->Tib.ExceptionList; /* Check for V86 mode */ @@ -740,4 +971,198 @@ /* Set debug header */ KiFillTrapFrameDebug(TrapFrame); } -#endif + +// +// Generates a Trap Prolog Stub for the given name +// +#define KI_PUSH_FAKE_ERROR_CODE 0x1 +#define KI_UNUSED 0x2 +#define KI_NONVOLATILES_ONLY 0x4 +#define KI_FAST_SYSTEM_CALL 0x8 +#define KI_SOFTWARE_TRAP 0x10 +#define KI_HARDWARE_INT 0x20 +#define KiTrap(x, y) VOID x(VOID) { KiTrapStub(y, (PVOID)x##Handler); UNREACHABLE; } +#define KiTrampoline(x, y) VOID x(VOID) { KiTrapStub(y, x##Handler); } + +// +// Trap Prolog Stub +// !!! ultrahorrible +// +VOID +FORCEINLINE +KiTrapStub(IN ULONG Flags, + IN PVOID Handler) +{ + ULONG FrameSize; + + /* Is this a fast system call? They don't have a stack! */ + if (Flags & KI_FAST_SYSTEM_CALL) + { +#if defined(_MSC_VER) + _ASM_BEGIN + mov esp, ss:[KIP0PCRADDRESS + offset KPCR.TSS] + mov esp, KTSS.Esp0[esp] + _ASM_END +#elif defined(__GNUC__) + __asm__ __volatile__ + ( + "movl %%ss:%c[t], %%esp\n" + "movl %c[e](%%esp), %%esp\n" + : + : [e] "i"(FIELD_OFFSET(KTSS, Esp0)), + [t] "i"(&PCR->TSS) + : "%esp" + ); +#elif +#error unsupported compiler +#endif + } + + /* Check what kind of trap frame this trap requires */ + if (Flags & KI_SOFTWARE_TRAP) + { + /* Software traps need a complete non-ring transition trap frame */ + FrameSize = FIELD_OFFSET(KTRAP_FRAME, HardwareEsp); + } + else if (Flags & KI_FAST_SYSTEM_CALL) + { + /* SYSENTER requires us to build a complete ring transition trap frame */ + FrameSize = FIELD_OFFSET(KTRAP_FRAME, V86Es); + + /* And it only preserves nonvolatile registers */ + Flags |= KI_NONVOLATILES_ONLY; + } + else if (Flags & KI_PUSH_FAKE_ERROR_CODE) + { + /* If the trap doesn't have an error code, we'll make space for it */ + FrameSize = FIELD_OFFSET(KTRAP_FRAME, Eip); + } + else + { + /* The trap already has an error code, so just make space for the rest */ + FrameSize = FIELD_OFFSET(KTRAP_FRAME, ErrCode); + } + + /* Software traps need to get their EIP from the caller's frame */ + if (Flags & KI_SOFTWARE_TRAP) + { +#if defined(_MSC_VER) + _ASM pop eax +#elif defined(__GNUC) + __asm__ __volatile__ ("popl %%eax\n":::"%esp"); +#elif +#error unsupported compiler +#endif + } + /* Save nonvolatile registers */ +#if defined(_MSC_VER) + _ASM_BEGIN + mov KTRAP_FRAME.Ebp[esp], ebp + mov KTRAP_FRAME.Ebx[esp], ebx + mov KTRAP_FRAME.Esi[esp], esi + mov KTRAP_FRAME.Edi[esp], edi + _ASM_END +#elif defined(__GNUC) + __asm__ __volatile__ + ( + /* EBX, ESI, EDI and EBP are saved */ + "movl %%ebp, %c[p](%%esp)\n" + "movl %%ebx, %c[b](%%esp)\n" + "movl %%esi, %c[s](%%esp)\n" + "movl %%edi, %c[i](%%esp)\n" + : + : [b] "i"(- FrameSize + FIELD_OFFSET(KTRAP_FRAME, Ebx)), + [s] "i"(- FrameSize + FIELD_OFFSET(KTRAP_FRAME, Esi)), + [i] "i"(- FrameSize + FIELD_OFFSET(KTRAP_FRAME, Edi)), + [p] "i"(- FrameSize + FIELD_OFFSET(KTRAP_FRAME, Ebp)) + : "%esp" + ); +#elif +#error unsupported compiler +#endif + + /* Does the caller want nonvolatiles only? */ + if (!(Flags & KI_NONVOLATILES_ONLY)) + { +#if defined(_MSC_VER) + _ASM_BEGIN + mov KTRAP_FRAME.Eax[esp], eax + mov KTRAP_FRAME.Ecx[esp], ecx + mov KTRAP_FRAME.Edx[esp], eax + _ASM_END +#elif defined(__GNUC) + __asm__ __volatile__ + ( + /* Otherwise, save the volatiles as well */ + "movl %%eax, %c[a](%%esp)\n" + "movl %%ecx, %c[c](%%esp)\n" + "movl %%edx, %c[d](%%esp)\n" + : + : [a] "i"(- FrameSize + FIELD_OFFSET(KTRAP_FRAME, Eax)), + [c] "i"(- FrameSize + FIELD_OFFSET(KTRAP_FRAME, Ecx)), + [d] "i"(- FrameSize + FIELD_OFFSET(KTRAP_FRAME, Edx)) + : "%esp" + ); +#elif +#error unsupported compiler +#endif + } + /* Now set parameter 1 (ECX) to point to the frame */ + /* make space for this frame */ +#if defined(_MSC_VER) + _ASM_BEGIN + sub esp, FrameSize + mov ecx, esp + _ASM_END + // !!! this is horrible and won't work after stkf optimization +#elif defined(__GNUC) + __asm__ __volatile__ ("movl %%esp, %%ecx\n":::"%esp"); + __asm__ __volatile__ ("subl $%c[e],%%esp\n":: [e] "i"(FrameSize) : "%esp"); + __asm__ __volatile__ ("subl $%c[e],%%ecx\n":: [e] "i"(FrameSize) : "%ecx"); +#elif +#error unsupported compiler +#endif + + /* Now jump to the C handler */ + + /* + * For hardware interrupts, set parameter 2 (EDX) to hold KINTERRUPT. + * This code will be dynamically patched when an interrupt is registered! + !!! ultrahorrible + */ + if (Flags & KI_HARDWARE_INT) + { +#if defined(_MSC_VER) + // !!! temp hack + _ASM_BEGIN + mov edx, [TrapStubInterrupt] + jmp [Handler] + _ASM_END +#elif defined(__GNUC) + __asm__ __volatile__ + ( + ".globl _KiInterruptTemplate2ndDispatch\n_KiInterruptTemplate2ndDispatch:\n" + "movl $0, %%edx\n" + ".globl _KiInterruptTemplateObject\n_KiInterruptTemplateObject:\n" + ::: "%edx" + "jmp *%0\n" + ".globl _KiInterruptTemplateDispatch\n_KiInterruptTemplateDispatch:\n" + : + : "a"(Handler) + + ); +#elif +#error unsupported compiler +#endif + } + +#if defined(_MSC_VER) + _ASM jmp [Handler] +#elif defined(__GNUC) + else __asm__ __volatile__ ("jmp %c[x]\n":: [x] "i"(Handler)); +#elif +#error unsupported compiler +#endif +} + +#endif Modified: branches/jcatena-branch/ntoskrnl/include/ntoskrnl_bld.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/include…
============================================================================== --- branches/jcatena-branch/ntoskrnl/include/ntoskrnl_bld.h [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/include/ntoskrnl_bld.h [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -42,6 +42,11 @@ #include <reactos_cfg.h> #include <cpu.h> +// !!! temp disable some warnings +_NOWARN_MSC(4244) // ULONG to USHORT +_NOWARN_MSC(4018) // ULONG to USHORT + + #include <ntverp.h> /* DDK/IFS/NDK Headers */ @@ -70,6 +75,7 @@ #include <ctype.h> #include <malloc.h> #include <wchar.h> +#include <intrin2.h> /* SEH support with PSEH */ #include <pseh/pseh2.h> Modified: branches/jcatena-branch/ntoskrnl/kdbg/kdb.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/kdbg/kd…
============================================================================== --- branches/jcatena-branch/ntoskrnl/kdbg/kdb.c [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/kdbg/kdb.c [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -140,42 +140,15 @@ PKTRAP_FRAME TrapFrame, PKDB_KTRAP_FRAME KdbTrapFrame) { - ULONG TrapCr0, TrapCr2, TrapCr3, TrapCr4; - /* Copy the TrapFrame only up to Eflags and zero the rest*/ RtlCopyMemory(&KdbTrapFrame->Tf, TrapFrame, FIELD_OFFSET(KTRAP_FRAME, HardwareEsp)); RtlZeroMemory((PVOID)((ULONG_PTR)&KdbTrapFrame->Tf + FIELD_OFFSET(KTRAP_FRAME, HardwareEsp)), sizeof(KTRAP_FRAME) - FIELD_OFFSET(KTRAP_FRAME, HardwareEsp)); -#ifndef _MSC_VER - asm volatile( - "movl %%cr0, %0" "\n\t" - "movl %%cr2, %1" "\n\t" - "movl %%cr3, %2" "\n\t" - "movl %%cr4, %3" "\n\t" - : "=r"(TrapCr0), "=r"(TrapCr2), - "=r"(TrapCr3), "=r"(TrapCr4)); -#else - __asm - { - mov eax, cr0; - mov TrapCr0, eax; - - mov eax, cr2; - mov TrapCr2, eax; - - mov eax, cr3; - mov TrapCr3, eax; -/* FIXME: What's the problem with cr4? */ - //mov eax, cr4; - //mov TrapCr4, eax; - } -#endif - - KdbTrapFrame->Cr0 = TrapCr0; - KdbTrapFrame->Cr2 = TrapCr2; - KdbTrapFrame->Cr3 = TrapCr3; - KdbTrapFrame->Cr4 = TrapCr4; + KdbTrapFrame->Cr0 = CpuGetCr0(); + KdbTrapFrame->Cr2 = CpuGetCr2(); + KdbTrapFrame->Cr3 = CpuGetCr3(); + KdbTrapFrame->Cr4 = CpuGetCr4(); KdbTrapFrame->Tf.HardwareEsp = KiEspFromTrapFrame(TrapFrame); KdbTrapFrame->Tf.HardwareSegSs = (USHORT)(KiSsFromTrapFrame(TrapFrame) & 0xFFFF); Modified: branches/jcatena-branch/ntoskrnl/ke/i386/cpu.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ke/i386…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ke/i386/cpu.c [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ke/i386/cpu.c [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -999,6 +999,7 @@ NTAPI KiDisableFastSyscallReturn(VOID) { +#if 0 /* Was it applied? */ if (KiSystemCallExitAdjusted) { @@ -1008,13 +1009,15 @@ /* It's not adjusted anymore */ KiSystemCallExitAdjusted = FALSE; } +#endif } VOID NTAPI KiEnableFastSyscallReturn(VOID) { - /* Check if the patch has already been done */ +#if 0 + /* Check if the patch has already been done */ if ((KiSystemCallExitAdjusted == KiSystemCallExitAdjust) && (KiFastCallCopyDoneOnce)) { @@ -1043,13 +1046,15 @@ DPRINT1("Your compiled kernel is broken!\n"); DbgBreakPoint(); } +#endif } VOID NTAPI KiRestoreFastSyscallReturnState(VOID) { - /* Check if the CPU Supports fast system call */ +#if 0 + /* Check if the CPU Supports fast system call */ if (KeFeatureBits & KF_FAST_SYSCALL) { /* Check if it has been disabled */ @@ -1077,6 +1082,7 @@ /* Perform the code patch that is required */ KiEnableFastSyscallReturn(); +#endif } ULONG_PTR @@ -1224,8 +1230,9 @@ Cr0 = __readcr0() & ~(CR0_MP | CR0_TS | CR0_EM | CR0_ET); /* Store on FPU stack */ - asm volatile ("fninit;" "fnstsw %0" : "+m"(Magic)); - + CpuFninit(); + CpuFnGetSw_m(Magic); + /* Magic should now be cleared */ if (Magic & 0xFF) { @@ -1261,7 +1268,7 @@ __writecr0(Cr0 & ~(CR0_MP | CR0_TS | CR0_EM)); /* Initialize FPU state */ - asm volatile ("fninit"); + CpuFninit(); /* Multiply the magic values and divide, we should get the result back */ Value1 = 4195835.0; @@ -1278,8 +1285,8 @@ return ErrataPresent; } -NTAPI -VOID +VOID +NTAPI KiFlushNPXState(IN PFLOATING_SAVE_AREA SaveArea) { ULONG EFlags, Cr0; @@ -1396,14 +1403,7 @@ if (!FpState) return STATUS_INSUFFICIENT_RESOURCES; *((PVOID *) Save) = FpState; -#ifdef __GNUC__ - asm volatile("fnsave %0\n\t" : "=m" (*FpState)); -#else - __asm - { - fnsave [FpState] - }; -#endif + CpuFnsave(FpState); KeGetCurrentThread()->DispatcherHeader.NpxIrql = KeGetCurrentIrql(); return STATUS_SUCCESS; @@ -1420,16 +1420,8 @@ ASSERT(KeGetCurrentThread()->DispatcherHeader.NpxIrql == KeGetCurrentIrql()); DPRINT1("%s is not really implemented\n", __FUNCTION__); -#ifdef __GNUC__ - asm volatile("fnclex\n\t"); - asm volatile("frstor %0\n\t" : "=m" (*FpState)); -#else - __asm - { - fnclex - frstor [FpState] - }; -#endif + CpuFnclex(); + CpuFrstor(FpState); ExFreePool(FpState); return STATUS_SUCCESS; Modified: branches/jcatena-branch/ntoskrnl/ke/i386/exp.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ke/i386…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ke/i386/exp.c [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ke/i386/exp.c [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -1107,7 +1107,6 @@ VOID NTAPI -DECLSPEC_NORETURN KiDispatchExceptionFromTrapFrame(IN NTSTATUS Code, IN ULONG_PTR Address, IN ULONG ParameterCount, @@ -1145,8 +1144,8 @@ } VOID +_NORETURN FASTCALL -DECLSPEC_NORETURN KiSystemFatalException(IN ULONG ExceptionCode, IN PKTRAP_FRAME TrapFrame) { Modified: branches/jcatena-branch/ntoskrnl/ke/i386/irqobj.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ke/i386…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ke/i386/irqobj.c [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ke/i386/irqobj.c [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -368,13 +368,16 @@ *DispatchCode++ = ((PULONG)KiInterruptTemplate)[i]; } - /* Jump to the last 4 bytes */ +#if 0 + /* Jump to the last 4 bytes */ Patch = (PULONG)((ULONG_PTR)Patch + ((ULONG_PTR)&KiInterruptTemplateObject - (ULONG_PTR)KiInterruptTemplate) - 4); /* Apply the patch */ *Patch = PtrToUlong(Interrupt); +#endif + TrapStubInterrupt = Interrupt; /* Disconnect it at first */ Interrupt->Connected = FALSE; Modified: branches/jcatena-branch/ntoskrnl/ke/i386/kiinit.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ke/i386…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ke/i386/kiinit.c [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ke/i386/kiinit.c [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -11,7 +11,7 @@ #include <ntoskrnl.h> #define NDEBUG #include <debug.h> -#include "trap_x.h" +// #include "trap_x.h" /* GLOBALS *******************************************************************/ @@ -271,12 +271,9 @@ FxSaveArea->U.FxArea.MXCsrMask = 0; /* Save the current NPX State */ -#ifdef __GNUC__ - asm volatile("fxsave %0\n\t" : "=m" (*FxSaveArea)); -#else - __asm fxsave [FxSaveArea] -#endif - /* Check if the current mask doesn't match the reserved bits */ + CpuFxsave(FxSaveArea); + + /* Check if the current mask doesn't match the reserved bits */ if (FxSaveArea->U.FxArea.MXCsrMask != 0) { /* Then use whatever it's holding */ Modified: branches/jcatena-branch/ntoskrnl/ke/i386/traphdlr.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ke/i386…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -13,6 +13,9 @@ #include <debug.h> /* GLOBALS ********************************************************************/ + +// !!! temp for testing +KINTERRUPT *TrapStubInterrupt; UCHAR KiTrapPrefixTable[] = { @@ -57,7 +60,7 @@ /* TRAP EXIT CODE *************************************************************/ VOID -DECLSPEC_NORETURN +// DECLSPEC_NORETURN FASTCALL KiEoiHelper(IN PKTRAP_FRAME TrapFrame) { @@ -72,10 +75,9 @@ } VOID -DECLSPEC_NORETURN -FASTCALL -KiServiceExit(IN PKTRAP_FRAME TrapFrame, - IN NTSTATUS Status) +// DECLSPEC_NORETURN7 +FASTCALL +KiServiceExit(IN PKTRAP_FRAME TrapFrame, IN NTSTATUS Status) { /* Disable interrupts until we return */ _disable(); @@ -91,7 +93,7 @@ } VOID -DECLSPEC_NORETURN +// DECLSPEC_NORETURN FASTCALL KiServiceExit2(IN PKTRAP_FRAME TrapFrame) { @@ -1039,8 +1041,8 @@ /* So since we're not dealing with the above case, check for RDMSR/WRMSR */ if ((Instructions[0] == 0xF) && // 2-byte opcode - (((Instructions[1] >> 8) == 0x30) || // RDMSR - ((Instructions[2] >> 8) == 0x32))) // WRMSR + (((Instructions[1]) == 0x30) || // RDMSR + ((Instructions[2]) == 0x32))) // WRMSR { /* Unknown CPU MSR, so raise an access violation */ KiDispatchException0Args(STATUS_ACCESS_VIOLATION, @@ -1501,7 +1503,6 @@ KiSystemCall(ServiceNumber, Arguments); } -#if 0 // was __attribute__((regparm(3))) VOID _NORETURN @@ -1540,9 +1541,7 @@ Thread->PreviousMode, KGDT_R3_TEB | RPL_MASK); } -#endif - -#if 0 + // was __attribute__((regparm(3))) VOID _NORETURN @@ -1576,7 +1575,6 @@ Thread->PreviousMode, SegFs); } -#endif /* CPU AND SOFTWARE TRAPS *****************************************************/ Modified: branches/jcatena-branch/ntoskrnl/ke/ke.vcproj URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ke/ke.v…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ke/ke.vcproj [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ke/ke.vcproj [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -195,6 +195,10 @@ > </File> <File + RelativePath=".\except.c" + > + </File> + <File RelativePath="freeldr.c" > </File> @@ -248,6 +252,10 @@ </File> <File RelativePath="thrdschd.c" + > + </File> + <File + RelativePath=".\time.c" > </File> <File @@ -278,6 +286,10 @@ > </File> <File + RelativePath=".\i386\exp.c" + > + </File> + <File RelativePath=".\i386\irqobj.c" > </File> @@ -302,7 +314,23 @@ > </File> <File + RelativePath=".\i386\trap.s" + > + </File> + <File + RelativePath=".\i386\traphdlr.c" + > + </File> + <File RelativePath=".\i386\usercall.c" + > + </File> + <File + RelativePath=".\i386\usercall_asm.S" + > + </File> + <File + RelativePath=".\i386\v86vdm.c" > </File> </Filter> Modified: branches/jcatena-branch/ntoskrnl/ntoskrnl.sln URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ntoskrn…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ntoskrnl.sln [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ntoskrnl.sln [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -64,8 +64,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpu-i386", "..\lib\cpu\i386\cpu-i386.vcproj", "{3D9AC5B7-C29C-46F5-B3D8-C4388F37DB5C}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kdw", "kdw\kdw.vcproj", "{97021AF5-ED87-4AA8-B116-2D53E5D6D528}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trap2", "trap2\trap2.vcproj", "{F9560D7C-D799-4A21-9827-6DDB6564E8C9}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trap", "trap\trap.vcproj", "{E2A7291E-515F-4BAD-8E82-F77AA0815B47}" EndProject @@ -245,18 +243,9 @@ {97021AF5-ED87-4AA8-B116-2D53E5D6D528}.r|Win32.Build.0 = r|Win32 {97021AF5-ED87-4AA8-B116-2D53E5D6D528}.Release|Win32.ActiveCfg = r|Win32 {97021AF5-ED87-4AA8-B116-2D53E5D6D528}.Release|Win32.Build.0 = r|Win32 - {F9560D7C-D799-4A21-9827-6DDB6564E8C9}.d|Win32.ActiveCfg = d|Win32 - {F9560D7C-D799-4A21-9827-6DDB6564E8C9}.d|Win32.Build.0 = d|Win32 - {F9560D7C-D799-4A21-9827-6DDB6564E8C9}.Debug|Win32.ActiveCfg = d|Win32 - {F9560D7C-D799-4A21-9827-6DDB6564E8C9}.Debug|Win32.Build.0 = d|Win32 - {F9560D7C-D799-4A21-9827-6DDB6564E8C9}.r|Win32.ActiveCfg = r|Win32 - {F9560D7C-D799-4A21-9827-6DDB6564E8C9}.r|Win32.Build.0 = r|Win32 - {F9560D7C-D799-4A21-9827-6DDB6564E8C9}.Release|Win32.ActiveCfg = r|Win32 - {F9560D7C-D799-4A21-9827-6DDB6564E8C9}.Release|Win32.Build.0 = r|Win32 {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.d|Win32.ActiveCfg = d|Win32 {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.d|Win32.Build.0 = d|Win32 {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.Debug|Win32.ActiveCfg = d|Win32 - {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.Debug|Win32.Build.0 = d|Win32 {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.r|Win32.ActiveCfg = r|Win32 {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.r|Win32.Build.0 = r|Win32 {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.Release|Win32.ActiveCfg = r|Win32 Modified: branches/jcatena-branch/ntoskrnl/ntoskrnl.vcproj URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ntoskrn…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ntoskrnl.vcproj [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ntoskrnl.vcproj [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -63,7 +63,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="mma3.lib mm.lib ke.lib ex.lib se.lib ob.lib ps.lib cm.lib io.lib pnp.lib cc.lib csq.lib pseh.lib cmlib.lib fs.lib rossym.lib wdmguid.lib rt.lib rtl.lib crtnt.lib cpu-i386.lib dbgp.lib kdw.lib hal.lib bootvid.lib kdcom.lib" + AdditionalDependencies="mma3.lib mm.lib ke.lib ex.lib se.lib ob.lib ps.lib cm.lib io.lib pnp.lib cc.lib csq.lib cmlib.lib fs.lib rossym.lib wdmguid.lib rt.lib rtl.lib crtnt.lib cpu-i386.lib dbgp.lib kdw.lib hal.lib bootvid.lib kdcom.lib" OutputFile="$(OutDir)/ntoskrnl.exe" AdditionalLibraryDirectories="" IgnoreAllDefaultLibraries="true" @@ -139,7 +139,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="mma3.lib mm.lib ke.lib ex.lib se.lib ob.lib ps.lib cm.lib io.lib pnp.lib cc.lib csq.lib pseh.lib cmlib.lib fs.lib rossym.lib wdmguid.lib rt.lib rtl.lib crtnt.lib cpu-i386.lib dbgp.lib kdw.lib hal.lib bootvid.lib kdcom.lib" + AdditionalDependencies="mma3.lib mm.lib ke.lib ex.lib se.lib ob.lib ps.lib cm.lib io.lib pnp.lib cc.lib csq.lib cmlib.lib fs.lib rossym.lib wdmguid.lib rt.lib rtl.lib crtnt.lib cpu-i386.lib dbgp.lib kdw.lib hal.lib bootvid.lib kdcom.lib" OutputFile="$(OutDir)/ntoskrnl.exe" AdditionalLibraryDirectories="" IgnoreAllDefaultLibraries="true" @@ -319,6 +319,10 @@ Filter="h;hpp;hxx;hm;inl" > <File + RelativePath="..\include\reactos\msc\intrin2.h" + > + </File> + <File RelativePath=".\include\internal\ntoskrnl.h" > </File> Modified: branches/jcatena-branch/ntoskrnl/trap/i386/TrapStub.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/trap/i3…
============================================================================== --- branches/jcatena-branch/ntoskrnl/trap/i386/TrapStub.h [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/trap/i386/TrapStub.h [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -6,13 +6,21 @@ #error #endif +#ifndef TRAP_STUB_DS +#define TRAP_STUB_DS KGDT_R3_DATA | RPL_MASK +#endif + +#ifndef TRAP_STUB_FS +#define TRAP_STUB_FS KGDT_R0_PCR +#endif + #define TRAP_STUB_NAMEH tokenpaste(TRAP_STUB_NAME, Handler) #if (TRAP_STUB_FLAGS & TRAPF_INTERRUPT) #define TRAP_STUB_PARAM2 tokenpaste(TRAP_STUB_NAME, Interrupt) PKINTERRUPT TRAP_STUB_PARAM2; #else -VOID _FASTCALL TRAP_STUB_NAMEH(KTRAP_FRAME *TrapFrame); +VOID _FASTCALL tokenpaste(TRAP_STUB_NAME, Handler)(KTRAP_FRAME *TrapFrame); #endif _NAKED VOID TRAP_STUB_NAME(VOID) @@ -22,7 +30,6 @@ #if (TRAP_STUB_FLAGS & TRAPF_FASTSYSCALL) mov esp, ss:[KIP0PCRADDRESS + offset KPCR.TSS] mov esp, KTSS.Esp0[esp] - // sub esp, dword ptr offset KTRAP_FRAME.V86Es sub esp, dword ptr offset KTRAP_FRAME.V86Es #elif (TRAP_STUB_FLAGS & TRAPF_ERRORCODE) sub esp, offset KTRAP_FRAME.ErrCode @@ -61,12 +68,13 @@ #endif // call handler - mov ecx, esp #if (TRAP_STUB_FLAGS & TRAPF_INTERRUPT) mov edx, TRAP_STUB_PARAM2 + mov ecx, esp call PKINTERRUPT.DispatchAddress[edx] #else - call TRAP_STUB_NAMEH + mov ecx, esp + call tokenpaste(TRAP_STUB_NAME, Handler) #endif // restore regs Modified: branches/jcatena-branch/ntoskrnl/trap/trap.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/trap/tr…
============================================================================== --- branches/jcatena-branch/ntoskrnl/trap/trap.c [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/trap/trap.c [iso-8859-1] Thu Feb 4 13:05:14 2010 @@ -115,7 +115,7 @@ #define TRAP_STUB_FLAGS 0 #include <TrapStub.h> -#define TRAP_STUB_NAME KiDebugService +#define TRAP_STUB_NAME KiDebugServiceVOID #define TRAP_STUB_FLAGS 0 #include <TrapStub.h> @@ -134,7 +134,176 @@ _NOWARN_POP -VOID _FASTCALL init(void) +/* TRAP EXIT CODE *************************************************************/ +// +// Generic Exit Routine +// + +VOID +FASTCALL +KiExitTrap(IN PKTRAP_FRAME TrapFrame, IN UCHAR Skip) { + KTRAP_EXIT_SKIP_BITS SkipBits; + PULONG ReturnStack; + + SkipBits.Bits = Skip; + + /* Debugging checks */ + // DPRINTT("DebugChecks\n"); + // KiExitTrapDebugChecks(TrapFrame, SkipBits); + + /* Restore the SEH handler chain */ + KeGetPcr()->Tib.ExceptionList = TrapFrame->ExceptionList; + + /* Check if the previous mode must be restored */ + if (__builtin_expect(!SkipBits.SkipPreviousMode, 0)) /* More INTS than SYSCALLs */ + { + /* Restore it */ + KeGetCurrentThread()->PreviousMode = TrapFrame->PreviousPreviousMode; + } + + /* Check if there are active debug registers */ + if (__builtin_expect(TrapFrame->Dr7 & ~DR7_RESERVED_MASK, 0)) + { + /* Not handled yet */ + DbgPrint("Need Hardware Breakpoint Support!\n"); + DbgBreakPoint(); + while (TRUE); + } + + /* Check if this was a V8086 trap */ + // DPRINTT("V8086\n"); + if (__builtin_expect(TrapFrame->EFlags & EFLAGS_V86_MASK, 0)) + { + // DPRINTT("V8086 r\n"); + // KiTrapReturn(TrapFrame); + return; + } + + /* Check if the trap frame was edited */ + if (__builtin_expect(!(TrapFrame->SegCs & FRAME_EDITED), 0)) + { + /* + * An edited trap frame happens when we need to modify CS and/or ESP but + * don't actually have a ring transition. This happens when a kernelmode + * caller wants to perform an NtContinue to another kernel address, such + * as in the case of SEH (basically, a longjmp), or to a user address. + * + * Therefore, the CPU never saved CS/ESP on the stack because we did not + * get a trap frame due to a ring transition (there was no interrupt). + * Even if we didn't want to restore CS to a new value, a problem occurs + * due to the fact a normal RET would not work if we restored ESP since + * RET would then try to read the result off the stack. + * + * The NT kernel solves this by adding 12 bytes of stack to the exiting + * trap frame, in which EFLAGS, CS, and EIP are stored, and then saving + * the ESP that's being requested into the ErrorCode field. It will then + * exit with an IRET. This fixes both issues, because it gives the stack + * some space where to hold the return address and then end up with the + * wanted stack, and it uses IRET which allows a new CS to be inputted. + * + */ + // DPRINTT("edited\n"); + /* Set CS that is requested */ + TrapFrame->SegCs = TrapFrame->TempSegCs; + + /* First make space on requested stack */ + ReturnStack = (PULONG)(TrapFrame->TempEsp - 12); + TrapFrame->ErrCode = (ULONG_PTR)ReturnStack; + + /* Now copy IRET frame */ + ReturnStack[0] = TrapFrame->Eip; + ReturnStack[1] = TrapFrame->SegCs; + ReturnStack[2] = TrapFrame->EFlags; + + /* Do special edited return */ + // DPRINTT("KiEditedTrapReturn\n"); + // KiEditedTrapReturn(TrapFrame); + return; + } + + /* Check if this is a user trap */ + if (__builtin_expect(KiUserTrap(TrapFrame), 1)) /* Ring 3 is where we spend time */ + { + // DPRINTT("user\n"); + /* Check if segments should be restored */ + if (!SkipBits.SkipSegments) + { + /* Restore segments */ + CpuSetGs(TrapFrame->SegGs); + CpuSetEs(TrapFrame->SegEs); + CpuSetDs(TrapFrame->SegDs); + CpuSetFs(TrapFrame->SegFs); + } + + /* Always restore FS since it goes from KPCR to TEB */ + CpuSetFs(TrapFrame->SegFs); + } + + /* Check for system call -- a system call skips volatiles! */ + if (__builtin_expect(SkipBits.SkipVolatiles, 0)) /* More INTs than SYSCALLs */ + { + // DPRINTT("syscall\n"); + /* Kernel call or user call? */ + if (__builtin_expect(KiUserTrap(TrapFrame), 1)) /* More Ring 3 than 0 */ + { + /* Is SYSENTER supported and/or enabled, or are we stepping code? */ + if (__builtin_expect((KiFastSystemCallDisable) || + (TrapFrame->EFlags & EFLAGS_TF), 0)) + { + /* Exit normally */ + // DPRINTT("normally KiSystemCallTrapReturn\n"); + KiSystemCallTrapReturn(TrapFrame); + } + else + { + /* Restore user FS */ + CpuSetFs(KGDT_R3_TEB | RPL_MASK); + + /* Remove interrupt flag */ + TrapFrame->EFlags &= ~EFLAGS_INTERRUPT_MASK; + __writeeflags(TrapFrame->EFlags); + + /* Exit through SYSEXIT */ + // DPRINTT("sysexit KiSystemCallSysExitReturn\n"); + // KiSystemCallSysExitReturn(TrapFrame); + } + } + else + { + /* Restore EFLags */ + __writeeflags(TrapFrame->EFlags); + + /* Call is kernel, so do a jump back since this wasn't a real INT */ + // DPRINTT("kernel KiSystemCallReturn\n"); + // KiSystemCallReturn(TrapFrame); + } + } + else + { + // DPRINTT("int KiTrapReturn\n"); + /* Return from interrupt */ + // KiTrapReturn(TrapFrame); + } } + + +VOID _FASTCALL +KiEoiHelper(IN PKTRAP_FRAME TrapFrame) +{ + // DPRINTT("\n"); + /* Disable interrupts until we return */ + CpuIntDisable(); + + /* Check for APC delivery */ + KiCheckForApcDelivery(TrapFrame); + + /* Now exit the trap for real */ + // DPRINTT("KiExitTrap\n"); + KiExitTrap(TrapFrame, KTE_SKIP_PM_BIT); + UNREACHABLE; +} + + +
14 years, 10 months
1
0
0
0
[evb] 45416: - Refactor keyboard support to match serial. Now reading a key and waiting for a key are two things. - Implement KbHit Firmware routine. - It is now possible to interact with FreeLDR using the keyboard.
by evb@svn.reactos.org
Author: evb Date: Thu Feb 4 09:02:30 2010 New Revision: 45416 URL:
http://svn.reactos.org/svn/reactos?rev=45416&view=rev
Log: - Refactor keyboard support to match serial. Now reading a key and waiting for a key are two things. - Implement KbHit Firmware routine. - It is now possible to interact with FreeLDR using the keyboard. Modified: trunk/reactos/boot/armllb/fw.c trunk/reactos/boot/armllb/hw/versatile/hwkmi.c trunk/reactos/boot/armllb/inc/hw.h Modified: trunk/reactos/boot/armllb/fw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/fw.c?rev=45416…
============================================================================== --- trunk/reactos/boot/armllb/fw.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/fw.c [iso-8859-1] Thu Feb 4 09:02:30 2010 @@ -21,8 +21,8 @@ BOOLEAN LlbFwKbHit(VOID) { - /* Not yet implemented */ - return FALSE; + /* Check RX buffer */ + return LlbHwKbdReady(); } INT Modified: trunk/reactos/boot/armllb/hw/versatile/hwkmi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/hw/versatile/h…
============================================================================== --- trunk/reactos/boot/armllb/hw/versatile/hwkmi.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/hw/versatile/hwkmi.c [iso-8859-1] Thu Feb 4 09:02:30 2010 @@ -115,19 +115,17 @@ WRITE_REGISTER_UCHAR(PL050_KMIDATA, Value); } +BOOLEAN +NTAPI +LlbHwKbdReady(VOID) +{ + return READ_REGISTER_UCHAR(PL050_KMISTAT) & KMISTAT_RXFULL; +} + INT NTAPI LlbHwKbdRead(VOID) { - ULONG Status; - - /* Wait for ready signal */ - do - { - /* Read TX buffer state */ - Status = READ_REGISTER_UCHAR(PL050_KMISTAT); - } while (!(Status & KMISTAT_RXFULL)); - /* Read current data on keyboard */ return READ_REGISTER_UCHAR(PL050_KMIDATA); } Modified: trunk/reactos/boot/armllb/inc/hw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/inc/hw.h?rev=4…
============================================================================== --- trunk/reactos/boot/armllb/inc/hw.h [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/inc/hw.h [iso-8859-1] Thu Feb 4 09:02:30 2010 @@ -92,6 +92,12 @@ IN ULONG Value ); +BOOLEAN +NTAPI +LlbHwKbdReady( + VOID +); + INT NTAPI LlbHwKbdRead(
14 years, 10 months
1
0
0
0
[evb] 45415: - Switch to bootvid 8x13 font (closer to PC/VGA experience). - Fix LlbFwVideoGetDisplaySize return characters X/Y, not pixels. Now "Press F8 for advanced menu" shows".
by evb@svn.reactos.org
Author: evb Date: Thu Feb 4 08:55:26 2010 New Revision: 45415 URL:
http://svn.reactos.org/svn/reactos?rev=45415&view=rev
Log: - Switch to bootvid 8x13 font (closer to PC/VGA experience). - Fix LlbFwVideoGetDisplaySize return characters X/Y, not pixels. Now "Press F8 for advanced menu" shows". Modified: trunk/reactos/boot/armllb/fw.c trunk/reactos/boot/armllb/hw/versatile/hwclcd.c trunk/reactos/boot/armllb/hw/video.c Modified: trunk/reactos/boot/armllb/fw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/fw.c?rev=45415…
============================================================================== --- trunk/reactos/boot/armllb/fw.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/fw.c [iso-8859-1] Thu Feb 4 08:55:26 2010 @@ -46,8 +46,8 @@ OUT PULONG Depth) { /* Query static settings */ - *Width = LlbHwGetScreenWidth(); - *Height = LlbHwGetScreenHeight(); + *Width = LlbHwGetScreenWidth() / 8; + *Height = LlbHwGetScreenHeight() / 13; /* Depth is always 16 bpp */ *Depth = 16; @@ -127,7 +127,7 @@ ColorPalette[Attr >> 4][2]); /* Compute buffer address */ - Buffer = (PUSHORT)LlbHwGetFrameBuffer() + (LlbHwGetScreenWidth() * (Y * 8)) + (X * 8); + Buffer = (PUSHORT)LlbHwGetFrameBuffer() + (LlbHwGetScreenWidth() * (Y * 13)) + (X * 8); /* Draw it */ LlbVideoDrawChar(c, Buffer, Color, BackColor); Modified: trunk/reactos/boot/armllb/hw/versatile/hwclcd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/hw/versatile/h…
============================================================================== --- trunk/reactos/boot/armllb/hw/versatile/hwclcd.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/hw/versatile/hwclcd.c [iso-8859-1] Thu Feb 4 08:55:26 2010 @@ -48,14 +48,14 @@ NTAPI LlbHwGetScreenWidth(VOID) { - return 640; + return 720; } ULONG NTAPI LlbHwGetScreenHeight(VOID) { - return 480; + return 400; } PVOID Modified: trunk/reactos/boot/armllb/hw/video.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/hw/video.c?rev…
============================================================================== --- trunk/reactos/boot/armllb/hw/video.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/hw/video.c [iso-8859-1] Thu Feb 4 08:55:26 2010 @@ -8,264 +8,266 @@ #include "precomp.h" -CHAR LlbHwBootFont[] = +#define FONT_HEIGHT 13 + +CHAR LlbHwBootFont[256 * 13] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x7e,0x81,0xa5,0x81,0xbd,0x99,0x81,0x7e, - 0x7e,0xff,0xdb,0xff,0xc3,0xe7,0xff,0x7e, - 0x6c,0xfe,0xfe,0xfe,0x7c,0x38,0x10,0x00, - 0x10,0x38,0x7c,0xfe,0x7c,0x38,0x10,0x00, - 0x38,0x7c,0x38,0xfe,0xfe,0x7c,0x38,0x7c, - 0x10,0x10,0x38,0x7c,0xfe,0x7c,0x38,0x7c, - 0x00,0x00,0x18,0x3c,0x3c,0x18,0x00,0x00, - 0xff,0xff,0xe7,0xc3,0xc3,0xe7,0xff,0xff, - 0x00,0x3c,0x66,0x42,0x42,0x66,0x3c,0x00, - 0xff,0xc3,0x99,0xbd,0xbd,0x99,0xc3,0xff, - 0x0f,0x07,0x0f,0x7d,0xcc,0xcc,0xcc,0x78, - 0x3c,0x66,0x66,0x66,0x3c,0x18,0x7e,0x18, - 0x3f,0x33,0x3f,0x30,0x30,0x70,0xf0,0xe0, - 0x7f,0x63,0x7f,0x63,0x63,0x67,0xe6,0xc0, - 0x99,0x5a,0x3c,0xe7,0xe7,0x3c,0x5a,0x99, - 0x80,0xe0,0xf8,0xfe,0xf8,0xe0,0x80,0x00, - 0x02,0x0e,0x3e,0xfe,0x3e,0x0e,0x02,0x00, - 0x18,0x3c,0x7e,0x18,0x18,0x7e,0x3c,0x18, - 0x66,0x66,0x66,0x66,0x66,0x00,0x66,0x00, - 0x7f,0xdb,0xdb,0x7b,0x1b,0x1b,0x1b,0x00, - 0x3e,0x63,0x38,0x6c,0x6c,0x38,0xcc,0x78, - 0x00,0x00,0x00,0x00,0x7e,0x7e,0x7e,0x00, - 0x18,0x3c,0x7e,0x18,0x7e,0x3c,0x18,0xff, - 0x18,0x3c,0x7e,0x18,0x18,0x18,0x18,0x00, - 0x18,0x18,0x18,0x18,0x7e,0x3c,0x18,0x00, - 0x00,0x18,0x0c,0xfe,0x0c,0x18,0x00,0x00, - 0x00,0x30,0x60,0xfe,0x60,0x30,0x00,0x00, - 0x00,0x00,0xc0,0xc0,0xc0,0xfe,0x00,0x00, - 0x00,0x24,0x66,0xff,0x66,0x24,0x00,0x00, - 0x00,0x18,0x3c,0x7e,0xff,0xff,0x00,0x00, - 0x00,0xff,0xff,0x7e,0x3c,0x18,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x30,0x78,0x78,0x30,0x30,0x00,0x30,0x00, - 0x6c,0x6c,0x6c,0x00,0x00,0x00,0x00,0x00, - 0x6c,0x6c,0xfe,0x6c,0xfe,0x6c,0x6c,0x00, - 0x30,0x7c,0xc0,0x78,0x0c,0xf8,0x30,0x00, - 0x00,0xc6,0xcc,0x18,0x30,0x66,0xc6,0x00, - 0x38,0x6c,0x38,0x76,0xdc,0xcc,0x76,0x00, - 0x60,0x60,0xc0,0x00,0x00,0x00,0x00,0x00, - 0x18,0x30,0x60,0x60,0x60,0x30,0x18,0x00, - 0x60,0x30,0x18,0x18,0x18,0x30,0x60,0x00, - 0x00,0x66,0x3c,0xff,0x3c,0x66,0x00,0x00, - 0x00,0x30,0x30,0xfc,0x30,0x30,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x60, - 0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00, - 0x06,0x0c,0x18,0x30,0x60,0xc0,0x80,0x00, - 0x7c,0xc6,0xce,0xde,0xf6,0xe6,0x7c,0x00, - 0x30,0x70,0x30,0x30,0x30,0x30,0xfc,0x00, - 0x78,0xcc,0x0c,0x38,0x60,0xcc,0xfc,0x00, - 0x78,0xcc,0x0c,0x38,0x0c,0xcc,0x78,0x00, - 0x1c,0x3c,0x6c,0xcc,0xfe,0x0c,0x1e,0x00, - 0xfc,0xc0,0xf8,0x0c,0x0c,0xcc,0x78,0x00, - 0x38,0x60,0xc0,0xf8,0xcc,0xcc,0x78,0x00, - 0xfc,0xcc,0x0c,0x18,0x30,0x30,0x30,0x00, - 0x78,0xcc,0xcc,0x78,0xcc,0xcc,0x78,0x00, - 0x78,0xcc,0xcc,0x7c,0x0c,0x18,0x70,0x00, - 0x00,0x30,0x30,0x00,0x00,0x30,0x30,0x00, - 0x00,0x30,0x30,0x00,0x00,0x30,0x30,0x60, - 0x18,0x30,0x60,0xc0,0x60,0x30,0x18,0x00, - 0x00,0x00,0xfc,0x00,0x00,0xfc,0x00,0x00, - 0x60,0x30,0x18,0x0c,0x18,0x30,0x60,0x00, - 0x78,0xcc,0x0c,0x18,0x30,0x00,0x30,0x00, - 0x7c,0xc6,0xde,0xde,0xde,0xc0,0x78,0x00, - 0x30,0x78,0xcc,0xcc,0xfc,0xcc,0xcc,0x00, - 0xfc,0x66,0x66,0x7c,0x66,0x66,0xfc,0x00, - 0x3c,0x66,0xc0,0xc0,0xc0,0x66,0x3c,0x00, - 0xf8,0x6c,0x66,0x66,0x66,0x6c,0xf8,0x00, - 0xfe,0x62,0x68,0x78,0x68,0x62,0xfe,0x00, - 0xfe,0x62,0x68,0x78,0x68,0x60,0xf0,0x00, - 0x3c,0x66,0xc0,0xc0,0xce,0x66,0x3e,0x00, - 0xcc,0xcc,0xcc,0xfc,0xcc,0xcc,0xcc,0x00, - 0x78,0x30,0x30,0x30,0x30,0x30,0x78,0x00, - 0x1e,0x0c,0x0c,0x0c,0xcc,0xcc,0x78,0x00, - 0xe6,0x66,0x6c,0x78,0x6c,0x66,0xe6,0x00, - 0xf0,0x60,0x60,0x60,0x62,0x66,0xfe,0x00, - 0xc6,0xee,0xfe,0xfe,0xd6,0xc6,0xc6,0x00, - 0xc6,0xe6,0xf6,0xde,0xce,0xc6,0xc6,0x00, - 0x38,0x6c,0xc6,0xc6,0xc6,0x6c,0x38,0x00, - 0xfc,0x66,0x66,0x7c,0x60,0x60,0xf0,0x00, - 0x78,0xcc,0xcc,0xcc,0xdc,0x78,0x1c,0x00, - 0xfc,0x66,0x66,0x7c,0x6c,0x66,0xe6,0x00, - 0x78,0xcc,0xe0,0x70,0x1c,0xcc,0x78,0x00, - 0xfc,0xb4,0x30,0x30,0x30,0x30,0x78,0x00, - 0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xfc,0x00, - 0xcc,0xcc,0xcc,0xcc,0xcc,0x78,0x30,0x00, - 0xc6,0xc6,0xc6,0xd6,0xfe,0xee,0xc6,0x00, - 0xc6,0xc6,0x6c,0x38,0x38,0x6c,0xc6,0x00, - 0xcc,0xcc,0xcc,0x78,0x30,0x30,0x78,0x00, - 0xfe,0xc6,0x8c,0x18,0x32,0x66,0xfe,0x00, - 0x78,0x60,0x60,0x60,0x60,0x60,0x78,0x00, - 0xc0,0x60,0x30,0x18,0x0c,0x06,0x02,0x00, - 0x78,0x18,0x18,0x18,0x18,0x18,0x78,0x00, - 0x10,0x38,0x6c,0xc6,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff, - 0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x78,0x0c,0x7c,0xcc,0x76,0x00, - 0xe0,0x60,0x60,0x7c,0x66,0x66,0xdc,0x00, - 0x00,0x00,0x78,0xcc,0xc0,0xcc,0x78,0x00, - 0x1c,0x0c,0x0c,0x7c,0xcc,0xcc,0x76,0x00, - 0x00,0x00,0x78,0xcc,0xfc,0xc0,0x78,0x00, - 0x38,0x6c,0x60,0xf0,0x60,0x60,0xf0,0x00, - 0x00,0x00,0x76,0xcc,0xcc,0x7c,0x0c,0xf8, - 0xe0,0x60,0x6c,0x76,0x66,0x66,0xe6,0x00, - 0x30,0x00,0x70,0x30,0x30,0x30,0x78,0x00, - 0x0c,0x00,0x0c,0x0c,0x0c,0xcc,0xcc,0x78, - 0xe0,0x60,0x66,0x6c,0x78,0x6c,0xe6,0x00, - 0x70,0x30,0x30,0x30,0x30,0x30,0x78,0x00, - 0x00,0x00,0xcc,0xfe,0xfe,0xd6,0xc6,0x00, - 0x00,0x00,0xf8,0xcc,0xcc,0xcc,0xcc,0x00, - 0x00,0x00,0x78,0xcc,0xcc,0xcc,0x78,0x00, - 0x00,0x00,0xdc,0x66,0x66,0x7c,0x60,0xf0, - 0x00,0x00,0x76,0xcc,0xcc,0x7c,0x0c,0x1e, - 0x00,0x00,0xdc,0x76,0x66,0x60,0xf0,0x00, - 0x00,0x00,0x7c,0xc0,0x78,0x0c,0xf8,0x00, - 0x10,0x30,0x7c,0x30,0x30,0x34,0x18,0x00, - 0x00,0x00,0xcc,0xcc,0xcc,0xcc,0x76,0x00, - 0x00,0x00,0xcc,0xcc,0xcc,0x78,0x30,0x00, - 0x00,0x00,0xc6,0xd6,0xfe,0xfe,0x6c,0x00, - 0x00,0x00,0xc6,0x6c,0x38,0x6c,0xc6,0x00, - 0x00,0x00,0xcc,0xcc,0xcc,0x7c,0x0c,0xf8, - 0x00,0x00,0xfc,0x98,0x30,0x64,0xfc,0x00, - 0x1c,0x30,0x30,0xe0,0x30,0x30,0x1c,0x00, - 0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x00, - 0xe0,0x30,0x30,0x1c,0x30,0x30,0xe0,0x00, - 0x76,0xdc,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x10,0x38,0x6c,0xc6,0xc6,0xfe,0x00, - 0x78,0xcc,0xc0,0xcc,0x78,0x18,0x0c,0x78, - 0x00,0xcc,0x00,0xcc,0xcc,0xcc,0x7e,0x00, - 0x1c,0x00,0x78,0xcc,0xfc,0xc0,0x78,0x00, - 0x7e,0xc3,0x3c,0x06,0x3e,0x66,0x3f,0x00, - 0xcc,0x00,0x78,0x0c,0x7c,0xcc,0x7e,0x00, - 0xe0,0x00,0x78,0x0c,0x7c,0xcc,0x7e,0x00, - 0x30,0x30,0x78,0x0c,0x7c,0xcc,0x7e,0x00, - 0x00,0x00,0x78,0xc0,0xc0,0x78,0x0c,0x38, - 0x7e,0xc3,0x3c,0x66,0x7e,0x60,0x3c,0x00, - 0xcc,0x00,0x78,0xcc,0xfc,0xc0,0x78,0x00, - 0xe0,0x00,0x78,0xcc,0xfc,0xc0,0x78,0x00, - 0xcc,0x00,0x70,0x30,0x30,0x30,0x78,0x00, - 0x7c,0xc6,0x38,0x18,0x18,0x18,0x3c,0x00, - 0xe0,0x00,0x70,0x30,0x30,0x30,0x78,0x00, - 0xc6,0x38,0x6c,0xc6,0xfe,0xc6,0xc6,0x00, - 0x30,0x30,0x00,0x78,0xcc,0xfc,0xcc,0x00, - 0x1c,0x00,0xfc,0x60,0x78,0x60,0xfc,0x00, - 0x00,0x00,0x7f,0x0c,0x7f,0xcc,0x7f,0x00, - 0x3e,0x6c,0xcc,0xfe,0xcc,0xcc,0xce,0x00, - 0x78,0xcc,0x00,0x78,0xcc,0xcc,0x78,0x00, - 0x00,0xcc,0x00,0x78,0xcc,0xcc,0x78,0x00, - 0x00,0xe0,0x00,0x78,0xcc,0xcc,0x78,0x00, - 0x78,0xcc,0x00,0xcc,0xcc,0xcc,0x7e,0x00, - 0x00,0xe0,0x00,0xcc,0xcc,0xcc,0x7e,0x00, - 0x00,0xcc,0x00,0xcc,0xcc,0x7c,0x0c,0xf8, - 0xc3,0x18,0x3c,0x66,0x66,0x3c,0x18,0x00, - 0xcc,0x00,0xcc,0xcc,0xcc,0xcc,0x78,0x00, - 0x18,0x18,0x7e,0xc0,0xc0,0x7e,0x18,0x18, - 0x38,0x6c,0x64,0xf0,0x60,0xe6,0xfc,0x00, - 0xcc,0xcc,0x78,0xfc,0x30,0xfc,0x30,0x30, - 0xf8,0xcc,0xcc,0xfa,0xc6,0xcf,0xc6,0xc7, - 0x0e,0x1b,0x18,0x3c,0x18,0x18,0xd8,0x70, - 0x1c,0x00,0x78,0x0c,0x7c,0xcc,0x7e,0x00, - 0x38,0x00,0x70,0x30,0x30,0x30,0x78,0x00, - 0x00,0x1c,0x00,0x78,0xcc,0xcc,0x78,0x00, - 0x00,0x1c,0x00,0xcc,0xcc,0xcc,0x7e,0x00, - 0x00,0xf8,0x00,0xf8,0xcc,0xcc,0xcc,0x00, - 0xfc,0x00,0xcc,0xec,0xfc,0xdc,0xcc,0x00, - 0x3c,0x6c,0x6c,0x3e,0x00,0x7e,0x00,0x00, - 0x38,0x6c,0x6c,0x38,0x00,0x7c,0x00,0x00, - 0x30,0x00,0x30,0x60,0xc0,0xcc,0x78,0x00, - 0x00,0x00,0x00,0xfc,0xc0,0xc0,0x00,0x00, - 0x00,0x00,0x00,0xfc,0x0c,0x0c,0x00,0x00, - 0xc3,0xc6,0xcc,0xde,0x33,0x66,0xcc,0x0f, - 0xc3,0xc6,0xcc,0xdb,0x37,0x6f,0xcf,0x03, - 0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x00, - 0x00,0x33,0x66,0xcc,0x66,0x33,0x00,0x00, - 0x00,0xcc,0x66,0x33,0x66,0xcc,0x00,0x00, - 0x22,0x88,0x22,0x88,0x22,0x88,0x22,0x88, - 0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa, - 0xdb,0x77,0xdb,0xee,0xdb,0x77,0xdb,0xee, - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18,0xf8,0x18,0x18,0x18, - 0x18,0x18,0xf8,0x18,0xf8,0x18,0x18,0x18, - 0x36,0x36,0x36,0x36,0xf6,0x36,0x36,0x36, - 0x00,0x00,0x00,0x00,0xfe,0x36,0x36,0x36, - 0x00,0x00,0xf8,0x18,0xf8,0x18,0x18,0x18, - 0x36,0x36,0xf6,0x06,0xf6,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, - 0x00,0x00,0xfe,0x06,0xf6,0x36,0x36,0x36, - 0x36,0x36,0xf6,0x06,0xfe,0x00,0x00,0x00, - 0x36,0x36,0x36,0x36,0xfe,0x00,0x00,0x00, - 0x18,0x18,0xf8,0x18,0xf8,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0xf8,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18,0x1f,0x00,0x00,0x00, - 0x18,0x18,0x18,0x18,0xff,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0xff,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18,0x1f,0x18,0x18,0x18, - 0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00, - 0x18,0x18,0x18,0x18,0xff,0x18,0x18,0x18, - 0x18,0x18,0x1f,0x18,0x1f,0x18,0x18,0x18, - 0x36,0x36,0x36,0x36,0x37,0x36,0x36,0x36, - 0x36,0x36,0x37,0x30,0x3f,0x00,0x00,0x00, - 0x00,0x00,0x3f,0x30,0x37,0x36,0x36,0x36, - 0x36,0x36,0xf7,0x00,0xff,0x00,0x00,0x00, - 0x00,0x00,0xff,0x00,0xf7,0x36,0x36,0x36, - 0x36,0x36,0x37,0x30,0x37,0x36,0x36,0x36, - 0x00,0x00,0xff,0x00,0xff,0x00,0x00,0x00, - 0x36,0x36,0xf7,0x00,0xf7,0x36,0x36,0x36, - 0x18,0x18,0xff,0x00,0xff,0x00,0x00,0x00, - 0x36,0x36,0x36,0x36,0xff,0x00,0x00,0x00, - 0x00,0x00,0xff,0x00,0xff,0x18,0x18,0x18, - 0x00,0x00,0x00,0x00,0xff,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36,0x3f,0x00,0x00,0x00, - 0x18,0x18,0x1f,0x18,0x1f,0x00,0x00,0x00, - 0x00,0x00,0x1f,0x18,0x1f,0x18,0x18,0x18, - 0x00,0x00,0x00,0x00,0x3f,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36,0xff,0x36,0x36,0x36, - 0x18,0x18,0xff,0x18,0xff,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18,0xf8,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x1f,0x18,0x18,0x18, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff, - 0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0, - 0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f, - 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, - 0x00,0x00,0x76,0xdc,0xc8,0xdc,0x76,0x00, - 0x00,0x78,0xcc,0xf8,0xcc,0xf8,0xc0,0xc0, - 0x00,0xfc,0xcc,0xc0,0xc0,0xc0,0xc0,0x00, - 0x00,0xfe,0x6c,0x6c,0x6c,0x6c,0x6c,0x00, - 0xfc,0xcc,0x60,0x30,0x60,0xcc,0xfc,0x00, - 0x00,0x00,0x7e,0xd8,0xd8,0xd8,0x70,0x00, - 0x00,0x66,0x66,0x66,0x66,0x7c,0x60,0xc0, - 0x00,0x76,0xdc,0x18,0x18,0x18,0x18,0x00, - 0xfc,0x30,0x78,0xcc,0xcc,0x78,0x30,0xfc, - 0x38,0x6c,0xc6,0xfe,0xc6,0x6c,0x38,0x00, - 0x38,0x6c,0xc6,0xc6,0x6c,0x6c,0xee,0x00, - 0x1c,0x30,0x18,0x7c,0xcc,0xcc,0x78,0x00, - 0x00,0x00,0x7e,0xdb,0xdb,0x7e,0x00,0x00, - 0x06,0x0c,0x7e,0xdb,0xdb,0x7e,0x60,0xc0, - 0x38,0x60,0xc0,0xf8,0xc0,0x60,0x38,0x00, - 0x78,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x00, - 0x00,0xfc,0x00,0xfc,0x00,0xfc,0x00,0x00, - 0x30,0x30,0xfc,0x30,0x30,0x00,0xfc,0x00, - 0x60,0x30,0x18,0x30,0x60,0x00,0xfc,0x00, - 0x18,0x30,0x60,0x30,0x18,0x00,0xfc,0x00, - 0x0e,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18,0x18,0xd8,0xd8,0x70, - 0x30,0x30,0x00,0xfc,0x00,0x30,0x30,0x00, - 0x00,0x76,0xdc,0x00,0x76,0xdc,0x00,0x00, - 0x38,0x6c,0x6c,0x38,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00, - 0x0f,0x0c,0x0c,0x0c,0xec,0x6c,0x3c,0x1c, - 0x78,0x6c,0x6c,0x6c,0x6c,0x00,0x00,0x00, - 0x70,0x18,0x30,0x60,0x78,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x3c,0x3c,0x3c,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 0 + 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 13 + 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 26 + 0x18, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 39 + 0x14, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 52 + 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 65 + 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 78 + 0x10, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 91 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, // 104 + 0x14, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 117 + 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 130 + 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 143 + 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 156 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, // 169 + 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 182 + 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 195 + 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 208 + 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 221 + 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 234 + 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 247 + 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 260 + 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 273 + 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 286 + 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 299 + 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 312 + 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 325 + 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 338 + 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 351 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 364 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 377 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 390 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 403 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 416 + 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // 429 + 0x24, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 442 + 0x00, 0x14, 0x14, 0x14, 0x7F, 0x28, 0xFE, 0x50, 0x50, 0x50, 0x00, 0x00, 0x00, // 455 + 0x10, 0x3C, 0x50, 0x50, 0x70, 0x38, 0x1C, 0x14, 0x14, 0x78, 0x10, 0x00, 0x00, // 468 + 0x00, 0x61, 0x92, 0x94, 0x68, 0x18, 0x16, 0x29, 0x49, 0x86, 0x00, 0x00, 0x00, // 481 + 0x00, 0x18, 0x24, 0x24, 0x38, 0x71, 0x89, 0x8E, 0xC6, 0x7E, 0x00, 0x00, 0x00, // 494 + 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 507 + 0x06, 0x08, 0x10, 0x30, 0x20, 0x20, 0x20, 0x20, 0x30, 0x10, 0x08, 0x06, 0x00, // 520 + 0x60, 0x10, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x10, 0x60, 0x00, // 533 + 0x00, 0x10, 0x52, 0x24, 0x3C, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 546 + 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0xFE, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, // 559 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x10, 0x20, 0x00, // 572 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 585 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, // 598 + 0x01, 0x02, 0x02, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x40, 0x40, 0x80, 0x00, // 611 + 0x00, 0x18, 0x24, 0x42, 0x42, 0x42, 0x42, 0x42, 0x24, 0x3C, 0x00, 0x00, 0x00, // 624 + 0x00, 0x30, 0xD0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xFE, 0x00, 0x00, 0x00, // 637 + 0x00, 0x78, 0x04, 0x04, 0x04, 0x08, 0x10, 0x20, 0x40, 0x7C, 0x00, 0x00, 0x00, // 650 + 0x00, 0x78, 0x04, 0x04, 0x08, 0x30, 0x0C, 0x04, 0x04, 0x78, 0x00, 0x00, 0x00, // 663 + 0x00, 0x08, 0x18, 0x28, 0x28, 0x48, 0x88, 0xFC, 0x08, 0x08, 0x00, 0x00, 0x00, // 676 + 0x00, 0x3C, 0x20, 0x20, 0x38, 0x04, 0x04, 0x04, 0x04, 0x38, 0x00, 0x00, 0x00, // 689 + 0x00, 0x1C, 0x20, 0x40, 0x5C, 0x62, 0x42, 0x42, 0x22, 0x1C, 0x00, 0x00, 0x00, // 702 + 0x00, 0x7E, 0x02, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x00, 0x00, 0x00, // 715 + 0x00, 0x3C, 0x42, 0x42, 0x24, 0x3C, 0x46, 0x42, 0x42, 0x3C, 0x00, 0x00, 0x00, // 728 + 0x00, 0x38, 0x44, 0x42, 0x42, 0x46, 0x3A, 0x02, 0x04, 0x38, 0x00, 0x00, 0x00, // 741 + 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, // 754 + 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x30, 0x30, 0x10, 0x20, 0x00, // 767 + 0x00, 0x00, 0x00, 0x02, 0x0C, 0x10, 0x60, 0x10, 0x0C, 0x02, 0x00, 0x00, 0x00, // 780 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, // 793 + 0x00, 0x00, 0x00, 0x40, 0x30, 0x08, 0x06, 0x08, 0x30, 0x40, 0x00, 0x00, 0x00, // 806 + 0x00, 0x7C, 0x42, 0x02, 0x04, 0x08, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // 819 + 0x00, 0x3C, 0x62, 0xDE, 0xB2, 0xA2, 0xA6, 0x9B, 0x44, 0x3C, 0x00, 0x00, 0x00, // 832 + 0x00, 0x00, 0x18, 0x18, 0x24, 0x24, 0x24, 0x7E, 0x42, 0x81, 0x00, 0x00, 0x00, // 845 + 0x00, 0x00, 0x7C, 0x42, 0x42, 0x7C, 0x42, 0x42, 0x42, 0x7C, 0x00, 0x00, 0x00, // 858 + 0x00, 0x00, 0x3E, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x3E, 0x00, 0x00, 0x00, // 871 + 0x00, 0x00, 0x78, 0x44, 0x42, 0x42, 0x42, 0x42, 0x44, 0x78, 0x00, 0x00, 0x00, // 884 + 0x00, 0x00, 0x7E, 0x40, 0x40, 0x40, 0x7C, 0x40, 0x40, 0x7E, 0x00, 0x00, 0x00, // 897 + 0x00, 0x00, 0x7E, 0x40, 0x40, 0x40, 0x7C, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, // 910 + 0x00, 0x00, 0x3E, 0x40, 0x80, 0x80, 0x8E, 0x82, 0x42, 0x3E, 0x00, 0x00, 0x00, // 923 + 0x00, 0x00, 0x42, 0x42, 0x42, 0x7E, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, // 936 + 0x00, 0x00, 0x7C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7C, 0x00, 0x00, 0x00, // 949 + 0x00, 0x00, 0x3C, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x78, 0x00, 0x00, 0x00, // 962 + 0x00, 0x00, 0x42, 0x44, 0x48, 0x70, 0x50, 0x48, 0x44, 0x42, 0x00, 0x00, 0x00, // 975 + 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x7E, 0x00, 0x00, 0x00, // 988 + 0x00, 0x00, 0xC6, 0xC6, 0xAA, 0xAA, 0xAA, 0x92, 0x82, 0x82, 0x00, 0x00, 0x00, // 1001 + 0x00, 0x00, 0x42, 0x62, 0x52, 0x52, 0x4A, 0x4A, 0x46, 0x42, 0x00, 0x00, 0x00, // 1014 + 0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, // 1027 + 0x00, 0x00, 0x7C, 0x42, 0x42, 0x42, 0x7C, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, // 1040 + 0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x06, 0x03, 0x00, // 1053 + 0x00, 0x00, 0x78, 0x44, 0x44, 0x44, 0x78, 0x48, 0x44, 0x42, 0x00, 0x00, 0x00, // 1066 + 0x00, 0x00, 0x3E, 0x40, 0x40, 0x38, 0x04, 0x02, 0x02, 0x7C, 0x00, 0x00, 0x00, // 1079 + 0x00, 0x00, 0xFE, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, // 1092 + 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00, 0x00, 0x00, // 1105 + 0x00, 0x00, 0x81, 0x42, 0x42, 0x44, 0x24, 0x28, 0x38, 0x10, 0x00, 0x00, 0x00, // 1118 + 0x00, 0x00, 0x81, 0x81, 0x92, 0x5A, 0x5A, 0x6A, 0x66, 0x24, 0x00, 0x00, 0x00, // 1131 + 0x00, 0x00, 0x81, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x81, 0x00, 0x00, 0x00, // 1144 + 0x00, 0x00, 0x82, 0x44, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, // 1157 + 0x00, 0x00, 0xFE, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0xFE, 0x00, 0x00, 0x00, // 1170 + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1E, 0x00, // 1183 + 0x80, 0x40, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x02, 0x02, 0x01, 0x00, // 1196 + 0x78, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x78, 0x00, // 1209 + 0x00, 0x08, 0x08, 0x18, 0x14, 0x24, 0x24, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, // 1222 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, // 1235 + 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 1248 + 0x00, 0x00, 0x00, 0x38, 0x04, 0x04, 0x3C, 0x44, 0x44, 0x3E, 0x00, 0x00, 0x00, // 1261 + 0x40, 0x40, 0x40, 0x5C, 0x62, 0x42, 0x42, 0x42, 0x62, 0x5C, 0x00, 0x00, 0x00, // 1274 + 0x00, 0x00, 0x00, 0x1E, 0x20, 0x40, 0x40, 0x40, 0x20, 0x1E, 0x00, 0x00, 0x00, // 1287 + 0x02, 0x02, 0x02, 0x3A, 0x46, 0x42, 0x42, 0x42, 0x46, 0x3A, 0x00, 0x00, 0x00, // 1300 + 0x00, 0x00, 0x00, 0x3C, 0x22, 0x42, 0x7E, 0x40, 0x40, 0x3E, 0x00, 0x00, 0x00, // 1313 + 0x1E, 0x20, 0x20, 0xFE, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, // 1326 + 0x00, 0x00, 0x00, 0x3A, 0x46, 0x42, 0x42, 0x42, 0x46, 0x3A, 0x02, 0x02, 0x3C, // 1339 + 0x40, 0x40, 0x40, 0x5C, 0x62, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, // 1352 + 0x18, 0x18, 0x00, 0x78, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, // 1365 + 0x18, 0x18, 0x00, 0x78, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x70, // 1378 + 0x40, 0x40, 0x40, 0x44, 0x48, 0x50, 0x60, 0x50, 0x48, 0x44, 0x00, 0x00, 0x00, // 1391 + 0x78, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, // 1404 + 0x00, 0x00, 0x00, 0xB6, 0xDA, 0x92, 0x92, 0x92, 0x92, 0x92, 0x00, 0x00, 0x00, // 1417 + 0x00, 0x00, 0x00, 0x5C, 0x62, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, // 1430 + 0x00, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00, 0x00, 0x00, // 1443 + 0x00, 0x00, 0x00, 0x5C, 0x62, 0x42, 0x42, 0x42, 0x62, 0x5C, 0x40, 0x40, 0x40, // 1456 + 0x00, 0x00, 0x00, 0x3A, 0x46, 0x42, 0x42, 0x42, 0x46, 0x3A, 0x02, 0x02, 0x02, // 1469 + 0x00, 0x00, 0x00, 0x5C, 0x64, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, // 1482 + 0x00, 0x00, 0x00, 0x3C, 0x40, 0x60, 0x18, 0x04, 0x04, 0x78, 0x00, 0x00, 0x00, // 1495 + 0x00, 0x00, 0x20, 0xFC, 0x20, 0x20, 0x20, 0x20, 0x20, 0x1C, 0x00, 0x00, 0x00, // 1508 + 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x46, 0x3A, 0x00, 0x00, 0x00, // 1521 + 0x00, 0x00, 0x00, 0x82, 0x44, 0x44, 0x44, 0x28, 0x28, 0x10, 0x00, 0x00, 0x00, // 1534 + 0x00, 0x00, 0x00, 0x81, 0x91, 0x5A, 0x5A, 0x6A, 0x24, 0x24, 0x00, 0x00, 0x00, // 1547 + 0x00, 0x00, 0x00, 0x42, 0x24, 0x18, 0x18, 0x18, 0x24, 0x42, 0x00, 0x00, 0x00, // 1560 + 0x00, 0x00, 0x00, 0x81, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, 0x10, 0x30, 0xE0, // 1573 + 0x00, 0x00, 0x00, 0x7E, 0x02, 0x04, 0x08, 0x10, 0x20, 0x7E, 0x00, 0x00, 0x00, // 1586 + 0x1C, 0x10, 0x10, 0x10, 0x10, 0x60, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0C, 0x00, // 1599 + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, // 1612 + 0x30, 0x08, 0x08, 0x08, 0x08, 0x06, 0x08, 0x08, 0x08, 0x08, 0x08, 0x30, 0x00, // 1625 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x8E, 0x00, 0x00, 0x00, 0x00, 0x00, // 1638 + 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 1651 + 0x00, 0x00, 0x3E, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x3E, 0x04, 0x02, 0x06, // 1664 + 0x00, 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x46, 0x3A, 0x00, 0x00, 0x00, // 1677 + 0x08, 0x10, 0x00, 0x3C, 0x22, 0x42, 0x7E, 0x40, 0x40, 0x3E, 0x00, 0x00, 0x00, // 1690 + 0x18, 0x24, 0x00, 0x38, 0x04, 0x04, 0x3C, 0x44, 0x44, 0x3E, 0x00, 0x00, 0x00, // 1703 + 0x00, 0x24, 0x00, 0x38, 0x04, 0x04, 0x3C, 0x44, 0x44, 0x3E, 0x00, 0x00, 0x00, // 1716 + 0x10, 0x08, 0x00, 0x38, 0x04, 0x04, 0x3C, 0x44, 0x44, 0x3E, 0x00, 0x00, 0x00, // 1729 + 0x10, 0x28, 0x10, 0x38, 0x04, 0x04, 0x3C, 0x44, 0x44, 0x3E, 0x00, 0x00, 0x00, // 1742 + 0x00, 0x00, 0x00, 0x1E, 0x20, 0x40, 0x40, 0x40, 0x20, 0x1E, 0x08, 0x04, 0x0C, // 1755 + 0x18, 0x24, 0x00, 0x3C, 0x22, 0x42, 0x7E, 0x40, 0x40, 0x3E, 0x00, 0x00, 0x00, // 1768 + 0x00, 0x12, 0x00, 0x3C, 0x22, 0x42, 0x7E, 0x40, 0x40, 0x3E, 0x00, 0x00, 0x00, // 1781 + 0x10, 0x08, 0x00, 0x3C, 0x22, 0x42, 0x7E, 0x40, 0x40, 0x3E, 0x00, 0x00, 0x00, // 1794 + 0x00, 0x24, 0x00, 0x78, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, // 1807 + 0x18, 0x24, 0x00, 0x78, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, // 1820 + 0x10, 0x08, 0x00, 0x78, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, // 1833 + 0x24, 0x00, 0x18, 0x18, 0x24, 0x24, 0x24, 0x7E, 0x42, 0x81, 0x00, 0x00, 0x00, // 1846 + 0x10, 0x28, 0x10, 0x28, 0x28, 0x24, 0x44, 0x7E, 0x42, 0x81, 0x00, 0x00, 0x00, // 1859 + 0x08, 0x10, 0x7E, 0x40, 0x40, 0x40, 0x7C, 0x40, 0x40, 0x7E, 0x00, 0x00, 0x00, // 1872 + 0x00, 0x00, 0x00, 0xFC, 0x12, 0x12, 0x7E, 0x90, 0x90, 0x6E, 0x00, 0x00, 0x00, // 1885 + 0x00, 0x00, 0x0F, 0x18, 0x18, 0x28, 0x2E, 0x78, 0x48, 0x8F, 0x00, 0x00, 0x00, // 1898 + 0x18, 0x24, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00, 0x00, 0x00, // 1911 + 0x00, 0x24, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00, 0x00, 0x00, // 1924 + 0x20, 0x10, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00, 0x00, 0x00, // 1937 + 0x18, 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x46, 0x3A, 0x00, 0x00, 0x00, // 1950 + 0x20, 0x10, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x46, 0x3A, 0x00, 0x00, 0x00, // 1963 + 0x00, 0x24, 0x00, 0x81, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, 0x10, 0x30, 0xE0, // 1976 + 0x24, 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, // 1989 + 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00, 0x00, 0x00, // 2002 + 0x00, 0x08, 0x1C, 0x28, 0x48, 0x48, 0x48, 0x68, 0x1C, 0x08, 0x00, 0x00, 0x00, // 2015 + 0x00, 0x0E, 0x10, 0x10, 0x10, 0x38, 0x10, 0x10, 0x20, 0x3E, 0x00, 0x00, 0x00, // 2028 + 0x00, 0x81, 0x42, 0x24, 0x18, 0x7C, 0x10, 0x7C, 0x10, 0x10, 0x00, 0x00, 0x00, // 2041 + 0x00, 0xE0, 0x90, 0x90, 0xE0, 0x96, 0xBC, 0x94, 0x92, 0x9E, 0x00, 0x00, 0x00, // 2054 + 0x0E, 0x10, 0x10, 0x3C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xE0, // 2067 + 0x08, 0x10, 0x00, 0x38, 0x04, 0x04, 0x3C, 0x44, 0x44, 0x3E, 0x00, 0x00, 0x00, // 2080 + 0x08, 0x10, 0x00, 0x78, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, // 2093 + 0x08, 0x10, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00, 0x00, 0x00, // 2106 + 0x08, 0x10, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x46, 0x3A, 0x00, 0x00, 0x00, // 2119 + 0x14, 0x28, 0x00, 0x5C, 0x62, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, // 2132 + 0x14, 0x28, 0x42, 0x62, 0x52, 0x52, 0x4A, 0x4A, 0x46, 0x42, 0x00, 0x00, 0x00, // 2145 + 0x00, 0x78, 0x08, 0x38, 0x48, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 2158 + 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 2171 + 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x10, 0x20, 0x40, 0x42, 0x3E, 0x00, // 2184 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, // 2197 + 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, // 2210 + 0x00, 0xC4, 0x48, 0x48, 0x50, 0x37, 0x21, 0x43, 0x44, 0x87, 0x00, 0x00, 0x00, // 2223 + 0x00, 0xC4, 0x48, 0x48, 0x50, 0x22, 0x26, 0x4A, 0x4F, 0x82, 0x00, 0x00, 0x00, // 2236 + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, // 2249 + 0x00, 0x00, 0x00, 0x00, 0x12, 0x24, 0x48, 0x24, 0x12, 0x00, 0x00, 0x00, 0x00, // 2262 + 0x00, 0x00, 0x00, 0x00, 0x48, 0x24, 0x12, 0x24, 0x48, 0x00, 0x00, 0x00, 0x00, // 2275 + 0x94, 0x00, 0x00, 0x94, 0x00, 0x94, 0x00, 0x00, 0x94, 0x00, 0x94, 0x00, 0x00, // 2288 + 0x49, 0x94, 0x00, 0x49, 0x94, 0x49, 0x00, 0x94, 0x49, 0x94, 0x49, 0x00, 0x94, // 2301 + 0xFF, 0x94, 0x94, 0xFF, 0x94, 0xFF, 0x94, 0x94, 0xFF, 0x94, 0xFF, 0x94, 0x94, // 2314 + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, // 2327 + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xF0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, // 2340 + 0x10, 0x10, 0x10, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x10, 0x10, 0x10, 0x10, 0x10, // 2353 + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0xF4, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, // 2366 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, // 2379 + 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0xF0, 0x10, 0x10, 0x10, 0x10, 0x10, // 2392 + 0x14, 0x14, 0x14, 0x14, 0x14, 0xF4, 0x04, 0xF4, 0x14, 0x14, 0x14, 0x14, 0x14, // 2405 + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, // 2418 + 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x04, 0xF4, 0x14, 0x14, 0x14, 0x14, 0x14, // 2431 + 0x14, 0x14, 0x14, 0x14, 0x14, 0xF4, 0x04, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, // 2444 + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 2457 + 0x10, 0x10, 0x10, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, // 2470 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, // 2483 + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 2496 + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 2509 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, // 2522 + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, // 2535 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 2548 + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xFF, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, // 2561 + 0x10, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x10, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x10, // 2574 + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x17, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, // 2587 + 0x14, 0x14, 0x14, 0x14, 0x14, 0x17, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, // 2600 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x17, 0x14, 0x14, 0x14, 0x14, 0x14, // 2613 + 0x14, 0x14, 0x14, 0x14, 0x14, 0xF7, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, // 2626 + 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xF7, 0x14, 0x14, 0x14, 0x14, 0x14, // 2639 + 0x14, 0x14, 0x14, 0x14, 0x14, 0x17, 0x10, 0x17, 0x14, 0x14, 0x14, 0x14, 0x14, // 2652 + 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, // 2665 + 0x14, 0x14, 0x14, 0x14, 0x14, 0xF7, 0x00, 0xF7, 0x14, 0x14, 0x14, 0x14, 0x14, // 2678 + 0x10, 0x10, 0x10, 0x10, 0x10, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, // 2691 + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 2704 + 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x10, 0x10, 0x10, 0x10, 0x10, // 2717 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, // 2730 + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 2743 + 0x10, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, // 2756 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x10, // 2769 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, // 2782 + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0xFF, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, // 2795 + 0x10, 0x10, 0x10, 0x10, 0x10, 0xFF, 0x10, 0xFF, 0x10, 0x10, 0x10, 0x10, 0x10, // 2808 + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 2821 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, // 2834 + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 2847 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 2860 + 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, // 2873 + 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, // 2886 + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 2899 + 0x00, 0x00, 0x00, 0x31, 0x49, 0x86, 0x84, 0x84, 0x8A, 0x71, 0x00, 0x00, 0x00, // 2912 + 0x38, 0x48, 0x48, 0x50, 0x50, 0x58, 0x44, 0x42, 0x42, 0x5C, 0x00, 0x00, 0x00, // 2925 + 0x00, 0x00, 0x3F, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, // 2938 + 0x00, 0x00, 0x00, 0x7F, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x00, 0x00, 0x00, // 2951 + 0x00, 0x00, 0xFF, 0x40, 0x20, 0x10, 0x10, 0x20, 0x40, 0xFF, 0x00, 0x00, 0x00, // 2964 + 0x00, 0x00, 0x00, 0x7F, 0x84, 0x84, 0x84, 0x84, 0x84, 0x78, 0x00, 0x00, 0x00, // 2977 + 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x66, 0x5A, 0x40, 0x40, 0x40, // 2990 + 0x00, 0x00, 0x00, 0xFE, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, // 3003 + 0x00, 0x00, 0x10, 0x7C, 0x92, 0x92, 0x92, 0x92, 0x7C, 0x10, 0x00, 0x00, 0x00, // 3016 + 0x00, 0x00, 0x38, 0x44, 0x82, 0xBA, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, // 3029 + 0x00, 0x00, 0x7C, 0xC6, 0x82, 0x82, 0x82, 0x84, 0x44, 0xEE, 0x00, 0x00, 0x00, // 3042 + 0x38, 0x40, 0x60, 0x18, 0x24, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00, 0x00, 0x00, // 3055 + 0x00, 0x00, 0x00, 0x00, 0x66, 0x99, 0x99, 0x99, 0x66, 0x00, 0x00, 0x00, 0x00, // 3068 + 0x10, 0x10, 0x10, 0x7C, 0x92, 0x91, 0x91, 0x91, 0x92, 0x7C, 0x10, 0x10, 0x10, // 3081 + 0x00, 0x00, 0x00, 0x1E, 0x20, 0x40, 0x7C, 0x40, 0x60, 0x1E, 0x00, 0x00, 0x00, // 3094 + 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x00, 0x00, 0x00, // 3107 + 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, // 3120 + 0x00, 0x00, 0x00, 0x10, 0x10, 0xFE, 0x10, 0x10, 0x00, 0xFE, 0x00, 0x00, 0x00, // 3133 + 0x00, 0x00, 0x40, 0x30, 0x08, 0x06, 0x08, 0x30, 0x40, 0x00, 0x7E, 0x00, 0x00, // 3146 + 0x00, 0x00, 0x02, 0x0C, 0x10, 0x60, 0x10, 0x0C, 0x02, 0x00, 0x7E, 0x00, 0x00, // 3159 + 0x0C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, // 3172 + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x60, // 3185 + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // 3198 + 0x00, 0x00, 0x00, 0x00, 0x72, 0x4E, 0x00, 0x72, 0x4E, 0x00, 0x00, 0x00, 0x00, // 3211 + 0x00, 0x10, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 3224 + 0x00, 0x00, 0x00, 0x00, 0x18, 0x3C, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, // 3237 + 0x00, 0x00, 0x00, 0x00, 0x18, 0x3C, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, // 3250 + 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0xC4, 0x28, 0x28, 0x18, 0x10, 0x00, // 3263 + 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 3276 + 0x00, 0x3C, 0x04, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 3289 + 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, // 3302 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // 3315 }; ULONG ScreenCursor; @@ -284,10 +286,10 @@ /* Get screen width */ ScreenWidth = LlbHwGetScreenWidth(); - Pixels = LlbHwBootFont + c * 8; + Pixels = LlbHwBootFont + c * FONT_HEIGHT; /* Loop y pixels */ - for (y = 0; y < 8; y++) + for (y = 0; y < FONT_HEIGHT; y++) { /* Loop x pixels */ Line = *Pixels++; @@ -349,7 +351,7 @@ /* Amount of characters in a line */ ScreenWidth = LlbHwGetScreenWidth(); - CharsPerLine = ScreenWidth / 8; + CharsPerLine = ScreenWidth / FONT_HEIGHT; /* Handle new line and scrolling */ if (c == '\n') @@ -362,7 +364,7 @@ else { /* Calculate character position from pixel position */ - cy = (ScreenCursor / CharsPerLine) * 8; + cy = (ScreenCursor / CharsPerLine) * FONT_HEIGHT; cx = (ScreenCursor % CharsPerLine) * 8; /* Draw the character and increment the cursor */
14 years, 10 months
1
0
0
0
[evb] 45414: - Add PL031 RTC code for Versatile. - Add RTC time to TimeInfo convert. - Implement FirmWare GetTime function. Countdown in FreeLDR now working.
by evb@svn.reactos.org
Author: evb Date: Thu Feb 4 08:22:03 2010 New Revision: 45414 URL:
http://svn.reactos.org/svn/reactos?rev=45414&view=rev
Log: - Add PL031 RTC code for Versatile. - Add RTC time to TimeInfo convert. - Implement FirmWare GetTime function. Countdown in FreeLDR now working. Added: trunk/reactos/boot/armllb/hw/time.c (with props) Modified: trunk/reactos/boot/armllb/armllb.rbuild trunk/reactos/boot/armllb/fw.c trunk/reactos/boot/armllb/hw/versatile/hwinfo.c trunk/reactos/boot/armllb/inc/fw.h trunk/reactos/boot/armllb/inc/hw.h trunk/reactos/boot/armllb/inc/precomp.h Modified: trunk/reactos/boot/armllb/armllb.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/armllb.rbuild?…
============================================================================== --- trunk/reactos/boot/armllb/armllb.rbuild [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/armllb.rbuild [iso-8859-1] Thu Feb 4 08:22:03 2010 @@ -26,6 +26,7 @@ <directory name="hw"> <file>keyboard.c</file> <file>serial.c</file> + <file>time.c</file> <file>video.c</file> <if property="SARCH" value="omap3"> <directory name="omap3"> Modified: trunk/reactos/boot/armllb/fw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/fw.c?rev=45414…
============================================================================== --- trunk/reactos/boot/armllb/fw.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/fw.c [iso-8859-1] Thu Feb 4 08:22:03 2010 @@ -171,12 +171,11 @@ return; } -VOID +TIMEINFO* LlbFwGetTime(VOID) { - printf("%s is UNIMPLEMENTED", __FUNCTION__); - while (TRUE); - return; + /* Call existing function */ + return LlbGetTime(); } /* EOF */ Added: trunk/reactos/boot/armllb/hw/time.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/hw/time.c?rev=…
============================================================================== --- trunk/reactos/boot/armllb/hw/time.c (added) +++ trunk/reactos/boot/armllb/hw/time.c [iso-8859-1] Thu Feb 4 08:22:03 2010 @@ -1,0 +1,91 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: boot/armllb/hw/time.c + * PURPOSE: LLB Time Routines + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +#include "precomp.h" + +#define LEAPS_THRU_END_OF(y) ((y)/4 - (y)/100 + (y)/400) + +UCHAR LlbDaysInMonth[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; +TIMEINFO LlbTime; + +BOOLEAN +NTAPI +LlbIsLeapYear(IN ULONG Year) +{ + /* Every 4, 100, or 400 years */ + return (!(Year % 4) && (Year % 100)) || !(Year % 400); +} + +ULONG +NTAPI +LlbDayOfMonth(IN ULONG Month, + IN ULONG Year) +{ + /* Check how many days a month has, accounting for leap yearS */ + return LlbDaysInMonth[Month] + (LlbIsLeapYear(Year) && Month == 1); +} + +VOID +NTAPI +LlbConvertRtcTime(IN ULONG RtcTime, + OUT TIMEINFO* TimeInfo) +{ + ULONG Month, Year, Days, DaysLeft; + + /* Count the days, keep the minutes */ + Days = RtcTime / 86400; + RtcTime -= Days * 86400; + + /* Get the year, based on days since 1970 */ + Year = 1970 + Days / 365; + + /* Account for leap years which changed the number of days/year */ + Days -= (Year - 1970) * 365 + LEAPS_THRU_END_OF(Year - 1) - LEAPS_THRU_END_OF(1970 - 1); + if (Days < 0) + { + /* We hit a leap year, so fixup the math */ + Year--; + Days += 365 + LlbIsLeapYear(Year); + } + + /* Count months */ + for (Month = 0; Month < 11; Month++) + { + /* How many days in this month? */ + DaysLeft = Days - LlbDayOfMonth(Month, Year); + if (DaysLeft < 0) break; + + /* How many days left total? */ + Days = DaysLeft; + } + + /* Write the structure */ + TimeInfo->Year = Year; + TimeInfo->Day = Days + 1; + TimeInfo->Month = Month + 1; + TimeInfo->Hour = RtcTime / 3600; + RtcTime -= TimeInfo->Hour * 3600; + TimeInfo->Minute = RtcTime / 60; + TimeInfo->Second = RtcTime - TimeInfo->Minute * 60; +} + +TIMEINFO* +NTAPI +LlbGetTime(VOID) +{ + ULONG RtcTime; + + /* Read RTC time */ + RtcTime = LlbHwRtcRead(); + + /* Convert it */ + LlbConvertRtcTime(RtcTime, &LlbTime); + return &LlbTime; +} + +/* EOF */ Propchange: trunk/reactos/boot/armllb/hw/time.c ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/boot/armllb/hw/time.c ------------------------------------------------------------------------------ svn:executable = * Modified: trunk/reactos/boot/armllb/hw/versatile/hwinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/hw/versatile/h…
============================================================================== --- trunk/reactos/boot/armllb/hw/versatile/hwinfo.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/hw/versatile/hwinfo.c [iso-8859-1] Thu Feb 4 08:22:03 2010 @@ -7,6 +7,9 @@ */ #include "precomp.h" + +#define PL031_RTC_DR (LlbHwVersaRtcBase + 0x00) +static const ULONG LlbHwVersaRtcBase = 0x101E8000; ULONG NTAPI @@ -44,4 +47,10 @@ LlbAllocateMemoryEntry(BiosMemoryReserved, 0x10000000, 128 * 1024 * 1024); } +ULONG +LlbHwRtcRead(VOID) +{ + /* Read RTC value */ + return READ_REGISTER_ULONG(PL031_RTC_DR); +} /* EOF */ Modified: trunk/reactos/boot/armllb/inc/fw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/inc/fw.h?rev=4…
============================================================================== --- trunk/reactos/boot/armllb/inc/fw.h [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/inc/fw.h [iso-8859-1] Thu Feb 4 08:22:03 2010 @@ -5,6 +5,16 @@ * PURPOSE: LLB Firmware Functions * PROGRAMMERS: ReactOS Portable Systems Group */ + +typedef struct _TIMEINFO +{ + USHORT Year; + USHORT Month; + USHORT Day; + USHORT Hour; + USHORT Minute; + USHORT Second; +} TIMEINFO; VOID LlbFwPutChar( @@ -94,7 +104,7 @@ VOID ); -VOID +TIMEINFO* LlbFwGetTime( VOID ); Modified: trunk/reactos/boot/armllb/inc/hw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/inc/hw.h?rev=4…
============================================================================== --- trunk/reactos/boot/armllb/inc/hw.h [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/inc/hw.h [iso-8859-1] Thu Feb 4 08:22:03 2010 @@ -104,6 +104,19 @@ VOID ); +ULONG +NTAPI +LlbHwRtcRead( + VOID +); + +//fix +TIMEINFO* +NTAPI +LlbGetTime( + VOID +); + #ifdef _VERSATILE_ #include "versa.h" #elif _OMAP3_ Modified: trunk/reactos/boot/armllb/inc/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/inc/precomp.h?…
============================================================================== --- trunk/reactos/boot/armllb/inc/precomp.h [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/inc/precomp.h [iso-8859-1] Thu Feb 4 08:22:03 2010 @@ -11,8 +11,8 @@ #include "ioaccess.h" #include "machtype.h" #include "osloader.h" +#include "fw.h" #include "hw.h" -#include "fw.h" #include "serial.h" #include "video.h" #include "keyboard.h"
14 years, 10 months
1
0
0
0
[evb] 45413: - Add GetTime stub, bump version to 1.4. - Implement function for drawing character on the screen when request come from firmware. - Tui.c assumes all screens are x86 VGA Consoles with 8-bit character and 8-bit attribute. On ARM, call Mach function to draw character instead of drawing into ScreenMemory off-screen buffer. - FreeLDR menu now appears, need GetTime for counter.
by evb@svn.reactos.org
Author: evb Date: Thu Feb 4 07:44:06 2010 New Revision: 45413 URL:
http://svn.reactos.org/svn/reactos?rev=45413&view=rev
Log: - Add GetTime stub, bump version to 1.4. - Implement function for drawing character on the screen when request come from firmware. - Tui.c assumes all screens are x86 VGA Consoles with 8-bit character and 8-bit attribute. On ARM, call Mach function to draw character instead of drawing into ScreenMemory off-screen buffer. - FreeLDR menu now appears, need GetTime for counter. Modified: trunk/reactos/boot/armllb/fw.c trunk/reactos/boot/armllb/hw/video.c trunk/reactos/boot/armllb/inc/fw.h trunk/reactos/boot/armllb/inc/osloader.h trunk/reactos/boot/armllb/inc/video.h trunk/reactos/boot/armllb/os/loader.c trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c trunk/reactos/boot/freeldr/freeldr/ui/tui.c Modified: trunk/reactos/boot/armllb/fw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/fw.c?rev=45413…
============================================================================== --- trunk/reactos/boot/armllb/fw.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/fw.c [iso-8859-1] Thu Feb 4 07:44:06 2010 @@ -75,11 +75,31 @@ return; } +USHORT ColorPalette[16][3] = +{ + {0x00, 0x00, 0x00}, + {0x00, 0x00, 0xAA}, + {0x00, 0xAA, 0x00}, + {0x00, 0xAA, 0xAA}, + {0xAA, 0x00, 0x00}, + {0xAA, 0x00, 0xAA}, + {0xAA, 0x55, 0x00}, + {0xAA, 0xAA, 0xAA}, + {0x55, 0x55, 0x55}, + {0x55, 0x55, 0xFF}, + {0x55, 0xFF, 0x55}, + {0x55, 0xFF, 0xFF}, + {0xFF, 0x55, 0x55}, + {0xFF, 0x55, 0xFF}, + {0xFF, 0xFF, 0x55}, + {0xFF, 0xFF, 0xFF}, +}; + VOID LlbFwVideoCopyOffScreenBufferToVRAM(IN PVOID Buffer) { - printf("%s is UNIMPLEMENTED", __FUNCTION__); - while (TRUE); + /* No double-buffer is used on ARM */ + return; } VOID @@ -95,8 +115,22 @@ IN ULONG X, IN ULONG Y) { - printf("%s is UNIMPLEMENTED", __FUNCTION__); - while (TRUE); + ULONG Color, BackColor; + PUSHORT Buffer; + + /* Convert EGA index to color used by hardware */ + Color = LlbHwVideoCreateColor(ColorPalette[Attr & 0xF][0], + ColorPalette[Attr & 0xF][1], + ColorPalette[Attr & 0xF][2]); + BackColor = LlbHwVideoCreateColor(ColorPalette[Attr >> 4][0], + ColorPalette[Attr >> 4][1], + ColorPalette[Attr >> 4][2]); + + /* Compute buffer address */ + Buffer = (PUSHORT)LlbHwGetFrameBuffer() + (LlbHwGetScreenWidth() * (Y * 8)) + (X * 8); + + /* Draw it */ + LlbVideoDrawChar(c, Buffer, Color, BackColor); } BOOLEAN @@ -137,4 +171,12 @@ return; } +VOID +LlbFwGetTime(VOID) +{ + printf("%s is UNIMPLEMENTED", __FUNCTION__); + while (TRUE); + return; +} + /* EOF */ Modified: trunk/reactos/boot/armllb/hw/video.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/hw/video.c?rev…
============================================================================== --- trunk/reactos/boot/armllb/hw/video.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/hw/video.c [iso-8859-1] Thu Feb 4 07:44:06 2010 @@ -268,51 +268,22 @@ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, }; -#if 0 -USHORT ColorPalette[16] = -{ - RGB565(0x00, 0x00, 0x00), - RGB565(0x00, 0x00, 0xAA), - RGB565(0x00, 0xAA, 0x00), - RGB565(0x00, 0xAA, 0xAA), - RGB565(0xAA, 0x00, 0x00), - RGB565(0xAA, 0x00, 0xAA), - RGB565(0xAA, 0x55, 0x00), - RGB565(0xAA, 0xAA, 0xAA), - RGB565(0x55, 0x55, 0x55), - RGB565(0x55, 0x55, 0xFF), - RGB565(0x55, 0xFF, 0x55), - RGB565(0x55, 0xFF, 0xFF), - RGB565(0xFF, 0x55, 0x55), - RGB565(0xFF, 0x55, 0xFF), - RGB565(0xFF, 0xFF, 0x55), - RGB565(0xFF, 0xFF, 0xFF), -}; -#endif - ULONG ScreenCursor; VOID NTAPI LlbVideoDrawChar(IN CHAR c, - IN ULONG cx, - IN ULONG cy, + IN PUSHORT Buffer, IN USHORT Color, IN USHORT BackColor) { - PUSHORT Buffer; PCHAR Pixels; CHAR Line; ULONG y, ScreenWidth; LONG x; - PUSHORT VideoBuffer; - - /* Get screen width and frame buffer */ + + /* Get screen width */ ScreenWidth = LlbHwGetScreenWidth(); - VideoBuffer = LlbHwGetFrameBuffer(); - - /* Compute starting address on-screen and in the character-array */ - Buffer = VideoBuffer + ScreenWidth * cy + cx; Pixels = LlbHwBootFont + c * 8; /* Loop y pixels */ @@ -371,13 +342,14 @@ NTAPI LlbVideoPutChar(IN CHAR c) { - ULONG cx, cy, CharsPerLine, BackColor; + ULONG cx, cy, CharsPerLine, BackColor, ScreenWidth; /* Forecolor on this machine */ BackColor = LlbHwVideoCreateColor(14, 0, 82); /* Amount of characters in a line */ - CharsPerLine = LlbHwGetScreenWidth() / 8; + ScreenWidth = LlbHwGetScreenWidth(); + CharsPerLine = ScreenWidth / 8; /* Handle new line and scrolling */ if (c == '\n') @@ -394,7 +366,10 @@ cx = (ScreenCursor % CharsPerLine) * 8; /* Draw the character and increment the cursor */ - LlbVideoDrawChar(c, cx, cy, 0xFFFF, BackColor); + LlbVideoDrawChar(c, + (PUSHORT)LlbHwGetFrameBuffer() + ScreenWidth * cy + cx, + 0xFFFF, + BackColor); ScreenCursor++; } } Modified: trunk/reactos/boot/armllb/inc/fw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/inc/fw.h?rev=4…
============================================================================== --- trunk/reactos/boot/armllb/inc/fw.h [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/inc/fw.h [iso-8859-1] Thu Feb 4 07:44:06 2010 @@ -94,4 +94,9 @@ VOID ); +VOID +LlbFwGetTime( + VOID +); + /* EOF */ Modified: trunk/reactos/boot/armllb/inc/osloader.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/inc/osloader.h…
============================================================================== --- trunk/reactos/boot/armllb/inc/osloader.h [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/inc/osloader.h [iso-8859-1] Thu Feb 4 07:44:06 2010 @@ -42,7 +42,7 @@ // Information sent from LLB to OS Loader // #define ARM_BOARD_CONFIGURATION_MAJOR_VERSION 1 -#define ARM_BOARD_CONFIGURATION_MINOR_VERSION 3 +#define ARM_BOARD_CONFIGURATION_MINOR_VERSION 4 typedef struct _ARM_BOARD_CONFIGURATION_BLOCK { ULONG MajorVersion; @@ -69,6 +69,7 @@ PVOID VideoSetPaletteColor; PVOID VideoGetPaletteColor; PVOID VideoSync; + PVOID GetTime; } ARM_BOARD_CONFIGURATION_BLOCK, *PARM_BOARD_CONFIGURATION_BLOCK; VOID Modified: trunk/reactos/boot/armllb/inc/video.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/inc/video.h?re…
============================================================================== --- trunk/reactos/boot/armllb/inc/video.h [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/inc/video.h [iso-8859-1] Thu Feb 4 07:44:06 2010 @@ -18,4 +18,13 @@ IN CHAR c ); +VOID +NTAPI +LlbVideoDrawChar( + IN CHAR c, + IN PUSHORT Buffer, + IN USHORT Color, + IN USHORT BackColor +); + /* EOF */ Modified: trunk/reactos/boot/armllb/os/loader.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/os/loader.c?re…
============================================================================== --- trunk/reactos/boot/armllb/os/loader.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/os/loader.c [iso-8859-1] Thu Feb 4 07:44:06 2010 @@ -86,6 +86,7 @@ ArmBlock.VideoSetPaletteColor = LlbFwVideoSetPaletteColor; ArmBlock.VideoGetPaletteColor = LlbFwVideoGetPaletteColor; ArmBlock.VideoSync = LlbFwVideoSync; + ArmBlock.GetTime = LlbFwGetTime; } VOID Modified: trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c [iso-8859-1] Thu Feb 4 07:44:06 2010 @@ -171,6 +171,7 @@ MachVtbl.VideoSetPaletteColor = ArmBoardBlock->VideoSetPaletteColor; MachVtbl.VideoGetPaletteColor = ArmBoardBlock->VideoGetPaletteColor; MachVtbl.VideoSync = ArmBoardBlock->VideoSync; + MachVtbl.GetTime = ArmBoardBlock->GetTime; /* Setup the disk and file system buffers */ gDiskReadBuffer = 0x00090000; Modified: trunk/reactos/boot/freeldr/freeldr/ui/tui.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/ui/tu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/ui/tui.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/ui/tui.c [iso-8859-1] Thu Feb 4 07:44:06 2010 @@ -325,8 +325,13 @@ // Draw the text for (i=X, j=0; Text[j] && i<UiScreenWidth; i++,j++) { +#ifndef _ARM_ ScreenMemory[((Y*2)*UiScreenWidth)+(i*2)] = (UCHAR)Text[j]; ScreenMemory[((Y*2)*UiScreenWidth)+(i*2)+1] = Attr; +#else + UNREFERENCED_PARAMETER(ScreenMemory); + MachVideoPutChar(Text[j], Attr, i, Y); +#endif } }
14 years, 10 months
1
0
0
0
[evb] 45412: - Implement some simple video routines. - Fix usable RAM not to include loader code and ram disk (up to 32MB).
by evb@svn.reactos.org
Author: evb Date: Thu Feb 4 07:09:03 2010 New Revision: 45412 URL:
http://svn.reactos.org/svn/reactos?rev=45412&view=rev
Log: - Implement some simple video routines. - Fix usable RAM not to include loader code and ram disk (up to 32MB). Modified: trunk/reactos/boot/armllb/fw.c trunk/reactos/boot/armllb/os/loader.c Modified: trunk/reactos/boot/armllb/fw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/fw.c?rev=45412…
============================================================================== --- trunk/reactos/boot/armllb/fw.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/fw.c [iso-8859-1] Thu Feb 4 07:09:03 2010 @@ -36,8 +36,7 @@ LlbFwVideoSetDisplayMode(IN PCHAR DisplayModeName, IN BOOLEAN Init) { - printf("%s is UNIMPLEMENTED", __FUNCTION__); - while (TRUE); + /* Return text mode */ return 0; } @@ -46,15 +45,19 @@ OUT PULONG Height, OUT PULONG Depth) { - printf("%s is UNIMPLEMENTED", __FUNCTION__); - while (TRUE); + /* Query static settings */ + *Width = LlbHwGetScreenWidth(); + *Height = LlbHwGetScreenHeight(); + + /* Depth is always 16 bpp */ + *Depth = 16; } ULONG LlbFwVideoGetBufferSize(VOID) { - printf("%s is UNIMPLEMENTED", __FUNCTION__); - while (TRUE); + /* X * Y * BPP */ + return LlbHwGetScreenWidth() * LlbHwGetScreenHeight() * 2; } VOID @@ -68,8 +71,8 @@ VOID LlbFwVideoHideShowTextCursor(IN BOOLEAN Show) { - printf("%s is UNIMPLEMENTED", __FUNCTION__); - while (TRUE); + /* Nothing to do */ + return; } VOID @@ -82,8 +85,8 @@ VOID LlbFwVideoClearScreen(IN UCHAR Attr) { - printf("%s is UNIMPLEMENTED", __FUNCTION__); - while (TRUE); + /* Clear the screen */ + LlbVideoClearScreen(TRUE); } VOID Modified: trunk/reactos/boot/armllb/os/loader.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/os/loader.c?re…
============================================================================== --- trunk/reactos/boot/armllb/os/loader.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/os/loader.c [iso-8859-1] Thu Feb 4 07:09:03 2010 @@ -99,6 +99,13 @@ /* Query memory information */ LlbEnvGetMemoryInformation(&Base, &Size); + + /* Don't use memory that the RAMDISK is using */ + /* HACK HACK */ + Base += 32 * 1024 * 1024; + Size -= 32 * 1024 * 1024; + + /* Allocate an entry for it */ LlbAllocateMemoryEntry(BiosMemoryUsable, Base, Size); /* Call the hardware-specific function for hardware-defined regions */
14 years, 10 months
1
0
0
0
← Newer
1
...
29
30
31
32
33
34
35
36
37
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Results per page:
10
25
50
100
200