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
September 2006
----- 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
16 participants
146 discussions
Start a n
N
ew thread
[ion] 23866: - More initialization cleanup.
by ion@svn.reactos.org
Author: ion Date: Fri Sep 1 17:13:08 2006 New Revision: 23866 URL:
http://svn.reactos.org/svn/reactos?rev=23866&view=rev
Log: - More initialization cleanup. Modified: trunk/reactos/ntoskrnl/include/internal/ke.h trunk/reactos/ntoskrnl/ke/i386/kernel.c trunk/reactos/ntoskrnl/ke/i386/main_asm.S trunk/reactos/ntoskrnl/ke/main.c Modified: trunk/reactos/ntoskrnl/include/internal/ke.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ke.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ke.h Fri Sep 1 17:13:08 2006 @@ -611,8 +611,9 @@ VOID NTAPI -KeInit1( - VOID +KiSystemStartup( + IN PROS_LOADER_PARAMETER_BLOCK LoaderBlock, + IN ULONG DriverBase // FIXME: hackhack ); VOID Modified: trunk/reactos/ntoskrnl/ke/i386/kernel.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/kernel.c?…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/kernel.c (original) +++ trunk/reactos/ntoskrnl/ke/i386/kernel.c Fri Sep 1 17:13:08 2006 @@ -149,12 +149,14 @@ VOID NTAPI -KeInit1(VOID) +KiSystemStartup(IN PROS_LOADER_PARAMETER_BLOCK LoaderBlock, + IN ULONG DriverBase) // FIXME: hackhack { PKIPCR KPCR; PKPRCB Prcb; BOOLEAN NpxPresent; ULONG FeatureBits; + ULONG DriverSize; extern USHORT KiBootGdt[]; extern KTSS KiBootTss; @@ -187,6 +189,12 @@ KeInitExceptions(); KeInitInterrupts(); + /* Load the Kernel with the PE Loader */ + LdrSafePEProcessModule((PVOID)KERNEL_BASE, + (PVOID)KERNEL_BASE, + (PVOID)DriverBase, + &DriverSize); + /* Detect and set the CPU Type */ KiSetProcessorType(); @@ -246,40 +254,79 @@ } } - if (KeFeatureBits & KF_GLOBAL_PAGE) - { - ULONG Flags; - /* Enable global pages */ - Ke386GlobalPagesEnabled = TRUE; - Ke386SaveFlags(Flags); - Ke386DisableInterrupts(); - Ke386SetCr4(Ke386GetCr4() | X86_CR4_PGE); - Ke386RestoreFlags(Flags); - } - - if (KeFeatureBits & KF_FAST_SYSCALL) - { - extern void KiFastCallEntry(void); - - /* CS Selector of the target segment. */ - Ke386Wrmsr(0x174, KGDT_R0_CODE, 0); - /* Target ESP. */ - Ke386Wrmsr(0x175, 0, 0); - /* Target EIP. */ - Ke386Wrmsr(0x176, (ULONG_PTR)KiFastCallEntry, 0); - } - - /* Does the CPU Support 'prefetchnta' (SSE) */ - if(KeFeatureBits & KF_XMMI) - { - ULONG Protect; - - Protect = MmGetPageProtect(NULL, (PVOID)RtlPrefetchMemoryNonTemporal); - MmSetPageProtect(NULL, (PVOID)RtlPrefetchMemoryNonTemporal, Protect | PAGE_IS_WRITABLE); - /* Replace the ret by a nop */ - *(PCHAR)RtlPrefetchMemoryNonTemporal = 0x90; - MmSetPageProtect(NULL, (PVOID)RtlPrefetchMemoryNonTemporal, Protect); - } + if (KeFeatureBits & KF_GLOBAL_PAGE) + { + ULONG Flags; + /* Enable global pages */ + Ke386GlobalPagesEnabled = TRUE; + Ke386SaveFlags(Flags); + Ke386DisableInterrupts(); + Ke386SetCr4(Ke386GetCr4() | X86_CR4_PGE); + Ke386RestoreFlags(Flags); + } + + if (KeFeatureBits & KF_FAST_SYSCALL) + { + extern void KiFastCallEntry(void); + + /* CS Selector of the target segment. */ + Ke386Wrmsr(0x174, KGDT_R0_CODE, 0); + /* Target ESP. */ + Ke386Wrmsr(0x175, 0, 0); + /* Target EIP. */ + Ke386Wrmsr(0x176, (ULONG_PTR)KiFastCallEntry, 0); + } + + /* Does the CPU Support 'prefetchnta' (SSE) */ + if(KeFeatureBits & KF_XMMI) + { + ULONG Protect; + + Protect = MmGetPageProtect(NULL, (PVOID)RtlPrefetchMemoryNonTemporal); + MmSetPageProtect(NULL, (PVOID)RtlPrefetchMemoryNonTemporal, Protect | PAGE_IS_WRITABLE); + /* Replace the ret by a nop */ + *(PCHAR)RtlPrefetchMemoryNonTemporal = 0x90; + MmSetPageProtect(NULL, (PVOID)RtlPrefetchMemoryNonTemporal, Protect); + } + + /* Initialize the Debugger */ + KdInitSystem (0, &KeLoaderBlock); + + /* Initialize HAL */ + HalInitSystem (0, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock); + + /* Initialize the Processor with HAL */ + HalInitializeProcessor(KeNumberProcessors, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock); + + /* Initialize the Kernel Executive */ + ExpInitializeExecutive(); + + /* Create the IOPM Save Area */ + Ki386IopmSaveArea = ExAllocatePoolWithTag(NonPagedPool, + PAGE_SIZE * 2, + TAG('K', 'e', ' ', ' ')); + + /* Free Initial Memory */ + MiFreeInitMemory(); + + /* Never returns */ +#if 0 + /* FIXME: + * The initial thread isn't a real ETHREAD object, we cannot call PspExitThread. + */ + PspExitThread(STATUS_SUCCESS); +#else + while (1) + { + LARGE_INTEGER Timeout; + Timeout.QuadPart = 0x7fffffffffffffffLL; + KeDelayExecutionThread(KernelMode, FALSE, &Timeout); + } +#endif + + /* Bug Check and loop forever if anything failed */ + KEBUGCHECK(0); + for(;;); } VOID @@ -287,41 +334,13 @@ NTAPI KeInit2(VOID) { - ULONG Protect; - PKIPCR Pcr = (PKIPCR)KeGetPcr(); - PKPRCB Prcb = Pcr->Prcb; - - KiInitializeBugCheck(); - KeInitializeDispatcher(); - KiInitializeSystemClock(); - - DPRINT1("CPU Detection Complete.\n" - "CPUID: %lx\n" - "Step : %lx\n" - "Type : %lx\n" - "ID : %s\n" - "FPU : %lx\n" - "XMMI : %lx\n" - "Fxsr : %lx\n" - "Feat : %lx\n" - "Ftrs : %lx\n" - "Cache: %lx\n" - "CR0 : %lx\n" - "CR4 : %lx\n", - Prcb->CpuID, - Prcb->CpuStep, - Prcb->CpuType, - Prcb->VendorString, - KeI386NpxPresent, - KeI386XMMIPresent, - KeI386FxsrPresent, - Prcb->FeatureBits, - KeFeatureBits, - Pcr->SecondLevelCacheSize, - Ke386GetCr0(), - Ke386GetCr4()); - - /* Set IDT to writable */ - Protect = MmGetPageProtect(NULL, (PVOID)KiIdt); - MmSetPageProtect(NULL, (PVOID)KiIdt, Protect | PAGE_IS_WRITABLE); + ULONG Protect; + + KiInitializeBugCheck(); + KeInitializeDispatcher(); + KiInitializeSystemClock(); + + /* Set IDT to writable */ + Protect = MmGetPageProtect(NULL, (PVOID)KiIdt); + MmSetPageProtect(NULL, (PVOID)KiIdt, Protect | PAGE_IS_WRITABLE); } Modified: trunk/reactos/ntoskrnl/ke/i386/main_asm.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/main_asm.…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/main_asm.S (original) +++ trunk/reactos/ntoskrnl/ke/i386/main_asm.S Fri Sep 1 17:13:08 2006 @@ -49,29 +49,11 @@ mov es, ax .att_syntax - cmpl $AP_MAGIC, %ecx - jne .m1 - - pushl $0 - popfl - - /* - * Reserve space for the floating point save area. - */ - subl $SIZEOF_FX_SAVE_AREA, %esp - - /* - * Call the application processor initialization code - */ - pushl $0 - call _KiSystemStartup@4 - -.m1: /* Load the initial kernel stack */ lea _kernel_stack_top, %eax sub $(SIZEOF_FX_SAVE_AREA), %eax movl %eax, %esp - + /* Call the main kernel initialization */ pushl %edx call _KiRosPrepareForSystemStartup@4 Modified: trunk/reactos/ntoskrnl/ke/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/main.c?rev=238…
============================================================================== --- trunk/reactos/ntoskrnl/ke/main.c (original) +++ trunk/reactos/ntoskrnl/ke/main.c Fri Sep 1 17:13:08 2006 @@ -86,53 +86,7 @@ VOID NTAPI -KiSystemStartup(BOOLEAN BootProcessor) -{ - DPRINT("KiSystemStartup(%d)\n", BootProcessor); - - /* Initialize the Debugger */ - KdInitSystem (0, &KeLoaderBlock); - - /* Initialize HAL */ - HalInitSystem (0, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock); - - /* Initialize the Processor with HAL */ - HalInitializeProcessor(KeNumberProcessors, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock); - - /* Initialize the Kernel Executive */ - ExpInitializeExecutive(); - - /* Create the IOPM Save Area */ - Ki386IopmSaveArea = ExAllocatePoolWithTag(NonPagedPool, - PAGE_SIZE * 2, - TAG('K', 'e', ' ', ' ')); - - /* Free Initial Memory */ - MiFreeInitMemory(); - - /* Never returns */ -#if 0 - /* FIXME: - * The initial thread isn't a real ETHREAD object, we cannot call PspExitThread. - */ - PspExitThread(STATUS_SUCCESS); -#else - while (1) - { - LARGE_INTEGER Timeout; - Timeout.QuadPart = 0x7fffffffffffffffLL; - KeDelayExecutionThread(KernelMode, FALSE, &Timeout); - } -#endif - - /* Bug Check and loop forever if anything failed */ - KEBUGCHECK(0); - for(;;); -} - -VOID -NTAPI -KiRosPrepareForSystemStartup(PROS_LOADER_PARAMETER_BLOCK LoaderBlock) +KiRosPrepareForSystemStartup(IN PROS_LOADER_PARAMETER_BLOCK LoaderBlock) { ULONG i; ULONG size; @@ -266,21 +220,12 @@ /* Increase the last kernel address with the size of HAL */ LastKernelAddress += PAGE_ROUND_UP(DriverSize); - /* FIXME: We need to do this in KiSystemStartup! */ - KeInit1(); - - /* Load the Kernel with the PE Loader */ - LdrSafePEProcessModule((PVOID)KERNEL_BASE, - (PVOID)KERNEL_BASE, - (PVOID)DriverBase, - &DriverSize); - /* Now select the final beginning and ending Kernel Addresses */ FirstKrnlPhysAddr = KeLoaderModules[0].ModStart - KERNEL_BASE + 0x200000; LastKrnlPhysAddr = LastKernelAddress - KERNEL_BASE + 0x200000; /* Do general System Startup */ - KiSystemStartup(1); + KiSystemStartup(LoaderBlock, DriverBase); } /* EOF */
18 years, 3 months
1
0
0
0
[hpoussin] 23865: Fix build when compilation units are enabled for usetup.c
by hpoussin@svn.reactos.org
Author: hpoussin Date: Fri Sep 1 16:58:56 2006 New Revision: 23865 URL:
http://svn.reactos.org/svn/reactos?rev=23865&view=rev
Log: Fix build when compilation units are enabled for usetup.c Modified: trunk/reactos/base/setup/usetup/filequeue.c trunk/reactos/base/setup/usetup/filequeue.h trunk/reactos/base/setup/usetup/usetup.c trunk/reactos/base/setup/usetup/usetup.h Modified: trunk/reactos/base/setup/usetup/filequeue.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/filequeu…
============================================================================== --- trunk/reactos/base/setup/usetup/filequeue.c (original) +++ trunk/reactos/base/setup/usetup/filequeue.c Fri Sep 1 16:58:56 2006 @@ -312,15 +312,6 @@ } -typedef struct _COPYCONTEXT -{ - LPCWSTR DestinationRootPath; /* Not owned by this structure */ - LPCWSTR InstallPath; /* Not owned by this structure */ - ULONG TotalOperations; - ULONG CompletedOperations; - PPROGRESSBAR ProgressBar; -} COPYCONTEXT, *PCOPYCONTEXT; - BOOL WINAPI SetupCommitFileQueueW(HWND Owner, HSPFILEQ QueueHandle, @@ -336,11 +327,8 @@ WCHAR FileSrcPath[MAX_PATH]; WCHAR FileDstPath[MAX_PATH]; - DPRINT1("Context %p\n", Context); TargetRootPath = ((PCOPYCONTEXT)Context)->DestinationRootPath; - DPRINT1("TargetRootPath %S\n", TargetRootPath); TargetPath = ((PCOPYCONTEXT)Context)->InstallPath; - DPRINT1("TargetPath %S\n", TargetPath); if (QueueHandle == NULL) return(FALSE); Modified: trunk/reactos/base/setup/usetup/filequeue.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/filequeu…
============================================================================== --- trunk/reactos/base/setup/usetup/filequeue.h (original) +++ trunk/reactos/base/setup/usetup/filequeue.h Fri Sep 1 16:58:56 2006 @@ -58,6 +58,14 @@ UINT_PTR Param1, UINT_PTR Param2); +typedef struct _COPYCONTEXT +{ + LPCWSTR DestinationRootPath; /* Not owned by this structure */ + LPCWSTR InstallPath; /* Not owned by this structure */ + ULONG TotalOperations; + ULONG CompletedOperations; + PPROGRESSBAR ProgressBar; +} COPYCONTEXT, *PCOPYCONTEXT; /* FUNCTIONS ****************************************************************/ Modified: trunk/reactos/base/setup/usetup/usetup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/usetup.c…
============================================================================== --- trunk/reactos/base/setup/usetup/usetup.c (original) +++ trunk/reactos/base/setup/usetup/usetup.c Fri Sep 1 16:58:56 2006 @@ -69,16 +69,6 @@ REBOOT_PAGE, /* virtual page */ } PAGE_NUMBER, *PPAGE_NUMBER; -typedef struct _COPYCONTEXT -{ - LPCWSTR DestinationRootPath; /* Not owned by this structure */ - LPCWSTR InstallPath; /* Not owned by this structure */ - ULONG TotalOperations; - ULONG CompletedOperations; - PPROGRESSBAR ProgressBar; -} COPYCONTEXT, *PCOPYCONTEXT; - - /* GLOBALS ******************************************************************/ HANDLE ProcessHeap; Modified: trunk/reactos/base/setup/usetup/usetup.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/usetup.h…
============================================================================== --- trunk/reactos/base/setup/usetup/usetup.h (original) +++ trunk/reactos/base/setup/usetup/usetup.h Fri Sep 1 16:58:56 2006 @@ -59,8 +59,8 @@ #include "partlist.h" #include "inffile.h" #include "inicache.h" +#include "progress.h" #include "filequeue.h" -#include "progress.h" #include "bootsup.h" #include "keytrans.h" #include "registry.h"
18 years, 3 months
1
0
0
0
[ion] 23864: - Fix bugs in RtlCompareMemory, RtlCompareMemoryULong
by ion@svn.reactos.org
Author: ion Date: Fri Sep 1 16:38:57 2006 New Revision: 23864 URL:
http://svn.reactos.org/svn/reactos?rev=23864&view=rev
Log: - Fix bugs in RtlCompareMemory, RtlCompareMemoryULong Modified: trunk/reactos/lib/rtl/i386/rtlmem.s Modified: trunk/reactos/lib/rtl/i386/rtlmem.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/i386/rtlmem.s?rev=…
============================================================================== --- trunk/reactos/lib/rtl/i386/rtlmem.s (original) +++ trunk/reactos/lib/rtl/i386/rtlmem.s Fri Sep 1 16:38:57 2006 @@ -67,7 +67,7 @@ /* Remember how many mathced */ dec esi - sub esi, [esp+20] + sub esi, [esp+12] /* Return count */ mov eax, esi @@ -89,7 +89,7 @@ /* Do the compare and check result */ repe scasd jz Done - sub esi, 4 + sub edi, 4 /* Return count */ Done:
18 years, 3 months
1
0
0
0
[ekohl] 23863: Remove trailing whitespace
by ekohl@svn.reactos.org
Author: ekohl Date: Fri Sep 1 15:16:32 2006 New Revision: 23863 URL:
http://svn.reactos.org/svn/reactos?rev=23863&view=rev
Log: Remove trailing whitespace Modified: trunk/reactos/include/ddk/winddk.h Modified: trunk/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=2…
============================================================================== --- trunk/reactos/include/ddk/winddk.h (original) +++ trunk/reactos/include/ddk/winddk.h Fri Sep 1 15:16:32 2006 @@ -154,7 +154,7 @@ /* ** Routines specific to this DDK */ -#define NtCurrentThread() ( (HANDLE)(LONG_PTR) -2 ) +#define NtCurrentThread() ( (HANDLE)(LONG_PTR) -2 ) /* ** Simple structures @@ -197,11 +197,11 @@ typedef struct _ADAPTER_OBJECT *PADAPTER_OBJECT; /* Constants */ -#define NtCurrentProcess() ( (HANDLE)(LONG_PTR) -1 ) -#define ZwCurrentProcess() NtCurrentProcess() -#define NtCurrentThread() ( (HANDLE)(LONG_PTR) -2 ) -#define ZwCurrentThread() NtCurrentThread() -#ifdef _REACTOS_ +#define NtCurrentProcess() ( (HANDLE)(LONG_PTR) -1 ) +#define ZwCurrentProcess() NtCurrentProcess() +#define NtCurrentThread() ( (HANDLE)(LONG_PTR) -2 ) +#define ZwCurrentThread() NtCurrentThread() +#ifdef _REACTOS_ #define KIP0PCRADDRESS 0xff000000 #else #define KIP0PCRADDRESS 0xffdff000 @@ -410,14 +410,14 @@ #define PROCESSOR_FEATURE_MAX 64 #define MAX_WOW64_SHARED_ENTRIES 16 -typedef enum _ALTERNATIVE_ARCHITECTURE_TYPE +typedef enum _ALTERNATIVE_ARCHITECTURE_TYPE { StandardDesign, NEC98x86, EndAlternatives } ALTERNATIVE_ARCHITECTURE_TYPE; -typedef struct _KSYSTEM_TIME +typedef struct _KSYSTEM_TIME { ULONG LowPart; LONG High1Time; @@ -426,7 +426,7 @@ extern volatile KSYSTEM_TIME KeTickCount; -typedef struct _KUSER_SHARED_DATA +typedef struct _KUSER_SHARED_DATA { ULONG TickCountLowDeprecated; ULONG TickCountMultiplier; @@ -1723,7 +1723,7 @@ ULONG BaudClock; } CM_SERIAL_DEVICE_DATA, *PCM_SERIAL_DEVICE_DATA; -typedef struct _VM_COUNTERS +typedef struct _VM_COUNTERS { SIZE_T PeakVirtualSize; SIZE_T VirtualSize; @@ -1738,7 +1738,7 @@ SIZE_T PeakPagefileUsage; } VM_COUNTERS, *PVM_COUNTERS; -typedef struct _VM_COUNTERS_EX +typedef struct _VM_COUNTERS_EX { SIZE_T PeakVirtualSize; SIZE_T VirtualSize; @@ -2643,7 +2643,7 @@ typedef NTSTATUS (DDKAPI *pHalInitPnpDriver)( VOID); - + typedef NTSTATUS (DDKAPI *pHalInitPowerManagement)( IN PPM_DISPATCH_TABLE PmDriverDispatchTable, @@ -2654,7 +2654,7 @@ IN PVOID Context, IN struct _DEVICE_DESCRIPTION *DeviceDescriptor, OUT PULONG NumberOfMapRegisters); - + typedef NTSTATUS (DDKAPI *pHalGetInterruptTranslator)( IN INTERFACE_TYPE ParentInterfaceType, @@ -2821,7 +2821,7 @@ typedef BOOLEAN (DDKAPI *PHAL_RESET_DISPLAY_PARAMETERS)( ULONG Columns, ULONG Rows); - + typedef struct { ULONG Version; pHalQuerySystemInformation HalQuerySystemInformation; @@ -3469,7 +3469,7 @@ #define IO_TYPE_TIMER 9 #define IO_TYPE_VPB 10 #define IO_TYPE_ERROR_LOG 11 -#define IO_TYPE_ERROR_MESSAGE 12 +#define IO_TYPE_ERROR_MESSAGE 12 #define IO_TYPE_DEVICE_OBJECT_EXTENSION 13 #define IO_TYPE_CSQ_IRP_CONTEXT 1 @@ -4884,7 +4884,7 @@ ULONG DataSize; } REG_SET_VALUE_KEY_INFORMATION, *PREG_SET_VALUE_KEY_INFORMATION; -typedef struct _REG_DELETE_VALUE_KEY_INFORMATION +typedef struct _REG_DELETE_VALUE_KEY_INFORMATION { PVOID Object; PUNICODE_STRING ValueName; @@ -4908,7 +4908,7 @@ PULONG ResultLength; } REG_ENUMERATE_KEY_INFORMATION, *PREG_ENUMERATE_KEY_INFORMATION; -typedef struct _REG_ENUMERATE_VALUE_KEY_INFORMATION +typedef struct _REG_ENUMERATE_VALUE_KEY_INFORMATION { PVOID Object; ULONG Index; @@ -4927,7 +4927,7 @@ PULONG ResultLength; } REG_QUERY_KEY_INFORMATION, *PREG_QUERY_KEY_INFORMATION; -typedef struct _REG_QUERY_VALUE_KEY_INFORMATION +typedef struct _REG_QUERY_VALUE_KEY_INFORMATION { PVOID Object; PUNICODE_STRING ValueName; @@ -4947,31 +4947,31 @@ PULONG RequiredBufferLength; } REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION, *PREG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION; -typedef struct _REG_PRE_CREATE_KEY_INFORMATION +typedef struct _REG_PRE_CREATE_KEY_INFORMATION { PUNICODE_STRING CompleteName; } REG_PRE_CREATE_KEY_INFORMATION, *PREG_PRE_CREATE_KEY_INFORMATION; -typedef struct _REG_POST_CREATE_KEY_INFORMATION +typedef struct _REG_POST_CREATE_KEY_INFORMATION { PUNICODE_STRING CompleteName; PVOID Object; NTSTATUS Status; } REG_POST_CREATE_KEY_INFORMATION, *PREG_POST_CREATE_KEY_INFORMATION; -typedef struct _REG_PRE_OPEN_KEY_INFORMATION +typedef struct _REG_PRE_OPEN_KEY_INFORMATION { PUNICODE_STRING CompleteName; } REG_PRE_OPEN_KEY_INFORMATION, *PREG_PRE_OPEN_KEY_INFORMATION; -typedef struct _REG_POST_OPEN_KEY_INFORMATION +typedef struct _REG_POST_OPEN_KEY_INFORMATION { PUNICODE_STRING CompleteName; PVOID Object; NTSTATUS Status; } REG_POST_OPEN_KEY_INFORMATION, *PREG_POST_OPEN_KEY_INFORMATION; -typedef struct _REG_POST_OPERATION_INFORMATION +typedef struct _REG_POST_OPERATION_INFORMATION { PVOID Object; NTSTATUS Status; @@ -6075,7 +6075,7 @@ IN PVOID Context, IN PVOID Environment OPTIONAL); - + #define LONG_SIZE (sizeof(LONG)) #define LONG_MASK (LONG_SIZE - 1) @@ -8993,7 +8993,7 @@ DDKAPI KeRaiseIrqlToDpcLevel( VOID); - + NTHALAPI KIRQL DDKAPI
18 years, 3 months
1
0
0
0
[hpoussin] 23862: Fix option selection in bootcd Fix SetupOpenFileQueue, SetupCloseFileQueue and SetupCommitFileQueueW prototypes to match setupapi.dll ones
by hpoussin@svn.reactos.org
Author: hpoussin Date: Fri Sep 1 13:53:33 2006 New Revision: 23862 URL:
http://svn.reactos.org/svn/reactos?rev=23862&view=rev
Log: Fix option selection in bootcd Fix SetupOpenFileQueue, SetupCloseFileQueue and SetupCommitFileQueueW prototypes to match setupapi.dll ones Modified: trunk/reactos/base/setup/usetup/console.c trunk/reactos/base/setup/usetup/console.h trunk/reactos/base/setup/usetup/filequeue.c trunk/reactos/base/setup/usetup/filequeue.h trunk/reactos/base/setup/usetup/usetup.c Modified: trunk/reactos/base/setup/usetup/console.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/console.…
============================================================================== --- trunk/reactos/base/setup/usetup/console.c (original) +++ trunk/reactos/base/setup/usetup/console.c Fri Sep 1 13:53:33 2006 @@ -684,7 +684,7 @@ FillConsoleOutputAttribute( StdOutput, - FOREGROUND_BLUE | BACKGROUND_WHITE, + FOREGROUND_WHITE | BACKGROUND_BLUE, col, coPos, &Written); Modified: trunk/reactos/base/setup/usetup/console.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/console.…
============================================================================== --- trunk/reactos/base/setup/usetup/console.h (original) +++ trunk/reactos/base/setup/usetup/console.h Fri Sep 1 13:53:33 2006 @@ -64,6 +64,10 @@ ConAllocConsole(VOID); BOOL WINAPI +ConAttachConsole( + IN DWORD dwProcessId); + +BOOL WINAPI ConFillConsoleOutputAttribute( IN HANDLE hConsoleOutput, IN WORD wAttribute, Modified: trunk/reactos/base/setup/usetup/filequeue.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/filequeu…
============================================================================== --- trunk/reactos/base/setup/usetup/filequeue.c (original) +++ trunk/reactos/base/setup/usetup/filequeue.c Fri Sep 1 13:53:33 2006 @@ -60,7 +60,7 @@ /* FUNCTIONS ****************************************************************/ -HSPFILEQ +HSPFILEQ WINAPI SetupOpenFileQueue(VOID) { PFILEQUEUEHEADER QueueHeader; @@ -81,14 +81,14 @@ } -BOOL +VOID WINAPI SetupCloseFileQueue(HSPFILEQ QueueHandle) { PFILEQUEUEHEADER QueueHeader; PQUEUEENTRY Entry; if (QueueHandle == NULL) - return(FALSE); + return; QueueHeader = (PFILEQUEUEHEADER)QueueHandle; @@ -133,8 +133,6 @@ RtlFreeHeap(ProcessHeap, 0, QueueHeader); - - return(TRUE); } @@ -314,21 +312,36 @@ } -BOOL -SetupCommitFileQueue(HSPFILEQ QueueHandle, - PCWSTR TargetRootPath, - PCWSTR TargetPath, - PSP_FILE_CALLBACK MsgHandler, +typedef struct _COPYCONTEXT +{ + LPCWSTR DestinationRootPath; /* Not owned by this structure */ + LPCWSTR InstallPath; /* Not owned by this structure */ + ULONG TotalOperations; + ULONG CompletedOperations; + PPROGRESSBAR ProgressBar; +} COPYCONTEXT, *PCOPYCONTEXT; + +BOOL WINAPI +SetupCommitFileQueueW(HWND Owner, + HSPFILEQ QueueHandle, + PSP_FILE_CALLBACK_W MsgHandler, PVOID Context) { WCHAR CabinetName[MAX_PATH]; PFILEQUEUEHEADER QueueHeader; PQUEUEENTRY Entry; NTSTATUS Status; + PCWSTR TargetRootPath, TargetPath; WCHAR FileSrcPath[MAX_PATH]; WCHAR FileDstPath[MAX_PATH]; + DPRINT1("Context %p\n", Context); + TargetRootPath = ((PCOPYCONTEXT)Context)->DestinationRootPath; + DPRINT1("TargetRootPath %S\n", TargetRootPath); + TargetPath = ((PCOPYCONTEXT)Context)->InstallPath; + DPRINT1("TargetPath %S\n", TargetPath); + if (QueueHandle == NULL) return(FALSE); @@ -336,13 +349,13 @@ MsgHandler(Context, SPFILENOTIFY_STARTQUEUE, - NULL, - NULL); + 0, + 0); MsgHandler(Context, SPFILENOTIFY_STARTSUBQUEUE, - (PVOID)FILEOP_COPY, - (PVOID)QueueHeader->CopyCount); + FILEOP_COPY, + QueueHeader->CopyCount); /* Commit copy queue */ Entry = QueueHeader->CopyHead; @@ -389,8 +402,8 @@ MsgHandler(Context, SPFILENOTIFY_STARTCOPY, - (PVOID)Entry->SourceFilename, - (PVOID)FILEOP_COPY); + (UINT_PTR)Entry->SourceFilename, + FILEOP_COPY); if (Entry->SourceCabinet != NULL) { @@ -411,16 +424,16 @@ { MsgHandler(Context, SPFILENOTIFY_COPYERROR, - (PVOID)Entry->SourceFilename, - (PVOID)FILEOP_COPY); + (UINT_PTR)Entry->SourceFilename, + FILEOP_COPY); } else { MsgHandler(Context, SPFILENOTIFY_ENDCOPY, - (PVOID)Entry->SourceFilename, - (PVOID)FILEOP_COPY); + (UINT_PTR)Entry->SourceFilename, + FILEOP_COPY); } Entry = Entry->Next; @@ -428,13 +441,13 @@ MsgHandler(Context, SPFILENOTIFY_ENDSUBQUEUE, - (PVOID)FILEOP_COPY, - NULL); + FILEOP_COPY, + 0); MsgHandler(Context, SPFILENOTIFY_ENDQUEUE, - NULL, - NULL); + 0, + 0); return(TRUE); } Modified: trunk/reactos/base/setup/usetup/filequeue.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/filequeu…
============================================================================== --- trunk/reactos/base/setup/usetup/filequeue.h (original) +++ trunk/reactos/base/setup/usetup/filequeue.h Fri Sep 1 13:53:33 2006 @@ -53,19 +53,32 @@ typedef PVOID HSPFILEQ; -typedef ULONG (*PSP_FILE_CALLBACK)(PVOID Context, - ULONG Notification, - PVOID Param1, - PVOID Param2); +typedef UINT (CALLBACK* PSP_FILE_CALLBACK_W)(PVOID Context, + UINT Notification, + UINT_PTR Param1, + UINT_PTR Param2); /* FUNCTIONS ****************************************************************/ -HSPFILEQ +HSPFILEQ WINAPI SetupOpenFileQueue(VOID); -BOOL -SetupCloseFileQueue(HSPFILEQ QueueHandle); +VOID WINAPI +SetupCloseFileQueue( + IN HSPFILEQ QueueHandle); + +BOOL WINAPI +SetupQueueCopyWNew( + IN HSPFILEQ QueueHandle, + IN PCWSTR SourceRootPath, + IN PCWSTR SourcePath, + IN PCWSTR SourceFileName, + IN PCWSTR SourceDescription, + IN PCWSTR SourceTagFile, + IN PCWSTR TargetDirectory, + IN PCWSTR TargetFileName, + IN DWORD CopyStyle); BOOL SetupQueueCopy(HSPFILEQ QueueHandle, @@ -76,11 +89,10 @@ PCWSTR TargetDirectory, PCWSTR TargetFilename); -BOOL -SetupCommitFileQueue(HSPFILEQ QueueHandle, - PCWSTR TargetRootPath, - PCWSTR TargetPath, - PSP_FILE_CALLBACK MsgHandler, +BOOL WINAPI +SetupCommitFileQueueW(HWND Owner, + HSPFILEQ QueueHandle, + PSP_FILE_CALLBACK_W MsgHandler, PVOID Context); #endif /* __FILEQUEUE_H__ */ Modified: trunk/reactos/base/setup/usetup/usetup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/usetup.c…
============================================================================== --- trunk/reactos/base/setup/usetup/usetup.c (original) +++ trunk/reactos/base/setup/usetup/usetup.c Fri Sep 1 13:53:33 2006 @@ -71,6 +71,8 @@ typedef struct _COPYCONTEXT { + LPCWSTR DestinationRootPath; /* Not owned by this structure */ + LPCWSTR InstallPath; /* Not owned by this structure */ ULONG TotalOperations; ULONG CompletedOperations; PPROGRESSBAR ProgressBar; @@ -2920,11 +2922,11 @@ } -static ULONG +static UINT CALLBACK FileCopyCallback(PVOID Context, - ULONG Notification, - PVOID Param1, - PVOID Param2) + UINT Notification, + UINT_PTR Param1, + UINT_PTR Param2) { PCOPYCONTEXT CopyContext; @@ -2967,6 +2969,8 @@ CONSOLE_SetTextXY(20, 14, "This may take several minutes to complete."); CONSOLE_GetScreenSize(&xScreen, &yScreen); + CopyContext.DestinationRootPath = DestinationRootPath.Buffer; + CopyContext.InstallPath = InstallPath.Buffer; CopyContext.TotalOperations = 0; CopyContext.CompletedOperations = 0; CopyContext.ProgressBar = CreateProgressBar(13, @@ -2975,10 +2979,9 @@ yScreen - 20, "Setup is copying files..."); - SetupCommitFileQueue(SetupFileQueue, - DestinationRootPath.Buffer, - InstallPath.Buffer, - (PSP_FILE_CALLBACK)FileCopyCallback, + SetupCommitFileQueueW(NULL, + SetupFileQueue, + FileCopyCallback, &CopyContext); SetupCloseFileQueue(SetupFileQueue); @@ -3489,7 +3492,7 @@ SignalInitEvent(); ret = AllocConsole(); - if (ret) + if (!ret) ret = AttachConsole(ATTACH_PARENT_PROCESS); if (!ret
18 years, 3 months
1
0
0
0
[arty] 23861: Most of an implementation of page lookup for PPC. Written for understanding and also to provide a way to inspect virtual to phyiscal translations. We should and will do this with ofw most of the time, but we'll have to do it ourselves in the delicate time before jumping to ntoskrnl.
by arty@svn.reactos.org
Author: arty Date: Fri Sep 1 13:46:44 2006 New Revision: 23861 URL:
http://svn.reactos.org/svn/reactos?rev=23861&view=rev
Log: Most of an implementation of page lookup for PPC. Written for understanding and also to provide a way to inspect virtual to phyiscal translations. We should and will do this with ofw most of the time, but we'll have to do it ourselves in the delicate time before jumping to ntoskrnl. Modified: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c Modified: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/boot/freeldr/fr…
============================================================================== --- branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c (original) +++ branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c Fri Sep 1 13:46:44 2006 @@ -384,6 +384,20 @@ return res; } +int GetPhys( int addr ) { + register int res asm ("r3"); + __asm__("mfmsr 5\n\t" + "mr 4,5\n\t" + "xor 1,1,1\n\t" + "addi 1,1,-1\n\t" + "xori 1,1,0x10\n\t" + "and 5,1,5\n\t" + "mtmsr 5\n\t" + "lwz 3,0(3)\n\t" + "mtmsr 4"); + return res; +} + int GetSR(int n) { register int res asm ("r3"); switch( n ) { @@ -484,6 +498,75 @@ *batLo = bl; } +int GetSDR1() { + register int res asm("r3"); + __asm__("mfsdr1 3"); + return res; +} + +int BatHit( int bath, int batl, int virt ) { + return (virt & 0xfffc0000) == (bath & 0xfffc0000); +} + +int BatTranslate( int bath, int batl, int virt ) { + return (virt & 0x3ffff) | (batl & 0xfffc0000); +} + +/* translate address */ +int virt2phys( int virt, int inst ) { + int msr = GetMSR(); + int txmask = inst ? 0x20 : 0x10; + if( msr & txmask ) { + int i, bath, batl, sr, sdr1, physbase, vahi, valo; + int npteg, hash, ptegaddr, hashmask, ptehi, ptelo; + int vsid, pteh; + for( i = 0; i < 4; i++ ) { + GetBat( i, inst, &bath, &batl ); + if( BatHit( bath, batl, virt ) ) { + return BatTranslate( bath, batl, virt ); + } + } + + sr = GetSR( virt >> 28 ); + vsid = sr & 0xfffffff; + valo = (vsid << 28) | (virt & 0xfffffff); + if( sr & 0x80000000 ) + return valo; + + sdr1 = GetSDR1(); + + physbase = sdr1 & ~0xffff; + vahi = vsid >> 4; + npteg = ((sdr1 & 0x1ff) << 10); + hash = (vsid & 0x7ffff) ^ ((valo >> 12) & 0xffff); + + hashmask = ((sdr1 & 0xffff) << 12) | 0x3ff; + + for( pteh = 0; pteh < 0xff; pteh += 64, hash ^= ~0 ) { + ptegaddr = ((hashmask & hash) * 64) + physbase; + + for( i = 0; i < 8; i++ ) { + int ptevsid, pteapi; + + ptehi = GetPhys( ptegaddr + (i * 8) ); + ptelo = GetPhys( ptegaddr + (i * 8) + 4 ); + ptevsid = (ptehi >> 8) & 0x7fffff; + pteapi = ptehi & 0x3f; + + //printf("pte[%d] @ %x = %x:%x\n", + //i, ptegaddr + (i * 8), ptehi, ptelo); + + if( (ptehi & 64) != pteh ) continue; + if( ptevsid != (vsid & 0x7fffff) ) continue; + if( pteapi != ((virt >> 22) & 0x3f) ) continue; + + return (ptelo & 0xfffff000) | (virt & 0xfff); + } + } + return -1; + } else return virt; +} + void PpcInit( of_proxy the_ofproxy ) { int i, len, stdin_handle_chosen, bathi, batlo; ofproxy = the_ofproxy; @@ -528,6 +611,9 @@ GetBat( i, 1, &bathi, &batlo ); printf("IBAT%d %x:%x\n", i, bathi, batlo); } + + printf("virt2phys (0x8000,I) -> %x\n", virt2phys(0x8000,1)); + printf("virt2phys (0xe00000,D) -> %x\n", virt2phys(0x60000000,0)); MachVtbl.VideoClearScreen = PpcVideoClearScreen; MachVtbl.VideoSetDisplayMode = PpcVideoSetDisplayMode;
18 years, 3 months
1
0
0
0
[pborobia] 23860: * Implement ALT+PrintScreen (copy window to clipboard)
by pborobia@svn.reactos.org
Author: pborobia Date: Fri Sep 1 11:25:34 2006 New Revision: 23860 URL:
http://svn.reactos.org/svn/reactos?rev=23860&view=rev
Log: * Implement ALT+PrintScreen (copy window to clipboard) Modified: branches/clipboard/dll/win32/user32/windows/defwnd.c Modified: branches/clipboard/dll/win32/user32/windows/defwnd.c URL:
http://svn.reactos.org/svn/reactos/branches/clipboard/dll/win32/user32/wind…
============================================================================== --- branches/clipboard/dll/win32/user32/windows/defwnd.c (original) +++ branches/clipboard/dll/win32/user32/windows/defwnd.c Fri Sep 1 11:25:34 2006 @@ -984,7 +984,31 @@ VOID FASTCALL DefWndScreenshot(HWND hWnd) { - + RECT rect; + + OpenClipboard(hWnd); + EmptyClipboard(); + + HDC hdc = GetWindowDC(hWnd); + GetWindowRect(hWnd, &rect); + INT w = rect.right - rect.left; + INT h = rect.bottom - rect.top; + + HBITMAP hbitmap = CreateCompatibleBitmap(hdc, w, h); + HDC hdc2 = CreateCompatibleDC(hdc); + SelectObject(hdc2, hbitmap); + + BitBlt(hdc2, 0, 0, w, h, + hdc, 0, 0, + SRCCOPY); + + SetClipboardData(CF_BITMAP, hbitmap); + + ReleaseDC(hWnd, hdc); + ReleaseDC(hWnd, hdc2); + + CloseClipboard(); + } LRESULT STDCALL @@ -1347,7 +1371,12 @@ } else if (wParam == VK_SNAPSHOT) { - DefWndScreenshot(hWnd); + HWND hwnd = hWnd; + while (GetParent(hwnd) != NULL) + { + hwnd = GetParent(hwnd); + } + DefWndScreenshot(hwnd); } } else if( wParam == VK_F10 )
18 years, 3 months
1
0
0
0
[pborobia] 23859: * Removed check for GDI handle (crash), should work, tested on Windows.
by pborobia@svn.reactos.org
Author: pborobia Date: Fri Sep 1 10:57:03 2006 New Revision: 23859 URL:
http://svn.reactos.org/svn/reactos?rev=23859&view=rev
Log: * Removed check for GDI handle (crash), should work, tested on Windows. Modified: branches/clipboard/dll/win32/user32/windows/clipboard.c Modified: branches/clipboard/dll/win32/user32/windows/clipboard.c URL:
http://svn.reactos.org/svn/reactos/branches/clipboard/dll/win32/user32/wind…
============================================================================== --- branches/clipboard/dll/win32/user32/windows/clipboard.c (original) +++ branches/clipboard/dll/win32/user32/windows/clipboard.c Fri Sep 1 10:57:03 2006 @@ -312,22 +312,24 @@ if (uFormat == CF_BITMAP) { + /* GlobalLock should return 0 for GDI handles pMem = GlobalLock(hMem); if (pMem) { - /* not a GDI handle */ + // not a GDI handle GlobalUnlock(hMem); return ret; } else { + */ /* check if this GDI handle is a HBITMAP */ /* GetObject for HBITMAP not implemented in ReactOS */ //if (GetObject(hMem, 0, NULL) == sifeof(BITMAP)) //{ return NtUserSetClipboardData(CF_BITMAP, hMem, 0); //} - } + /*}*/ } size = GlobalSize(hMem); @@ -337,7 +339,7 @@ { size = GlobalSize(hMem); ret = NtUserSetClipboardData(uFormat, pMem, size); - //sholud i unlock hMem? + //should i unlock hMem? GlobalUnlock(hMem); } else
18 years, 3 months
1
0
0
0
[arty] 23858: Adding methods to inquire about virtual memory setup.
by arty@svn.reactos.org
Author: arty Date: Fri Sep 1 10:53:49 2006 New Revision: 23858 URL:
http://svn.reactos.org/svn/reactos?rev=23858&view=rev
Log: Adding methods to inquire about virtual memory setup. Modified: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c Modified: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/boot/freeldr/fr…
============================================================================== --- branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c (original) +++ branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c Fri Sep 1 10:53:49 2006 @@ -35,7 +35,8 @@ void le_swap( void *start_addr_v, void *end_addr_v, void *target_addr_v ) { - long *start_addr = (long *)ROUND_DOWN((long)start_addr_v,8), + long + *start_addr = (long *)ROUND_DOWN((long)start_addr_v,8), *end_addr = (long *)ROUND_UP((long)end_addr_v,8), *target_addr = (long *)ROUND_DOWN((long)target_addr_v,8); long tmp; @@ -377,8 +378,114 @@ typedef unsigned int uint32_t; +int GetMSR() { + register int res asm ("r3"); + __asm__("mfmsr 3"); + return res; +} + +int GetSR(int n) { + register int res asm ("r3"); + switch( n ) { + case 0: + __asm__("mfsr 3,0"); + break; + case 1: + __asm__("mfsr 3,1"); + break; + case 2: + __asm__("mfsr 3,2"); + break; + case 3: + __asm__("mfsr 3,3"); + break; + case 4: + __asm__("mfsr 3,4"); + break; + case 5: + __asm__("mfsr 3,5"); + break; + case 6: + __asm__("mfsr 3,6"); + break; + case 7: + __asm__("mfsr 3,7"); + break; + case 8: + __asm__("mfsr 3,8"); + break; + case 9: + __asm__("mfsr 3,9"); + break; + case 10: + __asm__("mfsr 3,10"); + break; + case 11: + __asm__("mfsr 3,11"); + break; + case 12: + __asm__("mfsr 3,12"); + break; + case 13: + __asm__("mfsr 3,13"); + break; + case 14: + __asm__("mfsr 3,14"); + break; + case 15: + __asm__("mfsr 3,15"); + break; + } + return res; +} + +void GetBat( int bat, int inst, int *batHi, int *batLo ) { + register int bh asm("r3"), bl asm("r4"); + if( inst ) { + switch( bat ) { + case 0: + __asm__("mfibatu 3,0"); + __asm__("mfibatl 4,0"); + break; + case 1: + __asm__("mfibatu 3,1"); + __asm__("mfibatl 4,1"); + break; + case 2: + __asm__("mfibatu 3,2"); + __asm__("mfibatl 4,2"); + break; + case 3: + __asm__("mfibatu 3,3"); + __asm__("mfibatl 4,3"); + break; + } + } else { + switch( bat ) { + case 0: + __asm__("mfdbatu 3,0"); + __asm__("mfdbatl 4,0"); + break; + case 1: + __asm__("mfdbatu 3,1"); + __asm__("mfdbatl 4,1"); + break; + case 2: + __asm__("mfdbatu 3,2"); + __asm__("mfdbatl 4,2"); + break; + case 3: + __asm__("mfdbatu 3,3"); + __asm__("mfdbatl 4,3"); + break; + } + } + *batHi = bh; + *batLo = bl; +} + void PpcInit( of_proxy the_ofproxy ) { - int len, stdin_handle_chosen; + int i, len, stdin_handle_chosen, bathi, batlo; ofproxy = the_ofproxy; ofw_print_string("Freeldr PowerPC Init\n"); @@ -405,6 +512,22 @@ MachVtbl.ConsGetCh = PpcConsGetCh; printf( "stdin_handle is %x\n", stdin_handle ); + /* List MMU Status */ + printf("MSR %x\n", GetMSR()); + + for( i = 0; i < 16; i++ ) { + printf("SR%d %x\n", i, GetSR(i)); + } + + for( i = 0; i < 4; i++ ) { + GetBat( i, 0, &bathi, &batlo ); + printf("DBAT%d %x:%x\n", i, bathi, batlo); + } + + for( i = 0; i < 4; i++ ) { + GetBat( i, 1, &bathi, &batlo ); + printf("IBAT%d %x:%x\n", i, bathi, batlo); + } MachVtbl.VideoClearScreen = PpcVideoClearScreen; MachVtbl.VideoSetDisplayMode = PpcVideoSetDisplayMode;
18 years, 3 months
1
0
0
0
[pborobia] 23857: * Add implementation of GetLastInputInfo
by pborobia@svn.reactos.org
Author: pborobia Date: Fri Sep 1 09:47:33 2006 New Revision: 23857 URL:
http://svn.reactos.org/svn/reactos?rev=23857&view=rev
Log: * Add implementation of GetLastInputInfo Modified: branches/clipboard/dll/win32/user32/windows/input.c branches/clipboard/include/reactos/win32k/ntuser.h branches/clipboard/tools/nci/w32ksvc.db Modified: branches/clipboard/dll/win32/user32/windows/input.c URL:
http://svn.reactos.org/svn/reactos/branches/clipboard/dll/win32/user32/wind…
============================================================================== --- branches/clipboard/dll/win32/user32/windows/input.c (original) +++ branches/clipboard/dll/win32/user32/windows/input.c Fri Sep 1 09:47:33 2006 @@ -290,13 +290,12 @@ /* - * @unimplemented + * @implemented */ BOOL STDCALL GetLastInputInfo(PLASTINPUTINFO plii) { - UNIMPLEMENTED; - return FALSE; + return NtUserGetLastInputInfo(plii); } Modified: branches/clipboard/include/reactos/win32k/ntuser.h URL:
http://svn.reactos.org/svn/reactos/branches/clipboard/include/reactos/win32…
============================================================================== --- branches/clipboard/include/reactos/win32k/ntuser.h (original) +++ branches/clipboard/include/reactos/win32k/ntuser.h Fri Sep 1 09:47:33 2006 @@ -1043,6 +1043,11 @@ NtUserGetKeyState( DWORD Unknown0); +BOOL +NTAPI +NtUserGetLastInputInfo( + PLASTINPUTINFO plii); + DWORD NTAPI NtUserGetListBoxInfo( Modified: branches/clipboard/tools/nci/w32ksvc.db URL:
http://svn.reactos.org/svn/reactos/branches/clipboard/tools/nci/w32ksvc.db?…
============================================================================== --- branches/clipboard/tools/nci/w32ksvc.db (original) +++ branches/clipboard/tools/nci/w32ksvc.db Fri Sep 1 09:47:33 2006 @@ -391,6 +391,7 @@ NtUserGetKeyboardState 1 NtUserGetKeyNameText 3 NtUserGetKeyState 1 +NtUserGetLastInputInfo 1 NtUserGetListBoxInfo 1 NtUserGetMenuBarInfo 4 NtUserGetMenuIndex 2
18 years, 3 months
1
0
0
0
← Newer
1
...
11
12
13
14
15
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Results per page:
10
25
50
100
200