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
2025
April
March
February
January
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
November 2009
----- 2025 -----
April 2025
March 2025
February 2025
January 2025
----- 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
23 participants
444 discussions
Start a n
N
ew thread
[tkreuzer] 44025: [MM] - implement MmInitGlobalKernelPageDirectory, MmInitializeHandBuiltProcess - fix MmUpdatePageDir
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Nov 8 04:49:08 2009 New Revision: 44025 URL:
http://svn.reactos.org/svn/reactos?rev=44025&view=rev
Log: [MM] - implement MmInitGlobalKernelPageDirectory, MmInitializeHandBuiltProcess - fix MmUpdatePageDir Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/mm.h branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/page.c Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/mm.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/mm.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/mm.h [iso-8859-1] Sun Nov 8 04:49:08 2009 @@ -17,7 +17,8 @@ #define PAGE_MASK(x) ((x)&(~0xfff)) #define PAE_PAGE_MASK(x) ((x)&(~0xfffLL)) -#define HYPER_SPACE 0xFFFFF70000000000ULL +#define MI_HYPER_SPACE_START 0xFFFFF70000000000ULL +#define MI_HYPER_SPACE_END 0xFFFFF77FFFFFFFFFULL /* Base addresses of PTE and PDE */ //#define PAGETABLE_MAP PTE_BASE Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/page.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/page.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/page.c [iso-8859-1] Sun Nov 8 04:49:08 2009 @@ -18,10 +18,12 @@ #pragma alloc_text(INIT, MiInitPageDirectoryMap) #endif +extern MMPTE HyperTemplatePte; /* GLOBALS *****************************************************************/ ULONG64 MmGlobalKernelPageDirectory[512]; +ULONG Ke386GlobalPagesEnabled = 0; /* PRIVATE FUNCTIONS *******************************************************/ @@ -437,7 +439,7 @@ MmUpdatePageDir(PEPROCESS Process, PVOID Address, ULONG Size) { ULONG StartIndex, EndIndex, Index; - PULONG64 Pde; + PMMPTE Pte; /* Sanity check */ if (Address < MmSystemRangeStart) @@ -446,27 +448,32 @@ } /* Get pointer to the page directory to update */ - if (Process != NULL && Process != PsGetCurrentProcess()) - { -// Pde = MmCreateHyperspaceMapping(PTE_TO_PFN(Process->Pcb.DirectoryTableBase[0])); + if (Process && Process != PsGetCurrentProcess()) + { +// Pte = MmCreateHyperspaceMapping(PTE_TO_PFN(Process->Pcb.DirectoryTableBase[0])); } else { - Pde = (PULONG64)PXE_BASE; + Pte = (PMMPTE)PXE_BASE; } /* Update PML4 entries */ StartIndex = VAtoPXI(Address); - EndIndex = VAtoPXI((ULONG64)Address + Size); + EndIndex = VAtoPXI((ULONG64)Address + Size - 1); for (Index = StartIndex; Index <= EndIndex; Index++) { if (Index != VAtoPXI(PXE_BASE)) { - (void)InterlockedCompareExchangePointer((PVOID*)&Pde[Index], - (PVOID)MmGlobalKernelPageDirectory[Index], - 0); + InterlockedCompareExchange64(&Pte[Index].u.Long, + MmGlobalKernelPageDirectory[Index], + 0); + if (!MiIsHyperspaceAddress(Pte)) + __invlpg((PVOID)((ULONG64)Index * PAGE_SIZE)); } } + + if (MiIsHyperspaceAddress(Pte)) + MmDeleteHyperspaceMapping((PVOID)PAGE_ROUND_DOWN(Pte)); } VOID @@ -474,7 +481,35 @@ NTAPI MmInitGlobalKernelPageDirectory(VOID) { - UNIMPLEMENTED; + PULONG64 CurrentPageDirectory = (PULONG64)PXE_BASE; + MMPTE Pte; + ULONG i; + + /* Setup template pte */ + HyperTemplatePte.u.Long = 0; + HyperTemplatePte.u.Hard.Valid = 1; + HyperTemplatePte.u.Hard.Write = 1; + HyperTemplatePte.u.Hard.Dirty = 1; + HyperTemplatePte.u.Hard.Accessed = 1; + if (Ke386GlobalPagesEnabled) + HyperTemplatePte.u.Hard.Global = 1; + + for (i = VAtoPXI(MmSystemRangeStart); i < 512; i++) + { + if ((i < VAtoPXI(PTE_BASE) || i > VAtoPXI(PTE_TOP)) && + (i < VAtoPXI(MI_HYPER_SPACE_START) || i > VAtoPXI(MI_HYPER_SPACE_END)) && + MmGlobalKernelPageDirectory[i] == 0 && + CurrentPageDirectory[i] != 0) + { + Pte.u.Long = CurrentPageDirectory[i]; + if (Ke386GlobalPagesEnabled) + { + Pte.u.Hard.Global = 1; + CurrentPageDirectory[i] = Pte.u.Hard.Global; + } + MmGlobalKernelPageDirectory[i] = Pte.u.Hard.Global; + } + } } NTSTATUS @@ -482,8 +517,19 @@ MmInitializeHandBuiltProcess(IN PEPROCESS Process, IN PULONG_PTR DirectoryTableBase) { - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; + /* Share the directory base with the idle process */ + DirectoryTableBase[0] = PsGetCurrentProcess()->Pcb.DirectoryTableBase[0]; + DirectoryTableBase[1] = PsGetCurrentProcess()->Pcb.DirectoryTableBase[1]; + + /* Initialize the Addresss Space */ + KeInitializeGuardedMutex(&Process->AddressCreationLock); + Process->Vm.WorkingSetExpansionLinks.Flink = NULL; + ASSERT(Process->VadRoot.NumberGenericTableElements == 0); + Process->VadRoot.BalancedRoot.u1.Parent = &Process->VadRoot.BalancedRoot; + + /* The process now has an address space */ + Process->HasAddressSpace = TRUE; + return STATUS_SUCCESS; } BOOLEAN
15 years, 5 months
1
0
0
0
[tkreuzer] 44024: [MM] Implement amd64 versions for MiIsHyperspaceAddress, MiFlushTlb, MiGetPteForProcess, MiGetPteValueForProcess, MmGetPfnForProcess, MmGetPhysicalAddress, MmIsPagePresent, MmIsPageSwapEntry, MmIsDirtyPage, MmGetPageProtect, MmSetPageProtect, MmSetCleanPage, MmSetDirtyPage, MmDeleteVirtualMapping
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Nov 8 03:39:47 2009 New Revision: 44024 URL:
http://svn.reactos.org/svn/reactos?rev=44024&view=rev
Log: [MM] Implement amd64 versions for MiIsHyperspaceAddress, MiFlushTlb, MiGetPteForProcess, MiGetPteValueForProcess, MmGetPfnForProcess, MmGetPhysicalAddress, MmIsPagePresent, MmIsPageSwapEntry, MmIsDirtyPage, MmGetPageProtect, MmSetPageProtect, MmSetCleanPage, MmSetDirtyPage, MmDeleteVirtualMapping Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/page.c Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/page.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/page.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/page.c [iso-8859-1] Sun Nov 8 03:39:47 2009 @@ -1,5 +1,5 @@ /* - * COPYRIGHT: See COPYING in the top level directory + * COPYRIGHT: GPL, See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/amd64/page.c * PURPOSE: Low level memory managment manipulation @@ -26,43 +26,298 @@ /* PRIVATE FUNCTIONS *******************************************************/ +BOOLEAN +FORCEINLINE +MiIsHyperspaceAddress(PVOID Address) +{ + return ((ULONG64)Address >= MI_HYPER_SPACE_START && + (ULONG64)Address <= MI_HYPER_SPACE_END); +} + +VOID +MiFlushTlb(PMMPTE Pte, PVOID Address) +{ + if (MiIsHyperspaceAddress(Pte)) + { + MmDeleteHyperspaceMapping((PVOID)PAGE_ROUND_DOWN(Pte)); + } + else + { + __invlpg(Address); + } +} + +static +PMMPTE +MiGetPteForProcess( + PEPROCESS Process, + PVOID Address, + BOOLEAN Create) +{ + PMMPTE Pte; + + /* Check if we need hypersapce mapping */ + if (Address < MmSystemRangeStart && + Process && Process != PsGetCurrentProcess()) + { + UNIMPLEMENTED; + return NULL; + } + else if (Create) + { + /* Get the PXE */ + Pte = MiAddressToPxe(Address); + if (!Pte->u.Hard.Valid) + InterlockedBitTestAndSet64(&Pte->u.Long, 0); + + /* Get the PPE */ + Pte = MiAddressToPpe(Address); + if (!Pte->u.Hard.Valid) + InterlockedBitTestAndSet64(&Pte->u.Long, 0); + + /* Get the PDE */ + Pte = MiAddressToPde(Address); + if (!Pte->u.Hard.Valid) + InterlockedBitTestAndSet64(&Pte->u.Long, 0); + + /* Get the PTE */ + Pte = MiAddressToPte(Address); + + return Pte; + } + else + { + /* Get the PXE */ + Pte = MiAddressToPxe(Address); + if (!Pte->u.Hard.Valid) + return NULL; + + /* Get the PPE */ + Pte = MiAddressToPpe(Address); + if (Pte->u.Hard.Valid) + return NULL; + + /* Get the PDE */ + Pte = MiAddressToPde(Address); + if (Pte->u.Hard.Valid) + return NULL; + + /* Get the PTE */ + Pte = MiAddressToPte(Address); + + return Pte; + } + + return 0; +} + +static +ULONG64 +MiGetPteValueForProcess( + PEPROCESS Process, + PVOID Address) +{ + PMMPTE Pte; + ULONG64 PteValue; + + Pte = MiGetPteForProcess(Process, Address, FALSE); + PteValue = Pte ? Pte->u.Long : 0; + + if (MiIsHyperspaceAddress(Pte)) + MmDeleteHyperspaceMapping((PVOID)PAGE_ROUND_DOWN(Pte)); + + return PteValue; +} + /* FUNCTIONS ***************************************************************/ - -NTSTATUS -NTAPI -Mmi386ReleaseMmInfo(PEPROCESS Process) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -MmInitializeHandBuiltProcess(IN PEPROCESS Process, - IN PULONG_PTR DirectoryTableBase) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -BOOLEAN -NTAPI -MmCreateProcessAddressSpace(IN ULONG MinWs, - IN PEPROCESS Process, - IN PULONG_PTR DirectoryTableBase) -{ - UNIMPLEMENTED; - return 0; -} PFN_TYPE NTAPI MmGetPfnForProcess(PEPROCESS Process, PVOID Address) { - UNIMPLEMENTED; - return 0; + MMPTE Pte; + Pte.u.Long = MiGetPteValueForProcess(Process, Address); + return Pte.u.Hard.Valid ? Pte.u.Hard.PageFrameNumber : 0; +} + +PHYSICAL_ADDRESS +NTAPI +MmGetPhysicalAddress(PVOID Address) +{ + PHYSICAL_ADDRESS p; + MMPTE Pte; + + Pte.u.Long = MiGetPteValueForProcess(NULL, Address); + if (Pte.u.Hard.Valid) + { + p.QuadPart = Pte.u.Hard.PageFrameNumber * PAGE_SIZE; + p.u.LowPart |= (ULONG_PTR)Address & (PAGE_SIZE - 1); + } + else + { + p.QuadPart = 0; + } + + return p; +} + +BOOLEAN +NTAPI +MmIsPagePresent(PEPROCESS Process, PVOID Address) +{ + MMPTE Pte; + Pte.u.Long = MiGetPteValueForProcess(Process, Address); + return Pte.u.Hard.Valid; +} + +BOOLEAN +NTAPI +MmIsPageSwapEntry(PEPROCESS Process, PVOID Address) +{ + MMPTE Pte; + Pte.u.Long = MiGetPteValueForProcess(Process, Address); + return Pte.u.Hard.Valid && Pte.u.Soft.Transition; +} + +BOOLEAN +NTAPI +MmIsDirtyPage(PEPROCESS Process, PVOID Address) +{ + MMPTE Pte; + Pte.u.Long = MiGetPteValueForProcess(Process, Address); + return Pte.u.Hard.Valid && Pte.u.Hard.Dirty; +} + +ULONG +NTAPI +MmGetPageProtect(PEPROCESS Process, PVOID Address) +{ + MMPTE Pte; + ULONG Protect; + + Pte.u.Long = MiGetPteValueForProcess(Process, Address); + + if (!Pte.u.Flush.Valid) + { + Protect = PAGE_NOACCESS; + } + else if (Pte.u.Flush.NoExecute) + { + if (Pte.u.Flush.CopyOnWrite) + Protect = PAGE_WRITECOPY; + else if (Pte.u.Flush.Write) + Protect = PAGE_READWRITE; + else + Protect = PAGE_READONLY; + } + else + { + if (Pte.u.Flush.CopyOnWrite) + Protect = PAGE_EXECUTE_WRITECOPY; + else if (Pte.u.Flush.Write) + Protect = PAGE_EXECUTE_READWRITE; + else + Protect = PAGE_EXECUTE_READ; + } + + if (Pte.u.Flush.CacheDisable) + Protect |= PAGE_NOCACHE; + + if (Pte.u.Flush.WriteThrough) + Protect |= PAGE_WRITETHROUGH; + + // PAGE_GUARD ? + + return Protect; +} + +#define PAGE_EXECUTE_ANY (PAGE_EXECUTE|PAGE_EXECUTE_READ|PAGE_EXECUTE_READWRITE|PAGE_EXECUTE_WRITECOPY) + +VOID +NTAPI +MmSetPageProtect(PEPROCESS Process, PVOID Address, ULONG flProtect) +{ + PMMPTE Pte; + MMPTE NewPte; + + if (!(flProtect & PAGE_EXECUTE_ANY)) + NewPte.u.Flush.NoExecute = 1; + + if (flProtect & (PAGE_EXECUTE_WRITECOPY|PAGE_WRITECOPY)) + { + NewPte.u.Flush.Write = 1; + NewPte.u.Flush.CopyOnWrite = 1; + } + + if (flProtect & (PAGE_EXECUTE_READWRITE|PAGE_READWRITE)) + NewPte.u.Flush.Write = 1; + + if (flProtect & PAGE_NOCACHE) + NewPte.u.Flush.CacheDisable = 1; + + if (flProtect & PAGE_WRITETHROUGH) + NewPte.u.Flush.WriteThrough = 1; + + Pte = MiGetPteForProcess(Process, Address, FALSE); + + InterlockedExchange64(&Pte->u.Long, NewPte.u.Long); + + MiFlushTlb(Pte, Address); +} + +VOID +NTAPI +MmSetCleanPage(PEPROCESS Process, PVOID Address) +{ + PMMPTE Pte; + + Pte = MiGetPteForProcess(Process, Address, FALSE); + if (!Pte) + { + KeBugCheckEx(MEMORY_MANAGEMENT, 0x1234, (ULONG64)Address, 0, 0); + } + + /* Ckear the dirty bit */ + if (InterlockedBitTestAndReset64((PVOID)Pte, 6)) + { + if (!MiIsHyperspaceAddress(Pte)) + __invlpg(Address); + } + + MiFlushTlb(Pte, Address); +} + +VOID +NTAPI +MmSetDirtyPage(PEPROCESS Process, PVOID Address) +{ + PMMPTE Pte; + + Pte = MiGetPteForProcess(Process, Address, FALSE); + if (!Pte) + { + KeBugCheckEx(MEMORY_MANAGEMENT, 0x1234, (ULONG64)Address, 0, 0); + } + + /* Ckear the dirty bit */ + if (InterlockedBitTestAndSet64((PVOID)Pte, 6)) + { + if (!MiIsHyperspaceAddress(Pte)) + __invlpg(Address); + } + + MiFlushTlb(Pte, Address); +} + + +NTSTATUS +NTAPI +Mmi386ReleaseMmInfo(PEPROCESS Process) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; } VOID @@ -81,10 +336,48 @@ VOID NTAPI -MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage, - BOOLEAN* WasDirty, PPFN_TYPE Page) -{ - UNIMPLEMENTED; +MmDeleteVirtualMapping( + PEPROCESS Process, + PVOID Address, + BOOLEAN FreePage, + BOOLEAN* WasDirty, + PPFN_TYPE Page) +{ + PFN_NUMBER Pfn; + PMMPTE Pte; + MMPTE OldPte; + + Pte = MiGetPteForProcess(Process, Address, FALSE); + + if (Pte) + { + /* Atomically set the entry to zero and get the old value. */ + OldPte.u.Long = InterlockedExchange64(&Pte->u.Long, 0); + + if (OldPte.u.Hard.Valid) + { + Pfn = OldPte.u.Hard.PageFrameNumber; + + if (FreePage) + MmReleasePageMemoryConsumer(MC_NPPOOL, Pfn); + } + else + Pfn = 0; + } + else + { + OldPte.u.Long = 0; + Pfn = 0; + } + + /* Return information to the caller */ + if (WasDirty) + *WasDirty = OldPte.u.Hard.Dirty;; + + if (Page) + *Page = Pfn; + + MiFlushTlb(Pte, Address); } VOID @@ -95,27 +388,6 @@ UNIMPLEMENTED; } -BOOLEAN -NTAPI -MmIsDirtyPage(PEPROCESS Process, PVOID Address) -{ - UNIMPLEMENTED; - return FALSE; -} - -VOID -NTAPI -MmSetCleanPage(PEPROCESS Process, PVOID Address) -{ - UNIMPLEMENTED; -} - -VOID -NTAPI -MmSetDirtyPage(PEPROCESS Process, PVOID Address) -{ - UNIMPLEMENTED; -} VOID NTAPI @@ -124,21 +396,6 @@ UNIMPLEMENTED; } -BOOLEAN -NTAPI -MmIsPagePresent(PEPROCESS Process, PVOID Address) -{ - UNIMPLEMENTED; - return 0; -} - -BOOLEAN -NTAPI -MmIsPageSwapEntry(PEPROCESS Process, PVOID Address) -{ - UNIMPLEMENTED; - return 0; -} NTSTATUS NTAPI @@ -173,30 +430,6 @@ { UNIMPLEMENTED; return STATUS_UNSUCCESSFUL; -} - -ULONG -NTAPI -MmGetPageProtect(PEPROCESS Process, PVOID Address) -{ - UNIMPLEMENTED; - return 0; -} - -VOID -NTAPI -MmSetPageProtect(PEPROCESS Process, PVOID Address, ULONG flProtect) -{ - UNIMPLEMENTED; -} - -PHYSICAL_ADDRESS -NTAPI -MmGetPhysicalAddress(PVOID vaddr) -{ - PHYSICAL_ADDRESS ret = {{0}}; - UNIMPLEMENTED; - return ret; } VOID @@ -244,5 +477,24 @@ UNIMPLEMENTED; } +NTSTATUS +NTAPI +MmInitializeHandBuiltProcess(IN PEPROCESS Process, + IN PULONG_PTR DirectoryTableBase) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +BOOLEAN +NTAPI +MmCreateProcessAddressSpace(IN ULONG MinWs, + IN PEPROCESS Process, + IN PULONG_PTR DirectoryTableBase) +{ + UNIMPLEMENTED; + return 0; +} + /* EOF */
15 years, 5 months
1
0
0
0
[sginsberg] 44023: - Disable the MiCacheImageSymbols call in MmLoadSystemImage for KD too as this hack is required for rossym rather than KDBG. Fixes detection of non-boot driver images by WinDbg. - Add another hack to freeldr.c to make sure that HAL is the second entry in the Load Order list -- detect if it isn't and insert it as the second entry manually if it isn't. - KdbInitialize can now assume that the 2nd entry in the Load Order list is HAL, just like ExpLoadBootSymbols and KD does, so ge
by sginsberg@svn.reactos.org
Author: sginsberg Date: Sun Nov 8 02:13:49 2009 New Revision: 44023 URL:
http://svn.reactos.org/svn/reactos?rev=44023&view=rev
Log: - Disable the MiCacheImageSymbols call in MmLoadSystemImage for KD too as this hack is required for rossym rather than KDBG. Fixes detection of non-boot driver images by WinDbg. - Add another hack to freeldr.c to make sure that HAL is the second entry in the Load Order list -- detect if it isn't and insert it as the second entry manually if it isn't. - KdbInitialize can now assume that the 2nd entry in the Load Order list is HAL, just like ExpLoadBootSymbols and KD does, so get the Loader Entry directly instead of searching for it. - Move KiBootTss and KiBootGdt to freeldr.c as this is where they belong -- they are not required for NTLDR/WINLDR boot style and are only used directly in freeldr.c. - Get rid of the AcpiTableDetected variable from freeldr.c. Instead, set the AcpiTable entry to something and make PoInitSystem check for that instead to preserve the old behavior. - Implement KdpGetFirstParameter and KdpGetSecondParameter for ARM too -- just retrieve R3/R4 here. Also rename those macros to clarify what parameters we are retrieving. - Add MmIsSessionAddress stub and use it from KD handle session space properly in the Memory Query API, and ASSERT that we are not trying to do a copy to/from session space in MmDbgCopyMemory as we don't handle it properly. Put this in mmdbg.c for now as we don't implement session space, and it is only called from KD right now. - Rename the 3 kdsup.c files to kdx86.c, kdx64.c and kdarm.c to differ them from each other. - Implement KdpAllowDisable -- just check if any processor breakpoints are set on any processor in the system and disallow the disable if so. The routine is now architecture dependant, so move it to the appropriate files. - Get rid of the MmFreeLdr* variables too. These have been deprecated for some time now. - The ModuleObject and ImageBaseAddress parameters of MmLoadSystemImage are not optional so don't treat them as such, and don't zero initialize them as callers shouldn't rely on this. - Set LDRP_ENTRY_NATIVE instead of LDRP_COMPAT_DATABASE_PROCESSED to mark the image as a native image. Also fix the value of LDRP_ENTRY_NATIVE. - Fix definition of LDR_DATA_TABLE_ENTRY -- the Checksum member should be in the union too. - Remove some unnecessary externs for stuff we now define globally in the kernel headers. - Rename some variables in KD to better match the logic. - Move some x86 only stuff from global ke.h and ke_x.h to the x86 dependent ke.h. Remove DR_ACTIVE_MASK as it has been deprecated/unused for a while now. Added: trunk/reactos/ntoskrnl/kd64/amd64/kdx64.c - copied, changed from r43987, trunk/reactos/ntoskrnl/kd64/amd64/kdsup.c trunk/reactos/ntoskrnl/kd64/arm/kdarm.c - copied, changed from r43987, trunk/reactos/ntoskrnl/kd64/arm/kdsup.c trunk/reactos/ntoskrnl/kd64/i386/kdx86.c - copied, changed from r43987, trunk/reactos/ntoskrnl/kd64/i386/kdsup.c Removed: trunk/reactos/ntoskrnl/kd64/amd64/kdsup.c trunk/reactos/ntoskrnl/kd64/arm/kdsup.c trunk/reactos/ntoskrnl/kd64/i386/kdsup.c Modified: trunk/reactos/include/ndk/ldrtypes.h trunk/reactos/include/reactos/rosldr.h trunk/reactos/ntoskrnl/ex/init.c trunk/reactos/ntoskrnl/include/internal/i386/ke.h trunk/reactos/ntoskrnl/include/internal/kd64.h trunk/reactos/ntoskrnl/include/internal/ke.h trunk/reactos/ntoskrnl/include/internal/ke_x.h trunk/reactos/ntoskrnl/include/internal/mm.h trunk/reactos/ntoskrnl/include/internal/po.h trunk/reactos/ntoskrnl/kd64/kdapi.c trunk/reactos/ntoskrnl/kd64/kdprint.c trunk/reactos/ntoskrnl/kd64/kdtrap.c trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c trunk/reactos/ntoskrnl/ke/freeldr.c trunk/reactos/ntoskrnl/ke/i386/cpu.c trunk/reactos/ntoskrnl/ke/i386/exp.c trunk/reactos/ntoskrnl/mm/mmdbg.c trunk/reactos/ntoskrnl/mm/sysldr.c trunk/reactos/ntoskrnl/po/power.c Modified: trunk/reactos/include/ndk/ldrtypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/ldrtypes.h?rev…
============================================================================== --- trunk/reactos/include/ndk/ldrtypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/ldrtypes.h [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -52,7 +52,7 @@ #define LDRP_SYSTEM_MAPPED 0x01000000 #define LDRP_IMAGE_VERIFYING 0x02000000 #define LDRP_DRIVER_DEPENDENT_DLL 0x04000000 -#define LDRP_ENTRY_NATIVE 0x08800000 +#define LDRP_ENTRY_NATIVE 0x08000000 #define LDRP_REDIRECTED 0x10000000 #define LDRP_NON_PAGED_DEBUG_INFO 0x20000000 #define LDRP_MM_LOADED 0x40000000 @@ -112,9 +112,12 @@ union { LIST_ENTRY HashLinks; - PVOID SectionPointer; + struct + { + PVOID SectionPointer; + ULONG CheckSum; + }; }; - ULONG CheckSum; union { ULONG TimeDateStamp; Modified: trunk/reactos/include/reactos/rosldr.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/rosldr.h?r…
============================================================================== --- trunk/reactos/include/reactos/rosldr.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/rosldr.h [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -48,7 +48,4 @@ ULONG (*FrLdrDbgPrint)(const char *Format, ...); } ROS_LOADER_PARAMETER_BLOCK, *PROS_LOADER_PARAMETER_BLOCK; -extern BOOLEAN AcpiTableDetected; -extern ULONG MmFreeLdrPageDirectoryStart, MmFreeLdrPageDirectoryEnd; - #endif Modified: trunk/reactos/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=440…
============================================================================== --- trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -1395,7 +1395,7 @@ InbvDisplayString(EndBuffer); /* Initialize Power Subsystem in Phase 0 */ - if (!PoInitSystem(0, AcpiTableDetected)) KeBugCheck(INTERNAL_POWER_ERROR); + if (!PoInitSystem(0)) KeBugCheck(INTERNAL_POWER_ERROR); /* Check for Y2K hack */ Y2KHackRequired = strstr(CommandLine, "YEAR"); @@ -1833,7 +1833,7 @@ #endif /* Initialize Power Subsystem in Phase 1*/ - if (!PoInitSystem(1, AcpiTableDetected)) KeBugCheck(INTERNAL_POWER_ERROR); + if (!PoInitSystem(1)) KeBugCheck(INTERNAL_POWER_ERROR); /* Initialize the Process Manager at Phase 1 */ if (!PsInitSystem(LoaderBlock)) KeBugCheck(PROCESS1_INITIALIZATION_FAILED); Modified: trunk/reactos/ntoskrnl/include/internal/i386/ke.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/i386/ke.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/i386/ke.h [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -7,6 +7,12 @@ #include "v86m.h" extern ULONG Ke386CacheAlignment; + +// +// Thread Dispatcher Header DebugActive Mask +// +#define DR_MASK(x) (1 << (x)) +#define DR_REG_MASK 0x4F #define IMAGE_FILE_MACHINE_ARCHITECTURE IMAGE_FILE_MACHINE_I386 @@ -107,7 +113,180 @@ IN PKGDTENTRY Descriptor ); +VOID +NTAPI +KiFlushNPXState( + IN FLOATING_SAVE_AREA *SaveArea +); + +VOID +NTAPI +Ki386AdjustEsp0( + IN PKTRAP_FRAME TrapFrame +); + +VOID +NTAPI +Ki386SetupAndExitToV86Mode( + OUT PTEB VdmTeb +); + +VOID +NTAPI +KeI386VdmInitialize( + VOID +); + +ULONG_PTR +NTAPI +Ki386EnableGlobalPage( + IN volatile ULONG_PTR Context +); + +VOID +NTAPI +KiI386PentiumLockErrataFixup( + VOID +); + +VOID +NTAPI +KiInitializePAT( + VOID +); + +VOID +NTAPI +KiInitializeMTRR( + IN BOOLEAN FinalCpu +); + +VOID +NTAPI +KiAmdK6InitializeMTRR( + VOID +); + +VOID +NTAPI +KiRestoreFastSyscallReturnState( + VOID +); + +ULONG_PTR +NTAPI +Ki386EnableDE( + IN ULONG_PTR Context +); + +ULONG_PTR +NTAPI +Ki386EnableFxsr( + IN ULONG_PTR Context +); + +ULONG_PTR +NTAPI +Ki386EnableXMMIExceptions( + IN ULONG_PTR Context +); + +// +// Global x86 only Kernel data +// +extern PVOID Ki386IopmSaveArea; +extern ULONG KeI386EFlagsAndMaskV86; +extern ULONG KeI386EFlagsOrMaskV86; +extern BOOLEAN KeI386VirtualIntExtensions; +extern KIDTENTRY KiIdt[MAXIMUM_IDTVECTOR]; +extern KDESCRIPTOR KiIdtDescriptor; +extern ULONG Ke386GlobalPagesEnabled; +extern BOOLEAN KiI386PentiumLockErrataPresent; +extern ULONG KeI386NpxPresent; +extern ULONG KeI386XMMIPresent; +extern ULONG KeI386FxsrPresent; +extern ULONG KiMXCsrMask; +extern ULONG KeI386CpuType; +extern ULONG KeI386CpuStep; +extern UCHAR KiDebugRegisterTrapOffsets[9]; +extern UCHAR KiDebugRegisterContextOffsets[9]; +extern VOID __cdecl KiTrap2(VOID); +extern VOID __cdecl KiTrap8(VOID); +extern VOID __cdecl KiTrap19(VOID); +extern VOID __cdecl KiFastCallEntry(VOID); + +// +// Sanitizes a selector +// +FORCEINLINE +ULONG +Ke386SanitizeSeg(IN ULONG Cs, + IN KPROCESSOR_MODE Mode) +{ + // + // Check if we're in kernel-mode, and force CPL 0 if so. + // Otherwise, force CPL 3. + // + return ((Mode == KernelMode) ? + (Cs & (0xFFFF & ~RPL_MASK)) : + (RPL_MASK | (Cs & 0xFFFF))); +} + +// +// Sanitizes EFLAGS +// +FORCEINLINE +ULONG +Ke386SanitizeFlags(IN ULONG Eflags, + IN KPROCESSOR_MODE Mode) +{ + // + // Check if we're in kernel-mode, and sanitize EFLAGS if so. + // Otherwise, also force interrupt mask on. + // + return ((Mode == KernelMode) ? + (Eflags & (EFLAGS_USER_SANITIZE | EFLAGS_INTERRUPT_MASK)) : + (EFLAGS_INTERRUPT_MASK | (Eflags & EFLAGS_USER_SANITIZE))); +} + +// +// Gets a DR register from a CONTEXT structure +// +FORCEINLINE +PVOID +KiDrFromContext(IN ULONG Dr, + IN PCONTEXT Context) +{ + return *(PVOID*)((ULONG_PTR)Context + KiDebugRegisterContextOffsets[Dr]); +} + +// +// Gets a DR register from a KTRAP_FRAME structure +// +FORCEINLINE +PVOID* +KiDrFromTrapFrame(IN ULONG Dr, + IN PKTRAP_FRAME TrapFrame) +{ + return (PVOID*)((ULONG_PTR)TrapFrame + KiDebugRegisterTrapOffsets[Dr]); +} + +// +// Sanitizes a Debug Register +// +FORCEINLINE +PVOID +Ke386SanitizeDr(IN PVOID DrAddress, + IN KPROCESSOR_MODE Mode) +{ + // + // Check if we're in kernel-mode, and return the address directly if so. + // Otherwise, make sure it's not inside the kernel-mode address space. + // If it is, then clear the address. + // + return ((Mode == KernelMode) ? DrAddress : + (DrAddress <= MM_HIGHEST_USER_ADDRESS) ? DrAddress : 0); +} + #endif #endif /* __NTOSKRNL_INCLUDE_INTERNAL_I386_KE_H */ - -/* EOF */ Modified: trunk/reactos/ntoskrnl/include/internal/kd64.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/kd64.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/kd64.h [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -179,7 +179,7 @@ VOID NTAPI KdExitDebugger( - IN BOOLEAN Entered + IN BOOLEAN Enable ); NTSTATUS @@ -207,7 +207,7 @@ IN KPROCESSOR_MODE PreviousMode, IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame, - OUT PBOOLEAN Status + OUT PBOOLEAN Handled ); USHORT @@ -310,6 +310,15 @@ VOID NTAPI KdpSuspendAllBreakPoints( + VOID +); + +// +// Routine to determine if it is safe to disable the debugger +// +NTSTATUS +NTAPI +KdpAllowDisable( VOID ); 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 [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/ke.h [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -71,10 +71,6 @@ IN ULONG Length ); -extern ULONG_PTR MmFreeLdrFirstKrnlPhysAddr; -extern ULONG_PTR MmFreeLdrLastKrnlPhysAddr; -extern ULONG_PTR MmFreeLdrLastKernelAddress; - extern PVOID KeUserApcDispatcher; extern PVOID KeUserCallbackDispatcher; extern PVOID KeUserExceptionDispatcher; @@ -82,18 +78,10 @@ extern LARGE_INTEGER KeBootTime; extern ULONGLONG KeBootTimeBias; extern BOOLEAN ExCmosClockIsSane; -extern ULONG KeI386NpxPresent; -extern ULONG KeI386XMMIPresent; -extern ULONG KeI386FxsrPresent; -extern ULONG KiMXCsrMask; -extern ULONG KeI386CpuType; -extern ULONG KeI386CpuStep; extern ULONG KeProcessorArchitecture; extern ULONG KeProcessorLevel; extern ULONG KeProcessorRevision; extern ULONG KeFeatureBits; -extern ULONG Ke386GlobalPagesEnabled; -extern BOOLEAN KiI386PentiumLockErrataPresent; extern KNODE KiNode0; extern PKNODE KeNodeBlock[1]; extern UCHAR KeNumberNodes; @@ -105,17 +93,6 @@ extern PULONG KiInterruptTemplateDispatch; extern PULONG KiInterruptTemplate2ndDispatch; extern ULONG KiUnexpectedEntrySize; -#ifdef _M_IX86 -extern PVOID Ki386IopmSaveArea; -extern ULONG KeI386EFlagsAndMaskV86; -extern ULONG KeI386EFlagsOrMaskV86; -extern BOOLEAN KeI386VirtualIntExtensions; -extern KIDTENTRY KiIdt[]; -extern KGDTENTRY KiBootGdt[]; -extern KDESCRIPTOR KiGdtDescriptor; -extern KDESCRIPTOR KiIdtDescriptor; -extern KTSS KiBootTss; -#endif extern UCHAR P0BootStack[]; extern UCHAR KiDoubleFaultStack[]; extern EX_PUSH_LOCK KernelAddressSpaceLock; @@ -142,16 +119,10 @@ extern PKPRCB KiProcessorBlock[]; extern ULONG KiMask32Array[MAXIMUM_PRIORITY]; extern ULONG KiIdleSummary; -extern VOID __cdecl KiTrap19(VOID); -extern VOID __cdecl KiTrap8(VOID); -extern VOID __cdecl KiTrap2(VOID); -extern VOID __cdecl KiFastCallEntry(VOID); extern PVOID KeUserApcDispatcher; extern PVOID KeUserCallbackDispatcher; extern PVOID KeUserExceptionDispatcher; extern PVOID KeRaiseUserExceptionDispatcher; -extern UCHAR KiDebugRegisterTrapOffsets[9]; -extern UCHAR KiDebugRegisterContextOffsets[9]; extern ULONG KeTimeIncrement; extern ULONG KeTimeAdjustment; extern ULONG_PTR KiBugCheckData[5]; @@ -885,38 +856,9 @@ VOID NTAPI -Ki386AdjustEsp0( - IN PKTRAP_FRAME TrapFrame -); - -VOID -NTAPI -Ki386SetupAndExitToV86Mode( - OUT PTEB VdmTeb -); - -VOID -NTAPI -KeI386VdmInitialize( - VOID -); - -VOID -NTAPI KiInitializeMachineType( VOID ); - -// -// We need to do major portability work -// -#ifdef _M_IX86 -VOID -NTAPI -KiFlushNPXState( - IN FLOATING_SAVE_AREA *SaveArea -); -#endif VOID NTAPI @@ -969,45 +911,9 @@ VOID ); -ULONG_PTR -NTAPI -Ki386EnableGlobalPage(IN volatile ULONG_PTR Context); - -VOID -NTAPI -KiInitializePAT(VOID); - -VOID -NTAPI -KiInitializeMTRR(IN BOOLEAN FinalCpu); - -VOID -NTAPI -KiAmdK6InitializeMTRR(VOID); - -VOID -NTAPI -KiRestoreFastSyscallReturnState(VOID); - -ULONG_PTR -NTAPI -Ki386EnableDE(IN ULONG_PTR Context); - -ULONG_PTR -NTAPI -Ki386EnableFxsr(IN ULONG_PTR Context); - -ULONG_PTR -NTAPI -Ki386EnableXMMIExceptions(IN ULONG_PTR Context); - VOID NTAPI KiInitMachineDependent(VOID); - -VOID -NTAPI -KiI386PentiumLockErrataFixup(VOID); BOOLEAN NTAPI Modified: trunk/reactos/ntoskrnl/include/internal/ke_x.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ke_x.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/ke_x.h [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -5,88 +5,6 @@ * PURPOSE: Internal Inlined Functions for the Kernel * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) */ - -// -// Thread Dispatcher Header DebugActive Mask -// -#define DR_MASK(x) 1 << x -#define DR_ACTIVE_MASK 0x10 -#define DR_REG_MASK 0x4F - -#ifdef _M_IX86 -// -// Sanitizes a selector -// -FORCEINLINE -ULONG -Ke386SanitizeSeg(IN ULONG Cs, - IN KPROCESSOR_MODE Mode) -{ - // - // Check if we're in kernel-mode, and force CPL 0 if so. - // Otherwise, force CPL 3. - // - return ((Mode == KernelMode) ? - (Cs & (0xFFFF & ~RPL_MASK)) : - (RPL_MASK | (Cs & 0xFFFF))); -} - -// -// Sanitizes EFLAGS -// -FORCEINLINE -ULONG -Ke386SanitizeFlags(IN ULONG Eflags, - IN KPROCESSOR_MODE Mode) -{ - // - // Check if we're in kernel-mode, and sanitize EFLAGS if so. - // Otherwise, also force interrupt mask on. - // - return ((Mode == KernelMode) ? - (Eflags & (EFLAGS_USER_SANITIZE | EFLAGS_INTERRUPT_MASK)) : - (EFLAGS_INTERRUPT_MASK | (Eflags & EFLAGS_USER_SANITIZE))); -} - -// -// Gets a DR register from a CONTEXT structure -// -FORCEINLINE -PVOID -KiDrFromContext(IN ULONG Dr, - IN PCONTEXT Context) -{ - return *(PVOID*)((ULONG_PTR)Context + KiDebugRegisterContextOffsets[Dr]); -} - -// -// Gets a DR register from a KTRAP_FRAME structure -// -FORCEINLINE -PVOID* -KiDrFromTrapFrame(IN ULONG Dr, - IN PKTRAP_FRAME TrapFrame) -{ - return (PVOID*)((ULONG_PTR)TrapFrame + KiDebugRegisterTrapOffsets[Dr]); -} - -// -// -// -FORCEINLINE -PVOID -Ke386SanitizeDr(IN PVOID DrAddress, - IN KPROCESSOR_MODE Mode) -{ - // - // Check if we're in kernel-mode, and return the address directly if so. - // Otherwise, make sure it's not inside the kernel-mode address space. - // If it is, then clear the address. - // - return ((Mode == KernelMode) ? DrAddress : - (DrAddress <= MM_HIGHEST_USER_ADDRESS) ? DrAddress : 0); -} -#endif /* _M_IX86 */ #ifndef _M_ARM FORCEINLINE Modified: trunk/reactos/ntoskrnl/include/internal/mm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -511,6 +511,15 @@ IN ULONG Flags ); +// +// Determines if a given address is a session address +// +BOOLEAN +NTAPI +MmIsSessionAddress( + IN PVOID Address +); + /* marea.c *******************************************************************/ NTSTATUS Modified: trunk/reactos/ntoskrnl/include/internal/po.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/po.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/po.h [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -38,8 +38,7 @@ BOOLEAN NTAPI PoInitSystem( - IN ULONG BootPhase, - IN BOOLEAN HaveAcpiTable + IN ULONG BootPhase ); VOID Removed: trunk/reactos/ntoskrnl/kd64/amd64/kdsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/amd64/kdsup.…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/amd64/kdsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/amd64/kdsup.c (removed) @@ -1,151 +1,0 @@ -/* - * PROJECT: ReactOS Kernel - * LICENSE: GPL - See COPYING in the top level directory - * FILE: ntoskrnl/kd64/amd64/kdsup.c - * PURPOSE: KD support routines for AMD64 - * PROGRAMMERS: Timo Kreuzer (timo.kreuzer(a)reactos.org) - */ - -/* INCLUDES *****************************************************************/ - -#include <ntoskrnl.h> -#define NDEBUG -#include <debug.h> - -#undef UNIMPLEMENTED -#define UNIMPLEMENTED KdpDprintf("%s is unimplemented\n", __FUNCTION__) - -/* FUNCTIONS *****************************************************************/ - -VOID -NTAPI -KdpGetStateChange(IN PDBGKD_MANIPULATE_STATE64 State, - IN PCONTEXT Context) -{ - UNIMPLEMENTED; - while (TRUE); -} - -VOID -NTAPI -KdpSetContextState(IN PDBGKD_ANY_WAIT_STATE_CHANGE WaitStateChange, - IN PCONTEXT Context) -{ - UNIMPLEMENTED; - while (TRUE); -} - -NTSTATUS -NTAPI -KdpSysReadMsr(IN ULONG Msr, - OUT PLARGE_INTEGER MsrValue) -{ - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -KdpSysWriteMsr(IN ULONG Msr, - IN PLARGE_INTEGER MsrValue) -{ - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -KdpSysReadBusData(IN ULONG BusDataType, - IN ULONG BusNumber, - IN ULONG SlotNumber, - IN ULONG Offset, - IN PVOID Buffer, - IN ULONG Length, - OUT PULONG ActualLength) -{ - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -KdpSysWriteBusData(IN ULONG BusDataType, - IN ULONG BusNumber, - IN ULONG SlotNumber, - IN ULONG Offset, - IN PVOID Buffer, - IN ULONG Length, - OUT PULONG ActualLength) -{ - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -KdpSysReadControlSpace(IN ULONG Processor, - IN ULONG64 BaseAddress, - IN PVOID Buffer, - IN ULONG Length, - OUT PULONG ActualLength) -{ - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -KdpSysWriteControlSpace(IN ULONG Processor, - IN ULONG64 BaseAddress, - IN PVOID Buffer, - IN ULONG Length, - OUT PULONG ActualLength) -{ - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -KdpSysReadIoSpace(IN ULONG InterfaceType, - IN ULONG BusNumber, - IN ULONG AddressSpace, - IN ULONG64 IoAddress, - IN PVOID DataValue, - IN ULONG DataSize, - OUT PULONG ActualDataSize) -{ - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -KdpSysWriteIoSpace(IN ULONG InterfaceType, - IN ULONG BusNumber, - IN ULONG AddressSpace, - IN ULONG64 IoAddress, - IN PVOID DataValue, - IN ULONG DataSize, - OUT PULONG ActualDataSize) -{ - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -KdpSysCheckLowMemory(IN ULONG Flags) -{ - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; -} Copied: trunk/reactos/ntoskrnl/kd64/amd64/kdx64.c (from r43987, trunk/reactos/ntoskrnl/kd64/amd64/kdsup.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/amd64/kdx64.…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/amd64/kdsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/amd64/kdx64.c [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS Kernel * LICENSE: GPL - See COPYING in the top level directory - * FILE: ntoskrnl/kd64/amd64/kdsup.c + * FILE: ntoskrnl/kd64/amd64/kdx64.c * PURPOSE: KD support routines for AMD64 * PROGRAMMERS: Timo Kreuzer (timo.kreuzer(a)reactos.org) */ @@ -149,3 +149,12 @@ while (TRUE); return STATUS_UNSUCCESSFUL; } + +NTSTATUS +NTAPI +KdpAllowDisable(VOID) +{ + UNIMPLEMENTED; + while (TRUE); + return STATUS_ACCESS_DENIED; +} Copied: trunk/reactos/ntoskrnl/kd64/arm/kdarm.c (from r43987, trunk/reactos/ntoskrnl/kd64/arm/kdsup.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/arm/kdarm.c?…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/arm/kdsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/arm/kdarm.c [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS Kernel * LICENSE: BSD - See COPYING.ARM in the top level directory - * FILE: ntoskrnl/kd64/arm/kdsup.c + * FILE: ntoskrnl/kd64/arm/kdarm.c * PURPOSE: KD support routines for ARM * PROGRAMMERS: ReactOS Portable Systems Group */ @@ -149,3 +149,12 @@ while (TRUE); return STATUS_UNSUCCESSFUL; } + +NTSTATUS +NTAPI +KdpAllowDisable(VOID) +{ + UNIMPLEMENTED; + while (TRUE); + return STATUS_ACCESS_DENIED; +} Removed: trunk/reactos/ntoskrnl/kd64/arm/kdsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/arm/kdsup.c?…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/arm/kdsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/arm/kdsup.c (removed) @@ -1,151 +1,0 @@ -/* - * PROJECT: ReactOS Kernel - * LICENSE: BSD - See COPYING.ARM in the top level directory - * FILE: ntoskrnl/kd64/arm/kdsup.c - * PURPOSE: KD support routines for ARM - * PROGRAMMERS: ReactOS Portable Systems Group - */ - -/* INCLUDES *****************************************************************/ - -#include <ntoskrnl.h> -#define NDEBUG -#include <debug.h> - -#undef UNIMPLEMENTED -#define UNIMPLEMENTED KdpDprintf("%s is unimplemented\n", __FUNCTION__) - -/* FUNCTIONS *****************************************************************/ - -VOID -NTAPI -KdpGetStateChange(IN PDBGKD_MANIPULATE_STATE64 State, - IN PCONTEXT Context) -{ - UNIMPLEMENTED; - while (TRUE); -} - -VOID -NTAPI -KdpSetContextState(IN PDBGKD_ANY_WAIT_STATE_CHANGE WaitStateChange, - IN PCONTEXT Context) -{ - UNIMPLEMENTED; - while (TRUE); -} - -NTSTATUS -NTAPI -KdpSysReadMsr(IN ULONG Msr, - OUT PLARGE_INTEGER MsrValue) -{ - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -KdpSysWriteMsr(IN ULONG Msr, - IN PLARGE_INTEGER MsrValue) -{ - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -KdpSysReadBusData(IN ULONG BusDataType, - IN ULONG BusNumber, - IN ULONG SlotNumber, - IN ULONG Offset, - IN PVOID Buffer, - IN ULONG Length, - OUT PULONG ActualLength) -{ - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -KdpSysWriteBusData(IN ULONG BusDataType, - IN ULONG BusNumber, - IN ULONG SlotNumber, - IN ULONG Offset, - IN PVOID Buffer, - IN ULONG Length, - OUT PULONG ActualLength) -{ - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -KdpSysReadControlSpace(IN ULONG Processor, - IN ULONG64 BaseAddress, - IN PVOID Buffer, - IN ULONG Length, - OUT PULONG ActualLength) -{ - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -KdpSysWriteControlSpace(IN ULONG Processor, - IN ULONG64 BaseAddress, - IN PVOID Buffer, - IN ULONG Length, - OUT PULONG ActualLength) -{ - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -KdpSysReadIoSpace(IN ULONG InterfaceType, - IN ULONG BusNumber, - IN ULONG AddressSpace, - IN ULONG64 IoAddress, - IN PVOID DataValue, - IN ULONG DataSize, - OUT PULONG ActualDataSize) -{ - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -KdpSysWriteIoSpace(IN ULONG InterfaceType, - IN ULONG BusNumber, - IN ULONG AddressSpace, - IN ULONG64 IoAddress, - IN PVOID DataValue, - IN ULONG DataSize, - OUT PULONG ActualDataSize) -{ - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -KdpSysCheckLowMemory(IN ULONG Flags) -{ - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; -} Removed: trunk/reactos/ntoskrnl/kd64/i386/kdsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/i386/kdsup.c…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/i386/kdsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/i386/kdsup.c (removed) @@ -1,423 +1,0 @@ -/* - * PROJECT: ReactOS Kernel - * LICENSE: GPL - See COPYING in the top level directory - * FILE: ntoskrnl/kd64/i386/kdsup.c - * PURPOSE: KD support routines for x86 - * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) - * Stefan Ginsberg (stefan.ginsberg(a)reactos.org) - */ - -/* INCLUDES *****************************************************************/ - -#include <ntoskrnl.h> -#define NDEBUG -#include <debug.h> - -/* FUNCTIONS *****************************************************************/ - -VOID -NTAPI -KdpGetStateChange(IN PDBGKD_MANIPULATE_STATE64 State, - IN PCONTEXT Context) -{ - PKPRCB Prcb; - ULONG i; - - /* Check for success */ - if (NT_SUCCESS(State->u.Continue2.ContinueStatus)) - { - /* Check if we're tracing */ - if (State->u.Continue2.ControlSet.TraceFlag) - { - /* Enable TF */ - Context->EFlags |= EFLAGS_TF; - } - else - { - /* Remove it */ - Context->EFlags &= ~EFLAGS_TF; - } - - /* Loop all processors */ - for (i = 0; i < KeNumberProcessors; i++) - { - /* Get the PRCB and update DR7 and DR6 */ - Prcb = KiProcessorBlock[i]; - Prcb->ProcessorState.SpecialRegisters.KernelDr7 = - State->u.Continue2.ControlSet.Dr7; - Prcb->ProcessorState.SpecialRegisters.KernelDr6 = 0; - } - - /* Check if we have new symbol information */ - if (State->u.Continue2.ControlSet.CurrentSymbolStart != 1) - { - /* Update it */ - KdpCurrentSymbolStart = - State->u.Continue2.ControlSet.CurrentSymbolStart; - KdpCurrentSymbolEnd= State->u.Continue2.ControlSet.CurrentSymbolEnd; - } - } -} - -VOID -NTAPI -KdpSetContextState(IN PDBGKD_ANY_WAIT_STATE_CHANGE WaitStateChange, - IN PCONTEXT Context) -{ - PKPRCB Prcb = KeGetCurrentPrcb(); - - /* Copy i386 specific debug registers */ - WaitStateChange->ControlReport.Dr6 = Prcb->ProcessorState.SpecialRegisters. - KernelDr6; - WaitStateChange->ControlReport.Dr7 = Prcb->ProcessorState.SpecialRegisters. - KernelDr7; - - /* Copy i386 specific segments */ - WaitStateChange->ControlReport.SegCs = (USHORT)Context->SegCs; - WaitStateChange->ControlReport.SegDs = (USHORT)Context->SegDs; - WaitStateChange->ControlReport.SegEs = (USHORT)Context->SegEs; - WaitStateChange->ControlReport.SegFs = (USHORT)Context->SegFs; - - /* Copy EFlags */ - WaitStateChange->ControlReport.EFlags = Context->EFlags; - - /* Set Report Flags */ - WaitStateChange->ControlReport.ReportFlags = REPORT_INCLUDES_SEGS; - if (WaitStateChange->ControlReport.SegCs == KGDT_R0_CODE) - { - WaitStateChange->ControlReport.ReportFlags |= REPORT_STANDARD_CS; - } -} - -NTSTATUS -NTAPI -KdpSysReadMsr(IN ULONG Msr, - OUT PLARGE_INTEGER MsrValue) -{ - /* Wrap this in SEH in case the MSR doesn't exist */ - //_SEH2_TRY - { - /* Read from the MSR */ - MsrValue->QuadPart = RDMSR(Msr); - } - //_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - /* Invalid MSR */ - //_SEH2_YIELD(return STATUS_NO_SUCH_DEVICE); - } - //_SEH2_END; - - /* Success */ - return STATUS_SUCCESS; -} - -NTSTATUS -NTAPI -KdpSysWriteMsr(IN ULONG Msr, - IN PLARGE_INTEGER MsrValue) -{ - /* Wrap this in SEH in case the MSR doesn't exist */ - //_SEH2_TRY - { - /* Write to the MSR */ - WRMSR(Msr, MsrValue->QuadPart); - } - //_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - /* Invalid MSR */ - //_SEH2_YIELD(return STATUS_NO_SUCH_DEVICE); - } - //_SEH2_END; - - /* Success */ - return STATUS_SUCCESS; -} - -NTSTATUS -NTAPI -KdpSysReadBusData(IN ULONG BusDataType, - IN ULONG BusNumber, - IN ULONG SlotNumber, - IN ULONG Offset, - IN PVOID Buffer, - IN ULONG Length, - OUT PULONG ActualLength) -{ - /* Just forward to HAL */ - *ActualLength = HalGetBusDataByOffset(BusDataType, - BusNumber, - SlotNumber, - Buffer, - Offset, - Length); - - /* Return status */ - return *ActualLength != 0 ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -KdpSysWriteBusData(IN ULONG BusDataType, - IN ULONG BusNumber, - IN ULONG SlotNumber, - IN ULONG Offset, - IN PVOID Buffer, - IN ULONG Length, - OUT PULONG ActualLength) -{ - /* Just forward to HAL */ - *ActualLength = HalSetBusDataByOffset(BusDataType, - BusNumber, - SlotNumber, - Buffer, - Offset, - Length); - - /* Return status */ - return *ActualLength != 0 ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -KdpSysReadControlSpace(IN ULONG Processor, - IN ULONG64 BaseAddress, - IN PVOID Buffer, - IN ULONG Length, - OUT PULONG ActualLength) -{ - PVOID ControlStart; - ULONG RealLength; - - /* Make sure that this is a valid request */ - if ((BaseAddress < sizeof(KPROCESSOR_STATE)) && - (Processor < KeNumberProcessors)) - { - /* Get the actual length */ - RealLength = sizeof(KPROCESSOR_STATE) - (ULONG_PTR)BaseAddress; - if (RealLength < Length) Length = RealLength; - - /* Set the proper address */ - ControlStart = (PVOID)((ULONG_PTR)BaseAddress + - (ULONG_PTR)&KiProcessorBlock[Processor]-> - ProcessorState); - - /* Read the control state safely */ - return KdpCopyMemoryChunks((ULONG_PTR)Buffer, - ControlStart, - Length, - 0, - MMDBG_COPY_UNSAFE | MMDBG_COPY_WRITE, - ActualLength); - } - else - { - /* Invalid request */ - *ActualLength = 0; - return STATUS_UNSUCCESSFUL; - } -} - -NTSTATUS -NTAPI -KdpSysWriteControlSpace(IN ULONG Processor, - IN ULONG64 BaseAddress, - IN PVOID Buffer, - IN ULONG Length, - OUT PULONG ActualLength) -{ - PVOID ControlStart; - - /* Make sure that this is a valid request */ - if (((BaseAddress + Length) <= sizeof(KPROCESSOR_STATE)) && - (Processor < KeNumberProcessors)) - { - /* Set the proper address */ - ControlStart = (PVOID)((ULONG_PTR)BaseAddress + - (ULONG_PTR)&KiProcessorBlock[Processor]-> - ProcessorState); - - /* Write the control state safely */ - return KdpCopyMemoryChunks((ULONG_PTR)Buffer, - ControlStart, - Length, - 0, - MMDBG_COPY_UNSAFE, - ActualLength); - } - else - { - /* Invalid request */ - *ActualLength = 0; - return STATUS_UNSUCCESSFUL; - } -} - -NTSTATUS -NTAPI -KdpSysReadIoSpace(IN ULONG InterfaceType, - IN ULONG BusNumber, - IN ULONG AddressSpace, - IN ULONG64 IoAddress, - IN PVOID DataValue, - IN ULONG DataSize, - OUT PULONG ActualDataSize) -{ - NTSTATUS Status; - - /* Verify parameters */ - if ((InterfaceType != Isa) || - (BusNumber != 0) || - (AddressSpace != 1)) - { - /* Fail, we don't support this */ - *ActualDataSize = 0; - return STATUS_UNSUCCESSFUL; - } - - /* Check the size */ - switch (DataSize) - { - case sizeof(UCHAR): - - /* Read 1 byte */ - *(PUCHAR)DataValue = - READ_PORT_UCHAR((PUCHAR)(ULONG_PTR)IoAddress); - *ActualDataSize = sizeof(UCHAR); - Status = STATUS_SUCCESS; - break; - - case sizeof(USHORT): - - /* Make sure the address is aligned */ - if ((IoAddress & (sizeof(USHORT) - 1)) != 0) - { - /* It isn't, bail out */ - *ActualDataSize = 0; - Status = STATUS_DATATYPE_MISALIGNMENT; - break; - } - - /* Read 2 bytes */ - *(PUSHORT)DataValue = - READ_PORT_USHORT((PUSHORT)(ULONG_PTR)IoAddress); - *ActualDataSize = sizeof(USHORT); - Status = STATUS_SUCCESS; - break; - - case sizeof(ULONG): - - /* Make sure the address is aligned */ - if ((IoAddress & (sizeof(ULONG) - 1)) != 0) - { - /* It isn't, bail out */ - *ActualDataSize = 0; - Status = STATUS_DATATYPE_MISALIGNMENT; - break; - } - - /* Read 4 bytes */ - *(PULONG)DataValue = - READ_PORT_ULONG((PULONG)(ULONG_PTR)IoAddress); - *ActualDataSize = sizeof(ULONG); - Status = STATUS_SUCCESS; - break; - - default: - - /* Invalid size, fail */ - *ActualDataSize = 0; - Status = STATUS_INVALID_PARAMETER; - } - - /* Return status */ - return Status; -} - -NTSTATUS -NTAPI -KdpSysWriteIoSpace(IN ULONG InterfaceType, - IN ULONG BusNumber, - IN ULONG AddressSpace, - IN ULONG64 IoAddress, - IN PVOID DataValue, - IN ULONG DataSize, - OUT PULONG ActualDataSize) -{ - NTSTATUS Status; - - /* Verify parameters */ - if ((InterfaceType != Isa) || - (BusNumber != 0) || - (AddressSpace != 1)) - { - /* Fail, we don't support this */ - *ActualDataSize = 0; - return STATUS_UNSUCCESSFUL; - } - - /* Check the size */ - switch (DataSize) - { - case sizeof(UCHAR): - - /* Write 1 byte */ - WRITE_PORT_UCHAR((PUCHAR)(ULONG_PTR)IoAddress, - *(PUCHAR)DataValue); - *ActualDataSize = sizeof(UCHAR); - Status = STATUS_SUCCESS; - break; - - case sizeof(USHORT): - - /* Make sure the address is aligned */ - if ((IoAddress & (sizeof(USHORT) - 1)) != 0) - { - /* It isn't, bail out */ - *ActualDataSize = 0; - Status = STATUS_DATATYPE_MISALIGNMENT; - break; - } - - /* Write 2 bytes */ - WRITE_PORT_USHORT((PUSHORT)(ULONG_PTR)IoAddress, - *(PUSHORT)DataValue); - *ActualDataSize = sizeof(USHORT); - Status = STATUS_SUCCESS; - break; - - case sizeof(ULONG): - - /* Make sure the address is aligned */ - if ((IoAddress & (sizeof(ULONG) - 1)) != 0) - { - /* It isn't, bail out */ - *ActualDataSize = 0; - Status = STATUS_DATATYPE_MISALIGNMENT; - break; - } - - /* Write 4 bytes */ - WRITE_PORT_ULONG((PULONG)(ULONG_PTR)IoAddress, - *(PULONG)DataValue); - *ActualDataSize = sizeof(ULONG); - Status = STATUS_SUCCESS; - break; - - default: - - /* Invalid size, fail */ - *ActualDataSize = 0; - Status = STATUS_INVALID_PARAMETER; - } - - /* Return status */ - return Status; -} - -NTSTATUS -NTAPI -KdpSysCheckLowMemory(IN ULONG Flags) -{ - /* Stubbed as we don't support PAE */ - return STATUS_UNSUCCESSFUL; -} Copied: trunk/reactos/ntoskrnl/kd64/i386/kdx86.c (from r43987, trunk/reactos/ntoskrnl/kd64/i386/kdsup.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/i386/kdx86.c…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/i386/kdsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/i386/kdx86.c [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS Kernel * LICENSE: GPL - See COPYING in the top level directory - * FILE: ntoskrnl/kd64/i386/kdsup.c + * FILE: ntoskrnl/kd64/i386/kdx86.c * PURPOSE: KD support routines for x86 * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) * Stefan Ginsberg (stefan.ginsberg(a)reactos.org) @@ -421,3 +421,28 @@ /* Stubbed as we don't support PAE */ return STATUS_UNSUCCESSFUL; } + +NTSTATUS +NTAPI +KdpAllowDisable(VOID) +{ + LONG i; + ULONG Dr7; + + /* Loop every processor */ + for (i = 0; i < KeNumberProcessors; i++) + { + /* Get its DR7 */ + Dr7 = KiProcessorBlock[i]->ProcessorState.SpecialRegisters.KernelDr7; + + /* Check if any processor breakpoints are active */ + if (Dr7 != 0) + { + /* We can't allow running without a debugger then */ + return STATUS_ACCESS_DENIED; + } + } + + /* No processor breakpoints; allow disabling the debugger */ + return STATUS_SUCCESS; +} Modified: trunk/reactos/ntoskrnl/kd64/kdapi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kdapi.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/kdapi.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/kdapi.c [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -112,8 +112,17 @@ } else { - /* FIXME: Check if it's session space */ - Memory->AddressSpace = DBGKD_QUERY_MEMORY_KERNEL; + /* Check if it's session space */ + if (MmIsSessionAddress((PVOID)(ULONG_PTR)Memory->Address)) + { + /* It is */ + Memory->AddressSpace = DBGKD_QUERY_MEMORY_SESSION; + } + else + { + /* Not session space but some other kernel memory */ + Memory->AddressSpace = DBGKD_QUERY_MEMORY_KERNEL; + } } /* Set flags */ @@ -1642,28 +1651,12 @@ return KeQueryPerformanceCounter(NULL); } -NTSTATUS -NTAPI -KdpAllowDisable(VOID) -{ - /* Check if we are on MP */ - if (KeNumberProcessors > 1) - { - /* TODO */ - KdpDprintf("KdpAllowDisable: SMP UNHANDLED\n"); - while (TRUE); - } - - /* Allow disable */ - return STATUS_SUCCESS; -} - BOOLEAN NTAPI KdEnterDebugger(IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame) { - BOOLEAN Entered; + BOOLEAN Enable; /* Check if we have a trap frame */ if (TrapFrame) @@ -1683,7 +1676,7 @@ KeGetCurrentPrcb()->DebuggerSavedIRQL = KeGetCurrentIrql(); /* Freeze all CPUs */ - Entered = KeFreezeExecution(TrapFrame, ExceptionFrame); + Enable = KeFreezeExecution(TrapFrame, ExceptionFrame); /* Lock the port, save the state and set debugger entered */ KdpPortLocked = KeTryToAcquireSpinLockAtDpcLevel(&KdpDebuggerLock); @@ -1707,13 +1700,13 @@ /* Make sure we acquired the port */ if (!KdpPortLocked) KdpDprintf("Port lock was not acquired!\n"); - /* Return enter state */ - return Entered; -} - -VOID -NTAPI -KdExitDebugger(IN BOOLEAN Entered) + /* Return if interrupts needs to be re-enabled */ + return Enable; +} + +VOID +NTAPI +KdExitDebugger(IN BOOLEAN Enable) { ULONG TimeSlip; @@ -1722,7 +1715,7 @@ if (KdpPortLocked) KdpPortUnlock(); /* Unfreeze the CPUs */ - KeThawExecution(Entered); + KeThawExecution(Enable); /* Compare time with the one from KdEnterDebugger */ if (!KdTimerStop.QuadPart) @@ -2048,7 +2041,7 @@ NTAPI KdRefreshDebuggerNotPresent(VOID) { - BOOLEAN Entered, DebuggerNotPresent; + BOOLEAN Enable, DebuggerNotPresent; /* Check if the debugger is completely disabled */ if (KdPitchDebugger) @@ -2058,7 +2051,7 @@ } /* Enter the debugger */ - Entered = KdEnterDebugger(NULL, NULL); + Enable = KdEnterDebugger(NULL, NULL); /* * Attempt to send a string to the debugger to refresh the @@ -2070,7 +2063,7 @@ DebuggerNotPresent = KdDebuggerNotPresent; /* Exit the debugger and return the state */ - KdExitDebugger(Entered); + KdExitDebugger(Enable); return DebuggerNotPresent; } Modified: trunk/reactos/ntoskrnl/kd64/kdprint.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kdprint.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/kdprint.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/kdprint.c [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -130,14 +130,14 @@ IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame) { - BOOLEAN Entered; + BOOLEAN Enable; PKPRCB Prcb = KeGetCurrentPrcb(); /* Check if we need to do anything */ if ((PreviousMode != KernelMode) || (KdDebuggerNotPresent)) return; /* Enter the debugger */ - Entered = KdEnterDebugger(TrapFrame, ExceptionFrame); + Enable = KdEnterDebugger(TrapFrame, ExceptionFrame); /* Save the CPU Control State and save the context */ KiSaveProcessorControlState(&Prcb->ProcessorState); @@ -157,7 +157,7 @@ KiRestoreProcessorControlState(&Prcb->ProcessorState); /* Exit the debugger and return */ - KdExitDebugger(Entered); + KdExitDebugger(Enable); } VOID @@ -170,14 +170,14 @@ IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame) { - BOOLEAN Entered; + BOOLEAN Enable; PKPRCB Prcb = KeGetCurrentPrcb(); /* Check if we need to do anything */ if ((PreviousMode != KernelMode) || (KdDebuggerNotPresent)) return; /* Enter the debugger */ - Entered = KdEnterDebugger(TrapFrame, ExceptionFrame); + Enable = KdEnterDebugger(TrapFrame, ExceptionFrame); /* Save the CPU Control State and save the context */ KiSaveProcessorControlState(&Prcb->ProcessorState); @@ -198,7 +198,7 @@ KiRestoreProcessorControlState(&Prcb->ProcessorState); /* Exit the debugger and return */ - KdExitDebugger(Entered); + KdExitDebugger(Enable); } USHORT @@ -212,7 +212,7 @@ IN PKEXCEPTION_FRAME ExceptionFrame) { STRING PromptBuffer, ResponseBuffer; - BOOLEAN Entered, Resend; + BOOLEAN Enable, Resend; /* Normalize the lengths */ PromptLength = min(PromptLength, 512); @@ -235,7 +235,7 @@ //KdLogDbgPrint(&PromptBuffer); /* Enter the debugger */ - Entered = KdEnterDebugger(TrapFrame, ExceptionFrame); + Enable = KdEnterDebugger(TrapFrame, ExceptionFrame); /* Enter prompt loop */ do @@ -247,7 +247,7 @@ } while (Resend); /* Exit the debugger */ - KdExitDebugger(Entered); + KdExitDebugger(Enable); /* Return the number of characters received */ return ResponseBuffer.Length; @@ -262,14 +262,14 @@ IN KPROCESSOR_MODE PreviousMode, IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame, - OUT PBOOLEAN Status) + OUT PBOOLEAN Handled) { NTSTATUS ReturnStatus; - BOOLEAN Entered; + BOOLEAN Enable; STRING OutputString; /* Assume failure */ - *Status = FALSE; + *Handled = FALSE; /* Validate the mask */ if (Level < 32) Level = 1 << Level; @@ -278,7 +278,7 @@ !(*KdComponentTable[ComponentId] & Level))) { /* Mask validation failed */ - *Status = TRUE; + *Handled = TRUE; return STATUS_SUCCESS; } @@ -302,12 +302,12 @@ if (KdDebuggerNotPresent) { /* Fail */ - *Status = TRUE; + *Handled = TRUE; return STATUS_DEVICE_NOT_CONNECTED; } /* Enter the debugger */ - Entered = KdEnterDebugger(TrapFrame, ExceptionFrame); + Enable = KdEnterDebugger(TrapFrame, ExceptionFrame); /* Print the string */ if (KdpPrintString(&OutputString)) @@ -322,8 +322,8 @@ } /* Exit the debugger and return */ - KdExitDebugger(Entered); - *Status = TRUE; + KdExitDebugger(Enable); + *Handled = TRUE; return ReturnStatus; } Modified: trunk/reactos/ntoskrnl/kd64/kdtrap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kdtrap.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/kdtrap.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/kdtrap.c [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -22,20 +22,24 @@ // // EBX/EDI on x86 // -#define KdpGetFirstParameter(Context) ((Context)->Ebx) -#define KdpGetSecondParameter(Context) ((Context)->Edi) +#define KdpGetParameterThree(Context) ((Context)->Ebx) +#define KdpGetParameterFour(Context) ((Context)->Edi) #elif defined(_AMD64_) // // R8/R9 on AMD64 // -#define KdpGetFirstParameter(Context) ((Context)->R8) -#define KdpGetSecondParameter(Context) ((Context)->R9) +#define KdpGetParameterThree(Context) ((Context)->R8) +#define KdpGetParameterFour(Context) ((Context)->R9) #elif defined(_ARM_) -#error Yo Ninjas! +// +// R3/R4 on ARM +// +#define KdpGetParameterThree(Context) ((Context)->R3) +#define KdpGetParameterFour(Context) ((Context)->R4) #else #error Unsupported Architecture @@ -52,7 +56,7 @@ IN KPROCESSOR_MODE PreviousMode, IN BOOLEAN SecondChanceException) { - BOOLEAN Entered, Status; + BOOLEAN Enable, Handled; PKPRCB Prcb; NTSTATUS ExceptionCode = ExceptionRecord->ExceptionCode; @@ -95,7 +99,7 @@ } /* Enter the debugger */ - Entered = KdEnterDebugger(TrapFrame, ExceptionFrame); + Enable = KdEnterDebugger(TrapFrame, ExceptionFrame); /* * Get the KPRCB and save the CPU Control State manually instead of @@ -108,10 +112,10 @@ sizeof(CONTEXT)); /* Report the new state */ - Status = KdpReportExceptionStateChange(ExceptionRecord, - &Prcb->ProcessorState. - ContextFrame, - SecondChanceException); + Handled = KdpReportExceptionStateChange(ExceptionRecord, + &Prcb->ProcessorState. + ContextFrame, + SecondChanceException); /* Now restore the processor state, manually again. */ RtlCopyMemory(ContextRecord, @@ -120,9 +124,9 @@ KiRestoreProcessorControlState(&Prcb->ProcessorState); /* Exit the debugger and clear the CTRL-C state */ - KdExitDebugger(Entered); + KdExitDebugger(Enable); KdpControlCPressed = FALSE; - return Status; + return Handled; } BOOLEAN @@ -136,7 +140,7 @@ { BOOLEAN Unload = FALSE; ULONG_PTR ProgramCounter; - BOOLEAN Status = FALSE; + BOOLEAN Handled; NTSTATUS ReturnStatus; USHORT ReturnLength; @@ -158,8 +162,8 @@ case BREAKPOINT_PRINT: /* Call the worker routine */ - ReturnStatus = KdpPrint((ULONG)KdpGetFirstParameter(ContextRecord), - (ULONG)KdpGetSecondParameter(ContextRecord), + ReturnStatus = KdpPrint((ULONG)KdpGetParameterThree(ContextRecord), + (ULONG)KdpGetParameterFour(ContextRecord), (LPSTR)ExceptionRecord-> ExceptionInformation[1], (USHORT)ExceptionRecord-> @@ -167,7 +171,7 @@ PreviousMode, TrapFrame, ExceptionFrame, - &Status); + &Handled); /* Update the return value for the caller */ KeSetContextReturnRegister(ContextRecord, ReturnStatus); @@ -181,12 +185,12 @@ ExceptionInformation[1], (USHORT)ExceptionRecord-> ExceptionInformation[2], - (LPSTR)KdpGetFirstParameter(ContextRecord), - (USHORT)KdpGetSecondParameter(ContextRecord), + (LPSTR)KdpGetParameterThree(ContextRecord), + (USHORT)KdpGetParameterFour(ContextRecord), PreviousMode, TrapFrame, ExceptionFrame); - Status = TRUE; + Handled = TRUE; /* Update the return value for the caller */ KeSetContextReturnRegister(ContextRecord, ReturnLength); @@ -211,7 +215,7 @@ ContextRecord, TrapFrame, ExceptionFrame); - Status = TRUE; + Handled = TRUE; break; /* DbgCommandString */ @@ -226,12 +230,13 @@ ContextRecord, TrapFrame, ExceptionFrame); - Status = TRUE; + Handled = TRUE; /* Anything else, do nothing */ default: - /* Get out */ + /* Invalid debug service! Don't handle this! */ + Handled = FALSE; break; } @@ -249,16 +254,16 @@ else { /* Call the worker routine */ - Status = KdpReport(TrapFrame, - ExceptionFrame, - ExceptionRecord, - ContextRecord, - PreviousMode, - SecondChanceException); + Handled = KdpReport(TrapFrame, + ExceptionFrame, + ExceptionRecord, + ContextRecord, + PreviousMode, + SecondChanceException); } /* Return TRUE or FALSE to caller */ - return Status; + return Handled; } BOOLEAN Modified: trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kdbg/kdb_symbols.…
============================================================================== --- trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -529,10 +529,9 @@ LdrEntry = CONTAINING_RECORD(PsLoadedModuleList.Flink, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks); KdbSymProcessSymbols(LdrEntry); - /* Also load them for HAL.DLL. - This module has no fixed position, so search for it. */ - if(KdbpSymFindModule(NULL, L"HAL.DLL", -1, &LdrEntry)) - KdbSymProcessSymbols(LdrEntry); + /* Also load them for HAL.DLL. */ + LdrEntry = CONTAINING_RECORD(PsLoadedModuleList.Flink->Flink, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks); + KdbSymProcessSymbols(LdrEntry); KdbpSymbolsInitialized = TRUE; } Modified: trunk/reactos/ntoskrnl/ke/freeldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/freeldr.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ke/freeldr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/freeldr.c [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -9,10 +9,10 @@ /* INCLUDES *****************************************************************/ #include <ntoskrnl.h> -//#define NDEBUG +#define NDEBUG #include <debug.h> -#ifdef _M_PPC +#if defined(_PPC_) #include <ppcmmu/mmu.h> #define KERNEL_RVA(x) RVA(x,0x80800000) #define KERNEL_DESCRIPTOR_PAGE(x) (((ULONG_PTR)x + KernelBase) >> PAGE_SHIFT) @@ -31,7 +31,6 @@ /* FreeLDR Loader Data */ PROS_LOADER_PARAMETER_BLOCK KeRosLoaderBlock; -BOOLEAN AcpiTableDetected = FALSE; ADDRESS_RANGE KeMemoryMap[64]; ULONG KeMemoryMapRangeCount; @@ -66,8 +65,35 @@ ULONG NumberDescriptors = 0; MEMORY_DESCRIPTOR MDArray[60] = { { 0, 0, 0 }, }; +#if defined(_X86_) + +/* The Boot TSS */ +KTSS KiBootTss; + /* Old boot style IDT */ -KIDTENTRY KiHackIdt[256]; +KIDTENTRY KiBootIdt[256]; + +/* The Boot GDT */ +KGDTENTRY KiBootGdt[256] = +{ + {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}}, /* KGDT_NULL */ + {0xffff, 0x0000, {{0x00, 0x9b, 0xcf, 0x00}}}, /* KGDT_R0_CODE */ + {0xffff, 0x0000, {{0x00, 0x93, 0xcf, 0x00}}}, /* KGDT_R0_DATA */ + {0xffff, 0x0000, {{0x00, 0xfb, 0xcf, 0x00}}}, /* KGDT_R3_CODE */ + {0xffff, 0x0000, {{0x00, 0xf3, 0xcf, 0x00}}}, /* KGDT_R3_DATA*/ + {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}}, /* KGDT_TSS */ + {0x0001, 0xf000, {{0xdf, 0x93, 0xc0, 0xff}}}, /* KGDT_R0_PCR */ + {0x0fff, 0x0000, {{0x00, 0xf3, 0x40, 0x00}}}, /* KGDT_R3_TEB */ + {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}}, /* KGDT_UNUSED */ + {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}}, /* KGDT_LDT */ + {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}}, /* KGDT_DF_TSS */ + {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}} /* KGDT_NMI_TSS */ +}; + +/* GDT Descriptor */ +KDESCRIPTOR KiGdtDescriptor = {0, sizeof(KiBootGdt) - 1, (ULONG)KiBootGdt}; + +#endif /* FUNCTIONS *****************************************************************/ @@ -465,7 +491,7 @@ /* If anything failed until now, return error code */ if (Status != STATUS_SUCCESS) return Status; -#ifdef _M_IX86 +#if defined(_X86_) /* Set the top 16MB region as reserved */ Status = KiRosConfigureArcDescriptor(0xFC0, 0x1000, MemorySpecialMemory); if (Status != STATUS_SUCCESS) return Status; @@ -492,6 +518,7 @@ return Status; } +#if defined(_X86_) VOID NTAPI KiRosBuildReservedMemoryMap(VOID) @@ -560,6 +587,7 @@ } } } +#endif VOID NTAPI @@ -917,12 +945,9 @@ WCHAR PathSetup[] = L"\\SystemRoot\\"; CHAR DriverNameLow[256]; ULONG Base; -#ifdef _M_PPC +#if defined(_PPC_) ULONG KernelBase = RosLoaderBlock->ModsAddr[0].ModStart; #endif - - /* First get some kernel-loader globals */ - AcpiTableDetected = (RosLoaderBlock->Flags & MB_FLAGS_ACPI_TABLE) ? TRUE : FALSE; /* Set the NT Loader block and initialize it */ *NtLoaderBlock = KeLoaderBlock = LoaderBlock = &BldrLoaderBlock; @@ -949,7 +974,7 @@ /* Build entries for ReactOS memory ranges, which uses ARC Descriptors */ KiRosBuildOsMemoryMap(); -#ifdef _M_IX86 +#if defined(_X86_) /* Build entries for the reserved map, which uses ARC Descriptors */ KiRosBuildReservedMemoryMap(); #endif @@ -966,7 +991,7 @@ ModStart = (PVOID)RosEntry->ModStart; ModSize = RosEntry->ModEnd - (ULONG_PTR)ModStart; -#ifdef _M_PPC +#if defined(_PPC_) ModStart -= KernelBase; #endif @@ -1073,7 +1098,7 @@ &Base); } -#ifdef _M_PPC +#if defined(_PPC_) ModStart += 0x80800000; #endif @@ -1138,6 +1163,33 @@ LdrEntry->Flags = LDRP_IMAGE_DLL | LDRP_ENTRY_PROCESSED; if (RosEntry->Reserved) LdrEntry->Flags |= LDRP_ENTRY_INSERTED; + + /* Check if this is HAL */ + if (!(_stricmp(DriverName, "hal.dll"))) + { + /* Check if there is a second entry already */ + if (LoaderBlock->LoadOrderListHead.Flink->Flink != + &LoaderBlock->LoadOrderListHead) + { + PLIST_ENTRY OldSecondEntry; + + /* Get the second entry */ + OldSecondEntry = + LoaderBlock->LoadOrderListHead.Flink->Flink; + + /* Set up our entry correctly */ + LdrEntry->InLoadOrderLinks.Flink = OldSecondEntry; + LdrEntry->InLoadOrderLinks.Blink = OldSecondEntry->Blink; + + /* Make the first entry (always the kernel) point to us */ + LoaderBlock->LoadOrderListHead.Flink->Flink = + &LdrEntry->InLoadOrderLinks; + + /* Make the old entry point back to us and continue looping */ + OldSecondEntry->Blink = &LdrEntry->InLoadOrderLinks; + continue; + } + } /* Insert it into the loader block */ InsertTailList(&LoaderBlock->LoadOrderListHead, @@ -1186,6 +1238,13 @@ /* Now convert to pages */ LoaderBlock->Extension->LoaderPagesSpanned /= PAGE_SIZE; + /* Check if FreeLdr detected a ACPI table */ + if (RosLoaderBlock->Flags & MB_FLAGS_ACPI_TABLE) + { + /* Set the pointer to something for compatibility */ + LoaderBlock->Extension->AcpiTable = (PVOID)1; + } + /* Now setup the setup block if we have one */ if (LoaderBlock->SetupLdrBlock) { @@ -1266,15 +1325,15 @@ { PLOADER_PARAMETER_BLOCK NtLoaderBlock; ULONG size, i = 0, *ent; -#if defined(_M_IX86) +#if defined(_X86_) PKTSS Tss; PKGDTENTRY TssEntry; KDESCRIPTOR IdtDescriptor; __sidt(&IdtDescriptor.Limit); - RtlCopyMemory(KiHackIdt, (PVOID)IdtDescriptor.Base, IdtDescriptor.Limit + 1); - IdtDescriptor.Base = (ULONG)&KiHackIdt; - IdtDescriptor.Limit = sizeof(KiHackIdt) - 1; + RtlCopyMemory(KiBootIdt, (PVOID)IdtDescriptor.Base, IdtDescriptor.Limit + 1); + IdtDescriptor.Base = (ULONG)&KiBootIdt; + IdtDescriptor.Limit = sizeof(KiBootIdt) - 1; /* Load the GDT and IDT */ Ke386SetGlobalDescriptorTable(&KiGdtDescriptor.Limit); Modified: trunk/reactos/ntoskrnl/ke/i386/cpu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/cpu.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/cpu.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/cpu.c [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -14,34 +14,11 @@ /* GLOBALS *******************************************************************/ -/* The Boot TSS */ -KTSS KiBootTss; - /* The TSS to use for Double Fault Traps (INT 0x9) */ UCHAR KiDoubleFaultTSS[KTSS_IO_MAPS]; /* The TSS to use for NMI Fault Traps (INT 0x2) */ UCHAR KiNMITSS[KTSS_IO_MAPS]; - -/* The Boot GDT */ -KGDTENTRY KiBootGdt[256] = -{ - {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}}, /* KGDT_NULL */ - {0xffff, 0x0000, {{0x00, 0x9b, 0xcf, 0x00}}}, /* KGDT_R0_CODE */ - {0xffff, 0x0000, {{0x00, 0x93, 0xcf, 0x00}}}, /* KGDT_R0_DATA */ - {0xffff, 0x0000, {{0x00, 0xfb, 0xcf, 0x00}}}, /* KGDT_R3_CODE */ - {0xffff, 0x0000, {{0x00, 0xf3, 0xcf, 0x00}}}, /* KGDT_R3_DATA*/ - {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}}, /* KGDT_TSS */ - {0x0001, 0xf000, {{0xdf, 0x93, 0xc0, 0xff}}}, /* KGDT_R0_PCR */ - {0x0fff, 0x0000, {{0x00, 0xf3, 0x40, 0x00}}}, /* KGDT_R3_TEB */ - {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}}, /* KGDT_UNUSED */ - {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}}, /* KGDT_LDT */ - {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}}, /* KGDT_DF_TSS */ - {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}} /* KGDT_NMI_TSS */ -}; - -/* GDT Descriptor */ -KDESCRIPTOR KiGdtDescriptor = {0, sizeof(KiBootGdt) - 1, (ULONG)KiBootGdt}; /* CPU Features and Flags */ ULONG KeI386CpuType; Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/exp.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/exp.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/exp.c [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -53,7 +53,6 @@ { ULONG i; USHORT FlippedSelector; - extern KIDTENTRY KiIdt[MAXIMUM_IDTVECTOR]; /* Loop the IDT */ for (i = 0; i <= MAXIMUM_IDTVECTOR; i++) Modified: trunk/reactos/ntoskrnl/mm/mmdbg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mmdbg.c?rev=44…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mmdbg.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/mmdbg.c [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -19,6 +19,16 @@ BOOLEAN MiDbgReadyForPhysical = FALSE; /* FUNCTIONS ******************************************************************/ + +BOOLEAN +NTAPI +MmIsSessionAddress(IN PVOID Address) +{ + // + // No session space support yet + // + return FALSE; +} PVOID NTAPI @@ -217,6 +227,11 @@ TargetAddress); return STATUS_UNSUCCESSFUL; } + + // + // No session space support yet + // + ASSERT(MmIsSessionAddress(TargetAddress) == FALSE); } // Modified: trunk/reactos/ntoskrnl/mm/sysldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/sysldr.c?rev=4…
============================================================================== --- trunk/reactos/ntoskrnl/mm/sysldr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/sysldr.c [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -32,7 +32,6 @@ KSPIN_LOCK PsLoadedModuleSpinLock; ULONG_PTR PsNtosImageBase; KMUTANT MmSystemLoadLock; -extern ULONG NtGlobalFlag; PVOID MmUnloadedDrivers; PVOID MmLastUnloadedDrivers; @@ -997,7 +996,7 @@ /* Now add the import name and null-terminate it */ RtlAppendStringToString((PSTRING)&DllName, (PSTRING)&NameString); - DllName.Buffer[(DllName.MaximumLength - 1) / 2] = UNICODE_NULL; + DllName.Buffer[(DllName.MaximumLength - 1) / sizeof(WCHAR)] = UNICODE_NULL; /* Load the image */ Status = MmLoadSystemImage(&DllName, @@ -1220,7 +1219,7 @@ /* Debug info */ DPRINT("[Mm0]: Driver at: %p ending at: %p for module: %wZ\n", LdrEntry->DllBase, - (ULONG_PTR)LdrEntry->DllBase+ LdrEntry->SizeOfImage, + (ULONG_PTR)LdrEntry->DllBase + LdrEntry->SizeOfImage, &LdrEntry->FullDllName); /* Skip kernel and HAL */ @@ -1315,7 +1314,7 @@ LdrEntry->SizeOfImage); /* Update the loader entry */ - LdrEntry->Flags |= 0x01000000; + LdrEntry->Flags |= LDRP_SYSTEM_MAPPED; LdrEntry->EntryPoint = (PVOID)((ULONG_PTR)NewImageAddress + NtHeader->OptionalHeader.AddressOfEntryPoint); LdrEntry->SizeOfImage = LdrEntry->SizeOfImage; @@ -1551,9 +1550,6 @@ if (!PsGetCurrentProcess()->ProcessInSession) return STATUS_NO_MEMORY; } - if (ModuleObject) *ModuleObject = NULL; - if (ImageBaseAddress) *ImageBaseAddress = NULL; - /* Allocate a buffer we'll use for names */ Buffer = ExAllocatePoolWithTag(NonPagedPool, MAX_PATH, TAG_LDR_WSTR); if (!Buffer) return STATUS_INSUFFICIENT_RESOURCES; @@ -1644,8 +1640,8 @@ if (!Flags) { /* It wasn't, so just return the data */ - if (ModuleObject) *ModuleObject = LdrEntry; - if (ImageBaseAddress) *ImageBaseAddress = LdrEntry->DllBase; + *ModuleObject = LdrEntry; + *ImageBaseAddress = LdrEntry->DllBase; Status = STATUS_IMAGE_ALREADY_LOADED; } else @@ -1818,7 +1814,7 @@ (NtHeader->OptionalHeader.MajorImageVersion >= 5)) { /* Mark this image as a native image */ - LdrEntry->Flags |= 0x80000000; + LdrEntry->Flags |= LDRP_ENTRY_NATIVE; } /* Setup the rest of the entry */ @@ -1838,7 +1834,7 @@ RtlCopyMemory(LdrEntry->BaseDllName.Buffer, BaseName.Buffer, BaseName.Length); - LdrEntry->BaseDllName.Buffer[BaseName.Length / 2] = UNICODE_NULL; + LdrEntry->BaseDllName.Buffer[BaseName.Length / sizeof(WCHAR)] = UNICODE_NULL; /* Now allocate the full name */ LdrEntry->FullDllName.Buffer = ExAllocatePoolWithTag(PagedPool, @@ -1861,7 +1857,7 @@ RtlCopyMemory(LdrEntry->FullDllName.Buffer, PrefixName.Buffer, PrefixName.Length); - LdrEntry->FullDllName.Buffer[PrefixName.Length / 2] = UNICODE_NULL; + LdrEntry->FullDllName.Buffer[PrefixName.Length / sizeof(WCHAR)] = UNICODE_NULL; } /* Add the entry */ @@ -1919,11 +1915,11 @@ PspRunLoadImageNotifyRoutines(FileName, NULL, &ImageInfo); } - /* Check if there's symbols */ -#ifdef KDBG - /* If KDBG is defined, then we always have symbols */ +#if defined(KDBG) || defined(_WINKD_) + /* MiCacheImageSymbols doesn't detect rossym */ if (TRUE) #else + /* Check if there's symbols */ if (MiCacheImageSymbols(LdrEntry->DllBase)) #endif { @@ -1960,8 +1956,8 @@ ASSERT(Section == NULL); /* Return pointers */ - if (ModuleObject) *ModuleObject = LdrEntry; - if (ImageBaseAddress) *ImageBaseAddress = LdrEntry->DllBase; + *ModuleObject = LdrEntry; + *ImageBaseAddress = LdrEntry->DllBase; Quickie: /* If we have a file handle, close it */ @@ -1995,7 +1991,6 @@ ANSI_STRING AnsiRoutineName; NTSTATUS Status; PLIST_ENTRY NextEntry; - extern LIST_ENTRY PsLoadedModuleList; PLDR_DATA_TABLE_ENTRY LdrEntry; BOOLEAN Found = FALSE; UNICODE_STRING KernelName = RTL_CONSTANT_STRING(L"ntoskrnl.exe"); Modified: trunk/reactos/ntoskrnl/po/power.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/po/power.c?rev=44…
============================================================================== --- trunk/reactos/ntoskrnl/po/power.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/po/power.c [iso-8859-1] Sun Nov 8 02:13:49 2009 @@ -14,8 +14,6 @@ #include <debug.h> /* GLOBALS *******************************************************************/ - -extern ULONG ExpInitialiationPhase; typedef struct _REQUEST_POWER_ITEM { @@ -126,8 +124,7 @@ BOOLEAN NTAPI -PoInitSystem(IN ULONG BootPhase, - IN BOOLEAN HaveAcpiTable) +PoInitSystem(IN ULONG BootPhase) { PVOID NotificationEntry; PCHAR CommandLine; @@ -164,8 +161,8 @@ } else { - /* Otherwise check the LoaderBlock's Flag */ - PopAcpiPresent = HaveAcpiTable; + /* Otherwise check if the LoaderBlock has a ACPI Table */ + PopAcpiPresent = KeLoaderBlock->Extension->AcpiTable != NULL ? TRUE : FALSE; } return TRUE;
15 years, 5 months
1
0
0
0
[sginsberg] 44022: - Add HAL PCI tables required for future work.
by sginsberg@svn.reactos.org
Author: sginsberg Date: Sun Nov 8 01:22:29 2009 New Revision: 44022 URL:
http://svn.reactos.org/svn/reactos?rev=44022&view=rev
Log: - Add HAL PCI tables required for future work. Added: trunk/reactos/hal/halx86/generic/bus/pcidata.c (with props) Modified: trunk/reactos/hal/halx86/hal_generic.rbuild trunk/reactos/hal/halx86/hal_generic_amd64.rbuild [This mail would be too long, it was shortened to contain the URLs only.] Added: trunk/reactos/hal/halx86/generic/bus/pcidata.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/bus/pci…
Modified: trunk/reactos/hal/halx86/hal_generic.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/hal_generic.rbu…
Modified: trunk/reactos/hal/halx86/hal_generic_amd64.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/hal_generic_amd…
15 years, 5 months
1
0
0
0
[cgutman] 44021: - Stop using the TCPLock to protect all entries into the IP lib - Instead use TCPLock only to protect entries into oskittcp
by cgutman@svn.reactos.org
Author: cgutman Date: Sat Nov 7 21:41:57 2009 New Revision: 44021 URL:
http://svn.reactos.org/svn/reactos?rev=44021&view=rev
Log: - Stop using the TCPLock to protect all entries into the IP lib - Instead use TCPLock only to protect entries into oskittcp Modified: trunk/reactos/drivers/network/tcpip/include/lock.h trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c trunk/reactos/drivers/network/tcpip/tcpip/fileobjs.c trunk/reactos/drivers/network/tcpip/tcpip/lock.c trunk/reactos/drivers/network/tcpip/tcpip/mocklock.c trunk/reactos/lib/drivers/ip/transport/tcp/accept.c trunk/reactos/lib/drivers/ip/transport/tcp/event.c trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c Modified: trunk/reactos/drivers/network/tcpip/include/lock.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/incl…
============================================================================== --- trunk/reactos/drivers/network/tcpip/include/lock.h [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tcpip/include/lock.h [iso-8859-1] Sat Nov 7 21:41:57 2009 @@ -13,8 +13,7 @@ extern VOID TcpipAcquireFastMutex( PFAST_MUTEX Mutex ); extern VOID TcpipReleaseFastMutex( PFAST_MUTEX Mutex ); extern VOID TcpipRecursiveMutexInit( PRECURSIVE_MUTEX RecMutex ); -extern VOID TcpipRecursiveMutexEnter( PRECURSIVE_MUTEX RecMutex, - BOOLEAN ToWrite ); +extern VOID TcpipRecursiveMutexEnter( PRECURSIVE_MUTEX RecMutex ); extern VOID TcpipRecursiveMutexLeave( PRECURSIVE_MUTEX RecMutex ); #endif/*_LOCK_H*/ Modified: trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
============================================================================== --- trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] Sat Nov 7 21:41:57 2009 @@ -352,8 +352,6 @@ /* Get associated connection endpoint file object. Quit if none exists */ - TcpipRecursiveMutexEnter( &TCPLock, TRUE ); - TranContext = IrpSp->FileObject->FsContext; if (!TranContext) { TI_DbgPrint(MID_TRACE, ("Bad transport context.\n")); @@ -384,8 +382,6 @@ } done: - TcpipRecursiveMutexLeave( &TCPLock ); - if (Status != STATUS_PENDING) { DispDataRequestComplete(Irp, Status, 0); } else @@ -464,8 +460,6 @@ IrpSp = IoGetCurrentIrpStackLocation(Irp); DisReq = (PTDI_REQUEST_KERNEL_DISCONNECT)&IrpSp->Parameters; - - TcpipRecursiveMutexEnter( &TCPLock, TRUE ); /* Get associated connection endpoint file object. Quit if none exists */ @@ -492,8 +486,6 @@ Irp ); done: - TcpipRecursiveMutexLeave( &TCPLock ); - if (Status != STATUS_PENDING) { DispDataRequestComplete(Irp, Status, 0); } else @@ -526,8 +518,6 @@ IrpSp = IoGetCurrentIrpStackLocation(Irp); /* Get associated connection endpoint file object. Quit if none exists */ - - TcpipRecursiveMutexEnter( &TCPLock, TRUE ); TranContext = IrpSp->FileObject->FsContext; if (TranContext == NULL) @@ -593,8 +583,6 @@ } done: - TcpipRecursiveMutexLeave( &TCPLock ); - if (Status != STATUS_PENDING) { DispDataRequestComplete(Irp, Status, 0); } else @@ -621,19 +609,15 @@ PTDI_REQUEST_KERNEL_QUERY_INFORMATION Parameters; PTRANSPORT_CONTEXT TranContext; PIO_STACK_LOCATION IrpSp; - NTSTATUS Status; TI_DbgPrint(DEBUG_IRP, ("Called.\n")); IrpSp = IoGetCurrentIrpStackLocation(Irp); Parameters = (PTDI_REQUEST_KERNEL_QUERY_INFORMATION)&IrpSp->Parameters; - - TcpipRecursiveMutexEnter( &TCPLock, TRUE ); TranContext = IrpSp->FileObject->FsContext; if (!TranContext) { TI_DbgPrint(MID_TRACE, ("Bad transport context.\n")); - TcpipRecursiveMutexLeave(&TCPLock); return STATUS_INVALID_PARAMETER; } @@ -651,7 +635,6 @@ (FIELD_OFFSET(TDI_ADDRESS_INFO, Address.Address[0].Address) + sizeof(TDI_ADDRESS_IP))) { TI_DbgPrint(MID_TRACE, ("MDL buffer too small.\n")); - TcpipRecursiveMutexLeave(&TCPLock); return STATUS_BUFFER_TOO_SMALL; } @@ -670,7 +653,6 @@ RtlZeroMemory( &Address->Address[0].Address[0].sin_zero, sizeof(Address->Address[0].Address[0].sin_zero)); - TcpipRecursiveMutexLeave(&TCPLock); return STATUS_SUCCESS; case TDI_CONNECTION_FILE: @@ -681,12 +663,10 @@ RtlZeroMemory( &Address->Address[0].Address[0].sin_zero, sizeof(Address->Address[0].Address[0].sin_zero)); - TcpipRecursiveMutexLeave(&TCPLock); return STATUS_SUCCESS; default: TI_DbgPrint(MIN_TRACE, ("Invalid transport context\n")); - TcpipRecursiveMutexLeave(&TCPLock); return STATUS_INVALID_PARAMETER; } } @@ -701,7 +681,6 @@ (FIELD_OFFSET(TDI_CONNECTION_INFORMATION, RemoteAddress) + sizeof(PVOID))) { TI_DbgPrint(MID_TRACE, ("MDL buffer too small (ptr).\n")); - TcpipRecursiveMutexLeave(&TCPLock); return STATUS_BUFFER_TOO_SMALL; } @@ -721,24 +700,18 @@ default: TI_DbgPrint(MIN_TRACE, ("Invalid transport context\n")); - TcpipRecursiveMutexLeave(&TCPLock); return STATUS_INVALID_PARAMETER; } if (!Endpoint) { TI_DbgPrint(MID_TRACE, ("No connection object.\n")); - TcpipRecursiveMutexLeave(&TCPLock); return STATUS_INVALID_PARAMETER; } - Status = TCPGetSockAddress( Endpoint, AddressInfo->RemoteAddress, TRUE ); - - TcpipRecursiveMutexLeave(&TCPLock); - return Status; + return TCPGetSockAddress( Endpoint, AddressInfo->RemoteAddress, TRUE ); } } - TcpipRecursiveMutexLeave(&TCPLock); return STATUS_NOT_IMPLEMENTED; } @@ -763,8 +736,6 @@ IrpSp = IoGetCurrentIrpStackLocation(Irp); ReceiveInfo = (PTDI_REQUEST_KERNEL_RECEIVE)&(IrpSp->Parameters); - - TcpipRecursiveMutexEnter( &TCPLock, TRUE ); TranContext = IrpSp->FileObject->FsContext; if (TranContext == NULL) @@ -801,8 +772,6 @@ } done: - TcpipRecursiveMutexLeave( &TCPLock ); - if (Status != STATUS_PENDING) { DispDataRequestComplete(Irp, Status, BytesReceived); } else @@ -835,8 +804,6 @@ IrpSp = IoGetCurrentIrpStackLocation(Irp); DgramInfo = (PTDI_REQUEST_KERNEL_RECEIVEDG)&(IrpSp->Parameters); - - TcpipRecursiveMutexEnter( &TCPLock, TRUE ); TranContext = IrpSp->FileObject->FsContext; if (TranContext == NULL) @@ -879,8 +846,6 @@ } done: - TcpipRecursiveMutexLeave( &TCPLock ); - if (Status != STATUS_PENDING) { DispDataRequestComplete(Irp, Status, BytesReceived); } else @@ -912,8 +877,6 @@ IrpSp = IoGetCurrentIrpStackLocation(Irp); SendInfo = (PTDI_REQUEST_KERNEL_SEND)&(IrpSp->Parameters); - - TcpipRecursiveMutexEnter( &TCPLock, TRUE ); TranContext = IrpSp->FileObject->FsContext; if (TranContext == NULL) @@ -955,8 +918,6 @@ } done: - TcpipRecursiveMutexLeave( &TCPLock ); - if (Status != STATUS_PENDING) { DispDataRequestComplete(Irp, Status, BytesSent); } else @@ -988,8 +949,6 @@ IrpSp = IoGetCurrentIrpStackLocation(Irp); DgramInfo = (PTDI_REQUEST_KERNEL_SENDDG)&(IrpSp->Parameters); - - TcpipRecursiveMutexEnter( &TCPLock, TRUE ); TranContext = IrpSp->FileObject->FsContext; if (TranContext == NULL) @@ -1037,8 +996,6 @@ } done: - TcpipRecursiveMutexLeave( &TCPLock ); - if (Status != STATUS_PENDING) { DispDataRequestComplete(Irp, Status, Irp->IoStatus.Information); } else Modified: trunk/reactos/drivers/network/tcpip/tcpip/fileobjs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
============================================================================== --- trunk/reactos/drivers/network/tcpip/tcpip/fileobjs.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tcpip/tcpip/fileobjs.c [iso-8859-1] Sat Nov 7 21:41:57 2009 @@ -382,9 +382,7 @@ case IPPROTO_TCP: TCPFreePort( AddrFile->Port ); if( AddrFile->Listener ) { - TcpipRecursiveMutexEnter(&TCPLock, TRUE); TCPClose( AddrFile->Listener ); - TcpipRecursiveMutexLeave(&TCPLock); exFreePool( AddrFile->Listener ); } break; @@ -425,9 +423,7 @@ if( !Connection ) return STATUS_NO_MEMORY; - TcpipRecursiveMutexEnter(&TCPLock, TRUE); Status = TCPSocket( Connection, AF_INET, SOCK_STREAM, IPPROTO_TCP ); - TcpipRecursiveMutexLeave(&TCPLock); if( !NT_SUCCESS(Status) ) { TCPFreeConnectionEndpoint( Connection ); @@ -500,9 +496,7 @@ RemoveEntryList(&Connection->ListEntry); TcpipReleaseSpinLock(&ConnectionEndpointListLock, OldIrql); - TcpipRecursiveMutexEnter( &TCPLock, TRUE ); TCPClose( Connection ); - TcpipRecursiveMutexLeave( &TCPLock ); TCPFreeConnectionEndpoint(Connection); Modified: trunk/reactos/drivers/network/tcpip/tcpip/lock.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
============================================================================== --- trunk/reactos/drivers/network/tcpip/tcpip/lock.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tcpip/tcpip/lock.c [iso-8859-1] Sat Nov 7 21:41:57 2009 @@ -48,7 +48,7 @@ RecursiveMutexInit( RecMutex ); } -VOID TcpipRecursiveMutexEnter( PRECURSIVE_MUTEX RecMutex, BOOLEAN ToWrite ) { +VOID TcpipRecursiveMutexEnter( PRECURSIVE_MUTEX RecMutex ) { //TI_DbgPrint(DEBUG_LOCK,("Locking\n")); RecursiveMutexEnter( RecMutex ); } Modified: trunk/reactos/drivers/network/tcpip/tcpip/mocklock.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
============================================================================== --- trunk/reactos/drivers/network/tcpip/tcpip/mocklock.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tcpip/tcpip/mocklock.c [iso-8859-1] Sat Nov 7 21:41:57 2009 @@ -48,8 +48,7 @@ VOID TcpipRecursiveMutexInit( PRECURSIVE_MUTEX RecMutex ) { } -UINT TcpipRecursiveMutexEnter( PRECURSIVE_MUTEX RecMutex, BOOL ToWrite ) { - return 0; +VOID TcpipRecursiveMutexEnter( PRECURSIVE_MUTEX RecMutex ) { } VOID TcpipRecursiveMutexLeave( PRECURSIVE_MUTEX RecMutex ) { Modified: trunk/reactos/lib/drivers/ip/transport/tcp/accept.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/t…
============================================================================== --- trunk/reactos/lib/drivers/ip/transport/tcp/accept.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/transport/tcp/accept.c [iso-8859-1] Sat Nov 7 21:41:57 2009 @@ -19,14 +19,14 @@ PTA_IP_ADDRESS RequestAddressReturn; PTDI_CONNECTION_INFORMATION WhoIsConnecting; - ASSERT_LOCKED(&TCPLock); - /* Unpack TDI info -- We need the return connection information * struct to return the address so it can be filtered if needed * by WSAAccept -- The returned address will be passed on to * userland after we complete this irp */ WhoIsConnecting = (PTDI_CONNECTION_INFORMATION) Request->ReturnConnectionInformation; + + TcpipRecursiveMutexEnter(&TCPLock); Status = TCPTranslateError ( OskitTCPAccept( Listener->SocketContext, @@ -35,6 +35,8 @@ sizeof(OutAddr), &OutAddrLen, Request->RequestFlags & TDI_QUERY_ACCEPT ? 0 : 1 ) ); + + TcpipRecursiveMutexLeave(&TCPLock); TI_DbgPrint(DEBUG_TCP,("Status %x\n", Status)); @@ -70,8 +72,6 @@ NTSTATUS Status = STATUS_SUCCESS; SOCKADDR_IN AddressToBind; - TcpipRecursiveMutexEnter( &TCPLock, TRUE ); - ASSERT(Connection); ASSERT_KM_POINTER(Connection->SocketContext); ASSERT_KM_POINTER(Connection->AddressFile); @@ -88,6 +88,8 @@ AddressToBind.sin_port = Connection->AddressFile->Port; TI_DbgPrint(DEBUG_TCP,("AddressToBind - %x:%x\n", AddressToBind.sin_addr, AddressToBind.sin_port)); + + TcpipRecursiveMutexEnter( &TCPLock ); Status = TCPTranslateError( OskitTCPBind( Connection->SocketContext, &AddressToBind, @@ -138,12 +140,8 @@ TI_DbgPrint(DEBUG_TCP,("TCPAccept started\n")); - TcpipRecursiveMutexEnter( &TCPLock, TRUE ); - Status = TCPServiceListeningSocket( Listener, Connection, (PTDI_REQUEST_KERNEL)Request ); - - TcpipRecursiveMutexLeave( &TCPLock ); if( Status == STATUS_PENDING ) { Bucket = exAllocatePool( NonPagedPool, sizeof(*Bucket) ); Modified: trunk/reactos/lib/drivers/ip/transport/tcp/event.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/t…
============================================================================== --- trunk/reactos/lib/drivers/ip/transport/tcp/event.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/transport/tcp/event.c [iso-8859-1] Sat Nov 7 21:41:57 2009 @@ -44,7 +44,15 @@ Connection->SignalState |= NewState; + TcpipRecursiveMutexLeave(&TCPLock); + + /* We must not be locked when handling signalled connections + * because a completion could trigger another IOCTL which + * would cause a deadlock + */ NewState = HandleSignalledConnection(Connection); + + TcpipRecursiveMutexEnter(&TCPLock); KeAcquireSpinLock(&SignalledConnectionsLock, &OldIrql); if ((NewState == 0 || NewState == SEL_FIN) && Modified: trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/t…
============================================================================== --- trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] Sat Nov 7 21:41:57 2009 @@ -27,8 +27,6 @@ PLIST_ENTRY Entry; PIRP Irp; PMDL Mdl; - - ASSERT_LOCKED(&TCPLock); TI_DbgPrint(MID_TRACE,("Handling signalled state on %x (%x)\n", Connection, Connection->SocketContext)); @@ -337,7 +335,7 @@ UINT Family, UINT Type, UINT Proto ) { NTSTATUS Status; - ASSERT_LOCKED(&TCPLock); + TcpipRecursiveMutexEnter(&TCPLock); TI_DbgPrint(DEBUG_TCP,("Called: Connection %x, Family %d, Type %d, " "Proto %d\n", @@ -353,6 +351,8 @@ TI_DbgPrint(DEBUG_TCP,("Connection->SocketContext %x\n", Connection->SocketContext)); + + TcpipRecursiveMutexLeave(&TCPLock); return Status; } @@ -370,7 +370,7 @@ IPPacket->TotalSize, IPPacket->HeaderSize)); - TcpipRecursiveMutexEnter( &TCPLock, TRUE ); + TcpipRecursiveMutexEnter( &TCPLock ); OskitTCPReceiveDatagram( IPPacket->Header, IPPacket->TotalSize, @@ -447,12 +447,13 @@ PsTerminateSystemThread(Status); } - TcpipRecursiveMutexEnter( &TCPLock, TRUE ); + TcpipRecursiveMutexEnter( &TCPLock ); TimerOskitTCP( Next == NextFast, Next == NextSlow ); + TcpipRecursiveMutexLeave( &TCPLock ); + if (Next == NextSlow) { DrainSignals(); } - TcpipRecursiveMutexLeave( &TCPLock ); Current = Next; if (10 <= Current) { @@ -496,7 +497,7 @@ return Status; } - TcpipRecursiveMutexEnter(&TCPLock, TRUE); + TcpipRecursiveMutexEnter(&TCPLock); RegisterOskitTCPEventHandlers( &EventHandlers ); InitOskitTCP(); TcpipRecursiveMutexLeave(&TCPLock); @@ -544,7 +545,9 @@ TCPInitialized = FALSE; + TcpipRecursiveMutexEnter(&TCPLock); DeinitOskitTCP(); + TcpipRecursiveMutexLeave(&TCPLock); PortsShutdown( &TCPPorts ); @@ -597,8 +600,6 @@ TI_DbgPrint(DEBUG_TCP,("TCPConnect: Called\n")); - ASSERT_LOCKED(&TCPLock); - Status = AddrBuildAddress ((PTRANSPORT_ADDRESS)ConnInfo->RemoteAddress, &RemoteAddress, @@ -623,6 +624,8 @@ AddressToConnect.sin_family = AF_INET; AddressToBind = AddressToConnect; AddressToBind.sin_addr.s_addr = NCE->Interface->Unicast.Address.IPv4Address; + + TcpipRecursiveMutexEnter(&TCPLock); Status = TCPTranslateError ( OskitTCPBind( Connection->SocketContext, @@ -655,6 +658,8 @@ } } + TcpipRecursiveMutexLeave(&TCPLock); + return Status; } @@ -671,11 +676,15 @@ TI_DbgPrint(DEBUG_TCP,("started\n")); + TcpipRecursiveMutexEnter(&TCPLock); + if (Flags & TDI_DISCONNECT_RELEASE) Status = TCPTranslateError(OskitTCPDisconnect(Connection->SocketContext)); if ((Flags & TDI_DISCONNECT_ABORT) || !Flags) Status = TCPTranslateError(OskitTCPShutdown(Connection->SocketContext, FWRITE | FREAD)); + + TcpipRecursiveMutexLeave(&TCPLock); TI_DbgPrint(DEBUG_TCP,("finished %x\n", Status)); @@ -688,15 +697,17 @@ TI_DbgPrint(DEBUG_TCP,("TCPClose started\n")); - ASSERT_LOCKED(&TCPLock); - /* Make our code remove all pending IRPs */ Connection->SignalState |= SEL_FIN; HandleSignalledConnection(Connection); + TcpipRecursiveMutexEnter(&TCPLock); + Status = TCPTranslateError( OskitTCPClose( Connection->SocketContext ) ); if (Status == STATUS_SUCCESS) Connection->SocketContext = NULL; + + TcpipRecursiveMutexLeave(&TCPLock); TI_DbgPrint(DEBUG_TCP,("TCPClose finished %x\n", Status)); @@ -719,13 +730,13 @@ TI_DbgPrint(DEBUG_TCP,("Called for %d bytes (on socket %x)\n", ReceiveLength, Connection->SocketContext)); - ASSERT_LOCKED(&TCPLock); - ASSERT_KM_POINTER(Connection->SocketContext); NdisQueryBuffer( Buffer, &DataBuffer, &DataLen ); TI_DbgPrint(DEBUG_TCP,("TCP>|< Got an MDL %x (%x:%d)\n", Buffer, DataBuffer, DataLen)); + + TcpipRecursiveMutexEnter(&TCPLock); Status = TCPTranslateError ( OskitTCPRecv @@ -734,6 +745,8 @@ DataLen, &Received, ReceiveFlags ) ); + + TcpipRecursiveMutexLeave(&TCPLock); TI_DbgPrint(DEBUG_TCP,("OskitTCPReceive: %x, %d\n", Status, Received)); @@ -787,11 +800,14 @@ TI_DbgPrint(DEBUG_TCP,("Connection->SocketContext = %x\n", Connection->SocketContext)); + TcpipRecursiveMutexEnter(&TCPLock); Status = TCPTranslateError ( OskitTCPSend( Connection->SocketContext, (OSK_PCHAR)BufferData, SendLength, &Sent, 0 ) ); + + TcpipRecursiveMutexLeave(&TCPLock); TI_DbgPrint(DEBUG_TCP,("OskitTCPSend: %x, %d\n", Status, Sent)); @@ -850,11 +866,14 @@ PTA_IP_ADDRESS AddressIP = (PTA_IP_ADDRESS)Address; NTSTATUS Status; - ASSERT_LOCKED(&TCPLock); + TcpipRecursiveMutexEnter(&TCPLock); Status = TCPTranslateError(OskitTCPGetAddress(Connection->SocketContext, &LocalAddress, &LocalPort, &RemoteAddress, &RemotePort)); + + TcpipRecursiveMutexLeave(&TCPLock); + if (!NT_SUCCESS(Status)) return Status;
15 years, 5 months
1
0
0
0
[fireball] 44020: - Merge 44019.
by fireball@svn.reactos.org
Author: fireball Date: Sat Nov 7 21:19:08 2009 New Revision: 44020 URL:
http://svn.reactos.org/svn/reactos?rev=44020&view=rev
Log: - Merge 44019. Modified: branches/arwinss/reactos/include/psdk/commctrl.h (contents, props changed) Modified: branches/arwinss/reactos/include/psdk/commctrl.h URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/include/psdk/co…
============================================================================== --- branches/arwinss/reactos/include/psdk/commctrl.h [iso-8859-1] (original) +++ branches/arwinss/reactos/include/psdk/commctrl.h [iso-8859-1] Sat Nov 7 21:19:08 2009 @@ -1595,6 +1595,25 @@ #define TOOLTIPS_CLASSA "tooltips_class32" # define TOOLTIPS_CLASSW L"tooltips_class32" #define TOOLTIPS_CLASS WINELIB_NAME_AW(TOOLTIPS_CLASS) + +#if (_WIN32_WINNT >= 0x501) +#define BUTTON_IMAGELIST_ALIGN_LEFT 0 +#define BUTTON_IMAGELIST_ALIGN_RIGHT 1 +#define BUTTON_IMAGELIST_ALIGN_TOP 2 +#define BUTTON_IMAGELIST_ALIGN_BOTTOM 3 +#define BUTTON_IMAGELIST_ALIGN_CENTER 4 + +typedef struct +{ + HIMAGELIST himl; + RECT margin; + UINT uAlign; +} BUTTON_IMAGELIST, *PBUTTON_IMAGELIST; + +#define BCM_FIRST 0x1600 +#define BCM_GETIDEALSIZE (BCM_FIRST + 1) +#define BCM_SETIMAGELIST (BCM_FIRST + 2) +#endif /* _WIN32_WINNT */ #define INFOTIPSIZE 1024 Propchange: branches/arwinss/reactos/include/psdk/commctrl.h ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Nov 7 21:19:08 2009 @@ -1,2 +1,2 @@ /branches/ros-amd64-bringup/reactos/include/psdk/commctrl.h:34711-34712,34743,34812,34839,34842,34917,35323-35324,35347-35348,35361,35436,35509,35515,35588,35739,35746,35771,35789,35823,35902,35904-35906,35942,35947-35949,35952-35953,35966,36013,36360,36388-36389,36570,36614,36930,37323,37434,37472,37475,37536,37820-37821,37869,37873,37990-37991,38013-38014,38148,38151,38265,38268,39151,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080,43426,43454 -/trunk/reactos/include/psdk/commctrl.h:42000-43670,44013,44015 +/trunk/reactos/include/psdk/commctrl.h:42000-43670,44013,44015,44019
15 years, 5 months
1
0
0
0
[fireball] 44019: - Add defines needed by explorer-new. Fixes build.
by fireball@svn.reactos.org
Author: fireball Date: Sat Nov 7 21:18:04 2009 New Revision: 44019 URL:
http://svn.reactos.org/svn/reactos?rev=44019&view=rev
Log: - Add defines needed by explorer-new. Fixes build. Modified: trunk/reactos/include/psdk/commctrl.h Modified: trunk/reactos/include/psdk/commctrl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/commctrl.h?re…
============================================================================== --- trunk/reactos/include/psdk/commctrl.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/commctrl.h [iso-8859-1] Sat Nov 7 21:18:04 2009 @@ -1595,6 +1595,25 @@ #define TOOLTIPS_CLASSA "tooltips_class32" # define TOOLTIPS_CLASSW L"tooltips_class32" #define TOOLTIPS_CLASS WINELIB_NAME_AW(TOOLTIPS_CLASS) + +#if (_WIN32_WINNT >= 0x501) +#define BUTTON_IMAGELIST_ALIGN_LEFT 0 +#define BUTTON_IMAGELIST_ALIGN_RIGHT 1 +#define BUTTON_IMAGELIST_ALIGN_TOP 2 +#define BUTTON_IMAGELIST_ALIGN_BOTTOM 3 +#define BUTTON_IMAGELIST_ALIGN_CENTER 4 + +typedef struct +{ + HIMAGELIST himl; + RECT margin; + UINT uAlign; +} BUTTON_IMAGELIST, *PBUTTON_IMAGELIST; + +#define BCM_FIRST 0x1600 +#define BCM_GETIDEALSIZE (BCM_FIRST + 1) +#define BCM_SETIMAGELIST (BCM_FIRST + 2) +#endif /* _WIN32_WINNT */ #define INFOTIPSIZE 1024
15 years, 5 months
1
0
0
0
[tkreuzer] 44018: cleanup amd64 specific Mm stubs
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Nov 7 21:06:33 2009 New Revision: 44018 URL:
http://svn.reactos.org/svn/reactos?rev=44018&view=rev
Log: cleanup amd64 specific Mm stubs Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/page.c Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/page.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/page.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/page.c [iso-8859-1] Sat Nov 7 21:06:33 2009 @@ -4,7 +4,7 @@ * FILE: ntoskrnl/mm/amd64/page.c * PURPOSE: Low level memory managment manipulation * - * PROGRAMMERS: David Welch (welch(a)cwcom.net) + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) */ /* INCLUDES ***************************************************************/ @@ -24,32 +24,11 @@ ULONG64 MmGlobalKernelPageDirectory[512]; +/* PRIVATE FUNCTIONS *******************************************************/ + + /* FUNCTIONS ***************************************************************/ -BOOLEAN MmUnmapPageTable(PULONG Pt); - -ULONG_PTR -NTAPI -MiFlushTlbIpiRoutine(ULONG_PTR Address) -{ - UNIMPLEMENTED; - return 0; -} - -VOID -MiFlushTlb(PULONG Pt, PVOID Address) -{ - UNIMPLEMENTED; -} - - -/* -static ULONG -ProtectToPTE(ULONG flProtect) -{ - return 0; -} -*/ NTSTATUS NTAPI Mmi386ReleaseMmInfo(PEPROCESS Process) @@ -77,26 +56,6 @@ return 0; } -VOID -NTAPI -MmDeletePageTable(PEPROCESS Process, PVOID Address) -{ - UNIMPLEMENTED; -} - -VOID -NTAPI -MmFreePageTable(PEPROCESS Process, PVOID Address) -{ - UNIMPLEMENTED; -} - -BOOLEAN MmUnmapPageTable(PULONG Pt) -{ - UNIMPLEMENTED; - return FALSE; -} - PFN_TYPE NTAPI MmGetPfnForProcess(PEPROCESS Process, @@ -137,28 +96,13 @@ } BOOLEAN -Mmi386MakeKernelPageTableGlobal(PVOID PAddress) +NTAPI +MmIsDirtyPage(PEPROCESS Process, PVOID Address) { UNIMPLEMENTED; return FALSE; } -BOOLEAN -NTAPI -MmIsDirtyPage(PEPROCESS Process, PVOID Address) -{ - UNIMPLEMENTED; - return FALSE; -} - -BOOLEAN -NTAPI -MmIsAccessedAndResetAccessPage(PEPROCESS Process, PVOID Address) -{ - UNIMPLEMENTED; - return 0; -} - VOID NTAPI MmSetCleanPage(PEPROCESS Process, PVOID Address) @@ -194,17 +138,6 @@ { UNIMPLEMENTED; return 0; -} - -NTSTATUS -NTAPI -MmCreateVirtualMappingForKernel(PVOID Address, - ULONG flProtect, - PPFN_TYPE Pages, - ULONG PageCount) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; } NTSTATUS @@ -257,9 +190,6 @@ UNIMPLEMENTED; } -/* - * @implemented - */ PHYSICAL_ADDRESS NTAPI MmGetPhysicalAddress(PVOID vaddr) @@ -267,14 +197,6 @@ PHYSICAL_ADDRESS ret = {{0}}; UNIMPLEMENTED; return ret; -} - -PFN_TYPE -NTAPI -MmChangeHyperspaceMapping(PVOID Address, PFN_TYPE NewPage) -{ - UNIMPLEMENTED; - return 0; } VOID @@ -322,12 +244,5 @@ UNIMPLEMENTED; } -VOID -INIT_FUNCTION -NTAPI -MiInitPageDirectoryMap(VOID) -{ - UNIMPLEMENTED; -} /* EOF */
15 years, 5 months
1
0
0
0
[fireball] 44017: - Fully sync comctl32 with Wine-1.1.32 removing all ReactOS-specific hacks. - TOOLTIPS_NotifyFormat implementation remains.
by fireball@svn.reactos.org
Author: fireball Date: Sat Nov 7 21:02:44 2009 New Revision: 44017 URL:
http://svn.reactos.org/svn/reactos?rev=44017&view=rev
Log: - Fully sync comctl32 with Wine-1.1.32 removing all ReactOS-specific hacks. - TOOLTIPS_NotifyFormat implementation remains. Modified: branches/arwinss/reactos/dll/win32/comctl32/comboex.c branches/arwinss/reactos/dll/win32/comctl32/comctl32.h branches/arwinss/reactos/dll/win32/comctl32/comctl_Bg.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Cs.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_De.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_El.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_En.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Eo.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Es.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Fr.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Hu.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_It.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Ja.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Ko.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Lt.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Nl.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_No.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Pl.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Pt.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Ro.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Ru.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Si.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Sk.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Sv.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Th.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Tr.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Uk.rc branches/arwinss/reactos/dll/win32/comctl32/comctl_Zh.rc branches/arwinss/reactos/dll/win32/comctl32/datetime.c branches/arwinss/reactos/dll/win32/comctl32/header.c branches/arwinss/reactos/dll/win32/comctl32/imagelist.c branches/arwinss/reactos/dll/win32/comctl32/ipaddress.c branches/arwinss/reactos/dll/win32/comctl32/listview.c branches/arwinss/reactos/dll/win32/comctl32/monthcal.c branches/arwinss/reactos/dll/win32/comctl32/propsheet.c branches/arwinss/reactos/dll/win32/comctl32/rsrc.rc branches/arwinss/reactos/dll/win32/comctl32/syslink.c branches/arwinss/reactos/dll/win32/comctl32/tab.c branches/arwinss/reactos/dll/win32/comctl32/toolbar.c branches/arwinss/reactos/dll/win32/comctl32/tooltips.c branches/arwinss/reactos/dll/win32/comctl32/treeview.c branches/arwinss/reactos/dll/win32/comctl32/updown.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/arwinss/reactos/dll/win32/comctl32/comboex.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl32.h URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Bg.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Cs.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_De.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_El.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_En.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Eo.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Es.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Fr.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Hu.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_It.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Ja.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Ko.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Lt.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Nl.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_No.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Pl.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Pt.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Ro.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Ru.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Si.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Sk.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Sv.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Th.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Tr.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Uk.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/comctl_Zh.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/datetime.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/header.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/imagelist.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/ipaddress.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/listview.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/monthcal.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/propsheet.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/syslink.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/tab.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/toolbar.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/tooltips.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/treeview.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
Modified: branches/arwinss/reactos/dll/win32/comctl32/updown.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/comct…
15 years, 5 months
1
0
0
0
[fireball] 44016: - Merge r44013 and r44015 from trunk (commctrl.h updates).
by fireball@svn.reactos.org
Author: fireball Date: Sat Nov 7 20:56:54 2009 New Revision: 44016 URL:
http://svn.reactos.org/svn/reactos?rev=44016&view=rev
Log: - Merge r44013 and r44015 from trunk (commctrl.h updates). Modified: branches/arwinss/reactos/include/psdk/commctrl.h (contents, props changed) Modified: branches/arwinss/reactos/include/psdk/commctrl.h URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/include/psdk/co…
============================================================================== --- branches/arwinss/reactos/include/psdk/commctrl.h [iso-8859-1] (original) +++ branches/arwinss/reactos/include/psdk/commctrl.h [iso-8859-1] Sat Nov 7 20:56:54 2009 @@ -568,6 +568,7 @@ } IMAGELISTDRAWPARAMS, *LPIMAGELISTDRAWPARAMS; +HRESULT WINAPI HIMAGELIST_QueryInterface(HIMAGELIST,REFIID,void **); INT WINAPI ImageList_Add(HIMAGELIST,HBITMAP,HBITMAP); INT WINAPI ImageList_AddMasked(HIMAGELIST,HBITMAP,COLORREF); BOOL WINAPI ImageList_BeginDrag(HIMAGELIST,INT,INT,INT); @@ -1595,25 +1596,6 @@ # define TOOLTIPS_CLASSW L"tooltips_class32" #define TOOLTIPS_CLASS WINELIB_NAME_AW(TOOLTIPS_CLASS) -#if (_WIN32_WINNT >= 0x501) -#define BUTTON_IMAGELIST_ALIGN_LEFT 0 -#define BUTTON_IMAGELIST_ALIGN_RIGHT 1 -#define BUTTON_IMAGELIST_ALIGN_TOP 2 -#define BUTTON_IMAGELIST_ALIGN_BOTTOM 3 -#define BUTTON_IMAGELIST_ALIGN_CENTER 4 - -typedef struct -{ - HIMAGELIST himl; - RECT margin; - UINT uAlign; -} BUTTON_IMAGELIST, *PBUTTON_IMAGELIST; - -#define BCM_FIRST 0x1600 -#define BCM_GETIDEALSIZE (BCM_FIRST + 1) -#define BCM_SETIMAGELIST (BCM_FIRST + 2) -#endif /* _WIN32_WINNT */ - #define INFOTIPSIZE 1024 #define TTS_ALWAYSTIP 0x01 @@ -1749,6 +1731,10 @@ #define TTTOOLINFOA_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpszText) #define TTTOOLINFOW_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpszText) #define TTTOOLINFO_V1_SIZE CCSIZEOF_STRUCT(WINELIB_NAME_AW(TTTOOLINFO), lpszText) +#define TTTOOLINFOA_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lParam) +#define TTTOOLINFOW_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lParam) +#define TTTOOLINFOA_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpReserved) +#define TTTOOLINFOW_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpReserved) typedef struct _TT_HITTESTINFOA { @@ -4237,9 +4223,10 @@ #define TCN_FIRST (0U-550U) #define TCN_LAST (0U-580U) #define TCN_KEYDOWN (TCN_FIRST - 0) -#define TCN_SELCHANGE (TCN_FIRST - 1) +#define TCN_SELCHANGE (TCN_FIRST - 1) #define TCN_SELCHANGING (TCN_FIRST - 2) #define TCN_GETOBJECT (TCN_FIRST - 3) +#define TCN_FOCUSCHANGE (TCN_FIRST - 4) #include <pshpack1.h> typedef struct tagTCKEYDOWN @@ -4642,6 +4629,7 @@ #define MCS_WEEKNUMBERS 0x0004 #define MCS_NOTODAY 0x0010 #define MCS_NOTODAYCIRCLE 0x0008 +#define MCS_NOTRAILINGDATES 0x0040 #define MCHT_TITLE 0x00010000 #define MCHT_CALENDAR 0x00020000 @@ -4677,7 +4665,14 @@ POINT pt; UINT uHit; SYSTEMTIME st; + /* Vista */ + RECT rc; + INT iOffset; + INT iRow; + INT iCol; } MCHITTESTINFO, *PMCHITTESTINFO; + +#define MCHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(MCHITTESTINFO, st) typedef struct tagNMSELCHANGE { @@ -4701,51 +4696,51 @@ /* macros */ #define MonthCal_GetCurSel(hmc, pst) \ - (BOOL)SNDMSGA(hmc, MCM_GETCURSEL, 0, (LPARAM)(pst)) + (BOOL)SNDMSG(hmc, MCM_GETCURSEL, 0, (LPARAM)(pst)) #define MonthCal_SetCurSel(hmc, pst) \ - (BOOL)SNDMSGA(hmc, MCM_SETCURSEL, 0, (LPARAM)(pst)) + (BOOL)SNDMSG(hmc, MCM_SETCURSEL, 0, (LPARAM)(pst)) #define MonthCal_GetMaxSelCount(hmc) \ - (DWORD)SNDMSGA(hmc, MCM_GETMAXSELCOUNT, 0, 0L) + (DWORD)SNDMSG(hmc, MCM_GETMAXSELCOUNT, 0, 0L) #define MonthCal_SetMaxSelCount(hmc, n) \ - (BOOL)SNDMSGA(hmc, MCM_SETMAXSELCOUNT, (WPARAM)(n), 0L) + (BOOL)SNDMSG(hmc, MCM_SETMAXSELCOUNT, (WPARAM)(n), 0L) #define MonthCal_GetSelRange(hmc, rgst) \ - SNDMSGA(hmc, MCM_GETSELRANGE, 0, (LPARAM) (rgst)) + SNDMSG(hmc, MCM_GETSELRANGE, 0, (LPARAM) (rgst)) #define MonthCal_SetSelRange(hmc, rgst) \ - SNDMSGA(hmc, MCM_SETSELRANGE, 0, (LPARAM) (rgst)) + SNDMSG(hmc, MCM_SETSELRANGE, 0, (LPARAM) (rgst)) #define MonthCal_GetMonthRange(hmc, gmr, rgst) \ - (DWORD)SNDMSGA(hmc, MCM_GETMONTHRANGE, (WPARAM)(gmr), (LPARAM)(rgst)) + (DWORD)SNDMSG(hmc, MCM_GETMONTHRANGE, (WPARAM)(gmr), (LPARAM)(rgst)) #define MonthCal_SetDayState(hmc, cbds, rgds) \ - SNDMSGA(hmc, MCM_SETDAYSTATE, (WPARAM)(cbds), (LPARAM)(rgds)) + SNDMSG(hmc, MCM_SETDAYSTATE, (WPARAM)(cbds), (LPARAM)(rgds)) #define MonthCal_GetMinReqRect(hmc, prc) \ - SNDMSGA(hmc, MCM_GETMINREQRECT, 0, (LPARAM)(prc)) + SNDMSG(hmc, MCM_GETMINREQRECT, 0, (LPARAM)(prc)) #define MonthCal_SetColor(hmc, iColor, clr)\ - SNDMSGA(hmc, MCM_SETCOLOR, iColor, clr) + SNDMSG(hmc, MCM_SETCOLOR, iColor, clr) #define MonthCal_GetColor(hmc, iColor) \ - SNDMSGA(hmc, MCM_SETCOLOR, iColor, 0) + SNDMSG(hmc, MCM_SETCOLOR, iColor, 0) #define MonthCal_GetToday(hmc, pst)\ - (BOOL)SNDMSGA(hmc, MCM_GETTODAY, 0, (LPARAM)pst) + (BOOL)SNDMSG(hmc, MCM_GETTODAY, 0, (LPARAM)pst) #define MonthCal_SetToday(hmc, pst)\ - SNDMSGA(hmc, MCM_SETTODAY, 0, (LPARAM)pst) + SNDMSG(hmc, MCM_SETTODAY, 0, (LPARAM)pst) #define MonthCal_HitTest(hmc, pinfo) \ - SNDMSGA(hmc, MCM_HITTEST, 0, (LPARAM)(PMCHITTESTINFO)pinfo) + SNDMSG(hmc, MCM_HITTEST, 0, (LPARAM)(PMCHITTESTINFO)pinfo) #define MonthCal_SetFirstDayOfWeek(hmc, iDay) \ - SNDMSGA(hmc, MCM_SETFIRSTDAYOFWEEK, 0, iDay) + SNDMSG(hmc, MCM_SETFIRSTDAYOFWEEK, 0, iDay) #define MonthCal_GetFirstDayOfWeek(hmc) \ - (DWORD)SNDMSGA(hmc, MCM_GETFIRSTDAYOFWEEK, 0, 0) + (DWORD)SNDMSG(hmc, MCM_GETFIRSTDAYOFWEEK, 0, 0) #define MonthCal_GetRange(hmc, rgst) \ - (DWORD)SNDMSGA(hmc, MCM_GETRANGE, 0, (LPARAM)(rgst)) + (DWORD)SNDMSG(hmc, MCM_GETRANGE, 0, (LPARAM)(rgst)) #define MonthCal_SetRange(hmc, gd, rgst) \ - (BOOL)SNDMSGA(hmc, MCM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst)) + (BOOL)SNDMSG(hmc, MCM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst)) #define MonthCal_GetMonthDelta(hmc) \ - (int)SNDMSGA(hmc, MCM_GETMONTHDELTA, 0, 0) + (int)SNDMSG(hmc, MCM_GETMONTHDELTA, 0, 0) #define MonthCal_SetMonthDelta(hmc, n) \ - (int)SNDMSGA(hmc, MCM_SETMONTHDELTA, n, 0) + (int)SNDMSG(hmc, MCM_SETMONTHDELTA, n, 0) #define MonthCal_GetMaxTodayWidth(hmc) \ - (DWORD)SNDMSGA(hmc, MCM_GETMAXTODAYWIDTH, 0, 0) + (DWORD)SNDMSG(hmc, MCM_GETMAXTODAYWIDTH, 0, 0) #define MonthCal_SetUnicodeFormat(hwnd, fUnicode) \ - (BOOL)SNDMSGA((hwnd), MCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0) + (BOOL)SNDMSG((hwnd), MCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0) #define MonthCal_GetUnicodeFormat(hwnd) \ - (BOOL)SNDMSGA((hwnd), MCM_GETUNICODEFORMAT, 0, 0) + (BOOL)SNDMSG((hwnd), MCM_GETUNICODEFORMAT, 0, 0) /************************************************************************** @@ -4905,28 +4900,28 @@ #define DateTime_GetSystemtime(hdp, pst) \ - (DWORD)SNDMSGA (hdp, DTM_GETSYSTEMTIME , 0, (LPARAM)(pst)) + (DWORD)SNDMSG (hdp, DTM_GETSYSTEMTIME , 0, (LPARAM)(pst)) #define DateTime_SetSystemtime(hdp, gd, pst) \ - (BOOL)SNDMSGA (hdp, DTM_SETSYSTEMTIME, (LPARAM)(gd), (LPARAM)(pst)) + (BOOL)SNDMSG (hdp, DTM_SETSYSTEMTIME, (LPARAM)(gd), (LPARAM)(pst)) #define DateTime_GetRange(hdp, rgst) \ - (DWORD)SNDMSGA (hdp, DTM_GETRANGE, 0, (LPARAM)(rgst)) + (DWORD)SNDMSG (hdp, DTM_GETRANGE, 0, (LPARAM)(rgst)) #define DateTime_SetRange(hdp, gd, rgst) \ - (BOOL)SNDMSGA (hdp, DTM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst)) + (BOOL)SNDMSG (hdp, DTM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst)) #define DateTime_SetFormatA(hdp, sz) \ (BOOL)SNDMSGA (hdp, DTM_SETFORMATA, 0, (LPARAM)(sz)) #define DateTime_SetFormatW(hdp, sz) \ (BOOL)SNDMSGW (hdp, DTM_SETFORMATW, 0, (LPARAM)(sz)) #define DateTime_SetFormat WINELIB_NAME_AW(DateTime_SetFormat) #define DateTime_GetMonthCalColor(hdp, iColor) \ - SNDMSGA (hdp, DTM_GETMCCOLOR, iColor, 0) + SNDMSG (hdp, DTM_GETMCCOLOR, iColor, 0) #define DateTime_SetMonthCalColor(hdp, iColor, clr) \ - SNDMSGA (hdp, DTM_SETMCCOLOR, iColor, clr) + SNDMSG (hdp, DTM_SETMCCOLOR, iColor, clr) #define DateTime_GetMonthCal(hdp) \ - (HWND) SNDMSGA (hdp, DTM_GETMONTHCAL, 0, 0) + (HWND) SNDMSG (hdp, DTM_GETMONTHCAL, 0, 0) #define DateTime_SetMonthCalFont(hdp, hfont, fRedraw) \ - SNDMSGA (hdp, DTM_SETMCFONT, (WPARAM)hfont, (LPARAM)fRedraw) + SNDMSG (hdp, DTM_SETMCFONT, (WPARAM)hfont, (LPARAM)fRedraw) #define DateTime_GetMonthCalFont(hdp) \ - SNDMSGA (hdp, DTM_GETMCFONT, 0, 0) + SNDMSG (hdp, DTM_GETMCFONT, 0, 0) #define DA_LAST (0x7fffffff) #define DPA_APPEND (0x7fffffff) @@ -4997,6 +4992,9 @@ struct IStream; typedef HRESULT (CALLBACK *PFNDPASTREAM)(DPASTREAMINFO*, struct IStream*, LPVOID); +HRESULT WINAPI DPA_LoadStream(HDPA*, PFNDPASTREAM, struct IStream*, LPVOID); +HRESULT WINAPI DPA_SaveStream(HDPA, PFNDPASTREAM, struct IStream*, LPVOID); + BOOL WINAPI Str_SetPtrW (LPWSTR *, LPCWSTR); /************************************************************************** @@ -5010,6 +5008,10 @@ #else static const WCHAR WC_LINK[] = { 'S','y','s','L','i','n','k',0 }; #endif + +/* SysLink styles */ +#define LWS_TRANSPARENT 0x0001 +#define LWS_IGNORERETURN 0x0002 /* SysLink messages */ #define LM_HITTEST (WM_USER + 768) Propchange: branches/arwinss/reactos/include/psdk/commctrl.h ------------------------------------------------------------------------------ --- svn:mergeinfo (added) +++ svn:mergeinfo Sat Nov 7 20:56:54 2009 @@ -1,0 +1,2 @@ +/branches/ros-amd64-bringup/reactos/include/psdk/commctrl.h:34711-34712,34743,34812,34839,34842,34917,35323-35324,35347-35348,35361,35436,35509,35515,35588,35739,35746,35771,35789,35823,35902,35904-35906,35942,35947-35949,35952-35953,35966,36013,36360,36388-36389,36570,36614,36930,37323,37434,37472,37475,37536,37820-37821,37869,37873,37990-37991,38013-38014,38148,38151,38265,38268,39151,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080,43426,43454 +/trunk/reactos/include/psdk/commctrl.h:42000-43670,44013,44015
15 years, 5 months
1
0
0
0
← Newer
1
...
29
30
31
32
33
34
35
...
45
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
38
39
40
41
42
43
44
45
Results per page:
10
25
50
100
200