ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
November 2013
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
16 participants
348 discussions
Start a n
N
ew thread
[tkreuzer] 61059: [NTOSKRNL] Implement ObDeleteCapturedInsertInfo
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Nov 20 21:52:50 2013 New Revision: 61059 URL:
http://svn.reactos.org/svn/reactos?rev=61059&view=rev
Log: [NTOSKRNL] Implement ObDeleteCapturedInsertInfo Modified: trunk/reactos/ntoskrnl/ob/oblife.c Modified: trunk/reactos/ntoskrnl/ob/oblife.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/oblife.c?rev=6…
============================================================================== --- trunk/reactos/ntoskrnl/ob/oblife.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ob/oblife.c [iso-8859-1] Wed Nov 20 21:52:50 2013 @@ -1276,8 +1276,18 @@ NTAPI ObDeleteCapturedInsertInfo(IN PVOID Object) { - UNIMPLEMENTED; - return; + POBJECT_HEADER ObjectHeader; + PAGED_CODE(); + + /* Check if there is anything to free */ + ObjectHeader = OBJECT_TO_OBJECT_HEADER(Object); + if ((ObjectHeader->Flags & OB_FLAG_CREATE_INFO) && + (ObjectHeader->ObjectCreateInfo != NULL)) + { + /* Free the create info */ + ObpFreeObjectCreateInformation(ObjectHeader->ObjectCreateInfo); + ObjectHeader->ObjectCreateInfo = NULL; + } } VOID
11 years, 1 month
1
0
0
0
[aandrejevic] 61058: [FAST486] The top half of EIP is cleared after a 16-bit jump.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Wed Nov 20 14:21:47 2013 New Revision: 61058 URL:
http://svn.reactos.org/svn/reactos?rev=61058&view=rev
Log: [FAST486] The top half of EIP is cleared after a 16-bit jump. Modified: branches/ntvdm/lib/fast486/opcodes.c branches/ntvdm/lib/fast486/opgroups.c Modified: branches/ntvdm/lib/fast486/opcodes.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/opcodes.c?rev…
============================================================================== --- branches/ntvdm/lib/fast486/opcodes.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/opcodes.c [iso-8859-1] Wed Nov 20 14:21:47 2013 @@ -606,9 +606,12 @@ { BOOLEAN Jump = FALSE; CHAR Offset = 0; + BOOLEAN Size = State->SegmentRegs[FAST486_REG_CS].Size; /* Make sure this is the right instruction */ ASSERT((Opcode & 0xF0) == 0x70); + + TOGGLE_OPSIZE(Size); /* Fetch the offset */ if (!Fast486FetchByte(State, (PUCHAR)&Offset)) @@ -686,6 +689,12 @@ { /* Move the instruction pointer */ State->InstPtr.Long += Offset; + + if (!Size) + { + /* Clear the top half of EIP */ + State->InstPtr.Long &= 0xFFFF; + } } /* Return success */ @@ -1058,6 +1067,9 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeShortJump) { CHAR Offset = 0; + BOOLEAN Size = State->SegmentRegs[FAST486_REG_CS].Size; + + TOGGLE_OPSIZE(Size); /* Make sure this is the right instruction */ ASSERT(Opcode == 0xEB); @@ -1071,6 +1083,12 @@ /* Move the instruction pointer */ State->InstPtr.Long += Offset; + + if (!Size) + { + /* Clear the top half of EIP */ + State->InstPtr.Long &= 0xFFFF; + } return TRUE; } @@ -5087,7 +5105,10 @@ } /* Move the instruction pointer */ - State->InstPtr.LowWord += Offset; + State->InstPtr.Long += Offset; + + /* Clear the top half of EIP */ + State->InstPtr.Long &= 0xFFFF; } return TRUE; @@ -5137,9 +5158,8 @@ return FALSE; } - /* Load new (E)IP */ - if (Size) State->InstPtr.Long = Offset; - else State->InstPtr.LowWord = LOWORD(Offset); + /* Load new EIP */ + State->InstPtr.Long = Offset; return TRUE; } Modified: branches/ntvdm/lib/fast486/opgroups.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/opgroups.c?re…
============================================================================== --- branches/ntvdm/lib/fast486/opgroups.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/opgroups.c [iso-8859-1] Wed Nov 20 14:21:47 2013 @@ -1539,6 +1539,9 @@ /* Set the IP to the address */ State->InstPtr.LowWord = Value; + + /* Clear the top half of EIP */ + State->InstPtr.Long &= 0xFFFF; } else if (ModRegRm.Register == 3) { @@ -1588,6 +1591,8 @@ /* Set the IP to the address */ State->InstPtr.LowWord = Value; + /* Clear the top half of EIP */ + State->InstPtr.Long &= 0xFFFF; } else if (ModRegRm.Register == 4) { @@ -1627,6 +1632,9 @@ /* Set the IP to the address */ State->InstPtr.LowWord = Value; + + /* Clear the top half of EIP */ + State->InstPtr.Long &= 0xFFFF; } else if (ModRegRm.Register == 6) {
11 years, 1 month
1
0
0
0
[aandrejevic] 61057: [FAST486] Read the LDT instead of the GDT when the table indicator is set.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Wed Nov 20 10:48:26 2013 New Revision: 61057 URL:
http://svn.reactos.org/svn/reactos?rev=61057&view=rev
Log: [FAST486] Read the LDT instead of the GDT when the table indicator is set. Modified: branches/ntvdm/lib/fast486/common.h branches/ntvdm/lib/fast486/common.inl Modified: branches/ntvdm/lib/fast486/common.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/common.h?rev=…
============================================================================== --- branches/ntvdm/lib/fast486/common.h [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/common.h [iso-8859-1] Wed Nov 20 10:48:26 2013 @@ -37,6 +37,7 @@ #define GET_SEGMENT_RPL(s) ((s) & 3) #define GET_SEGMENT_INDEX(s) ((s) & 0xFFF8) +#define SEGMENT_TABLE_INDICATOR (1 << 2) #define EXCEPTION_HAS_ERROR_CODE(x) (((x) == 8) || ((x) >= 10 && (x) <= 14)) #define NO_LOCK_PREFIX() if (State->PrefixFlags & FAST486_PREFIX_LOCK)\ Modified: branches/ntvdm/lib/fast486/common.inl URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/common.inl?re…
============================================================================== --- branches/ntvdm/lib/fast486/common.inl [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/common.inl [iso-8859-1] Wed Nov 20 10:48:26 2013 @@ -399,22 +399,45 @@ /* Check for protected mode */ if ((State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE) && !State->Flags.Vm) { - /* Make sure the GDT contains the entry */ - if (GET_SEGMENT_INDEX(Selector) >= (State->Gdtr.Size + 1)) - { - Fast486Exception(State, FAST486_EXCEPTION_GP); - return FALSE; - } - - /* Read the GDT */ - if (!Fast486ReadLinearMemory(State, - State->Gdtr.Address - + GET_SEGMENT_INDEX(Selector), - &GdtEntry, - sizeof(GdtEntry))) - { - /* Exception occurred */ - return FALSE; + if (!(Selector & SEGMENT_TABLE_INDICATOR)) + { + /* Make sure the GDT contains the entry */ + if (GET_SEGMENT_INDEX(Selector) >= (State->Gdtr.Size + 1)) + { + Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_GP, Selector); + return FALSE; + } + + /* Read the GDT */ + if (!Fast486ReadLinearMemory(State, + State->Gdtr.Address + + GET_SEGMENT_INDEX(Selector), + &GdtEntry, + sizeof(GdtEntry))) + { + /* Exception occurred */ + return FALSE; + } + } + else + { + /* Make sure the LDT contains the entry */ + if (GET_SEGMENT_INDEX(Selector) >= (State->Ldtr.Size + 1)) + { + Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_GP, Selector); + return FALSE; + } + + /* Read the LDT */ + if (!Fast486ReadLinearMemory(State, + State->Ldtr.Address + + GET_SEGMENT_INDEX(Selector), + &GdtEntry, + sizeof(GdtEntry))) + { + /* Exception occurred */ + return FALSE; + } } if (Segment == FAST486_REG_SS) @@ -503,7 +526,6 @@ Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_GP, Selector); return FALSE; } - } /* Update CPL */
11 years, 1 month
1
0
0
0
[aandrejevic] 61056: [FAST486] Implement privilege checks when loading the code selector.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Wed Nov 20 10:43:12 2013 New Revision: 61056 URL:
http://svn.reactos.org/svn/reactos?rev=61056&view=rev
Log: [FAST486] Implement privilege checks when loading the code selector. Modified: branches/ntvdm/lib/fast486/common.inl Modified: branches/ntvdm/lib/fast486/common.inl URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/common.inl?re…
============================================================================== --- branches/ntvdm/lib/fast486/common.inl [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/common.inl [iso-8859-1] Wed Nov 20 10:43:12 2013 @@ -430,36 +430,85 @@ if (!GdtEntry.SystemType) { /* This is a special descriptor */ - Fast486Exception(State, FAST486_EXCEPTION_GP); + Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_GP, Selector); return FALSE; } if (GdtEntry.Executable || !GdtEntry.ReadWrite) { - Fast486Exception(State, FAST486_EXCEPTION_GP); + Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_GP, Selector); return FALSE; } if ((GET_SEGMENT_RPL(Selector) != Fast486GetCurrentPrivLevel(State)) || (GET_SEGMENT_RPL(Selector) != GdtEntry.Dpl)) { + Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_GP, Selector); + return FALSE; + } + + if (!GdtEntry.Present) + { + Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_SS, Selector); + return FALSE; + } + } + else if (Segment == FAST486_REG_CS) + { + /* Loading the code segment */ + + if (GET_SEGMENT_INDEX(Selector) == 0) + { Fast486Exception(State, FAST486_EXCEPTION_GP); return FALSE; } - if (!GdtEntry.Present) - { - Fast486Exception(State, FAST486_EXCEPTION_SS); - return FALSE; - } - } - else if (Segment == FAST486_REG_CS) - { - /* Loading the code segment */ - // TODO: Implement security checks, call gates, etc... - - /* Update CPL */ - State->Cpl = GET_SEGMENT_RPL(Selector); + if (GdtEntry.SystemType) + { + // TODO: Call/interrupt/task gates NOT IMPLEMENTED! + UNIMPLEMENTED; + } + else + { + if (!GdtEntry.Present) + { + Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_NP, Selector); + return FALSE; + } + + if (!GdtEntry.Executable) + { + Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_GP, Selector); + return FALSE; + } + + if (GdtEntry.DirConf) + { + /* Conforming Code Segment */ + + if (GdtEntry.Dpl > Fast486GetCurrentPrivLevel(State)) + { + /* Must be accessed from lower-privileged code */ + Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_GP, Selector); + return FALSE; + } + } + else + { + /* Regular code segment */ + + if ((GET_SEGMENT_RPL(Selector) > Fast486GetCurrentPrivLevel(State)) + || (Fast486GetCurrentPrivLevel(State) != GdtEntry.Dpl)) + { + Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_GP, Selector); + return FALSE; + } + + } + + /* Update CPL */ + State->Cpl = GET_SEGMENT_RPL(Selector); + } } else { @@ -468,20 +517,20 @@ if (!GdtEntry.SystemType) { /* This is a special descriptor */ - Fast486Exception(State, FAST486_EXCEPTION_GP); + Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_GP, Selector); return FALSE; } if ((GET_SEGMENT_RPL(Selector) > GdtEntry.Dpl) || (Fast486GetCurrentPrivLevel(State) > GdtEntry.Dpl)) { - Fast486Exception(State, FAST486_EXCEPTION_GP); + Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_GP, Selector); return FALSE; } if (!GdtEntry.Present) { - Fast486Exception(State, FAST486_EXCEPTION_NP); + Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_NP, Selector); return FALSE; } }
11 years, 1 month
1
0
0
0
[aandrejevic] 61055: [FAST486] Make the parameters to Fast486ReadModrm*Operands optional, so that unnecessary extra reads aren't performed. This also eliminates the need for dummy variables.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Wed Nov 20 08:01:10 2013 New Revision: 61055 URL:
http://svn.reactos.org/svn/reactos?rev=61055&view=rev
Log: [FAST486] Make the parameters to Fast486ReadModrm*Operands optional, so that unnecessary extra reads aren't performed. This also eliminates the need for dummy variables. Modified: branches/ntvdm/lib/fast486/common.inl branches/ntvdm/lib/fast486/extraops.c branches/ntvdm/lib/fast486/opcodes.c branches/ntvdm/lib/fast486/opgroups.c Modified: branches/ntvdm/lib/fast486/common.inl URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/common.inl?re…
============================================================================== --- branches/ntvdm/lib/fast486/common.inl [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/common.inl [iso-8859-1] Wed Nov 20 08:01:10 2013 @@ -935,51 +935,57 @@ { FAST486_SEG_REGS Segment = FAST486_REG_DS; - /* Get the register value */ - if (ModRegRm->Register & 0x04) - { - /* AH, CH, DH, BH */ - *RegValue = State->GeneralRegs[ModRegRm->Register & 0x03].HighByte; - } - else - { - /* AL, CL, DL, BL */ - *RegValue = State->GeneralRegs[ModRegRm->Register & 0x03].LowByte; - } - - if (!ModRegRm->Memory) - { - /* Get the second register value */ - if (ModRegRm->SecondRegister & 0x04) + if (RegValue) + { + /* Get the register value */ + if (ModRegRm->Register & 0x04) { /* AH, CH, DH, BH */ - *RmValue = State->GeneralRegs[ModRegRm->SecondRegister & 0x03].HighByte; + *RegValue = State->GeneralRegs[ModRegRm->Register & 0x03].HighByte; } else { /* AL, CL, DL, BL */ - *RmValue = State->GeneralRegs[ModRegRm->SecondRegister & 0x03].LowByte; - } - } - else - { - /* Check for the segment override */ - if (State->PrefixFlags & FAST486_PREFIX_SEG) - { - /* Use the override segment instead */ - Segment = State->SegmentOverride; - } - - /* Read memory */ - if (!Fast486ReadMemory(State, - Segment, - ModRegRm->MemoryAddress, - FALSE, - RmValue, - sizeof(UCHAR))) - { - /* Exception occurred */ - return FALSE; + *RegValue = State->GeneralRegs[ModRegRm->Register & 0x03].LowByte; + } + } + + if (RmValue) + { + if (!ModRegRm->Memory) + { + /* Get the second register value */ + if (ModRegRm->SecondRegister & 0x04) + { + /* AH, CH, DH, BH */ + *RmValue = State->GeneralRegs[ModRegRm->SecondRegister & 0x03].HighByte; + } + else + { + /* AL, CL, DL, BL */ + *RmValue = State->GeneralRegs[ModRegRm->SecondRegister & 0x03].LowByte; + } + } + else + { + /* Check for the segment override */ + if (State->PrefixFlags & FAST486_PREFIX_SEG) + { + /* Use the override segment instead */ + Segment = State->SegmentOverride; + } + + /* Read memory */ + if (!Fast486ReadMemory(State, + Segment, + ModRegRm->MemoryAddress, + FALSE, + RmValue, + sizeof(UCHAR))) + { + /* Exception occurred */ + return FALSE; + } } } @@ -995,33 +1001,39 @@ { FAST486_SEG_REGS Segment = FAST486_REG_DS; - /* Get the register value */ - *RegValue = State->GeneralRegs[ModRegRm->Register].LowWord; - - if (!ModRegRm->Memory) - { - /* Get the second register value */ - *RmValue = State->GeneralRegs[ModRegRm->SecondRegister].LowWord; - } - else - { - /* Check for the segment override */ - if (State->PrefixFlags & FAST486_PREFIX_SEG) - { - /* Use the override segment instead */ - Segment = State->SegmentOverride; - } - - /* Read memory */ - if (!Fast486ReadMemory(State, - Segment, - ModRegRm->MemoryAddress, - FALSE, - RmValue, - sizeof(USHORT))) - { - /* Exception occurred */ - return FALSE; + if (RegValue) + { + /* Get the register value */ + *RegValue = State->GeneralRegs[ModRegRm->Register].LowWord; + } + + if (RmValue) + { + if (!ModRegRm->Memory) + { + /* Get the second register value */ + *RmValue = State->GeneralRegs[ModRegRm->SecondRegister].LowWord; + } + else + { + /* Check for the segment override */ + if (State->PrefixFlags & FAST486_PREFIX_SEG) + { + /* Use the override segment instead */ + Segment = State->SegmentOverride; + } + + /* Read memory */ + if (!Fast486ReadMemory(State, + Segment, + ModRegRm->MemoryAddress, + FALSE, + RmValue, + sizeof(USHORT))) + { + /* Exception occurred */ + return FALSE; + } } } @@ -1037,33 +1049,39 @@ { FAST486_SEG_REGS Segment = FAST486_REG_DS; - /* Get the register value */ - *RegValue = State->GeneralRegs[ModRegRm->Register].Long; - - if (!ModRegRm->Memory) - { - /* Get the second register value */ - *RmValue = State->GeneralRegs[ModRegRm->SecondRegister].Long; - } - else - { - /* Check for the segment override */ - if (State->PrefixFlags & FAST486_PREFIX_SEG) - { - /* Use the override segment instead */ - Segment = State->SegmentOverride; - } - - /* Read memory */ - if (!Fast486ReadMemory(State, - Segment, - ModRegRm->MemoryAddress, - FALSE, - RmValue, - sizeof(ULONG))) - { - /* Exception occurred */ - return FALSE; + if (RegValue) + { + /* Get the register value */ + *RegValue = State->GeneralRegs[ModRegRm->Register].Long; + } + + if (RmValue) + { + if (!ModRegRm->Memory) + { + /* Get the second register value */ + *RmValue = State->GeneralRegs[ModRegRm->SecondRegister].Long; + } + else + { + /* Check for the segment override */ + if (State->PrefixFlags & FAST486_PREFIX_SEG) + { + /* Use the override segment instead */ + Segment = State->SegmentOverride; + } + + /* Read memory */ + if (!Fast486ReadMemory(State, + Segment, + ModRegRm->MemoryAddress, + FALSE, + RmValue, + sizeof(ULONG))) + { + /* Exception occurred */ + return FALSE; + } } } Modified: branches/ntvdm/lib/fast486/extraops.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/extraops.c?re…
============================================================================== --- branches/ntvdm/lib/fast486/extraops.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/extraops.c [iso-8859-1] Wed Nov 20 08:01:10 2013 @@ -570,10 +570,10 @@ if (OperandSize) { - ULONG Dummy, Value; + ULONG Value; /* Read the value */ - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -584,10 +584,10 @@ } else { - USHORT Dummy, Value; + USHORT Value; /* Read the value */ - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -755,10 +755,10 @@ if (OperandSize) { - ULONG Dummy, Value; + ULONG Value; /* Read the value */ - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -779,10 +779,10 @@ } else { - USHORT Dummy, Value; + USHORT Value; /* Read the value */ - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1216,10 +1216,10 @@ if (OperandSize) { - ULONG Dummy, Value; + ULONG Value; /* Read the value */ - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1240,10 +1240,10 @@ } else { - USHORT Dummy, Value; + USHORT Value; /* Read the value */ - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1339,7 +1339,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeMovzxByte) { - UCHAR Dummy, Value; + UCHAR Value; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; FAST486_MOD_REG_RM ModRegRm; @@ -1356,7 +1356,7 @@ } /* Read the operands */ - if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1371,7 +1371,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeMovzxWord) { - USHORT Dummy, Value; + USHORT Value; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; FAST486_MOD_REG_RM ModRegRm; @@ -1388,7 +1388,7 @@ } /* Read the operands */ - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1441,10 +1441,10 @@ if (OperandSize) { - ULONG Dummy, Value; + ULONG Value; /* Read the value */ - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1465,10 +1465,10 @@ } else { - USHORT Dummy, Value; + USHORT Value; /* Read the value */ - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1495,7 +1495,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBsf) { INT i; - ULONG Dummy = 0, Value = 0; + ULONG Value = 0; BOOLEAN OperandSize, AddressSize; FAST486_MOD_REG_RM ModRegRm; ULONG BitNumber; @@ -1522,7 +1522,7 @@ /* Read the value */ if (OperandSize) { - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1532,7 +1532,7 @@ { if (!Fast486ReadModrmWordOperands(State, &ModRegRm, - (PUSHORT)&Dummy, + (PUSHORT)NULL, (PUSHORT)&Value)) { /* Exception occurred */ @@ -1580,7 +1580,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBsr) { INT i; - ULONG Dummy = 0, Value = 0; + ULONG Value = 0; BOOLEAN OperandSize, AddressSize; FAST486_MOD_REG_RM ModRegRm; ULONG BitNumber; @@ -1607,7 +1607,7 @@ /* Read the value */ if (OperandSize) { - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1617,7 +1617,7 @@ { if (!Fast486ReadModrmWordOperands(State, &ModRegRm, - (PUSHORT)&Dummy, + (PUSHORT)NULL, (PUSHORT)&Value)) { /* Exception occurred */ @@ -1664,7 +1664,6 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeMovsxByte) { - UCHAR Dummy; CHAR Value; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; FAST486_MOD_REG_RM ModRegRm; @@ -1682,7 +1681,7 @@ } /* Read the operands */ - if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, (PUCHAR)&Value)) + if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, (PUCHAR)&Value)) { /* Exception occurred */ return FALSE; @@ -1697,7 +1696,6 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeMovsxWord) { - USHORT Dummy; SHORT Value; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; FAST486_MOD_REG_RM ModRegRm; @@ -1715,7 +1713,7 @@ } /* Read the operands */ - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, (PUSHORT)&Value)) + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, (PUSHORT)&Value)) { /* Exception occurred */ return FALSE; Modified: branches/ntvdm/lib/fast486/opcodes.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/opcodes.c?rev…
============================================================================== --- branches/ntvdm/lib/fast486/opcodes.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/opcodes.c [iso-8859-1] Wed Nov 20 08:01:10 2013 @@ -3951,9 +3951,9 @@ if (OperandSize) { - ULONG Dummy, Selector; - - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Selector)) + ULONG Selector; + + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Selector)) { /* Exception occurred */ return FALSE; @@ -3963,9 +3963,9 @@ } else { - USHORT Dummy, Selector; - - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Selector)) + USHORT Selector; + + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Selector)) { /* Exception occurred */ return FALSE; Modified: branches/ntvdm/lib/fast486/opgroups.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/opgroups.c?re…
============================================================================== --- branches/ntvdm/lib/fast486/opgroups.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/opgroups.c [iso-8859-1] Wed Nov 20 08:01:10 2013 @@ -293,7 +293,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroup8082) { - UCHAR Immediate, Dummy, Value; + UCHAR Immediate, Value; FAST486_MOD_REG_RM ModRegRm; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; @@ -313,7 +313,7 @@ } /* Read the operands */ - if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -349,7 +349,7 @@ if (OperandSize) { - ULONG Immediate, Value, Dummy; + ULONG Immediate, Value; /* Fetch the immediate operand */ if (!Fast486FetchDword(State, &Immediate)) @@ -359,7 +359,7 @@ } /* Read the operands */ - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -376,7 +376,7 @@ } else { - USHORT Immediate, Value, Dummy; + USHORT Immediate, Value; /* Fetch the immediate operand */ if (!Fast486FetchWord(State, &Immediate)) @@ -386,7 +386,7 @@ } /* Read the operands */ - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -432,10 +432,10 @@ if (OperandSize) { ULONG Immediate = (ULONG)((LONG)ImmByte); // Sign extend - ULONG Value, Dummy; + ULONG Value; /* Read the operands */ - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -453,10 +453,10 @@ else { USHORT Immediate = (USHORT)((SHORT)ImmByte); // Sign extend - USHORT Value, Dummy; + USHORT Value; /* Read the operands */ - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -527,7 +527,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroupC0) { - UCHAR Dummy, Value, Count; + UCHAR Value, Count; FAST486_MOD_REG_RM ModRegRm; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; @@ -547,7 +547,7 @@ } /* Read the operands */ - if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -593,10 +593,10 @@ if (OperandSize) { - ULONG Dummy, Value; + ULONG Value; /* Read the operands */ - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -614,10 +614,10 @@ } else { - USHORT Dummy, Value; + USHORT Value; /* Read the operands */ - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -728,7 +728,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroupD0) { - UCHAR Dummy, Value; + UCHAR Value; FAST486_MOD_REG_RM ModRegRm; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; @@ -741,7 +741,7 @@ } /* Read the operands */ - if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -776,10 +776,10 @@ if (OperandSize) { - ULONG Dummy, Value; + ULONG Value; /* Read the operands */ - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -793,10 +793,10 @@ } else { - USHORT Dummy, Value; + USHORT Value; /* Read the operands */ - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -812,7 +812,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroupD2) { - UCHAR Dummy, Value; + UCHAR Value; FAST486_MOD_REG_RM ModRegRm; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; @@ -825,7 +825,7 @@ } /* Read the operands */ - if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -863,10 +863,10 @@ if (OperandSize) { - ULONG Dummy, Value; + ULONG Value; /* Read the operands */ - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -884,10 +884,10 @@ } else { - USHORT Dummy, Value; + USHORT Value; /* Read the operands */ - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -907,7 +907,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroupF6) { - UCHAR Dummy, Value = 0; + UCHAR Value = 0; FAST486_MOD_REG_RM ModRegRm; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; @@ -920,7 +920,7 @@ } /* Read the operands */ - if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1039,7 +1039,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroupF7) { - ULONG Dummy, Value = 0, SignFlag; + ULONG Value = 0, SignFlag; FAST486_MOD_REG_RM ModRegRm; BOOLEAN OperandSize, AddressSize; @@ -1062,7 +1062,7 @@ if (OperandSize) { /* 32-bit */ - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1071,7 +1071,7 @@ else { /* 16-bit */ - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, (PUSHORT)&Dummy, (PUSHORT)&Value)) + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, (PUSHORT)&Value)) { /* Exception occurred */ return FALSE; @@ -1284,7 +1284,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroupFE) { - UCHAR Dummy, Value; + UCHAR Value; FAST486_MOD_REG_RM ModRegRm; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; @@ -1304,7 +1304,7 @@ } /* Read the operands */ - if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1363,9 +1363,9 @@ /* Read the operands */ if (OperandSize) { - ULONG Dummy, Value; - - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value)) + ULONG Value; + + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1506,9 +1506,9 @@ } else { - USHORT Dummy, Value; - - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value)) + USHORT Value; + + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1813,7 +1813,7 @@ /* LMSW */ case 6: { - USHORT MachineStatusWord, Dummy; + USHORT MachineStatusWord; /* This is a privileged instruction */ if (Fast486GetCurrentPrivLevel(State) != 0) @@ -1823,7 +1823,7 @@ } /* Read the new Machine Status Word */ - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &MachineStatusWord)) + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &MachineStatusWord)) { /* Exception occurred */ return FALSE; @@ -1928,10 +1928,10 @@ if (OperandSize) { - ULONG Dummy, Value; + ULONG Value; /* Read the value */ - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1968,10 +1968,10 @@ } else { - USHORT Dummy, Value; + USHORT Value; /* Read the value */ - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE;
11 years, 1 month
1
0
0
0
[tkreuzer] 61054: [DXG] Fix DxDdSuspendDirectDraw prototype.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Nov 19 23:36:57 2013 New Revision: 61054 URL:
http://svn.reactos.org/svn/reactos?rev=61054&view=rev
Log: [DXG] Fix DxDdSuspendDirectDraw prototype. Modified: trunk/reactos/win32ss/reactx/dxg/dxg_driver.h Modified: trunk/reactos/win32ss/reactx/dxg/dxg_driver.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/reactx/dxg/dxg_dri…
============================================================================== --- trunk/reactos/win32ss/reactx/dxg/dxg_driver.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/reactx/dxg/dxg_driver.h [iso-8859-1] Tue Nov 19 23:36:57 2013 @@ -783,7 +783,8 @@ DWORD NTAPI DxDdSuspendDirectDraw( - PVOID p1) + PVOID p1, + PVOID p2) { TRACE(); return 0;
11 years, 1 month
1
0
0
0
[tkreuzer] 61053: [KEYBOARDLEYOUTS] Keyboard layout files have special requirements to the section layout of the dell. That is because MS win32k devs didn't write proper code and that is why the or...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Nov 19 23:30:58 2013 New Revision: 61053 URL:
http://svn.reactos.org/svn/reactos?rev=61053&view=rev
Log: [KEYBOARDLEYOUTS] Keyboard layout files have special requirements to the section layout of the dell. That is because MS win32k devs didn't write proper code and that is why the original win32k first parses all sections, looks for the .data section, checks if everything is valid and then truncates a pointer in a table to 16 bit and uses this as an offset into the section. Of course that does ONLY work, if the section is the first section AND that pointer happens to be less than 64k off from the start of the section AND the image base is 64k aligned. To achieve this, add a new module type kbdlayout that does all the neccessary things. On MSVC we merge the sections with a linker command, on GCC we use a custom linker script. Added: trunk/reactos/kbdlayout.lds (with props) Modified: trunk/reactos/cmake/CMakeMacros.cmake trunk/reactos/dll/keyboard/kbda1/CMakeLists.txt trunk/reactos/dll/keyboard/kbda2/CMakeLists.txt trunk/reactos/dll/keyboard/kbda3/CMakeLists.txt trunk/reactos/dll/keyboard/kbdal/CMakeLists.txt trunk/reactos/dll/keyboard/kbdarme/CMakeLists.txt trunk/reactos/dll/keyboard/kbdarmw/CMakeLists.txt trunk/reactos/dll/keyboard/kbdaze/CMakeLists.txt trunk/reactos/dll/keyboard/kbdazel/CMakeLists.txt trunk/reactos/dll/keyboard/kbdbe/CMakeLists.txt trunk/reactos/dll/keyboard/kbdbga/CMakeLists.txt trunk/reactos/dll/keyboard/kbdbgm/CMakeLists.txt trunk/reactos/dll/keyboard/kbdbgt/CMakeLists.txt trunk/reactos/dll/keyboard/kbdblr/CMakeLists.txt trunk/reactos/dll/keyboard/kbdbr/CMakeLists.txt trunk/reactos/dll/keyboard/kbdbur/CMakeLists.txt trunk/reactos/dll/keyboard/kbdcan/CMakeLists.txt trunk/reactos/dll/keyboard/kbdcr/CMakeLists.txt trunk/reactos/dll/keyboard/kbdcz/CMakeLists.txt trunk/reactos/dll/keyboard/kbdcz1/CMakeLists.txt trunk/reactos/dll/keyboard/kbdda/CMakeLists.txt trunk/reactos/dll/keyboard/kbddv/CMakeLists.txt trunk/reactos/dll/keyboard/kbdes/CMakeLists.txt trunk/reactos/dll/keyboard/kbdest/CMakeLists.txt trunk/reactos/dll/keyboard/kbdfc/CMakeLists.txt trunk/reactos/dll/keyboard/kbdfi/CMakeLists.txt trunk/reactos/dll/keyboard/kbdfr/CMakeLists.txt trunk/reactos/dll/keyboard/kbdgeo/CMakeLists.txt trunk/reactos/dll/keyboard/kbdgerg/CMakeLists.txt trunk/reactos/dll/keyboard/kbdgneo/CMakeLists.txt trunk/reactos/dll/keyboard/kbdgr/CMakeLists.txt trunk/reactos/dll/keyboard/kbdgrist/CMakeLists.txt trunk/reactos/dll/keyboard/kbdhe/CMakeLists.txt trunk/reactos/dll/keyboard/kbdheb/CMakeLists.txt trunk/reactos/dll/keyboard/kbdhu/CMakeLists.txt trunk/reactos/dll/keyboard/kbdic/CMakeLists.txt trunk/reactos/dll/keyboard/kbdinasa/CMakeLists.txt trunk/reactos/dll/keyboard/kbdinben/CMakeLists.txt trunk/reactos/dll/keyboard/kbdindev/CMakeLists.txt trunk/reactos/dll/keyboard/kbdinguj/CMakeLists.txt trunk/reactos/dll/keyboard/kbdinmal/CMakeLists.txt trunk/reactos/dll/keyboard/kbdir/CMakeLists.txt trunk/reactos/dll/keyboard/kbdit/CMakeLists.txt trunk/reactos/dll/keyboard/kbdja/CMakeLists.txt trunk/reactos/dll/keyboard/kbdkaz/CMakeLists.txt trunk/reactos/dll/keyboard/kbdko/CMakeLists.txt trunk/reactos/dll/keyboard/kbdla/CMakeLists.txt trunk/reactos/dll/keyboard/kbdlt1/CMakeLists.txt trunk/reactos/dll/keyboard/kbdlv/CMakeLists.txt trunk/reactos/dll/keyboard/kbdmac/CMakeLists.txt trunk/reactos/dll/keyboard/kbdne/CMakeLists.txt trunk/reactos/dll/keyboard/kbdno/CMakeLists.txt trunk/reactos/dll/keyboard/kbdpl/CMakeLists.txt trunk/reactos/dll/keyboard/kbdpl1/CMakeLists.txt trunk/reactos/dll/keyboard/kbdpo/CMakeLists.txt trunk/reactos/dll/keyboard/kbdro/CMakeLists.txt trunk/reactos/dll/keyboard/kbdru/CMakeLists.txt trunk/reactos/dll/keyboard/kbdru1/CMakeLists.txt trunk/reactos/dll/keyboard/kbdsg/CMakeLists.txt trunk/reactos/dll/keyboard/kbdsk/CMakeLists.txt trunk/reactos/dll/keyboard/kbdsk1/CMakeLists.txt trunk/reactos/dll/keyboard/kbdsw/CMakeLists.txt trunk/reactos/dll/keyboard/kbdtat/CMakeLists.txt trunk/reactos/dll/keyboard/kbdth0/CMakeLists.txt trunk/reactos/dll/keyboard/kbdth1/CMakeLists.txt trunk/reactos/dll/keyboard/kbdth2/CMakeLists.txt trunk/reactos/dll/keyboard/kbdth3/CMakeLists.txt trunk/reactos/dll/keyboard/kbdtuf/CMakeLists.txt trunk/reactos/dll/keyboard/kbdtuq/CMakeLists.txt trunk/reactos/dll/keyboard/kbduk/CMakeLists.txt trunk/reactos/dll/keyboard/kbdur/CMakeLists.txt trunk/reactos/dll/keyboard/kbdurs/CMakeLists.txt trunk/reactos/dll/keyboard/kbdus/CMakeLists.txt trunk/reactos/dll/keyboard/kbdusa/CMakeLists.txt trunk/reactos/dll/keyboard/kbdusl/CMakeLists.txt trunk/reactos/dll/keyboard/kbdusr/CMakeLists.txt trunk/reactos/dll/keyboard/kbdusx/CMakeLists.txt trunk/reactos/dll/keyboard/kbduzb/CMakeLists.txt trunk/reactos/dll/keyboard/kbdvntc/CMakeLists.txt trunk/reactos/dll/keyboard/kbdycc/CMakeLists.txt trunk/reactos/dll/keyboard/kbdycl/CMakeLists.txt Modified: trunk/reactos/cmake/CMakeMacros.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/CMakeMacros.cmake?re…
============================================================================== --- trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -429,6 +429,18 @@ set(__subsystem console) elseif(${TYPE} STREQUAL win32gui) set(__subsystem windows) + elseif(${TYPE} STREQUAL kbdlayout) + set_entrypoint(${MODULE} 0) + set_image_base(${MODULE} 0x5FFF0000) + set_subsystem(${MODULE} native) + if (MSVC) + # Merge the .text and .rdata section into the .data section + add_target_link_flags(${MODULE} "/ignore:4254 /SECTION:.data,ER /MERGE:.text=.data /MERGE:.rdata=.data /MERGE:.bss=.data /MERGE:.edata=.data") + else() + # Use a custom linker script + add_target_link_flags(${MODULE} "-Wl,-T,${CMAKE_SOURCE_DIR}/kbdlayout.lds") + add_dependencies(${MODULE} "${CMAKE_SOURCE_DIR}/kbdlayout.lds") + endif() elseif(NOT ((${TYPE} STREQUAL win32dll) OR (${TYPE} STREQUAL win32ocx) OR (${TYPE} STREQUAL cpl) OR (${TYPE} STREQUAL module))) message(FATAL_ERROR "Unknown type ${TYPE} for module ${MODULE}") Modified: trunk/reactos/dll/keyboard/kbda1/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbda1/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbda1/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbda1/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbda1 SHARED kbda1.c kbda1.rc ${CMAKE_CURRENT_BINARY_DIR}/kbda1.def) -set_entrypoint(kbda1 0) +set_module_type(kbda1 kbdlayout) add_dependencies(kbda1 psdk) Modified: trunk/reactos/dll/keyboard/kbda2/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbda2/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbda2/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbda2/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbda2 SHARED kbda2.c kbda2.rc ${CMAKE_CURRENT_BINARY_DIR}/kbda2.def) -set_entrypoint(kbda2 0) +set_module_type(kbda2 kbdlayout) add_dependencies(kbda2 psdk) Modified: trunk/reactos/dll/keyboard/kbda3/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbda3/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbda3/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbda3/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbda3 SHARED kbda3.c kbda3.rc ${CMAKE_CURRENT_BINARY_DIR}/kbda3.def) -set_entrypoint(kbda3 0) +set_module_type(kbda3 kbdlayout) add_dependencies(kbda3 psdk) Modified: trunk/reactos/dll/keyboard/kbdal/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdal/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdal/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdal/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdal SHARED kbdal.c kbdal.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdal.def) -set_entrypoint(kbdal 0) +set_module_type(kbdal kbdlayout) add_dependencies(kbdal psdk) Modified: trunk/reactos/dll/keyboard/kbdarme/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdarme/CMake…
============================================================================== --- trunk/reactos/dll/keyboard/kbdarme/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdarme/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdarme SHARED kbdarme.c kbdarme.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdarme.def) -set_entrypoint(kbdarme 0) +set_module_type(kbdarme kbdlayout) add_dependencies(kbdarme psdk) Modified: trunk/reactos/dll/keyboard/kbdarmw/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdarmw/CMake…
============================================================================== --- trunk/reactos/dll/keyboard/kbdarmw/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdarmw/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdarmw SHARED kbdarmw.c kbdarmw.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdarmw.def) -set_entrypoint(kbdarmw 0) +set_module_type(kbdarmw kbdlayout) add_dependencies(kbdarmw psdk) Modified: trunk/reactos/dll/keyboard/kbdaze/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdaze/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdaze/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdaze/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdaze SHARED kbdaze.c kbdaze.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdaze.def) -set_entrypoint(kbdaze 0) +set_module_type(kbdaze kbdlayout) add_dependencies(kbdaze psdk) Modified: trunk/reactos/dll/keyboard/kbdazel/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdazel/CMake…
============================================================================== --- trunk/reactos/dll/keyboard/kbdazel/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdazel/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdazel SHARED kbdazel.c kbdazel.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdazel.def) -set_entrypoint(kbdazel 0) +set_module_type(kbdazel kbdlayout) add_dependencies(kbdazel psdk) Modified: trunk/reactos/dll/keyboard/kbdbe/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdbe/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdbe/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdbe/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdbe SHARED kbdbe.c kbdbe.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdbe.def) -set_entrypoint(kbdbe 0) +set_module_type(kbdbe kbdlayout) add_dependencies(kbdbe psdk) Modified: trunk/reactos/dll/keyboard/kbdbga/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdbga/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdbga/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdbga/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdbga SHARED kbdbga.c kbdbga.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdbga.def) -set_entrypoint(kbdbga 0) +set_module_type(kbdbga kbdlayout) add_dependencies(kbdbga psdk) Modified: trunk/reactos/dll/keyboard/kbdbgm/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdbgm/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdbgm/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdbgm/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdbgm SHARED kbdbgm.c kbdbgm.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdbgm.def) -set_entrypoint(kbdbgm 0) +set_module_type(kbdbgm kbdlayout) add_dependencies(kbdbgm psdk) Modified: trunk/reactos/dll/keyboard/kbdbgt/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdbgt/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdbgt/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdbgt/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdbgt SHARED kbdbgt.c kbdbgt.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdbgt.def) -set_entrypoint(kbdbgt 0) +set_module_type(kbdbgt kbdlayout) add_dependencies(kbdbgt psdk) Modified: trunk/reactos/dll/keyboard/kbdblr/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdblr/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdblr/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdblr/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdblr SHARED kbdblr.c kbdblr.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdblr.def) -set_entrypoint(kbdblr 0) +set_module_type(kbdblr kbdlayout) add_dependencies(kbdblr psdk) Modified: trunk/reactos/dll/keyboard/kbdbr/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdbr/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdbr/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdbr/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdbr SHARED kbdbr.c kbdbr.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdbr.def) -set_entrypoint(kbdbr 0) +set_module_type(kbdbr kbdlayout) add_dependencies(kbdbr psdk) Modified: trunk/reactos/dll/keyboard/kbdbur/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdbur/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdbur/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdbur/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdbur SHARED kbdbur.c kbdbur.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdbur.def) -set_entrypoint(kbdbur 0) +set_module_type(kbdbur kbdlayout) add_dependencies(kbdbur psdk) Modified: trunk/reactos/dll/keyboard/kbdcan/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdcan/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdcan/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdcan/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdcan SHARED kbdcan.c kbdcan.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdcan.def) -set_entrypoint(kbdcan 0) +set_module_type(kbdcan kbdlayout) add_dependencies(kbdcan psdk) Modified: trunk/reactos/dll/keyboard/kbdcr/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdcr/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdcr/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdcr/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdcr SHARED kbdcr.c kbdcr.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdcr.def) -set_entrypoint(kbdcr 0) +set_module_type(kbdcr kbdlayout) add_dependencies(kbdcr psdk) Modified: trunk/reactos/dll/keyboard/kbdcz/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdcz/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdcz/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdcz/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdcz SHARED kbdcz.c kbdcz.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdcz.def) -set_entrypoint(kbdcz 0) +set_module_type(kbdcz kbdlayout) add_dependencies(kbdcz psdk) Modified: trunk/reactos/dll/keyboard/kbdcz1/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdcz1/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdcz1/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdcz1/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdcz1 SHARED kbdcz1.c kbdcz1.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdcz1.def) -set_entrypoint(kbdcz1 0) +set_module_type(kbdcz1 kbdlayout) add_dependencies(kbdcz1 psdk) Modified: trunk/reactos/dll/keyboard/kbdda/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdda/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdda/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdda/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdda SHARED kbdda.c kbdda.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdda.def) -set_entrypoint(kbdda 0) +set_module_type(kbdda kbdlayout) add_dependencies(kbdda psdk) Modified: trunk/reactos/dll/keyboard/kbddv/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbddv/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbddv/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbddv/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbddv SHARED kbddv.c kbddv.rc ${CMAKE_CURRENT_BINARY_DIR}/kbddv.def) -set_entrypoint(kbddv 0) +set_module_type(kbddv kbdlayout) add_dependencies(kbddv psdk) Modified: trunk/reactos/dll/keyboard/kbdes/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdes/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdes/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdes/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdes SHARED kbdes.c kbdes.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdes.def) -set_entrypoint(kbdes 0) +set_module_type(kbdes kbdlayout) add_dependencies(kbdes psdk) Modified: trunk/reactos/dll/keyboard/kbdest/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdest/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdest/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdest/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdest SHARED kbdest.c kbdest.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdest.def) -set_entrypoint(kbdest 0) +set_module_type(kbdest kbdlayout) add_dependencies(kbdest psdk) Modified: trunk/reactos/dll/keyboard/kbdfc/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdfc/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdfc/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdfc/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdfc SHARED kbdfc.c kbdfc.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdfc.def) -set_entrypoint(kbdfc 0) +set_module_type(kbdfc kbdlayout) add_dependencies(kbdfc psdk) Modified: trunk/reactos/dll/keyboard/kbdfi/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdfi/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdfi/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdfi/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdfi SHARED kbdfi.c kbdfi.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdfi.def) -set_entrypoint(kbdfi 0) +set_module_type(kbdfi kbdlayout) add_dependencies(kbdfi psdk) Modified: trunk/reactos/dll/keyboard/kbdfr/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdfr/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdfr/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdfr/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdfr SHARED kbdfr.c kbdfr.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdfr.def) -set_entrypoint(kbdfr 0) +set_module_type(kbdfr kbdlayout) add_dependencies(kbdfr psdk) Modified: trunk/reactos/dll/keyboard/kbdgeo/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgeo/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdgeo/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdgeo/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdgeo SHARED kbdgeo.c kbdgeo.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdgeo.def) -set_entrypoint(kbdgeo 0) +set_module_type(kbdgeo kbdlayout) add_dependencies(kbdgeo psdk) Modified: trunk/reactos/dll/keyboard/kbdgerg/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgerg/CMake…
============================================================================== --- trunk/reactos/dll/keyboard/kbdgerg/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdgerg/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdgerg SHARED kbdgerg.c kbdgerg.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdgerg.def) -set_entrypoint(kbdgerg 0) +set_module_type(kbdgerg kbdlayout) add_dependencies(kbdgerg psdk) Modified: trunk/reactos/dll/keyboard/kbdgneo/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgneo/CMake…
============================================================================== --- trunk/reactos/dll/keyboard/kbdgneo/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdgneo/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdgneo SHARED kbdgneo.c kbdgneo.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdgneo.def) -set_entrypoint(kbdgneo 0) +set_module_type(kbdgneo kbdlayout) add_dependencies(kbdgneo psdk) Modified: trunk/reactos/dll/keyboard/kbdgr/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgr/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdgr/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdgr/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdgr SHARED kbdgr.c kbdgr.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdgr.def) -set_entrypoint(kbdgr 0) +set_module_type(kbdgr kbdlayout) add_dependencies(kbdgr psdk) Modified: trunk/reactos/dll/keyboard/kbdgrist/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgrist/CMak…
============================================================================== --- trunk/reactos/dll/keyboard/kbdgrist/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdgrist/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdgrist SHARED kbdgrist.c kbdgrist.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdgrist.def) -set_entrypoint(kbdgrist 0) +set_module_type(kbdgrist kbdlayout) add_dependencies(kbdgrist psdk) Modified: trunk/reactos/dll/keyboard/kbdhe/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdhe/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdhe/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdhe/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdhe SHARED kbdhe.c kbdhe.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdhe.def) -set_entrypoint(kbdhe 0) +set_module_type(kbdhe kbdlayout) add_dependencies(kbdhe psdk) Modified: trunk/reactos/dll/keyboard/kbdheb/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdheb/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdheb/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdheb/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdheb SHARED kbdheb.c kbdheb.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdheb.def) -set_entrypoint(kbdheb 0) +set_module_type(kbdheb kbdlayout) add_dependencies(kbdheb psdk) Modified: trunk/reactos/dll/keyboard/kbdhu/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdhu/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdhu/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdhu/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdhu SHARED kbdhu.c kbdhu.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdhu.def) -set_entrypoint(kbdhu 0) +set_module_type(kbdhu kbdlayout) add_dependencies(kbdhu psdk) Modified: trunk/reactos/dll/keyboard/kbdic/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdic/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdic/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdic/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdic SHARED kbdic.c kbdic.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdic.def) -set_entrypoint(kbdic 0) +set_module_type(kbdic kbdlayout) add_dependencies(kbdic psdk) Modified: trunk/reactos/dll/keyboard/kbdinasa/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdinasa/CMak…
============================================================================== --- trunk/reactos/dll/keyboard/kbdinasa/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdinasa/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdinasa SHARED kbdinasa.c kbdinasa.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdinasa.def) -set_entrypoint(kbdinasa 0) +set_module_type(kbdinasa kbdlayout) add_dependencies(kbdinasa psdk) Modified: trunk/reactos/dll/keyboard/kbdinben/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdinben/CMak…
============================================================================== --- trunk/reactos/dll/keyboard/kbdinben/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdinben/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdinben SHARED kbdinben.c kbdinben.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdinben.def) -set_entrypoint(kbdinben 0) +set_module_type(kbdinben kbdlayout) add_dependencies(kbdinben psdk) Modified: trunk/reactos/dll/keyboard/kbdindev/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdindev/CMak…
============================================================================== --- trunk/reactos/dll/keyboard/kbdindev/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdindev/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdindev SHARED kbdindev.c kbdindev.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdindev.def) -set_entrypoint(kbdindev 0) +set_module_type(kbdindev kbdlayout) add_dependencies(kbdindev psdk) Modified: trunk/reactos/dll/keyboard/kbdinguj/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdinguj/CMak…
============================================================================== --- trunk/reactos/dll/keyboard/kbdinguj/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdinguj/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdinguj SHARED kbdinguj.c kbdinguj.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdinguj.def) -set_entrypoint(kbdinguj 0) +set_module_type(kbdinguj kbdlayout) add_dependencies(kbdinguj psdk) Modified: trunk/reactos/dll/keyboard/kbdinmal/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdinmal/CMak…
============================================================================== --- trunk/reactos/dll/keyboard/kbdinmal/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdinmal/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdinmal SHARED kbdinmal.c kbdinmal.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdinmal.def) -set_entrypoint(kbdinmal 0) +set_module_type(kbdinmal kbdlayout) add_dependencies(kbdinmal psdk) Modified: trunk/reactos/dll/keyboard/kbdir/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdir/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdir/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdir/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdir SHARED kbdir.c kbdir.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdir.def) -set_entrypoint(kbdir 0) +set_module_type(kbdir kbdlayout) add_dependencies(kbdir psdk) Modified: trunk/reactos/dll/keyboard/kbdit/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdit/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdit/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdit/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdit SHARED kbdit.c kbdit.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdit.def) -set_entrypoint(kbdit 0) +set_module_type(kbdit kbdlayout) add_dependencies(kbdit psdk) Modified: trunk/reactos/dll/keyboard/kbdja/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdja/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdja/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdja/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdja SHARED kbdja.c kbdja.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdja.def) -set_entrypoint(kbdja 0) +set_module_type(kbdja kbdlayout) add_dependencies(kbdja psdk) Modified: trunk/reactos/dll/keyboard/kbdkaz/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdkaz/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdkaz/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdkaz/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdkaz SHARED kbdkaz.c kbdkaz.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdkaz.def) -set_entrypoint(kbdkaz 0) +set_module_type(kbdkaz kbdlayout) add_dependencies(kbdkaz psdk) Modified: trunk/reactos/dll/keyboard/kbdko/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdko/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdko/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdko/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdko SHARED kbdko.c kbdko.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdko.def) -set_entrypoint(kbdko 0) +set_module_type(kbdko kbdlayout) add_dependencies(kbdko psdk) Modified: trunk/reactos/dll/keyboard/kbdla/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdla/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdla/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdla/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdla SHARED kbdla.c kbdla.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdla.def) -set_entrypoint(kbdla 0) +set_module_type(kbdla kbdlayout) add_dependencies(kbdla psdk) Modified: trunk/reactos/dll/keyboard/kbdlt1/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdlt1/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdlt1/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdlt1/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdlt1 SHARED kbdlt1.c kbdlt1.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdlt1.def) -set_entrypoint(kbdlt1 0) +set_module_type(kbdlt1 kbdlayout) add_dependencies(kbdlt1 psdk) Modified: trunk/reactos/dll/keyboard/kbdlv/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdlv/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdlv/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdlv/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdlv SHARED kbdlv.c kbdlv.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdlv.def) -set_entrypoint(kbdlv 0) +set_module_type(kbdlv kbdlayout) add_dependencies(kbdlv psdk) Modified: trunk/reactos/dll/keyboard/kbdmac/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdmac/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdmac/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdmac/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdmac SHARED kbdmac.c kbdmac.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdmac.def) -set_entrypoint(kbdmac 0) +set_module_type(kbdmac kbdlayout) add_dependencies(kbdmac psdk) Modified: trunk/reactos/dll/keyboard/kbdne/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdne/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdne/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdne/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdne SHARED kbdne.c kbdne.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdne.def) -set_entrypoint(kbdne 0) +set_module_type(kbdne kbdlayout) add_dependencies(kbdne psdk) Modified: trunk/reactos/dll/keyboard/kbdno/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdno/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdno/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdno/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdno SHARED kbdno.c kbdno.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdno.def) -set_entrypoint(kbdno 0) +set_module_type(kbdno kbdlayout) add_dependencies(kbdno psdk) Modified: trunk/reactos/dll/keyboard/kbdpl/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdpl/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdpl/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdpl/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -3,7 +3,7 @@ add_library(kbdpl SHARED kbdpl.c kbdpl.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdpl.def) -set_entrypoint(kbdpl 0) +set_module_type(kbdpl kbdlayout) add_dependencies(kbdpl psdk) Modified: trunk/reactos/dll/keyboard/kbdpl1/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdpl1/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdpl1/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdpl1/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdpl1 SHARED kbdpl1.c kbdpl1.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdpl1.def) -set_entrypoint(kbdpl1 0) +set_module_type(kbdpl1 kbdlayout) add_dependencies(kbdpl1 psdk) Modified: trunk/reactos/dll/keyboard/kbdpo/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdpo/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdpo/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdpo/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdpo SHARED kbdpo.c kbdpo.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdpo.def) -set_entrypoint(kbdpo 0) +set_module_type(kbdpo kbdlayout) add_dependencies(kbdpo psdk) Modified: trunk/reactos/dll/keyboard/kbdro/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdro/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdro/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdro/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdro SHARED kbdro.c kbdro.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdro.def) -set_entrypoint(kbdro 0) +set_module_type(kbdro kbdlayout) add_dependencies(kbdro psdk) Modified: trunk/reactos/dll/keyboard/kbdru/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdru/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdru/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdru/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdru SHARED kbdru.c kbdru.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdru.def) -set_entrypoint(kbdru 0) +set_module_type(kbdru kbdlayout) add_dependencies(kbdru psdk) Modified: trunk/reactos/dll/keyboard/kbdru1/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdru1/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdru1/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdru1/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdru1 SHARED kbdru1.c kbdru1.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdru1.def) -set_entrypoint(kbdru1 0) +set_module_type(kbdru1 kbdlayout) add_dependencies(kbdru1 psdk) Modified: trunk/reactos/dll/keyboard/kbdsg/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdsg/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdsg/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdsg/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdsg SHARED kbdsg.c kbdsg.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdsg.def) -set_entrypoint(kbdsg 0) +set_module_type(kbdsg kbdlayout) add_dependencies(kbdsg psdk) Modified: trunk/reactos/dll/keyboard/kbdsk/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdsk/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdsk/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdsk/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdsk SHARED kbdsk.c kbdsk.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdsk.def) -set_entrypoint(kbdsk 0) +set_module_type(kbdsk kbdlayout) add_dependencies(kbdsk psdk) Modified: trunk/reactos/dll/keyboard/kbdsk1/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdsk1/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdsk1/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdsk1/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdsk1 SHARED kbdsk1.c kbdsk1.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdsk1.def) -set_entrypoint(kbdsk1 0) +set_module_type(kbdsk1 kbdlayout) add_dependencies(kbdsk1 psdk) Modified: trunk/reactos/dll/keyboard/kbdsw/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdsw/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdsw/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdsw/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdsw SHARED kbdsw.c kbdsw.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdsw.def) -set_entrypoint(kbdsw 0) +set_module_type(kbdsw kbdlayout) add_dependencies(kbdsw psdk) Modified: trunk/reactos/dll/keyboard/kbdtat/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdtat/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdtat/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdtat/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdtat SHARED kbdtat.c kbdtat.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdtat.def) -set_entrypoint(kbdtat 0) +set_module_type(kbdtat kbdlayout) add_dependencies(kbdtat psdk) Modified: trunk/reactos/dll/keyboard/kbdth0/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdth0/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdth0/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdth0/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdth0 SHARED kbdth0.c kbdth0.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdth0.def) -set_entrypoint(kbdth0 0) +set_module_type(kbdth0 kbdlayout) add_dependencies(kbdth0 psdk) Modified: trunk/reactos/dll/keyboard/kbdth1/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdth1/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdth1/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdth1/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdth1 SHARED kbdth1.c kbdth1.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdth1.def) -set_entrypoint(kbdth1 0) +set_module_type(kbdth1 kbdlayout) add_dependencies(kbdth1 psdk) Modified: trunk/reactos/dll/keyboard/kbdth2/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdth2/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdth2/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdth2/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdth2 SHARED kbdth2.c kbdth2.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdth2.def) -set_entrypoint(kbdth2 0) +set_module_type(kbdth2 kbdlayout) add_dependencies(kbdth2 psdk) Modified: trunk/reactos/dll/keyboard/kbdth3/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdth3/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdth3/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdth3/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdth3 SHARED kbdth3.c kbdth3.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdth3.def) -set_entrypoint(kbdth3 0) +set_module_type(kbdth3 kbdlayout) add_dependencies(kbdth3 psdk) Modified: trunk/reactos/dll/keyboard/kbdtuf/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdtuf/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdtuf/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdtuf/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdtuf SHARED kbdtuf.c kbdtuf.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdtuf.def) -set_entrypoint(kbdtuf 0) +set_module_type(kbdtuf kbdlayout) add_dependencies(kbdtuf psdk) Modified: trunk/reactos/dll/keyboard/kbdtuq/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdtuq/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdtuq/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdtuq/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdtuq SHARED kbdtuq.c kbdtuq.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdtuq.def) -set_entrypoint(kbdtuq 0) +set_module_type(kbdtuq kbdlayout) add_dependencies(kbdtuq psdk) Modified: trunk/reactos/dll/keyboard/kbduk/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbduk/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbduk/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbduk/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbduk SHARED kbduk.c kbduk.rc ${CMAKE_CURRENT_BINARY_DIR}/kbduk.def) -set_entrypoint(kbduk 0) +set_module_type(kbduk kbdlayout) add_dependencies(kbduk psdk) Modified: trunk/reactos/dll/keyboard/kbdur/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdur/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdur/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdur/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdur SHARED kbdur.c kbdur.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdur.def) -set_entrypoint(kbdur 0) +set_module_type(kbdur kbdlayout) add_dependencies(kbdur psdk) Modified: trunk/reactos/dll/keyboard/kbdurs/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdurs/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdurs/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdurs/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdurs SHARED kbdurs.c kbdurs.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdurs.def) -set_entrypoint(kbdurs 0) +set_module_type(kbdurs kbdlayout) add_dependencies(kbdurs psdk) Modified: trunk/reactos/dll/keyboard/kbdus/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdus/CMakeLi…
============================================================================== --- trunk/reactos/dll/keyboard/kbdus/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdus/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -4,7 +4,7 @@ add_library(kbdus SHARED kbdus.c kbdus.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdus.def) -set_entrypoint(kbdus 0) +set_module_type(kbdus kbdlayout) add_dependencies(kbdus psdk) Modified: trunk/reactos/dll/keyboard/kbdusa/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdusa/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdusa/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdusa/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdusa SHARED kbdusa.c kbdusa.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdusa.def) -set_entrypoint(kbdusa 0) +set_module_type(kbdusa kbdlayout) add_dependencies(kbdusa psdk) Modified: trunk/reactos/dll/keyboard/kbdusl/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdusl/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdusl/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdusl/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdusl SHARED kbdusl.c kbdusl.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdusl.def) -set_entrypoint(kbdusl 0) +set_module_type(kbdusl kbdlayout) add_dependencies(kbdusl psdk) Modified: trunk/reactos/dll/keyboard/kbdusr/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdusr/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdusr/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdusr/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdusr SHARED kbdusr.c kbdusr.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdusr.def) -set_entrypoint(kbdusr 0) +set_module_type(kbdusr kbdlayout) add_dependencies(kbdusr psdk) Modified: trunk/reactos/dll/keyboard/kbdusx/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdusx/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdusx/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdusx/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdusx SHARED kbdusx.c kbdusx.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdusx.def) -set_entrypoint(kbdusx 0) +set_module_type(kbdusx kbdlayout) add_dependencies(kbdusx psdk) Modified: trunk/reactos/dll/keyboard/kbduzb/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbduzb/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbduzb/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbduzb/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbduzb SHARED kbduzb.c kbduzb.rc ${CMAKE_CURRENT_BINARY_DIR}/kbduzb.def) -set_entrypoint(kbduzb 0) +set_module_type(kbduzb kbdlayout) add_dependencies(kbduzb psdk) Modified: trunk/reactos/dll/keyboard/kbdvntc/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdvntc/CMake…
============================================================================== --- trunk/reactos/dll/keyboard/kbdvntc/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdvntc/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdvntc SHARED kbdvntc.c kbdvntc.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdvntc.def) -set_entrypoint(kbdvntc 0) +set_module_type(kbdvntc kbdlayout) add_dependencies(kbdvntc psdk) Modified: trunk/reactos/dll/keyboard/kbdycc/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdycc/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdycc/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdycc/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdycc SHARED kbdycc.c kbdycc.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdycc.def) -set_entrypoint(kbdycc 0) +set_module_type(kbdycc kbdlayout) add_dependencies(kbdycc psdk) Modified: trunk/reactos/dll/keyboard/kbdycl/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdycl/CMakeL…
============================================================================== --- trunk/reactos/dll/keyboard/kbdycl/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/kbdycl/CMakeLists.txt [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -5,7 +5,7 @@ add_library(kbdycl SHARED kbdycl.c kbdycl.rc ${CMAKE_CURRENT_BINARY_DIR}/kbdycl.def) -set_entrypoint(kbdycl 0) +set_module_type(kbdycl kbdlayout) add_dependencies(kbdycl psdk) Added: trunk/reactos/kbdlayout.lds URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/kbdlayout.lds?rev=61053
============================================================================== --- trunk/reactos/kbdlayout.lds (added) +++ trunk/reactos/kbdlayout.lds [iso-8859-1] Tue Nov 19 23:30:58 2013 @@ -0,0 +1,35 @@ +SECTIONS +{ + .data __image_base__ + __section_alignment__ : + { + *(.data) + *(SORT(.data*)) + *(.rdata) + *(SORT(.rdata*)) + *(.text) + *(SORT(.text*)) + *(.bss) + *(COMMON) + } + + .rsrc BLOCK(__section_alignment__) : + { + *(.rsrc) + *(SORT(.rsrc$*)) + } + + .reloc BLOCK(__section_alignment__) : + { + *(.reloc) + } + + .edata BLOCK(__section_alignment__) : + { + *(.edata) + } + + /DISCARD/ : + { + *(*) + } +} Propchange: trunk/reactos/kbdlayout.lds ------------------------------------------------------------------------------ svn:eol-style = native
11 years, 1 month
1
0
0
0
[tkreuzer] 61052: [NTOSKRNK] Implement ExpWin32SessionCallout, which attaches to the session that the object (desktop or window station) belongs to before invoking any callbacks. The session side o...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Nov 19 23:09:13 2013 New Revision: 61052 URL:
http://svn.reactos.org/svn/reactos?rev=61052&view=rev
Log: [NTOSKRNK] Implement ExpWin32SessionCallout, which attaches to the session that the object (desktop or window station) belongs to before invoking any callbacks. The session side of support for this is currently hardcoded to support only a single session. To make this properly work, all callbacks that go through this function have the same function pointer type now, fix this in win32k accordingly. Modified: trunk/reactos/include/ndk/pstypes.h trunk/reactos/ntoskrnl/ex/win32k.c trunk/reactos/ntoskrnl/include/internal/mm.h trunk/reactos/ntoskrnl/mm/ARM3/session.c trunk/reactos/ntoskrnl/ps/win32.c trunk/reactos/win32ss/user/ntuser/desktop.c trunk/reactos/win32ss/user/ntuser/desktop.h trunk/reactos/win32ss/user/ntuser/winsta.c trunk/reactos/win32ss/user/ntuser/winsta.h Modified: trunk/reactos/include/ndk/pstypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/pstypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/pstypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/pstypes.h [iso-8859-1] Tue Nov 19 23:09:13 2013 @@ -559,7 +559,7 @@ ); typedef -VOID +NTSTATUS (NTAPI *PKWIN32_DELETEMETHOD_CALLOUT)( _In_ struct _WIN32_DELETEMETHOD_PARAMETERS *Parameters ); @@ -568,6 +568,12 @@ NTSTATUS (NTAPI *PKWIN32_PARSEMETHOD_CALLOUT)( _In_ struct _WIN32_PARSEMETHOD_PARAMETERS *Parameters +); + +typedef +NTSTATUS +(NTAPI *PKWIN32_SESSION_CALLOUT)( + _In_ PVOID Parameter ); typedef @@ -1406,15 +1412,15 @@ PKWIN32_POWERSTATE_CALLOUT PowerStateCallout; PKWIN32_JOB_CALLOUT JobCallout; PGDI_BATCHFLUSH_ROUTINE BatchFlushRoutine; - PKWIN32_OPENMETHOD_CALLOUT DesktopOpenProcedure; - PKWIN32_OKTOCLOSEMETHOD_CALLOUT DesktopOkToCloseProcedure; - PKWIN32_CLOSEMETHOD_CALLOUT DesktopCloseProcedure; - PKWIN32_DELETEMETHOD_CALLOUT DesktopDeleteProcedure; - PKWIN32_OKTOCLOSEMETHOD_CALLOUT WindowStationOkToCloseProcedure; - PKWIN32_CLOSEMETHOD_CALLOUT WindowStationCloseProcedure; - PKWIN32_DELETEMETHOD_CALLOUT WindowStationDeleteProcedure; - PKWIN32_PARSEMETHOD_CALLOUT WindowStationParseProcedure; - PKWIN32_OPENMETHOD_CALLOUT WindowStationOpenProcedure; + PKWIN32_SESSION_CALLOUT DesktopOpenProcedure; + PKWIN32_SESSION_CALLOUT DesktopOkToCloseProcedure; + PKWIN32_SESSION_CALLOUT DesktopCloseProcedure; + PKWIN32_SESSION_CALLOUT DesktopDeleteProcedure; + PKWIN32_SESSION_CALLOUT WindowStationOkToCloseProcedure; + PKWIN32_SESSION_CALLOUT WindowStationCloseProcedure; + PKWIN32_SESSION_CALLOUT WindowStationDeleteProcedure; + PKWIN32_SESSION_CALLOUT WindowStationParseProcedure; + PKWIN32_SESSION_CALLOUT WindowStationOpenProcedure; PKWIN32_WIN32DATACOLLECTION_CALLOUT Win32DataCollectionProcedure; } WIN32_CALLOUTS_FPNS, *PWIN32_CALLOUTS_FPNS; Modified: trunk/reactos/ntoskrnl/ex/win32k.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/win32k.c?rev=6…
============================================================================== --- trunk/reactos/ntoskrnl/ex/win32k.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/win32k.c [iso-8859-1] Tue Nov 19 23:09:13 2013 @@ -14,6 +14,12 @@ #pragma alloc_text(INIT, ExpWin32kInit) #endif +typedef struct _WIN32_KERNEL_OBJECT_HEADER +{ + ULONG SessionId; +} WIN32_KERNEL_OBJECT_HEADER, *PWIN32_KERNEL_OBJECT_HEADER; + + /* DATA **********************************************************************/ POBJECT_TYPE ExWindowStationObjectType = NULL; @@ -35,15 +41,76 @@ STANDARD_RIGHTS_REQUIRED }; -PKWIN32_PARSEMETHOD_CALLOUT ExpWindowStationObjectParse = NULL; -PKWIN32_DELETEMETHOD_CALLOUT ExpWindowStationObjectDelete = NULL; -PKWIN32_OKTOCLOSEMETHOD_CALLOUT ExpWindowStationObjectOkToClose = NULL; -PKWIN32_OKTOCLOSEMETHOD_CALLOUT ExpDesktopObjectOkToClose = NULL; -PKWIN32_DELETEMETHOD_CALLOUT ExpDesktopObjectDelete = NULL; -PKWIN32_OPENMETHOD_CALLOUT ExpDesktopObjectOpen = NULL; -PKWIN32_CLOSEMETHOD_CALLOUT ExpDesktopObjectClose = NULL; +PKWIN32_SESSION_CALLOUT ExpWindowStationObjectParse = NULL; +PKWIN32_SESSION_CALLOUT ExpWindowStationObjectDelete = NULL; +PKWIN32_SESSION_CALLOUT ExpWindowStationObjectOkToClose = NULL; +PKWIN32_SESSION_CALLOUT ExpDesktopObjectOkToClose = NULL; +PKWIN32_SESSION_CALLOUT ExpDesktopObjectDelete = NULL; +PKWIN32_SESSION_CALLOUT ExpDesktopObjectOpen = NULL; +PKWIN32_SESSION_CALLOUT ExpDesktopObjectClose = NULL; /* FUNCTIONS ****************************************************************/ + +NTSTATUS +NTAPI +ExpWin32SessionCallout( + _In_ PVOID Object, + _In_ PKWIN32_SESSION_CALLOUT CalloutProcedure, + _Inout_opt_ PVOID Parameter) +{ + PWIN32_KERNEL_OBJECT_HEADER Win32ObjectHeader; + PVOID SessionEntry = NULL; + KAPC_STATE ApcState; + NTSTATUS Status; + + /* The objects have a common header. And the kernel accesses it! + Thanks MS for this kind of retarded "design"! */ + Win32ObjectHeader = Object; + + /* Check if we are not already in the correct session */ + if (!PsGetCurrentProcess()->ProcessInSession || + (PsGetCurrentProcessSessionId() != Win32ObjectHeader->SessionId)) + { + /* Get the session from the objects session Id */ + DPRINT1("SessionId == %d\n", Win32ObjectHeader->SessionId); + SessionEntry = MmGetSessionById(Win32ObjectHeader->SessionId); + if (SessionEntry == NULL) + { + /* The requested session does not even exist! */ + NT_ASSERT(FALSE); + return STATUS_NOT_FOUND; + } + + /* Attach to the session */ + Status = MmAttachSession(SessionEntry, &ApcState); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Could not attach to 0x%p, object %p, callout 0x%p\n", + SessionEntry, + Win32ObjectHeader, + CalloutProcedure); + + /* Cleanup and return */ + MmQuitNextSession(SessionEntry); + NT_ASSERT(FALSE); + return Status; + } + } + + /* Call the callout routine */ + Status = CalloutProcedure(Parameter); + + /* Check if we have a session */ + if (SessionEntry != NULL) + { + /* Detach from the session and quit using it */ + MmDetachSession(SessionEntry, &ApcState); + MmQuitNextSession(SessionEntry); + } + + /* Return the callback status */ + return Status; +} BOOLEAN NTAPI @@ -53,13 +120,18 @@ IN KPROCESSOR_MODE AccessMode) { WIN32_OKAYTOCLOSEMETHOD_PARAMETERS Parameters; + NTSTATUS Status; Parameters.Process = Process; Parameters.Object = Object; Parameters.Handle = Handle; Parameters.PreviousMode = AccessMode; - return NT_SUCCESS(ExpDesktopObjectOkToClose(&Parameters)); + Status = ExpWin32SessionCallout(Object, + ExpDesktopObjectOkToClose, + &Parameters); + + return NT_SUCCESS(Status); } BOOLEAN @@ -70,13 +142,18 @@ IN KPROCESSOR_MODE AccessMode) { WIN32_OKAYTOCLOSEMETHOD_PARAMETERS Parameters; + NTSTATUS Status; Parameters.Process = Process; Parameters.Object = Object; Parameters.Handle = Handle; Parameters.PreviousMode = AccessMode; - return NT_SUCCESS(ExpWindowStationObjectOkToClose(&Parameters)); + Status = ExpWin32SessionCallout(Object, + ExpWindowStationObjectOkToClose, + &Parameters); + + return NT_SUCCESS(Status); } VOID @@ -88,8 +165,9 @@ /* Fill out the callback structure */ Parameters.Object = DeletedObject; - /* Call the Registered Callback */ - ExpWindowStationObjectDelete(&Parameters); + ExpWin32SessionCallout(DeletedObject, + ExpWindowStationObjectDelete, + &Parameters); } NTSTATUS @@ -119,8 +197,9 @@ Parameters.SecurityQos = SecurityQos; Parameters.Object = Object; - /* Call the Registered Callback */ - return ExpWindowStationObjectParse(&Parameters); + return ExpWin32SessionCallout(ParseObject, + ExpWindowStationObjectParse, + &Parameters); } VOID NTAPI @@ -131,12 +210,13 @@ /* Fill out the callback structure */ Parameters.Object = DeletedObject; - /* Call the Registered Callback */ - ExpDesktopObjectDelete(&Parameters); + ExpWin32SessionCallout(DeletedObject, + ExpDesktopObjectDelete, + &Parameters); } NTSTATUS -NTAPI +NTAPI ExpDesktopOpen(IN OB_OPEN_REASON Reason, IN PEPROCESS Process OPTIONAL, IN PVOID ObjectBody, @@ -151,11 +231,13 @@ Parameters.GrantedAccess = GrantedAccess; Parameters.HandleCount = HandleCount; - return ExpDesktopObjectOpen(&Parameters); + return ExpWin32SessionCallout(ObjectBody, + ExpDesktopObjectOpen, + &Parameters); } VOID -NTAPI +NTAPI ExpDesktopClose(IN PEPROCESS Process OPTIONAL, IN PVOID Object, IN ACCESS_MASK GrantedAccess, @@ -170,7 +252,9 @@ Parameters.ProcessHandleCount = ProcessHandleCount; Parameters.SystemHandleCount = SystemHandleCount; - ExpDesktopObjectClose(&Parameters); + ExpWin32SessionCallout(Object, + ExpDesktopObjectClose, + &Parameters); } BOOLEAN @@ -202,7 +286,7 @@ NULL, &ExWindowStationObjectType); if (!NT_SUCCESS(Status)) return FALSE; - + /* Create desktop object type */ RtlInitUnicodeString(&Name, L"Desktop"); ObjectTypeInitializer.GenericMapping = ExpDesktopMapping; @@ -216,7 +300,7 @@ NULL, &ExDesktopObjectType); if (!NT_SUCCESS(Status)) return FALSE; - + return TRUE; } 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] Tue Nov 19 23:09:13 2013 @@ -1770,3 +1770,31 @@ PVOID P, POOL_TYPE PoolType, ULONG Tag); + + +/* session.c *****************************************************************/ + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +NTAPI +MmAttachSession( + _Inout_ PVOID SessionEntry, + _Out_ PKAPC_STATE ApcState); + +_IRQL_requires_max_(APC_LEVEL) +VOID +NTAPI +MmDetachSession( + _Inout_ PVOID SessionEntry, + _Out_ PKAPC_STATE ApcState); + +VOID +NTAPI +MmQuitNextSession( + _Inout_ PVOID SessionEntry); + +PVOID +NTAPI +MmGetSessionById( + _In_ ULONG SessionId); + Modified: trunk/reactos/ntoskrnl/mm/ARM3/session.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/session.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/session.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/session.c [iso-8859-1] Tue Nov 19 23:09:13 2013 @@ -24,6 +24,9 @@ LONG MmSessionDataPages; PRTL_BITMAP MiSessionIdBitmap; volatile LONG MiSessionLeaderExists; + +// HACK: we support only one process. The creator is CSRSS and that lives! +PEPROCESS Session0CreatorProcess; /* PRIVATE FUNCTIONS **********************************************************/ @@ -607,6 +610,10 @@ ASSERT(SessionGlobal->ProcessReferenceToSession == 0); SessionGlobal->ProcessReferenceToSession = 1; + // HACK: we only support 1 session and save the creator process + NT_ASSERT(Session0CreatorProcess == NULL); + Session0CreatorProcess = PsGetCurrentProcess(); + /* We're done */ InterlockedIncrement(&MmSessionDataPages); return STATUS_SUCCESS; @@ -700,3 +707,74 @@ /* All done */ return STATUS_SUCCESS; } + +_IRQL_requires_max_(APC_LEVEL) +NTSTATUS +NTAPI +MmAttachSession( + _Inout_ PVOID SessionEntry, + _Out_ PKAPC_STATE ApcState) +{ + PEPROCESS EntryProcess; + + /* The parameter is the actual process! */ + EntryProcess = SessionEntry; + NT_ASSERT(EntryProcess != NULL); + + /* HACK: for now we only support 1 session! */ + NT_ASSERT(((PMM_SESSION_SPACE)EntryProcess->Session)->SessionId == 1); + + /* Very simple for now: just attach to the process we have */ + KeStackAttachProcess(&EntryProcess->Pcb, ApcState); + return STATUS_SUCCESS; +} + +_IRQL_requires_max_(APC_LEVEL) +VOID +NTAPI +MmDetachSession( + _Inout_ PVOID SessionEntry, + _In_ PKAPC_STATE ApcState) +{ + PEPROCESS EntryProcess; + + /* The parameter is the actual process! */ + EntryProcess = SessionEntry; + NT_ASSERT(EntryProcess != NULL); + + /* HACK: for now we only support 1 session! */ + NT_ASSERT(((PMM_SESSION_SPACE)EntryProcess->Session)->SessionId == 0); + + /* Very simple for now: just detach */ + KeUnstackDetachProcess(ApcState); +} + +VOID +NTAPI +MmQuitNextSession( + _Inout_ PVOID SessionEntry) +{ + PEPROCESS EntryProcess; + + /* The parameter is the actual process! */ + EntryProcess = SessionEntry; + NT_ASSERT(EntryProcess != NULL); + + /* HACK: for now we only support 1 session! */ + NT_ASSERT(((PMM_SESSION_SPACE)EntryProcess->Session)->SessionId == 0); + + /* Get rid of the reference we got */ + ObDereferenceObject(SessionEntry); +} + +PVOID +NTAPI +MmGetSessionById( + _In_ ULONG SessionId) +{ + /* HACK: for now we only support 1 session! */ + NT_ASSERT(SessionId == 0); + + /* Just return the sessions creator process, which is csrss and still alive. */ + return Session0CreatorProcess; +} Modified: trunk/reactos/ntoskrnl/ps/win32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/win32.c?rev=61…
============================================================================== --- trunk/reactos/ntoskrnl/ps/win32.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ps/win32.c [iso-8859-1] Tue Nov 19 23:09:13 2013 @@ -18,13 +18,13 @@ PKWIN32_PROCESS_CALLOUT PspW32ProcessCallout = NULL; PKWIN32_THREAD_CALLOUT PspW32ThreadCallout = NULL; PGDI_BATCHFLUSH_ROUTINE KeGdiFlushUserBatch = NULL; -extern PKWIN32_PARSEMETHOD_CALLOUT ExpWindowStationObjectParse; -extern PKWIN32_DELETEMETHOD_CALLOUT ExpWindowStationObjectDelete; -extern PKWIN32_OKTOCLOSEMETHOD_CALLOUT ExpWindowStationObjectOkToClose; -extern PKWIN32_OKTOCLOSEMETHOD_CALLOUT ExpDesktopObjectOkToClose; -extern PKWIN32_DELETEMETHOD_CALLOUT ExpDesktopObjectDelete; -extern PKWIN32_OPENMETHOD_CALLOUT ExpDesktopObjectOpen; -extern PKWIN32_CLOSEMETHOD_CALLOUT ExpDesktopObjectClose; +extern PKWIN32_SESSION_CALLOUT ExpWindowStationObjectParse; +extern PKWIN32_SESSION_CALLOUT ExpWindowStationObjectDelete; +extern PKWIN32_SESSION_CALLOUT ExpWindowStationObjectOkToClose; +extern PKWIN32_SESSION_CALLOUT ExpDesktopObjectOkToClose; +extern PKWIN32_SESSION_CALLOUT ExpDesktopObjectDelete; +extern PKWIN32_SESSION_CALLOUT ExpDesktopObjectOpen; +extern PKWIN32_SESSION_CALLOUT ExpDesktopObjectClose; extern PKWIN32_POWEREVENT_CALLOUT PopEventCallout; /* PRIVATE FUNCTIONS *********************************************************/ Modified: trunk/reactos/win32ss/user/ntuser/desktop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/deskto…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/desktop.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/desktop.c [iso-8859-1] Tue Nov 19 23:09:13 2013 @@ -138,10 +138,13 @@ return STATUS_SUCCESS; } -VOID APIENTRY -IntDesktopObjectDelete(PWIN32_DELETEMETHOD_PARAMETERS Parameters) -{ - PDESKTOP pdesk = (PDESKTOP)Parameters->Object; +NTSTATUS +NTAPI +IntDesktopObjectDelete( + _In_ PVOID Parameters) +{ + PWIN32_DELETEMETHOD_PARAMETERS DeleteParameters = Parameters; + PDESKTOP pdesk = (PDESKTOP)DeleteParameters->Object; TRACE("Deleting desktop object 0x%p\n", pdesk); @@ -158,11 +161,15 @@ /* Free the heap */ IntFreeDesktopHeap(pdesk); -} - -NTSTATUS NTAPI -IntDesktopOkToClose(PWIN32_OKAYTOCLOSEMETHOD_PARAMETERS Parameters) -{ + return STATUS_SUCCESS; +} + +NTSTATUS +NTAPI +IntDesktopOkToClose( + _In_ PVOID Parameters) +{ + PWIN32_OKAYTOCLOSEMETHOD_PARAMETERS OkToCloseParameters = Parameters; PTHREADINFO pti = PsGetCurrentThreadWin32Thread(); if( pti == NULL) @@ -172,8 +179,8 @@ } /* Do not allow the current desktop or the initial desktop to be closed */ - if( Parameters->Handle == pti->ppi->hdeskStartup || - Parameters->Handle == pti->hdesk) + if( OkToCloseParameters->Handle == pti->ppi->hdeskStartup || + OkToCloseParameters->Handle == pti->hdesk) { return STATUS_ACCESS_DENIED; } @@ -181,18 +188,26 @@ return STATUS_SUCCESS; } -NTSTATUS NTAPI IntDesktopObjectOpen(PWIN32_OPENMETHOD_PARAMETERS Parameters) -{ - PPROCESSINFO ppi = PsGetProcessWin32Process(Parameters->Process); +NTSTATUS +NTAPI +IntDesktopObjectOpen( + _In_ PVOID Parameters) +{ + PWIN32_OPENMETHOD_PARAMETERS OpenParameters = Parameters; + PPROCESSINFO ppi = PsGetProcessWin32Process(OpenParameters->Process); if (ppi == NULL) return STATUS_SUCCESS; - return IntMapDesktopView((PDESKTOP)Parameters->Object); -} - -NTSTATUS NTAPI IntDesktopObjectClose(PWIN32_CLOSEMETHOD_PARAMETERS Parameters) -{ - PPROCESSINFO ppi = PsGetProcessWin32Process(Parameters->Process); + return IntMapDesktopView((PDESKTOP)OpenParameters->Object); +} + +NTSTATUS +NTAPI +IntDesktopObjectClose( + _In_ PVOID Parameters) +{ + PWIN32_CLOSEMETHOD_PARAMETERS CloseParameters = Parameters; + PPROCESSINFO ppi = PsGetProcessWin32Process(CloseParameters->Process); if (ppi == NULL) { /* This happens when the process leaks desktop handles. @@ -200,7 +215,7 @@ return STATUS_SUCCESS; } - return IntUnmapDesktopView((PDESKTOP)Parameters->Object); + return IntUnmapDesktopView((PDESKTOP)CloseParameters->Object); } @@ -1341,6 +1356,7 @@ RETURN(NULL); } + pdesk->dwSessionId = PsGetCurrentProcessSessionId(); pdesk->DesktopWindow = pWnd->head.h; pdesk->pDeskInfo->spwnd = pWnd; pWnd->fnid = FNID_DESKTOP; @@ -1638,7 +1654,7 @@ if (PsGetCurrentProcessSessionId() != pdesk->rpwinstaParent->dwSessionId) { ERR("NtUserSwitchDesktop called for a desktop of a different session\n"); - RETURN(FALSE); + RETURN(FALSE); } if(pdesk == gpdeskInputDesktop) Modified: trunk/reactos/win32ss/user/ntuser/desktop.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/deskto…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/desktop.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/desktop.h [iso-8859-1] Tue Nov 19 23:09:13 2013 @@ -2,6 +2,9 @@ typedef struct _DESKTOP { + /* Must be the first member */ + DWORD dwSessionId; + PDESKTOPINFO pDeskInfo; LIST_ENTRY ListEntry; /* Pointer to the associated window station. */ @@ -99,17 +102,25 @@ IN PSECURITY_QUALITY_OF_SERVICE SecurityQos OPTIONAL, OUT PVOID *Object); -VOID APIENTRY -IntDesktopObjectDelete(PWIN32_DELETEMETHOD_PARAMETERS Parameters); - -NTSTATUS NTAPI -IntDesktopOkToClose(PWIN32_OKAYTOCLOSEMETHOD_PARAMETERS Parameters); - -NTSTATUS NTAPI -IntDesktopObjectOpen(PWIN32_OPENMETHOD_PARAMETERS Parameters); - -NTSTATUS NTAPI -IntDesktopObjectClose(PWIN32_CLOSEMETHOD_PARAMETERS Parameters); +NTSTATUS +NTAPI +IntDesktopObjectDelete( + _In_ PVOID Parameters); + +NTSTATUS +NTAPI +IntDesktopOkToClose( + _In_ PVOID Parameters); + +NTSTATUS +NTAPI +IntDesktopObjectOpen( + _In_ PVOID Parameters); + +NTSTATUS +NTAPI +IntDesktopObjectClose( + _In_ PVOID Parameters); HDC FASTCALL IntGetScreenDC(VOID); Modified: trunk/reactos/win32ss/user/ntuser/winsta.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/winsta…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/winsta.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/winsta.c [iso-8859-1] Tue Nov 19 23:09:13 2013 @@ -95,42 +95,49 @@ /* OBJECT CALLBACKS **********************************************************/ -VOID APIENTRY -IntWinStaObjectDelete(PWIN32_DELETEMETHOD_PARAMETERS Parameters) -{ - PWINSTATION_OBJECT WinSta = (PWINSTATION_OBJECT)Parameters->Object; - - TRACE("Deleting window station (0x%p)\n", WinSta); - - UserEmptyClipboardData(WinSta); - - RtlDestroyAtomTable(WinSta->AtomTable); - - RtlFreeUnicodeString(&WinSta->Name); -} - NTSTATUS APIENTRY -IntWinStaObjectParse(PWIN32_PARSEMETHOD_PARAMETERS Parameters) -{ - PUNICODE_STRING RemainingName = Parameters->RemainingName; +IntWinStaObjectDelete( + _In_ PVOID Parameters) +{ + PWIN32_DELETEMETHOD_PARAMETERS DeleteParameters = Parameters; + PWINSTATION_OBJECT WinSta = (PWINSTATION_OBJECT)DeleteParameters->Object; + + TRACE("Deleting window station (0x%p)\n", WinSta); + + UserEmptyClipboardData(WinSta); + + RtlDestroyAtomTable(WinSta->AtomTable); + + RtlFreeUnicodeString(&WinSta->Name); + + return STATUS_SUCCESS; +} + +NTSTATUS +APIENTRY +IntWinStaObjectParse( + _In_ PVOID Parameters) +{ + PWIN32_PARSEMETHOD_PARAMETERS ParseParameters = Parameters; + PUNICODE_STRING RemainingName = ParseParameters->RemainingName; /* Assume we don't find anything */ - *Parameters->Object = NULL; + *ParseParameters->Object = NULL; /* Check for an empty name */ if (!RemainingName->Length) { /* Make sure this is a window station, can't parse a desktop now */ - if (Parameters->ObjectType != ExWindowStationObjectType) + if (ParseParameters->ObjectType != ExWindowStationObjectType) { /* Fail */ return STATUS_OBJECT_TYPE_MISMATCH; } /* Reference the window station and return */ - ObReferenceObject(Parameters->ParseObject); - *Parameters->Object = Parameters->ParseObject; + ObReferenceObject(ParseParameters->ParseObject); + *ParseParameters->Object = ParseParameters->ParseObject; return STATUS_SUCCESS; } @@ -153,19 +160,19 @@ /* * Check if we are parsing a desktop. */ - if (Parameters->ObjectType == ExDesktopObjectType) + if (ParseParameters->ObjectType == ExDesktopObjectType) { /* Then call the desktop parse routine */ - return IntDesktopObjectParse(Parameters->ParseObject, - Parameters->ObjectType, - Parameters->AccessState, - Parameters->AccessMode, - Parameters->Attributes, - Parameters->CompleteName, + return IntDesktopObjectParse(ParseParameters->ParseObject, + ParseParameters->ObjectType, + ParseParameters->AccessState, + ParseParameters->AccessMode, + ParseParameters->Attributes, + ParseParameters->CompleteName, RemainingName, - Parameters->Context, - Parameters->SecurityQos, - Parameters->Object); + ParseParameters->Context, + ParseParameters->SecurityQos, + ParseParameters->Object); } /* Should hopefully never get here */ @@ -174,13 +181,15 @@ NTSTATUS NTAPI -IntWinstaOkToClose(PWIN32_OKAYTOCLOSEMETHOD_PARAMETERS Parameters) -{ +IntWinstaOkToClose( + _In_ PVOID Parameters) +{ + PWIN32_OKAYTOCLOSEMETHOD_PARAMETERS OkToCloseParameters = Parameters; PPROCESSINFO ppi; ppi = PsGetCurrentProcessWin32Process(); - if(ppi && (Parameters->Handle == ppi->hwinsta)) + if(ppi && (OkToCloseParameters->Handle == ppi->hwinsta)) { return STATUS_ACCESS_DENIED; } Modified: trunk/reactos/win32ss/user/ntuser/winsta.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/winsta…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/winsta.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/winsta.h [iso-8859-1] Tue Nov 19 23:09:13 2013 @@ -71,18 +71,34 @@ NTSTATUS NTAPI InitWindowStationImpl(VOID); -NTSTATUS NTAPI UserCreateWinstaDirectory(); -VOID APIENTRY IntWinStaObjectDelete(PWIN32_DELETEMETHOD_PARAMETERS Parameters); -NTSTATUS APIENTRY IntWinStaObjectParse(PWIN32_PARSEMETHOD_PARAMETERS Parameters); -NTSTATUS NTAPI IntWinstaOkToClose(PWIN32_OKAYTOCLOSEMETHOD_PARAMETERS Parameters); +NTSTATUS +NTAPI +UserCreateWinstaDirectory(); -NTSTATUS FASTCALL +NTSTATUS +APIENTRY +IntWinStaObjectDelete( + _In_ PVOID Parameters); + +NTSTATUS +APIENTRY +IntWinStaObjectParse( + _In_ PVOID Parameters); + +NTSTATUS +NTAPI +IntWinstaOkToClose( + _In_ PVOID Parameters); + +NTSTATUS +FASTCALL IntValidateWindowStationHandle( HWINSTA WindowStation, KPROCESSOR_MODE AccessMode, ACCESS_MASK DesiredAccess, PWINSTATION_OBJECT *Object); + BOOL FASTCALL UserSetProcessWindowStation(HWINSTA hWindowStation); BOOL FASTCALL co_IntInitializeDesktopGraphics(VOID);
11 years, 1 month
1
0
0
0
[hbelusca] 61051: [REGEDIT] Disable Delete/Rename menu options for root nodes ("My Computer" and HKEY_* keys). Patch by Edijs Kolesnikovics. CORE-7602 #resolve #comment Committed in revision 61051, ...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue Nov 19 21:20:13 2013 New Revision: 61051 URL:
http://svn.reactos.org/svn/reactos?rev=61051&view=rev
Log: [REGEDIT] Disable Delete/Rename menu options for root nodes ("My Computer" and HKEY_* keys). Patch by Edijs Kolesnikovics. CORE-7602 #resolve #comment Committed in revision 61051, thanks :) Modified: trunk/reactos/base/applications/regedit/childwnd.c Modified: trunk/reactos/base/applications/regedit/childwnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
============================================================================== --- trunk/reactos/base/applications/regedit/childwnd.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/childwnd.c [iso-8859-1] Tue Nov 19 21:20:13 2013 @@ -541,8 +541,34 @@ case TVN_ITEMEXPANDING: return !OnTreeExpanding(g_pChildWnd->hTreeWnd, (NMTREEVIEW*)lParam); case TVN_SELCHANGED: - UpdateAddress(((NMTREEVIEW*)lParam)->itemNew.hItem, NULL, NULL); + { + NMTREEVIEW* pnmtv = (NMTREEVIEW*)lParam; + /* Get the parent of the current item */ + HTREEITEM hParentItem = TreeView_GetParent(g_pChildWnd->hTreeWnd, pnmtv->itemNew.hItem); + + UpdateAddress(pnmtv->itemNew.hItem, NULL, NULL); + + /* + * Disable Delete/Rename menu options for 'My Computer' (first item so doesn't have any parent) + * and HKEY_* keys (their parent is 'My Computer' and the previous remark applies). + */ + if (!hParentItem || !TreeView_GetParent(g_pChildWnd->hTreeWnd, hParentItem)) + { + EnableMenuItem(hMenuFrame , ID_EDIT_DELETE, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(hMenuFrame , ID_EDIT_RENAME, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(hPopupMenus, ID_TREE_DELETE, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(hPopupMenus, ID_TREE_RENAME, MF_BYCOMMAND | MF_GRAYED); + } + else + { + EnableMenuItem(hMenuFrame , ID_EDIT_DELETE, MF_BYCOMMAND | MF_ENABLED); + EnableMenuItem(hMenuFrame , ID_EDIT_RENAME, MF_BYCOMMAND | MF_ENABLED); + EnableMenuItem(hPopupMenus, ID_TREE_DELETE, MF_BYCOMMAND | MF_ENABLED); + EnableMenuItem(hPopupMenus, ID_TREE_RENAME, MF_BYCOMMAND | MF_ENABLED); + } + break; + } case NM_SETFOCUS: g_pChildWnd->nFocusPanel = 0; break;
11 years, 1 month
1
0
0
0
[tkreuzer] 61050: [NTOSKRNL] Move session routines into session.c. No code change.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Nov 19 21:13:31 2013 New Revision: 61050 URL:
http://svn.reactos.org/svn/reactos?rev=61050&view=rev
Log: [NTOSKRNL] Move session routines into session.c. No code change. Added: trunk/reactos/ntoskrnl/mm/ARM3/session.c (with props) Modified: trunk/reactos/ntoskrnl/CMakeLists.txt trunk/reactos/ntoskrnl/mm/ARM3/procsup.c Modified: trunk/reactos/ntoskrnl/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/CMakeLists.txt?re…
============================================================================== --- trunk/reactos/ntoskrnl/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/CMakeLists.txt [iso-8859-1] Tue Nov 19 21:13:31 2013 @@ -216,6 +216,7 @@ mm/ARM3/pool.c mm/ARM3/procsup.c mm/ARM3/section.c + mm/ARM3/session.c mm/ARM3/special.c mm/ARM3/sysldr.c mm/ARM3/syspte.c Modified: trunk/reactos/ntoskrnl/mm/ARM3/procsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/procsup.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] Tue Nov 19 21:13:31 2013 @@ -554,41 +554,6 @@ // Return the old priority // return OldPriority; -} - -LCID -NTAPI -MmGetSessionLocaleId(VOID) -{ - PEPROCESS Process; - PAGED_CODE(); - - // - // Get the current process - // - Process = PsGetCurrentProcess(); - - // - // Check if it's the Session Leader - // - if (Process->Vm.Flags.SessionLeader) - { - // - // Make sure it has a valid Session - // - if (Process->Session) - { - // - // Get the Locale ID - // - return ((PMM_SESSION_SPACE)Process->Session)->LocaleId; - } - } - - // - // Not a session leader, return the default - // - return PsDefaultThreadLocaleId; } NTSTATUS @@ -1473,653 +1438,6 @@ Process->Pcb.DirectoryTableBase[1] = 0; } -/* SESSION CODE TO MOVE TO SESSION.C ******************************************/ - -PMM_SESSION_SPACE MmSessionSpace; -PFN_NUMBER MiSessionDataPages, MiSessionTagPages, MiSessionTagSizePages; -PFN_NUMBER MiSessionBigPoolPages, MiSessionCreateCharge; -KGUARDED_MUTEX MiSessionIdMutex; -LONG MmSessionDataPages; -PRTL_BITMAP MiSessionIdBitmap; -volatile LONG MiSessionLeaderExists; - -VOID -NTAPI -MiInitializeSessionIds(VOID) -{ - ULONG Size, BitmapSize; - PFN_NUMBER TotalPages; - - /* Setup the total number of data pages needed for the structure */ - TotalPages = MI_SESSION_DATA_PAGES_MAXIMUM; - MiSessionDataPages = ROUND_TO_PAGES(sizeof(MM_SESSION_SPACE)) >> PAGE_SHIFT; - ASSERT(MiSessionDataPages <= MI_SESSION_DATA_PAGES_MAXIMUM - 3); - TotalPages -= MiSessionDataPages; - - /* Setup the number of pages needed for session pool tags */ - MiSessionTagSizePages = 2; - MiSessionBigPoolPages = 1; - MiSessionTagPages = MiSessionTagSizePages + MiSessionBigPoolPages; - ASSERT(MiSessionTagPages <= TotalPages); - ASSERT(MiSessionTagPages < MI_SESSION_TAG_PAGES_MAXIMUM); - - /* Total pages needed for a session (FIXME: Probably different on PAE/x64) */ - MiSessionCreateCharge = 1 + MiSessionDataPages + MiSessionTagPages; - - /* Initialize the lock */ - KeInitializeGuardedMutex(&MiSessionIdMutex); - - /* Allocate the bitmap */ - Size = MI_INITIAL_SESSION_IDS; - BitmapSize = ((Size + 31) / 32) * sizeof(ULONG); - MiSessionIdBitmap = ExAllocatePoolWithTag(PagedPool, - sizeof(RTL_BITMAP) + BitmapSize, - ' mM'); - if (MiSessionIdBitmap) - { - /* Free all the bits */ - RtlInitializeBitMap(MiSessionIdBitmap, - (PVOID)(MiSessionIdBitmap + 1), - Size); - RtlClearAllBits(MiSessionIdBitmap); - } - else - { - /* Die if we couldn't allocate the bitmap */ - KeBugCheckEx(INSTALL_MORE_MEMORY, - MmNumberOfPhysicalPages, - MmLowestPhysicalPage, - MmHighestPhysicalPage, - 0x200); - } -} - -VOID -NTAPI -MiSessionLeader(IN PEPROCESS Process) -{ - KIRQL OldIrql; - - /* Set the flag while under the expansion lock */ - OldIrql = KeAcquireQueuedSpinLock(LockQueueExpansionLock); - Process->Vm.Flags.SessionLeader = TRUE; - KeReleaseQueuedSpinLock(LockQueueExpansionLock, OldIrql); -} - -ULONG -NTAPI -MmGetSessionId(IN PEPROCESS Process) -{ - PMM_SESSION_SPACE SessionGlobal; - - /* The session leader is always session zero */ - if (Process->Vm.Flags.SessionLeader == 1) return 0; - - /* Otherwise, get the session global, and read the session ID from it */ - SessionGlobal = (PMM_SESSION_SPACE)Process->Session; - if (!SessionGlobal) return 0; - return SessionGlobal->SessionId; -} - -ULONG -NTAPI -MmGetSessionIdEx(IN PEPROCESS Process) -{ - PMM_SESSION_SPACE SessionGlobal; - - /* The session leader is always session zero */ - if (Process->Vm.Flags.SessionLeader == 1) return 0; - - /* Otherwise, get the session global, and read the session ID from it */ - SessionGlobal = (PMM_SESSION_SPACE)Process->Session; - if (!SessionGlobal) return -1; - return SessionGlobal->SessionId; -} - -VOID -NTAPI -MiReleaseProcessReferenceToSessionDataPage(IN PMM_SESSION_SPACE SessionGlobal) -{ - ULONG i, SessionId; - PMMPTE PointerPte; - PFN_NUMBER PageFrameIndex[MI_SESSION_DATA_PAGES_MAXIMUM]; - PMMPFN Pfn1; - KIRQL OldIrql; - - /* Is there more than just this reference? If so, bail out */ - if (InterlockedDecrement(&SessionGlobal->ProcessReferenceToSession)) return; - - /* Get the session ID */ - SessionId = SessionGlobal->SessionId; - DPRINT1("Last process in session %lu going down!!!\n", SessionId); - - /* Free the session page tables */ -#ifndef _M_AMD64 - ExFreePoolWithTag(SessionGlobal->PageTables, 'tHmM'); -#endif - ASSERT(!MI_IS_PHYSICAL_ADDRESS(SessionGlobal)); - - /* Capture the data page PFNs */ - PointerPte = MiAddressToPte(SessionGlobal); - for (i = 0; i < MiSessionDataPages; i++) - { - PageFrameIndex[i] = PFN_FROM_PTE(PointerPte + i); - } - - /* Release them */ - MiReleaseSystemPtes(PointerPte, MiSessionDataPages, SystemPteSpace); - - /* Mark them as deleted */ - for (i = 0; i < MiSessionDataPages; i++) - { - Pfn1 = MI_PFN_ELEMENT(PageFrameIndex[i]); - MI_SET_PFN_DELETED(Pfn1); - } - - /* Loop every data page and drop a reference count */ - OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); - for (i = 0; i < MiSessionDataPages; i++) - { - /* Sanity check that the page is correct, then decrement it */ - Pfn1 = MI_PFN_ELEMENT(PageFrameIndex[i]); - ASSERT(Pfn1->u2.ShareCount == 1); - ASSERT(Pfn1->u3.e2.ReferenceCount == 1); - MiDecrementShareCount(Pfn1, PageFrameIndex[i]); - } - - /* Done playing with pages, release the lock */ - KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql); - - /* Decrement the number of data pages */ - InterlockedDecrement(&MmSessionDataPages); - - /* Free this session ID from the session bitmap */ - KeAcquireGuardedMutex(&MiSessionIdMutex); - ASSERT(RtlCheckBit(MiSessionIdBitmap, SessionId)); - RtlClearBit(MiSessionIdBitmap, SessionId); - KeReleaseGuardedMutex(&MiSessionIdMutex); -} - -VOID -NTAPI -MiSessionRemoveProcess(VOID) -{ - PEPROCESS CurrentProcess = PsGetCurrentProcess(); - - /* If the process isn't already in a session, or if it's the leader... */ - if (!(CurrentProcess->Flags & PSF_PROCESS_IN_SESSION_BIT) || - (CurrentProcess->Vm.Flags.SessionLeader)) - { - /* Then there's nothing to do */ - return; - } - - /* Sanity check */ - ASSERT(MmIsAddressValid(MmSessionSpace) == TRUE); - - /* Remove the process from the list ,and dereference the session */ - // DO NOT ENABLE THIS UNLESS YOU FIXED THE NP POOL CORRUPTION THAT IT CAUSES!!! - //RemoveEntryList(&CurrentProcess->SessionProcessLinks); - //MiDereferenceSession(); -} - -VOID -NTAPI -MiSessionAddProcess(IN PEPROCESS NewProcess) -{ - PMM_SESSION_SPACE SessionGlobal; - - /* The current process must already be in a session */ - if (!(PsGetCurrentProcess()->Flags & PSF_PROCESS_IN_SESSION_BIT)) return; - - /* Sanity check */ - ASSERT(MmIsAddressValid(MmSessionSpace) == TRUE); - - /* Get the global session */ - SessionGlobal = MmSessionSpace->GlobalVirtualAddress; - - /* Increment counters */ - InterlockedIncrement((PLONG)&SessionGlobal->ReferenceCount); - InterlockedIncrement(&SessionGlobal->ResidentProcessCount); - InterlockedIncrement(&SessionGlobal->ProcessReferenceToSession); - - /* Set the session pointer */ - ASSERT(NewProcess->Session == NULL); - NewProcess->Session = SessionGlobal; - - /* Insert it into the process list */ - // DO NOT ENABLE THIS UNLESS YOU FIXED THE NP POOL CORRUPTION THAT IT CAUSES!!! - //InsertTailList(&SessionGlobal->ProcessList, &NewProcess->SessionProcessLinks); - - /* Set the flag */ - PspSetProcessFlag(NewProcess, PSF_PROCESS_IN_SESSION_BIT); -} - -NTSTATUS -NTAPI -MiSessionInitializeWorkingSetList(VOID) -{ - KIRQL OldIrql; - PMMPTE PointerPte, PointerPde; - MMPTE TempPte; - ULONG Color, Index; - PFN_NUMBER PageFrameIndex; - PMM_SESSION_SPACE SessionGlobal; - BOOLEAN AllocatedPageTable; - PMMWSL WorkingSetList; - - /* Get pointers to session global and the session working set list */ - SessionGlobal = MmSessionSpace->GlobalVirtualAddress; - WorkingSetList = (PMMWSL)MiSessionSpaceWs; - - /* Fill out the two pointers */ - MmSessionSpace->Vm.VmWorkingSetList = WorkingSetList; - MmSessionSpace->Wsle = (PMMWSLE)WorkingSetList->UsedPageTableEntries; - - /* Get the PDE for the working set, and check if it's already allocated */ - PointerPde = MiAddressToPde(WorkingSetList); - if (PointerPde->u.Hard.Valid == 1) - { - /* Nope, we'll have to do it */ - ASSERT(PointerPde->u.Hard.Global == 0); - AllocatedPageTable = FALSE; - } - else - { - /* Yep, that makes our job easier */ - AllocatedPageTable = TRUE; - } - - /* Get the PTE for the working set */ - PointerPte = MiAddressToPte(WorkingSetList); - - /* Initialize the working set lock, and lock the PFN database */ - ExInitializePushLock(&SessionGlobal->Vm.WorkingSetMutex); - //MmLockPageableSectionByHandle(ExPageLockHandle); - OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); - - /* Check if we need a page table */ - if (AllocatedPageTable == TRUE) - { - /* Get a zeroed colored zero page */ - Color = MI_GET_NEXT_COLOR(); - PageFrameIndex = MiRemoveZeroPageSafe(Color); - if (!PageFrameIndex) - { - /* No zero pages, grab a free one */ - PageFrameIndex = MiRemoveAnyPage(Color); - - /* Zero it outside the PFN lock */ - KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql); - MiZeroPhysicalPage(PageFrameIndex); - OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); - } - - /* Write a valid PDE for it */ - TempPte.u.Long = ValidKernelPdeLocal.u.Long; - TempPte.u.Hard.PageFrameNumber = PageFrameIndex; - MI_WRITE_VALID_PTE(PointerPde, TempPte); - - /* Add this into the list */ - Index = ((ULONG_PTR)WorkingSetList - (ULONG_PTR)MmSessionBase) >> 22; -#ifndef _M_AMD64 - MmSessionSpace->PageTables[Index] = TempPte; -#endif - /* Initialize the page directory page, and now zero the working set list itself */ - MiInitializePfnForOtherProcess(PageFrameIndex, - PointerPde, - MmSessionSpace->SessionPageDirectoryIndex); - KeZeroPages(PointerPte, PAGE_SIZE); - } - - /* Get a zeroed colored zero page */ - Color = MI_GET_NEXT_COLOR(); - PageFrameIndex = MiRemoveZeroPageSafe(Color); - if (!PageFrameIndex) - { - /* No zero pages, grab a free one */ - PageFrameIndex = MiRemoveAnyPage(Color); - - /* Zero it outside the PFN lock */ - KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql); - MiZeroPhysicalPage(PageFrameIndex); - OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); - } - - /* Write a valid PTE for it */ - TempPte.u.Long = ValidKernelPteLocal.u.Long; - TempPte.u.Hard.Dirty = TRUE; - TempPte.u.Hard.PageFrameNumber = PageFrameIndex; - - /* Initialize the working set list page */ - MiInitializePfnAndMakePteValid(PageFrameIndex, PointerPte, TempPte); - - /* Now we can release the PFN database lock */ - KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql); - - /* Fill out the working set structure */ - MmSessionSpace->Vm.Flags.SessionSpace = 1; - MmSessionSpace->Vm.MinimumWorkingSetSize = 20; - MmSessionSpace->Vm.MaximumWorkingSetSize = 384; - WorkingSetList->LastEntry = 20; - WorkingSetList->HashTable = NULL; - WorkingSetList->HashTableSize = 0; - WorkingSetList->Wsle = MmSessionSpace->Wsle; - - /* FIXME: Handle list insertions */ - ASSERT(SessionGlobal->WsListEntry.Flink == NULL); - ASSERT(SessionGlobal->WsListEntry.Blink == NULL); - ASSERT(SessionGlobal->Vm.WorkingSetExpansionLinks.Flink == NULL); - ASSERT(SessionGlobal->Vm.WorkingSetExpansionLinks.Blink == NULL); - - /* All done, return */ - //MmUnlockPageableImageSection(ExPageLockHandle); - return STATUS_SUCCESS; -} - -NTSTATUS -NTAPI -MiSessionCreateInternal(OUT PULONG SessionId) -{ - PEPROCESS Process = PsGetCurrentProcess(); - ULONG NewFlags, Flags, Size, i, Color; - KIRQL OldIrql; - PMMPTE PointerPte, PageTables, SessionPte; - PMMPDE PointerPde; - PMM_SESSION_SPACE SessionGlobal; - MMPTE TempPte; - NTSTATUS Status; - BOOLEAN Result; - PFN_NUMBER SessionPageDirIndex; - PFN_NUMBER TagPage[MI_SESSION_TAG_PAGES_MAXIMUM]; - PFN_NUMBER DataPage[MI_SESSION_DATA_PAGES_MAXIMUM]; - - /* This should not exist yet */ - ASSERT(MmIsAddressValid(MmSessionSpace) == FALSE); - - /* Loop so we can set the session-is-creating flag */ - Flags = Process->Flags; - while (TRUE) - { - /* Check if it's already set */ - if (Flags & PSF_SESSION_CREATION_UNDERWAY_BIT) - { - /* Bail out */ - DPRINT1("Lost session race\n"); - return STATUS_ALREADY_COMMITTED; - } - - /* Now try to set it */ - NewFlags = InterlockedCompareExchange((PLONG)&Process->Flags, - Flags | PSF_SESSION_CREATION_UNDERWAY_BIT, - Flags); - if (NewFlags == Flags) break; - - /* It changed, try again */ - Flags = NewFlags; - } - - /* Now we should own the flag */ - ASSERT(Process->Flags & PSF_SESSION_CREATION_UNDERWAY_BIT); - - /* - * Session space covers everything from 0xA0000000 to 0xC0000000. - * Allocate enough page tables to describe the entire region - */ - Size = (0x20000000 / PDE_MAPPED_VA) * sizeof(MMPTE); - PageTables = ExAllocatePoolWithTag(NonPagedPool, Size, 'tHmM'); - ASSERT(PageTables != NULL); - RtlZeroMemory(PageTables, Size); - - /* Lock the session ID creation mutex */ - KeAcquireGuardedMutex(&MiSessionIdMutex); - - /* Allocate a new Session ID */ - *SessionId = RtlFindClearBitsAndSet(MiSessionIdBitmap, 1, 0); - if (*SessionId == 0xFFFFFFFF) - { - /* We ran out of session IDs, we should expand */ - DPRINT1("Too many sessions created. Expansion not yet supported\n"); - ExFreePoolWithTag(PageTables, 'tHmM'); - return STATUS_NO_MEMORY; - } - - /* Unlock the session ID creation mutex */ - KeReleaseGuardedMutex(&MiSessionIdMutex); - - /* Reserve the global PTEs */ - SessionPte = MiReserveSystemPtes(MiSessionDataPages, SystemPteSpace); - ASSERT(SessionPte != NULL); - - /* Acquire the PFN lock while we set everything up */ - OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); - - /* Loop the global PTEs */ - TempPte.u.Long = ValidKernelPte.u.Long; - for (i = 0; i < MiSessionDataPages; i++) - { - /* Get a zeroed colored zero page */ - Color = MI_GET_NEXT_COLOR(); - DataPage[i] = MiRemoveZeroPageSafe(Color); - if (!DataPage[i]) - { - /* No zero pages, grab a free one */ - DataPage[i] = MiRemoveAnyPage(Color); - - /* Zero it outside the PFN lock */ - KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql); - MiZeroPhysicalPage(DataPage[i]); - OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); - } - - /* Fill the PTE out */ - TempPte.u.Hard.PageFrameNumber = DataPage[i]; - MI_WRITE_VALID_PTE(SessionPte + i, TempPte); - } - - /* Set the pointer to global space */ - SessionGlobal = MiPteToAddress(SessionPte); - - /* Get a zeroed colored zero page */ - Color = MI_GET_NEXT_COLOR(); - SessionPageDirIndex = MiRemoveZeroPageSafe(Color); - if (!SessionPageDirIndex) - { - /* No zero pages, grab a free one */ - SessionPageDirIndex = MiRemoveAnyPage(Color); - - /* Zero it outside the PFN lock */ - KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql); - MiZeroPhysicalPage(SessionPageDirIndex); - OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); - } - - /* Fill the PTE out */ - TempPte.u.Long = ValidKernelPdeLocal.u.Long; - TempPte.u.Hard.PageFrameNumber = SessionPageDirIndex; - - /* Setup, allocate, fill out the MmSessionSpace PTE */ - PointerPde = MiAddressToPde(MmSessionSpace); - ASSERT(PointerPde->u.Long == 0); - MI_WRITE_VALID_PTE(PointerPde, TempPte); - MiInitializePfnForOtherProcess(SessionPageDirIndex, - PointerPde, - SessionPageDirIndex); - ASSERT(MI_PFN_ELEMENT(SessionPageDirIndex)->u1.WsIndex == 0); - - /* Loop all the local PTEs for it */ - TempPte.u.Long = ValidKernelPteLocal.u.Long; - PointerPte = MiAddressToPte(MmSessionSpace); - for (i = 0; i < MiSessionDataPages; i++) - { - /* And fill them out */ - TempPte.u.Hard.PageFrameNumber = DataPage[i]; - MiInitializePfnAndMakePteValid(DataPage[i], PointerPte + i, TempPte); - ASSERT(MI_PFN_ELEMENT(DataPage[i])->u1.WsIndex == 0); - } - - /* Finally loop all of the session pool tag pages */ - for (i = 0; i < MiSessionTagPages; i++) - { - /* Grab a zeroed colored page */ - Color = MI_GET_NEXT_COLOR(); - TagPage[i] = MiRemoveZeroPageSafe(Color); - if (!TagPage[i]) - { - /* No zero pages, grab a free one */ - TagPage[i] = MiRemoveAnyPage(Color); - - /* Zero it outside the PFN lock */ - KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql); - MiZeroPhysicalPage(TagPage[i]); - OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); - } - - /* Fill the PTE out */ - TempPte.u.Hard.PageFrameNumber = TagPage[i]; - MiInitializePfnAndMakePteValid(TagPage[i], - PointerPte + MiSessionDataPages + i, - TempPte); - } - - /* PTEs have been setup, release the PFN lock */ - KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql); - - /* Fill out the session space structure now */ - MmSessionSpace->GlobalVirtualAddress = SessionGlobal; - MmSessionSpace->ReferenceCount = 1; - MmSessionSpace->ResidentProcessCount = 1; - MmSessionSpace->u.LongFlags = 0; - MmSessionSpace->SessionId = *SessionId; - MmSessionSpace->LocaleId = PsDefaultSystemLocaleId; - MmSessionSpace->SessionPageDirectoryIndex = SessionPageDirIndex; - MmSessionSpace->Color = Color; - MmSessionSpace->NonPageablePages = MiSessionCreateCharge; - MmSessionSpace->CommittedPages = MiSessionCreateCharge; -#ifndef _M_AMD64 - MmSessionSpace->PageTables = PageTables; - MmSessionSpace->PageTables[PointerPde - MiAddressToPde(MmSessionBase)] = *PointerPde; -#endif - InitializeListHead(&MmSessionSpace->ImageList); - DPRINT1("Session %lu is ready to go: 0x%p 0x%p, %lx 0x%p\n", - *SessionId, MmSessionSpace, SessionGlobal, SessionPageDirIndex, PageTables); - - /* Initialize session pool */ - //Status = MiInitializeSessionPool(); - Status = STATUS_SUCCESS; - ASSERT(NT_SUCCESS(Status) == TRUE); - - /* Initialize system space */ - Result = MiInitializeSystemSpaceMap(&SessionGlobal->Session); - ASSERT(Result == TRUE); - - /* Initialize the process list, make sure the workign set list is empty */ - ASSERT(SessionGlobal->WsListEntry.Flink == NULL); - ASSERT(SessionGlobal->WsListEntry.Blink == NULL); - InitializeListHead(&SessionGlobal->ProcessList); - - /* We're done, clear the flag */ - ASSERT(Process->Flags & PSF_SESSION_CREATION_UNDERWAY_BIT); - PspClearProcessFlag(Process, PSF_SESSION_CREATION_UNDERWAY_BIT); - - /* Insert the process into the session */ - ASSERT(Process->Session == NULL); - ASSERT(SessionGlobal->ProcessReferenceToSession == 0); - SessionGlobal->ProcessReferenceToSession = 1; - - /* We're done */ - InterlockedIncrement(&MmSessionDataPages); - return STATUS_SUCCESS; -} - -NTSTATUS -NTAPI -MmSessionCreate(OUT PULONG SessionId) -{ - PEPROCESS Process = PsGetCurrentProcess(); - ULONG SessionLeaderExists; - NTSTATUS Status; - - /* Fail if the process is already in a session */ - if (Process->Flags & PSF_PROCESS_IN_SESSION_BIT) - { - DPRINT1("Process already in session\n"); - return STATUS_ALREADY_COMMITTED; - } - - /* Check if the process is already the session leader */ - if (!Process->Vm.Flags.SessionLeader) - { - /* Atomically set it as the leader */ - SessionLeaderExists = InterlockedCompareExchange(&MiSessionLeaderExists, 1, 0); - if (SessionLeaderExists) - { - DPRINT1("Session leader race\n"); - return STATUS_INVALID_SYSTEM_SERVICE; - } - - /* Do the work required to upgrade him */ - MiSessionLeader(Process); - } - - /* Create the session */ - KeEnterCriticalRegion(); - Status = MiSessionCreateInternal(SessionId); - if (!NT_SUCCESS(Status)) - { - KeLeaveCriticalRegion(); - return Status; - } - - /* Set up the session working set */ - Status = MiSessionInitializeWorkingSetList(); - if (!NT_SUCCESS(Status)) - { - /* Fail */ - //MiDereferenceSession(); - ASSERT(FALSE); - KeLeaveCriticalRegion(); - return Status; - } - - /* All done */ - KeLeaveCriticalRegion(); - - /* Set and assert the flags, and return */ - MmSessionSpace->u.Flags.Initialized = 1; - PspSetProcessFlag(Process, PSF_PROCESS_IN_SESSION_BIT); - ASSERT(MiSessionLeaderExists == 1); - return Status; -} - -NTSTATUS -NTAPI -MmSessionDelete(IN ULONG SessionId) -{ - PEPROCESS Process = PsGetCurrentProcess(); - - /* Process must be in a session */ - if (!(Process->Flags & PSF_PROCESS_IN_SESSION_BIT)) - { - DPRINT1("Not in a session!\n"); - return STATUS_UNABLE_TO_FREE_VM; - } - - /* It must be the session leader */ - if (!Process->Vm.Flags.SessionLeader) - { - DPRINT1("Not a session leader!\n"); - return STATUS_UNABLE_TO_FREE_VM; - } - - /* Remove one reference count */ - KeEnterCriticalRegion(); - /* FIXME: Do it */ - KeLeaveCriticalRegion(); - - /* All done */ - return STATUS_SUCCESS; -} /* SYSTEM CALLS ***************************************************************/ Added: trunk/reactos/ntoskrnl/mm/ARM3/session.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/session.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/session.c (added) +++ trunk/reactos/ntoskrnl/mm/ARM3/session.c [iso-8859-1] Tue Nov 19 21:13:31 2013 @@ -0,0 +1,702 @@ +/* + * PROJECT: ReactOS Kernel + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: ntoskrnl/mm/ARM3/session.c + * PURPOSE: Session support routines + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES *******************************************************************/ + +#include <ntoskrnl.h> +#define NDEBUG +#include <debug.h> + +#define MODULE_INVOLVED_IN_ARM3 +#include "../ARM3/miarm.h" + +/* GLOBALS ********************************************************************/ + +PMM_SESSION_SPACE MmSessionSpace; +PFN_NUMBER MiSessionDataPages, MiSessionTagPages, MiSessionTagSizePages; +PFN_NUMBER MiSessionBigPoolPages, MiSessionCreateCharge; +KGUARDED_MUTEX MiSessionIdMutex; +LONG MmSessionDataPages; +PRTL_BITMAP MiSessionIdBitmap; +volatile LONG MiSessionLeaderExists; + + +/* PRIVATE FUNCTIONS **********************************************************/ + +LCID +NTAPI +MmGetSessionLocaleId(VOID) +{ + PEPROCESS Process; + PAGED_CODE(); + + // + // Get the current process + // + Process = PsGetCurrentProcess(); + + // + // Check if it's the Session Leader + // + if (Process->Vm.Flags.SessionLeader) + { + // + // Make sure it has a valid Session + // + if (Process->Session) + { + // + // Get the Locale ID + // + return ((PMM_SESSION_SPACE)Process->Session)->LocaleId; + } + } + + // + // Not a session leader, return the default + // + return PsDefaultThreadLocaleId; +} + +VOID +NTAPI +MiInitializeSessionIds(VOID) +{ + ULONG Size, BitmapSize; + PFN_NUMBER TotalPages; + + /* Setup the total number of data pages needed for the structure */ + TotalPages = MI_SESSION_DATA_PAGES_MAXIMUM; + MiSessionDataPages = ROUND_TO_PAGES(sizeof(MM_SESSION_SPACE)) >> PAGE_SHIFT; + ASSERT(MiSessionDataPages <= MI_SESSION_DATA_PAGES_MAXIMUM - 3); + TotalPages -= MiSessionDataPages; + + /* Setup the number of pages needed for session pool tags */ + MiSessionTagSizePages = 2; + MiSessionBigPoolPages = 1; + MiSessionTagPages = MiSessionTagSizePages + MiSessionBigPoolPages; + ASSERT(MiSessionTagPages <= TotalPages); + ASSERT(MiSessionTagPages < MI_SESSION_TAG_PAGES_MAXIMUM); + + /* Total pages needed for a session (FIXME: Probably different on PAE/x64) */ + MiSessionCreateCharge = 1 + MiSessionDataPages + MiSessionTagPages; + + /* Initialize the lock */ + KeInitializeGuardedMutex(&MiSessionIdMutex); + + /* Allocate the bitmap */ + Size = MI_INITIAL_SESSION_IDS; + BitmapSize = ((Size + 31) / 32) * sizeof(ULONG); + MiSessionIdBitmap = ExAllocatePoolWithTag(PagedPool, + sizeof(RTL_BITMAP) + BitmapSize, + ' mM'); + if (MiSessionIdBitmap) + { + /* Free all the bits */ + RtlInitializeBitMap(MiSessionIdBitmap, + (PVOID)(MiSessionIdBitmap + 1), + Size); + RtlClearAllBits(MiSessionIdBitmap); + } + else + { + /* Die if we couldn't allocate the bitmap */ + KeBugCheckEx(INSTALL_MORE_MEMORY, + MmNumberOfPhysicalPages, + MmLowestPhysicalPage, + MmHighestPhysicalPage, + 0x200); + } +} + +VOID +NTAPI +MiSessionLeader(IN PEPROCESS Process) +{ + KIRQL OldIrql; + + /* Set the flag while under the expansion lock */ + OldIrql = KeAcquireQueuedSpinLock(LockQueueExpansionLock); + Process->Vm.Flags.SessionLeader = TRUE; + KeReleaseQueuedSpinLock(LockQueueExpansionLock, OldIrql); +} + +ULONG +NTAPI +MmGetSessionId(IN PEPROCESS Process) +{ + PMM_SESSION_SPACE SessionGlobal; + + /* The session leader is always session zero */ + if (Process->Vm.Flags.SessionLeader == 1) return 0; + + /* Otherwise, get the session global, and read the session ID from it */ + SessionGlobal = (PMM_SESSION_SPACE)Process->Session; + if (!SessionGlobal) return 0; + return SessionGlobal->SessionId; +} + +ULONG +NTAPI +MmGetSessionIdEx(IN PEPROCESS Process) +{ + PMM_SESSION_SPACE SessionGlobal; + + /* The session leader is always session zero */ + if (Process->Vm.Flags.SessionLeader == 1) return 0; + + /* Otherwise, get the session global, and read the session ID from it */ + SessionGlobal = (PMM_SESSION_SPACE)Process->Session; + if (!SessionGlobal) return -1; + return SessionGlobal->SessionId; +} + +VOID +NTAPI +MiReleaseProcessReferenceToSessionDataPage(IN PMM_SESSION_SPACE SessionGlobal) +{ + ULONG i, SessionId; + PMMPTE PointerPte; + PFN_NUMBER PageFrameIndex[MI_SESSION_DATA_PAGES_MAXIMUM]; + PMMPFN Pfn1; + KIRQL OldIrql; + + /* Is there more than just this reference? If so, bail out */ + if (InterlockedDecrement(&SessionGlobal->ProcessReferenceToSession)) return; + + /* Get the session ID */ + SessionId = SessionGlobal->SessionId; + DPRINT1("Last process in session %lu going down!!!\n", SessionId); + + /* Free the session page tables */ +#ifndef _M_AMD64 + ExFreePoolWithTag(SessionGlobal->PageTables, 'tHmM'); +#endif + ASSERT(!MI_IS_PHYSICAL_ADDRESS(SessionGlobal)); + + /* Capture the data page PFNs */ + PointerPte = MiAddressToPte(SessionGlobal); + for (i = 0; i < MiSessionDataPages; i++) + { + PageFrameIndex[i] = PFN_FROM_PTE(PointerPte + i); + } + + /* Release them */ + MiReleaseSystemPtes(PointerPte, MiSessionDataPages, SystemPteSpace); + + /* Mark them as deleted */ + for (i = 0; i < MiSessionDataPages; i++) + { + Pfn1 = MI_PFN_ELEMENT(PageFrameIndex[i]); + MI_SET_PFN_DELETED(Pfn1); + } + + /* Loop every data page and drop a reference count */ + OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); + for (i = 0; i < MiSessionDataPages; i++) + { + /* Sanity check that the page is correct, then decrement it */ + Pfn1 = MI_PFN_ELEMENT(PageFrameIndex[i]); + ASSERT(Pfn1->u2.ShareCount == 1); + ASSERT(Pfn1->u3.e2.ReferenceCount == 1); + MiDecrementShareCount(Pfn1, PageFrameIndex[i]); + } + + /* Done playing with pages, release the lock */ + KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql); + + /* Decrement the number of data pages */ + InterlockedDecrement(&MmSessionDataPages); + + /* Free this session ID from the session bitmap */ + KeAcquireGuardedMutex(&MiSessionIdMutex); + ASSERT(RtlCheckBit(MiSessionIdBitmap, SessionId)); + RtlClearBit(MiSessionIdBitmap, SessionId); + KeReleaseGuardedMutex(&MiSessionIdMutex); +} + +VOID +NTAPI +MiSessionRemoveProcess(VOID) +{ + PEPROCESS CurrentProcess = PsGetCurrentProcess(); + + /* If the process isn't already in a session, or if it's the leader... */ + if (!(CurrentProcess->Flags & PSF_PROCESS_IN_SESSION_BIT) || + (CurrentProcess->Vm.Flags.SessionLeader)) + { + /* Then there's nothing to do */ + return; + } + + /* Sanity check */ + ASSERT(MmIsAddressValid(MmSessionSpace) == TRUE); + + /* Remove the process from the list ,and dereference the session */ + // DO NOT ENABLE THIS UNLESS YOU FIXED THE NP POOL CORRUPTION THAT IT CAUSES!!! + //RemoveEntryList(&CurrentProcess->SessionProcessLinks); + //MiDereferenceSession(); +} + +VOID +NTAPI +MiSessionAddProcess(IN PEPROCESS NewProcess) +{ + PMM_SESSION_SPACE SessionGlobal; + + /* The current process must already be in a session */ + if (!(PsGetCurrentProcess()->Flags & PSF_PROCESS_IN_SESSION_BIT)) return; + + /* Sanity check */ + ASSERT(MmIsAddressValid(MmSessionSpace) == TRUE); + + /* Get the global session */ + SessionGlobal = MmSessionSpace->GlobalVirtualAddress; + + /* Increment counters */ + InterlockedIncrement((PLONG)&SessionGlobal->ReferenceCount); + InterlockedIncrement(&SessionGlobal->ResidentProcessCount); + InterlockedIncrement(&SessionGlobal->ProcessReferenceToSession); + + /* Set the session pointer */ + ASSERT(NewProcess->Session == NULL); + NewProcess->Session = SessionGlobal; + + /* Insert it into the process list */ + // DO NOT ENABLE THIS UNLESS YOU FIXED THE NP POOL CORRUPTION THAT IT CAUSES!!! + //InsertTailList(&SessionGlobal->ProcessList, &NewProcess->SessionProcessLinks); + + /* Set the flag */ + PspSetProcessFlag(NewProcess, PSF_PROCESS_IN_SESSION_BIT); +} + +NTSTATUS +NTAPI +MiSessionInitializeWorkingSetList(VOID) +{ + KIRQL OldIrql; + PMMPTE PointerPte, PointerPde; + MMPTE TempPte; + ULONG Color, Index; + PFN_NUMBER PageFrameIndex; + PMM_SESSION_SPACE SessionGlobal; + BOOLEAN AllocatedPageTable; + PMMWSL WorkingSetList; + + /* Get pointers to session global and the session working set list */ + SessionGlobal = MmSessionSpace->GlobalVirtualAddress; + WorkingSetList = (PMMWSL)MiSessionSpaceWs; + + /* Fill out the two pointers */ + MmSessionSpace->Vm.VmWorkingSetList = WorkingSetList; + MmSessionSpace->Wsle = (PMMWSLE)WorkingSetList->UsedPageTableEntries; + + /* Get the PDE for the working set, and check if it's already allocated */ + PointerPde = MiAddressToPde(WorkingSetList); + if (PointerPde->u.Hard.Valid == 1) + { + /* Nope, we'll have to do it */ + ASSERT(PointerPde->u.Hard.Global == 0); + AllocatedPageTable = FALSE; + } + else + { + /* Yep, that makes our job easier */ + AllocatedPageTable = TRUE; + } + + /* Get the PTE for the working set */ + PointerPte = MiAddressToPte(WorkingSetList); + + /* Initialize the working set lock, and lock the PFN database */ + ExInitializePushLock(&SessionGlobal->Vm.WorkingSetMutex); + //MmLockPageableSectionByHandle(ExPageLockHandle); + OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); + + /* Check if we need a page table */ + if (AllocatedPageTable == TRUE) + { + /* Get a zeroed colored zero page */ + Color = MI_GET_NEXT_COLOR(); + PageFrameIndex = MiRemoveZeroPageSafe(Color); + if (!PageFrameIndex) + { + /* No zero pages, grab a free one */ + PageFrameIndex = MiRemoveAnyPage(Color); + + /* Zero it outside the PFN lock */ + KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql); + MiZeroPhysicalPage(PageFrameIndex); + OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); + } + + /* Write a valid PDE for it */ + TempPte.u.Long = ValidKernelPdeLocal.u.Long; + TempPte.u.Hard.PageFrameNumber = PageFrameIndex; + MI_WRITE_VALID_PTE(PointerPde, TempPte); + + /* Add this into the list */ + Index = ((ULONG_PTR)WorkingSetList - (ULONG_PTR)MmSessionBase) >> 22; +#ifndef _M_AMD64 + MmSessionSpace->PageTables[Index] = TempPte; +#endif + /* Initialize the page directory page, and now zero the working set list itself */ + MiInitializePfnForOtherProcess(PageFrameIndex, + PointerPde, + MmSessionSpace->SessionPageDirectoryIndex); + KeZeroPages(PointerPte, PAGE_SIZE); + } + + /* Get a zeroed colored zero page */ + Color = MI_GET_NEXT_COLOR(); + PageFrameIndex = MiRemoveZeroPageSafe(Color); + if (!PageFrameIndex) + { + /* No zero pages, grab a free one */ + PageFrameIndex = MiRemoveAnyPage(Color); + + /* Zero it outside the PFN lock */ + KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql); + MiZeroPhysicalPage(PageFrameIndex); + OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); + } + + /* Write a valid PTE for it */ + TempPte.u.Long = ValidKernelPteLocal.u.Long; + TempPte.u.Hard.Dirty = TRUE; + TempPte.u.Hard.PageFrameNumber = PageFrameIndex; + + /* Initialize the working set list page */ + MiInitializePfnAndMakePteValid(PageFrameIndex, PointerPte, TempPte); + + /* Now we can release the PFN database lock */ + KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql); + + /* Fill out the working set structure */ + MmSessionSpace->Vm.Flags.SessionSpace = 1; + MmSessionSpace->Vm.MinimumWorkingSetSize = 20; + MmSessionSpace->Vm.MaximumWorkingSetSize = 384; + WorkingSetList->LastEntry = 20; + WorkingSetList->HashTable = NULL; + WorkingSetList->HashTableSize = 0; + WorkingSetList->Wsle = MmSessionSpace->Wsle; + + /* FIXME: Handle list insertions */ + ASSERT(SessionGlobal->WsListEntry.Flink == NULL); + ASSERT(SessionGlobal->WsListEntry.Blink == NULL); + ASSERT(SessionGlobal->Vm.WorkingSetExpansionLinks.Flink == NULL); + ASSERT(SessionGlobal->Vm.WorkingSetExpansionLinks.Blink == NULL); + + /* All done, return */ + //MmUnlockPageableImageSection(ExPageLockHandle); + return STATUS_SUCCESS; +} + +NTSTATUS +NTAPI +MiSessionCreateInternal(OUT PULONG SessionId) +{ + PEPROCESS Process = PsGetCurrentProcess(); + ULONG NewFlags, Flags, Size, i, Color; + KIRQL OldIrql; + PMMPTE PointerPte, PageTables, SessionPte; + PMMPDE PointerPde; + PMM_SESSION_SPACE SessionGlobal; + MMPTE TempPte; + NTSTATUS Status; + BOOLEAN Result; + PFN_NUMBER SessionPageDirIndex; + PFN_NUMBER TagPage[MI_SESSION_TAG_PAGES_MAXIMUM]; + PFN_NUMBER DataPage[MI_SESSION_DATA_PAGES_MAXIMUM]; + + /* This should not exist yet */ + ASSERT(MmIsAddressValid(MmSessionSpace) == FALSE); + + /* Loop so we can set the session-is-creating flag */ + Flags = Process->Flags; + while (TRUE) + { + /* Check if it's already set */ + if (Flags & PSF_SESSION_CREATION_UNDERWAY_BIT) + { + /* Bail out */ + DPRINT1("Lost session race\n"); + return STATUS_ALREADY_COMMITTED; + } + + /* Now try to set it */ + NewFlags = InterlockedCompareExchange((PLONG)&Process->Flags, + Flags | PSF_SESSION_CREATION_UNDERWAY_BIT, + Flags); + if (NewFlags == Flags) break; + + /* It changed, try again */ + Flags = NewFlags; + } + + /* Now we should own the flag */ + ASSERT(Process->Flags & PSF_SESSION_CREATION_UNDERWAY_BIT); + + /* + * Session space covers everything from 0xA0000000 to 0xC0000000. + * Allocate enough page tables to describe the entire region + */ + Size = (0x20000000 / PDE_MAPPED_VA) * sizeof(MMPTE); + PageTables = ExAllocatePoolWithTag(NonPagedPool, Size, 'tHmM'); + ASSERT(PageTables != NULL); + RtlZeroMemory(PageTables, Size); + + /* Lock the session ID creation mutex */ + KeAcquireGuardedMutex(&MiSessionIdMutex); + + /* Allocate a new Session ID */ + *SessionId = RtlFindClearBitsAndSet(MiSessionIdBitmap, 1, 0); + if (*SessionId == 0xFFFFFFFF) + { + /* We ran out of session IDs, we should expand */ + DPRINT1("Too many sessions created. Expansion not yet supported\n"); + ExFreePoolWithTag(PageTables, 'tHmM'); + return STATUS_NO_MEMORY; + } + + /* Unlock the session ID creation mutex */ + KeReleaseGuardedMutex(&MiSessionIdMutex); + + /* Reserve the global PTEs */ + SessionPte = MiReserveSystemPtes(MiSessionDataPages, SystemPteSpace); + ASSERT(SessionPte != NULL); + + /* Acquire the PFN lock while we set everything up */ + OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); + + /* Loop the global PTEs */ + TempPte.u.Long = ValidKernelPte.u.Long; + for (i = 0; i < MiSessionDataPages; i++) + { + /* Get a zeroed colored zero page */ + Color = MI_GET_NEXT_COLOR(); + DataPage[i] = MiRemoveZeroPageSafe(Color); + if (!DataPage[i]) + { + /* No zero pages, grab a free one */ + DataPage[i] = MiRemoveAnyPage(Color); + + /* Zero it outside the PFN lock */ + KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql); + MiZeroPhysicalPage(DataPage[i]); + OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); + } + + /* Fill the PTE out */ + TempPte.u.Hard.PageFrameNumber = DataPage[i]; + MI_WRITE_VALID_PTE(SessionPte + i, TempPte); + } + + /* Set the pointer to global space */ + SessionGlobal = MiPteToAddress(SessionPte); + + /* Get a zeroed colored zero page */ + Color = MI_GET_NEXT_COLOR(); + SessionPageDirIndex = MiRemoveZeroPageSafe(Color); + if (!SessionPageDirIndex) + { + /* No zero pages, grab a free one */ + SessionPageDirIndex = MiRemoveAnyPage(Color); + + /* Zero it outside the PFN lock */ + KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql); + MiZeroPhysicalPage(SessionPageDirIndex); + OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); + } + + /* Fill the PTE out */ + TempPte.u.Long = ValidKernelPdeLocal.u.Long; + TempPte.u.Hard.PageFrameNumber = SessionPageDirIndex; + + /* Setup, allocate, fill out the MmSessionSpace PTE */ + PointerPde = MiAddressToPde(MmSessionSpace); + ASSERT(PointerPde->u.Long == 0); + MI_WRITE_VALID_PTE(PointerPde, TempPte); + MiInitializePfnForOtherProcess(SessionPageDirIndex, + PointerPde, + SessionPageDirIndex); + ASSERT(MI_PFN_ELEMENT(SessionPageDirIndex)->u1.WsIndex == 0); + + /* Loop all the local PTEs for it */ + TempPte.u.Long = ValidKernelPteLocal.u.Long; + PointerPte = MiAddressToPte(MmSessionSpace); + for (i = 0; i < MiSessionDataPages; i++) + { + /* And fill them out */ + TempPte.u.Hard.PageFrameNumber = DataPage[i]; + MiInitializePfnAndMakePteValid(DataPage[i], PointerPte + i, TempPte); + ASSERT(MI_PFN_ELEMENT(DataPage[i])->u1.WsIndex == 0); + } + + /* Finally loop all of the session pool tag pages */ + for (i = 0; i < MiSessionTagPages; i++) + { + /* Grab a zeroed colored page */ + Color = MI_GET_NEXT_COLOR(); + TagPage[i] = MiRemoveZeroPageSafe(Color); + if (!TagPage[i]) + { + /* No zero pages, grab a free one */ + TagPage[i] = MiRemoveAnyPage(Color); + + /* Zero it outside the PFN lock */ + KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql); + MiZeroPhysicalPage(TagPage[i]); + OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); + } + + /* Fill the PTE out */ + TempPte.u.Hard.PageFrameNumber = TagPage[i]; + MiInitializePfnAndMakePteValid(TagPage[i], + PointerPte + MiSessionDataPages + i, + TempPte); + } + + /* PTEs have been setup, release the PFN lock */ + KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql); + + /* Fill out the session space structure now */ + MmSessionSpace->GlobalVirtualAddress = SessionGlobal; + MmSessionSpace->ReferenceCount = 1; + MmSessionSpace->ResidentProcessCount = 1; + MmSessionSpace->u.LongFlags = 0; + MmSessionSpace->SessionId = *SessionId; + MmSessionSpace->LocaleId = PsDefaultSystemLocaleId; + MmSessionSpace->SessionPageDirectoryIndex = SessionPageDirIndex; + MmSessionSpace->Color = Color; + MmSessionSpace->NonPageablePages = MiSessionCreateCharge; + MmSessionSpace->CommittedPages = MiSessionCreateCharge; +#ifndef _M_AMD64 + MmSessionSpace->PageTables = PageTables; + MmSessionSpace->PageTables[PointerPde - MiAddressToPde(MmSessionBase)] = *PointerPde; +#endif + InitializeListHead(&MmSessionSpace->ImageList); + DPRINT1("Session %lu is ready to go: 0x%p 0x%p, %lx 0x%p\n", + *SessionId, MmSessionSpace, SessionGlobal, SessionPageDirIndex, PageTables); + + /* Initialize session pool */ + //Status = MiInitializeSessionPool(); + Status = STATUS_SUCCESS; + ASSERT(NT_SUCCESS(Status) == TRUE); + + /* Initialize system space */ + Result = MiInitializeSystemSpaceMap(&SessionGlobal->Session); + ASSERT(Result == TRUE); + + /* Initialize the process list, make sure the workign set list is empty */ + ASSERT(SessionGlobal->WsListEntry.Flink == NULL); + ASSERT(SessionGlobal->WsListEntry.Blink == NULL); + InitializeListHead(&SessionGlobal->ProcessList); + + /* We're done, clear the flag */ + ASSERT(Process->Flags & PSF_SESSION_CREATION_UNDERWAY_BIT); + PspClearProcessFlag(Process, PSF_SESSION_CREATION_UNDERWAY_BIT); + + /* Insert the process into the session */ + ASSERT(Process->Session == NULL); + ASSERT(SessionGlobal->ProcessReferenceToSession == 0); + SessionGlobal->ProcessReferenceToSession = 1; + + /* We're done */ + InterlockedIncrement(&MmSessionDataPages); + return STATUS_SUCCESS; +} + +NTSTATUS +NTAPI +MmSessionCreate(OUT PULONG SessionId) +{ + PEPROCESS Process = PsGetCurrentProcess(); + ULONG SessionLeaderExists; + NTSTATUS Status; + + /* Fail if the process is already in a session */ + if (Process->Flags & PSF_PROCESS_IN_SESSION_BIT) + { + DPRINT1("Process already in session\n"); + return STATUS_ALREADY_COMMITTED; + } + + /* Check if the process is already the session leader */ + if (!Process->Vm.Flags.SessionLeader) + { + /* Atomically set it as the leader */ + SessionLeaderExists = InterlockedCompareExchange(&MiSessionLeaderExists, 1, 0); + if (SessionLeaderExists) + { + DPRINT1("Session leader race\n"); + return STATUS_INVALID_SYSTEM_SERVICE; + } + + /* Do the work required to upgrade him */ + MiSessionLeader(Process); + } + + /* Create the session */ + KeEnterCriticalRegion(); + Status = MiSessionCreateInternal(SessionId); + if (!NT_SUCCESS(Status)) + { + KeLeaveCriticalRegion(); + return Status; + } + + /* Set up the session working set */ + Status = MiSessionInitializeWorkingSetList(); + if (!NT_SUCCESS(Status)) + { + /* Fail */ + //MiDereferenceSession(); + ASSERT(FALSE); + KeLeaveCriticalRegion(); + return Status; + } + + /* All done */ + KeLeaveCriticalRegion(); + + /* Set and assert the flags, and return */ + MmSessionSpace->u.Flags.Initialized = 1; + PspSetProcessFlag(Process, PSF_PROCESS_IN_SESSION_BIT); + ASSERT(MiSessionLeaderExists == 1); + return Status; +} + +NTSTATUS +NTAPI +MmSessionDelete(IN ULONG SessionId) +{ + PEPROCESS Process = PsGetCurrentProcess(); + + /* Process must be in a session */ + if (!(Process->Flags & PSF_PROCESS_IN_SESSION_BIT)) + { + DPRINT1("Not in a session!\n"); + return STATUS_UNABLE_TO_FREE_VM; + } + + /* It must be the session leader */ + if (!Process->Vm.Flags.SessionLeader) + { + DPRINT1("Not a session leader!\n"); + return STATUS_UNABLE_TO_FREE_VM; + } + + /* Remove one reference count */ + KeEnterCriticalRegion(); + /* FIXME: Do it */ + KeLeaveCriticalRegion(); + + /* All done */ + return STATUS_SUCCESS; +} Propchange: trunk/reactos/ntoskrnl/mm/ARM3/session.c ------------------------------------------------------------------------------ svn:eol-style = native
11 years, 1 month
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
35
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
Results per page:
10
25
50
100
200