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
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
May 2015
----- 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
15 participants
500 discussions
Start a n
N
ew thread
[pschweitzer] 67634: [NTFS] Handle IRP_MJ_READ with the dispatch routine
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sun May 10 20:35:40 2015 New Revision: 67634 URL:
http://svn.reactos.org/svn/reactos?rev=67634&view=rev
Log: [NTFS] Handle IRP_MJ_READ with the dispatch routine Modified: trunk/reactos/drivers/filesystems/ntfs/dispatch.c trunk/reactos/drivers/filesystems/ntfs/ntfs.c trunk/reactos/drivers/filesystems/ntfs/ntfs.h trunk/reactos/drivers/filesystems/ntfs/rw.c Modified: trunk/reactos/drivers/filesystems/ntfs/dispatch.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/d…
============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/dispatch.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/dispatch.c [iso-8859-1] Sun May 10 20:35:40 2015 @@ -76,6 +76,10 @@ case IRP_MJ_DIRECTORY_CONTROL: Status = NtfsDirectoryControl(IrpContext); break; + + case IRP_MJ_READ: + Status = NtfsRead(IrpContext); + break; } } else Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/n…
============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/ntfs.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/ntfs.c [iso-8859-1] Sun May 10 20:35:40 2015 @@ -121,7 +121,7 @@ { DriverObject->MajorFunction[IRP_MJ_CREATE] = NtfsFsdCreate; DriverObject->MajorFunction[IRP_MJ_CLOSE] = NtfsFsdClose; - DriverObject->MajorFunction[IRP_MJ_READ] = NtfsFsdRead; + DriverObject->MajorFunction[IRP_MJ_READ] = NtfsFsdDispatch; DriverObject->MajorFunction[IRP_MJ_WRITE] = NtfsFsdWrite; DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = NtfsFsdDispatch; DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] = NtfsFsdDispatch; Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/n…
============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] Sun May 10 20:35:40 2015 @@ -759,10 +759,8 @@ /* rw.c */ -DRIVER_DISPATCH NtfsFsdRead; -NTSTATUS NTAPI -NtfsFsdRead(PDEVICE_OBJECT DeviceObject, - PIRP Irp); +NTSTATUS +NtfsRead(PNTFS_IRP_CONTEXT IrpContext); DRIVER_DISPATCH NtfsFsdWrite; NTSTATUS NTAPI Modified: trunk/reactos/drivers/filesystems/ntfs/rw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/r…
============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/rw.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/rw.c [iso-8859-1] Sun May 10 20:35:40 2015 @@ -161,9 +161,7 @@ NTSTATUS -NTAPI -NtfsFsdRead(PDEVICE_OBJECT DeviceObject, - PIRP Irp) +NtfsRead(PNTFS_IRP_CONTEXT IrpContext) { PDEVICE_EXTENSION DeviceExt; PIO_STACK_LOCATION Stack; @@ -173,13 +171,17 @@ LARGE_INTEGER ReadOffset; ULONG ReturnedReadLength = 0; NTSTATUS Status = STATUS_SUCCESS; - - DPRINT("NtfsRead(DeviceObject %x, Irp %x)\n",DeviceObject,Irp); + PIRP Irp; + PDEVICE_OBJECT DeviceObject; + + DPRINT("NtfsRead(DeviceObject %p)\n", IrpContext); + + DeviceObject = IrpContext->DeviceObject; + Irp = IrpContext->Irp; + Stack = IrpContext->Stack; + FileObject = IrpContext->FileObject; DeviceExt = DeviceObject->DeviceExtension; - Stack = IoGetCurrentIrpStackLocation(Irp); - FileObject = Stack->FileObject; - ReadLength = Stack->Parameters.Read.Length; ReadOffset = Stack->Parameters.Read.ByteOffset; Buffer = MmGetSystemAddressForMdl(Irp->MdlAddress); @@ -206,9 +208,6 @@ Irp->IoStatus.Information = 0; } - Irp->IoStatus.Status = Status; - IoCompleteRequest(Irp,IO_NO_INCREMENT); - return Status; }
9 years, 4 months
1
0
0
0
[tkreuzer] 67633: [NTOSKRNL/MM] Add MI_MAKE_CLEAN_PAGE Use PTE access macros for portability
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun May 10 19:35:24 2015 New Revision: 67633 URL:
http://svn.reactos.org/svn/reactos?rev=67633&view=rev
Log: [NTOSKRNL/MM] Add MI_MAKE_CLEAN_PAGE Use PTE access macros for portability Modified: trunk/reactos/ntoskrnl/include/internal/amd64/mm.h trunk/reactos/ntoskrnl/include/internal/arm/mm.h trunk/reactos/ntoskrnl/include/internal/i386/mm.h trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c trunk/reactos/ntoskrnl/mm/ARM3/section.c trunk/reactos/ntoskrnl/mm/ARM3/session.c Modified: trunk/reactos/ntoskrnl/include/internal/amd64/mm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/amd64/mm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/amd64/mm.h [iso-8859-1] Sun May 10 19:35:24 2015 @@ -87,6 +87,7 @@ /* Macros for portable PTE modification */ #define MI_MAKE_LOCAL_PAGE(x) ((x)->u.Hard.Global = 0) #define MI_MAKE_DIRTY_PAGE(x) ((x)->u.Hard.Dirty = 1) +#define MI_MAKE_CLEAN_PAGE(x) ((x)->u.Hard.Dirty = 0) #define MI_MAKE_ACCESSED_PAGE(x) ((x)->u.Hard.Accessed = 1) #define MI_PAGE_DISABLE_CACHE(x) ((x)->u.Hard.CacheDisable = 1) #define MI_PAGE_WRITE_THROUGH(x) ((x)->u.Hard.WriteThrough = 1) Modified: trunk/reactos/ntoskrnl/include/internal/arm/mm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/arm/mm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/arm/mm.h [iso-8859-1] Sun May 10 19:35:24 2015 @@ -76,6 +76,7 @@ /* Macros for portable PTE modification */ #define MI_MAKE_LOCAL_PAGE(x) ((x)->u.Hard.NonGlobal = 1) #define MI_MAKE_DIRTY_PAGE(x) +#define MI_MAKE_CLEAN_PAGE(x) #define MI_MAKE_ACCESSED_PAGE(x) #define MI_PAGE_DISABLE_CACHE(x) ((x)->u.Hard.Cached = 0) #define MI_PAGE_WRITE_THROUGH(x) ((x)->u.Hard.Buffered = 0) Modified: trunk/reactos/ntoskrnl/include/internal/i386/mm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/i386/mm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/i386/mm.h [iso-8859-1] Sun May 10 19:35:24 2015 @@ -91,6 +91,7 @@ /* Macros for portable PTE modification */ #define MI_MAKE_LOCAL_PAGE(x) ((x)->u.Hard.Global = 0) #define MI_MAKE_DIRTY_PAGE(x) ((x)->u.Hard.Dirty = 1) +#define MI_MAKE_CLEAN_PAGE(x) ((x)->u.Hard.Dirty = 0) #define MI_MAKE_ACCESSED_PAGE(x) ((x)->u.Hard.Accessed = 1) #define MI_PAGE_DISABLE_CACHE(x) ((x)->u.Hard.CacheDisable = 1) #define MI_PAGE_WRITE_THROUGH(x) ((x)->u.Hard.WriteThrough = 1) Modified: trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pagfault.…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c [iso-8859-1] Sun May 10 19:35:24 2015 @@ -165,7 +165,8 @@ if (StoreInstruction) { /* Is it writable?*/ - if ((TempPte.u.Hard.Write) || (TempPte.u.Hard.CopyOnWrite)) + if (MI_IS_PAGE_WRITEABLE(&TempPte) || + MI_IS_PAGE_COPY_ON_WRITE(&TempPte)) { /* Then there's nothing to worry about */ return STATUS_SUCCESS; @@ -791,7 +792,7 @@ } /* Set the dirty flag if needed */ - if (DirtyPage) TempPte.u.Hard.Dirty = TRUE; + if (DirtyPage) MI_MAKE_DIRTY_PAGE(&TempPte); /* Write the PTE */ MI_WRITE_VALID_PTE(PointerPte, TempPte); @@ -1004,16 +1005,17 @@ MiDetermineUserGlobalPteMask(PointerPte); /* Is the PTE writeable? */ - if (((Pfn1->u3.e1.Modified) && (TempPte.u.Hard.Write)) && - (TempPte.u.Hard.CopyOnWrite == 0)) + if ((Pfn1->u3.e1.Modified) && + MI_IS_PAGE_WRITEABLE(&TempPte) && + !MI_IS_PAGE_COPY_ON_WRITE(&TempPte)) { /* Make it dirty */ - TempPte.u.Hard.Dirty = TRUE; + MI_MAKE_DIRTY_PAGE(&TempPte); } else { /* Make it clean */ - TempPte.u.Hard.Dirty = FALSE; + MI_MAKE_CLEAN_PAGE(&TempPte); } /* Write the valid PTE */ @@ -1302,19 +1304,20 @@ TempPte.u.Long = (PointerProtoPte->u.Long & ~0xFFF) | MmProtectToPteMask[PointerProtoPte->u.Trans.Protection]; TempPte.u.Hard.Valid = 1; - TempPte.u.Hard.Accessed = 1; + MI_MAKE_ACCESSED_PAGE(&TempPte); /* Is the PTE writeable? */ - if (((Pfn1->u3.e1.Modified) && (TempPte.u.Hard.Write)) && - (TempPte.u.Hard.CopyOnWrite == 0)) + if ((Pfn1->u3.e1.Modified) && + MI_IS_PAGE_WRITEABLE(&TempPte) && + !MI_IS_PAGE_COPY_ON_WRITE(&TempPte)) { /* Make it dirty */ - TempPte.u.Hard.Dirty = TRUE; + MI_MAKE_DIRTY_PAGE(&TempPte); } else { /* Make it clean */ - TempPte.u.Hard.Dirty = FALSE; + MI_MAKE_CLEAN_PAGE(&TempPte); } /* Write the valid PTE */ @@ -1561,7 +1564,7 @@ /* Not yet implemented in ReactOS */ ASSERT(MI_IS_PAGE_LARGE(PointerPde) == FALSE); - ASSERT(((StoreInstruction) && (PointerPte->u.Hard.CopyOnWrite)) == FALSE); + ASSERT(((StoreInstruction) && MI_IS_PAGE_COPY_ON_WRITE(PointerPte)) == FALSE); /* Check if this was a write */ if (StoreInstruction) @@ -1740,7 +1743,7 @@ Pfn1 = MI_PFN_ELEMENT(PointerPte->u.Hard.PageFrameNumber); if (!(TempPte.u.Long & PTE_READWRITE) && !(Pfn1->OriginalPte.u.Soft.Protection & MM_READWRITE) && - !(TempPte.u.Hard.CopyOnWrite)) + !MI_IS_PAGE_COPY_ON_WRITE(&TempPte)) { /* Case not yet handled */ ASSERT(!IsSessionAddress); @@ -1757,13 +1760,13 @@ /* Check for read-only write in session space */ if ((IsSessionAddress) && (StoreInstruction) && - !(TempPte.u.Hard.Write)) + !MI_IS_PAGE_WRITEABLE(&TempPte)) { /* Sanity check */ ASSERT(MI_IS_SESSION_IMAGE_ADDRESS(Address)); /* Was this COW? */ - if (TempPte.u.Hard.CopyOnWrite == 0) + if (!MI_IS_PAGE_COPY_ON_WRITE(&TempPte)) { /* Then this is not allowed */ KeBugCheckEx(ATTEMPTED_WRITE_TO_READONLY_MEMORY, @@ -1993,14 +1996,14 @@ if (StoreInstruction) { /* Is this a copy on write PTE? */ - if (TempPte.u.Hard.CopyOnWrite) + if (MI_IS_PAGE_COPY_ON_WRITE(&TempPte)) { /* Not supported yet */ ASSERT(FALSE); } /* Is this a read-only PTE? */ - if (!TempPte.u.Hard.Write) + if (!MI_IS_PAGE_WRITEABLE(&TempPte)) { /* Return the status */ MiUnlockProcessWorkingSet(CurrentProcess, CurrentThread); Modified: trunk/reactos/ntoskrnl/mm/ARM3/section.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/section.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] Sun May 10 19:35:24 2015 @@ -2164,7 +2164,7 @@ ASSERT(((Pfn1->u3.e1.PrototypePte) && (Pfn1->OriginalPte.u.Soft.Prototype)) == 0); /* Mark the page as modified accordingly */ - if (PteContents.u.Hard.Dirty) + if (MI_IS_PAGE_DIRTY(&PteContents)) Pfn1->u3.e1.Modified = 1; /* Was the PDE invalid */ 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] Sun May 10 19:35:24 2015 @@ -572,7 +572,7 @@ /* Write a valid PTE for it */ TempPte.u.Long = ValidKernelPteLocal.u.Long; - TempPte.u.Hard.Dirty = TRUE; + MI_MAKE_DIRTY_PAGE(&TempPte); TempPte.u.Hard.PageFrameNumber = PageFrameIndex; /* Initialize the working set list page */
9 years, 4 months
1
0
0
0
[tkreuzer] 67632: [NTOSKRNL] - Fix MMPTE vs MMPDE usage - Use MiPteToPde instead of MiAddressToPte
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun May 10 19:35:00 2015 New Revision: 67632 URL:
http://svn.reactos.org/svn/reactos?rev=67632&view=rev
Log: [NTOSKRNL] - Fix MMPTE vs MMPDE usage - Use MiPteToPde instead of MiAddressToPte Modified: trunk/reactos/ntoskrnl/mm/ARM3/miarm.h trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c trunk/reactos/ntoskrnl/mm/ARM3/pool.c trunk/reactos/ntoskrnl/mm/ARM3/section.c trunk/reactos/ntoskrnl/mm/ARM3/session.c trunk/reactos/ntoskrnl/mm/ARM3/virtual.c Modified: trunk/reactos/ntoskrnl/mm/ARM3/miarm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/miarm.h?r…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] Sun May 10 19:35:00 2015 @@ -459,7 +459,7 @@ SIZE_T CommittedPages; PVOID PagedPoolStart; PVOID PagedPoolEnd; - PMMPTE PagedPoolBasePde; + PMMPDE PagedPoolBasePde; ULONG Color; LONG ResidentProcessCount; ULONG SessionPoolAllocationFailures[4]; @@ -479,9 +479,9 @@ PDRIVER_UNLOAD Win32KDriverUnload; POOL_DESCRIPTOR PagedPool; #if defined (_M_AMD64) - MMPTE PageDirectory; + MMPDE PageDirectory; #else - PMMPTE PageTables; + PMMPDE PageTables; #endif #if defined (_M_AMD64) PMMPTE SpecialPoolFirstPte; @@ -1887,7 +1887,7 @@ NTAPI MiInitializeAndChargePfn( OUT PPFN_NUMBER PageFrameIndex, - IN PMMPTE PointerPde, + IN PMMPDE PointerPde, IN PFN_NUMBER ContainingPageFrame, IN BOOLEAN SessionAllocation ); @@ -1904,7 +1904,7 @@ NTAPI MiInitializePfnForOtherProcess( IN PFN_NUMBER PageFrameIndex, - IN PMMPTE PointerPte, + IN PVOID PteAddress, IN PFN_NUMBER PteFrame ); @@ -2210,7 +2210,7 @@ VOID NTAPI MiMakePdeExistAndMakeValid( - IN PMMPTE PointerPde, + IN PMMPDE PointerPde, IN PEPROCESS TargetProcess, IN KIRQL OldIrql ); Modified: trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pagfault.…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c [iso-8859-1] Sun May 10 19:35:00 2015 @@ -336,7 +336,7 @@ MiCheckPdeForSessionSpace(IN PVOID Address) { MMPTE TempPde; - PMMPTE PointerPde; + PMMPDE PointerPde; PVOID SessionAddress; ULONG Index; @@ -1959,7 +1959,7 @@ } /* Write a demand-zero PDE */ - MI_WRITE_INVALID_PTE(PointerPde, DemandZeroPde); + MI_WRITE_INVALID_PDE(PointerPde, DemandZeroPde); /* Dispatch the fault */ Status = MiDispatchFault(TRUE, @@ -2087,7 +2087,12 @@ if (PointerPde == MiAddressToPde(PTE_BASE)) { /* Then it's really a demand-zero PDE (on behalf of user-mode) */ +#ifdef _M_ARM + _WARN("This is probably completely broken!"); + MI_WRITE_INVALID_PDE((PMMPDE)PointerPte, DemandZeroPde); +#else MI_WRITE_INVALID_PTE(PointerPte, DemandZeroPde); +#endif } else { Modified: trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c [iso-8859-1] Sun May 10 19:35:00 2015 @@ -1083,15 +1083,15 @@ NTSTATUS NTAPI MiInitializeAndChargePfn(OUT PPFN_NUMBER PageFrameIndex, - IN PMMPTE PointerPde, + IN PMMPDE PointerPde, IN PFN_NUMBER ContainingPageFrame, IN BOOLEAN SessionAllocation) { - MMPTE TempPte; + MMPDE TempPde; KIRQL OldIrql; /* Use either a global or local PDE */ - TempPte = SessionAllocation ? ValidKernelPdeLocal : ValidKernelPde; + TempPde = SessionAllocation ? ValidKernelPdeLocal : ValidKernelPde; /* Lock the PFN database */ OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); @@ -1106,8 +1106,8 @@ /* Grab a zero page and set the PFN, then make it valid */ *PageFrameIndex = MiRemoveZeroPage(MI_GET_NEXT_COLOR()); - TempPte.u.Hard.PageFrameNumber = *PageFrameIndex; - MI_WRITE_VALID_PTE(PointerPde, TempPte); + TempPde.u.Hard.PageFrameNumber = *PageFrameIndex; + MI_WRITE_VALID_PDE(PointerPde, TempPde); /* Initialize the PFN */ MiInitializePfnForOtherProcess(*PageFrameIndex, @@ -1270,14 +1270,14 @@ VOID NTAPI MiInitializePfnForOtherProcess(IN PFN_NUMBER PageFrameIndex, - IN PMMPTE PointerPte, + IN PVOID PteAddress, IN PFN_NUMBER PteFrame) { PMMPFN Pfn1; /* Setup the PTE */ Pfn1 = MI_PFN_ELEMENT(PageFrameIndex); - Pfn1->PteAddress = PointerPte; + Pfn1->PteAddress = PteAddress; /* Make this a software PTE */ MI_MAKE_SOFTWARE_PTE(&Pfn1->OriginalPte, MM_READWRITE); Modified: trunk/reactos/ntoskrnl/mm/ARM3/pool.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pool.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/pool.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/pool.c [iso-8859-1] Sun May 10 19:35:00 2015 @@ -507,7 +507,7 @@ // // We can only support this much then // - PointerPde = MiAddressToPte(MmPagedPoolInfo.LastPteForPagedPool); + PointerPde = MiPteToPde(MmPagedPoolInfo.LastPteForPagedPool); PageTableCount = (PFN_COUNT)(PointerPde + 1 - MmPagedPoolInfo.NextPdeForPagedPoolExpansion); ASSERT(PageTableCount < i); @@ -1277,7 +1277,8 @@ NTAPI MiInitializeSessionPool(VOID) { - PMMPTE PointerPde, PointerPte, LastPte, LastPde; + PMMPTE PointerPte, LastPte; + PMMPDE PointerPde, LastPde; PFN_NUMBER PageFrameIndex, PdeCount; PPOOL_DESCRIPTOR PoolDescriptor; PMM_SESSION_SPACE SessionGlobal; Modified: trunk/reactos/ntoskrnl/mm/ARM3/section.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/section.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] Sun May 10 19:35:00 2015 @@ -937,8 +937,8 @@ { KIRQL OldIrql; ULONG Color, Index; - PMMPTE StartPde, EndPde; - MMPTE TempPte = ValidKernelPdeLocal; + PMMPDE StartPde, EndPde; + MMPDE TempPde = ValidKernelPdeLocal; PMMPFN Pfn1; PFN_NUMBER PageCount = 0, ActualPages = 0, PageFrameNumber; @@ -976,7 +976,7 @@ _WARN("MiSessionCommitPageTables halfplemented for amd64") DBG_UNREFERENCED_LOCAL_VARIABLE(OldIrql); DBG_UNREFERENCED_LOCAL_VARIABLE(Color); - DBG_UNREFERENCED_LOCAL_VARIABLE(TempPte); + DBG_UNREFERENCED_LOCAL_VARIABLE(TempPde); DBG_UNREFERENCED_LOCAL_VARIABLE(Pfn1); DBG_UNREFERENCED_LOCAL_VARIABLE(PageFrameNumber); ASSERT(FALSE); @@ -996,12 +996,12 @@ OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); Color = (++MmSessionSpace->Color) & MmSecondaryColorMask; PageFrameNumber = MiRemoveZeroPage(Color); - TempPte.u.Hard.PageFrameNumber = PageFrameNumber; - MI_WRITE_VALID_PTE(StartPde, TempPte); + TempPde.u.Hard.PageFrameNumber = PageFrameNumber; + MI_WRITE_VALID_PDE(StartPde, TempPde); /* Write the page table in session space structure */ ASSERT(MmSessionSpace->PageTables[Index].u.Long == 0); - MmSessionSpace->PageTables[Index] = TempPte; + MmSessionSpace->PageTables[Index] = TempPde; /* Initialize the PFN */ MiInitializePfnForOtherProcess(PageFrameNumber, @@ -2053,7 +2053,7 @@ // if ((((ULONG_PTR)PointerPte) & (SYSTEM_PD_SIZE - 1)) == 0) { - PointerPde = MiAddressToPte(PointerPte); + PointerPde = MiPteToPde(PointerPte); MiMakePdeExistAndMakeValid(PointerPde, Process, MM_NOIRQL); } @@ -2157,7 +2157,7 @@ Pfn1 = MiGetPfnEntry(PFN_FROM_PTE(&PteContents)); /* Get the PTE */ - PointerPde = MiAddressToPte(PointerPte); + PointerPde = MiPteToPde(PointerPte); /* Lock the PFN database and make sure this isn't a mapped file */ OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); 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] Sun May 10 19:35:00 2015 @@ -480,8 +480,10 @@ MiSessionInitializeWorkingSetList(VOID) { KIRQL OldIrql; - PMMPTE PointerPte, PointerPde; + PMMPTE PointerPte; + PMMPDE PointerPde; MMPTE TempPte; + MMPDE TempPde; ULONG Color, Index; PFN_NUMBER PageFrameIndex; PMM_SESSION_SPACE SessionGlobal; @@ -501,7 +503,9 @@ if (PointerPde->u.Hard.Valid == 1) { /* Nope, we'll have to do it */ +#ifndef _M_ARM ASSERT(PointerPde->u.Hard.Global == 0); +#endif AllocatedPageTable = FALSE; } else @@ -536,14 +540,14 @@ } /* Write a valid PDE for it */ - TempPte.u.Long = ValidKernelPdeLocal.u.Long; - TempPte.u.Hard.PageFrameNumber = PageFrameIndex; - MI_WRITE_VALID_PTE(PointerPde, TempPte); + TempPde.u.Long = ValidKernelPdeLocal.u.Long; + TempPde.u.Hard.PageFrameNumber = PageFrameIndex; + MI_WRITE_VALID_PDE(PointerPde, TempPde); /* Add this into the list */ Index = ((ULONG_PTR)WorkingSetList - (ULONG_PTR)MmSessionBase) >> 22; #ifndef _M_AMD64 - MmSessionSpace->PageTables[Index] = TempPte; + MmSessionSpace->PageTables[Index] = TempPde; #endif /* Initialize the page directory page, and now zero the working set list itself */ MiInitializePfnForOtherProcess(PageFrameIndex, @@ -614,10 +618,11 @@ PEPROCESS Process = PsGetCurrentProcess(); ULONG NewFlags, Flags, Size, i, Color; KIRQL OldIrql; - PMMPTE PointerPte, PageTables, SessionPte; - PMMPDE PointerPde; + PMMPTE PointerPte, SessionPte; + PMMPDE PointerPde, PageTables; PMM_SESSION_SPACE SessionGlobal; MMPTE TempPte; + MMPDE TempPde; NTSTATUS Status; BOOLEAN Result; PFN_NUMBER SessionPageDirIndex; @@ -725,13 +730,13 @@ } /* Fill the PTE out */ - TempPte.u.Long = ValidKernelPdeLocal.u.Long; - TempPte.u.Hard.PageFrameNumber = SessionPageDirIndex; + TempPde.u.Long = ValidKernelPdeLocal.u.Long; + TempPde.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); + MI_WRITE_VALID_PDE(PointerPde, TempPde); MiInitializePfnForOtherProcess(SessionPageDirIndex, PointerPde, SessionPageDirIndex); Modified: trunk/reactos/ntoskrnl/mm/ARM3/virtual.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/virtual.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] Sun May 10 19:35:00 2015 @@ -45,7 +45,8 @@ IN PMMVAD Vad, IN PEPROCESS Process) { - PMMPTE PointerPte, LastPte, PointerPde; + PMMPTE PointerPte, LastPte; + PMMPDE PointerPde; ULONG CommittedPages; /* Compute starting and ending PTE and PDE addresses */ @@ -60,7 +61,7 @@ CommittedPages = (ULONG)BYTES_TO_PAGES(EndingAddress - StartingAddress); /* Is the PDE demand-zero? */ - PointerPde = MiAddressToPte(PointerPte); + PointerPde = MiPteToPde(PointerPte); if (PointerPde->u.Long != 0) { /* It is not. Is it valid? */ @@ -86,7 +87,7 @@ if (MiIsPteOnPdeBoundary(PointerPte)) { /* Is this PDE demand zero? */ - PointerPde = MiAddressToPte(PointerPte); + PointerPde = MiPteToPde(PointerPte); if (PointerPde->u.Long != 0) { /* It isn't -- is it valid? */ @@ -132,7 +133,7 @@ CommittedPages = 0; /* Is the PDE demand-zero? */ - PointerPde = MiAddressToPte(PointerPte); + PointerPde = MiPteToPde(PointerPte); if (PointerPde->u.Long != 0) { /* It isn't -- is it invalid? */ @@ -158,7 +159,7 @@ if (MiIsPteOnPdeBoundary(PointerPte)) { /* Is this new PDE demand-zero? */ - PointerPde = MiAddressToPte(PointerPte); + PointerPde = MiPteToPde(PointerPte); if (PointerPde->u.Long != 0) { /* It isn't. Is it valid? */ @@ -1978,7 +1979,8 @@ IN PMMVAD Vad, IN PEPROCESS Process) { - PMMPTE PointerPte, LastPte, PointerPde; + PMMPTE PointerPte, LastPte; + PMMPDE PointerPde; BOOLEAN OnBoundary = TRUE; PAGED_CODE(); @@ -2098,7 +2100,8 @@ PMMVAD Vad; PMMSUPPORT AddressSpace; ULONG_PTR StartingAddress, EndingAddress; - PMMPTE PointerPde, PointerPte, LastPte; + PMMPTE PointerPte, LastPte; + PMMPDE PointerPde; MMPTE PteContents; PMMPFN Pfn1; ULONG ProtectionMask, OldProtect; @@ -2273,7 +2276,7 @@ /* Check if we've crossed a PDE boundary and make the new PDE valid too */ if (MiIsPteOnPdeBoundary(PointerPte)) { - PointerPde = MiAddressToPte(PointerPte); + PointerPde = MiPteToPde(PointerPte); MiMakePdeExistAndMakeValid(PointerPde, Process, MM_NOIRQL); } @@ -2366,7 +2369,7 @@ VOID NTAPI -MiMakePdeExistAndMakeValid(IN PMMPTE PointerPde, +MiMakePdeExistAndMakeValid(IN PMMPDE PointerPde, IN PEPROCESS TargetProcess, IN KIRQL OldIrql) { @@ -2502,7 +2505,8 @@ IN PEPROCESS Process, IN PMMVAD Vad) { - PMMPTE PointerPde, PointerPte, CommitPte = NULL; + PMMPTE PointerPte, CommitPte = NULL; + PMMPDE PointerPde; ULONG CommitReduction = 0; PMMPTE ValidPteList[256]; ULONG PteCount = 0; @@ -4316,7 +4320,8 @@ ULONG ProtectionMask, QuotaCharge = 0, QuotaFree = 0; BOOLEAN Attached = FALSE, ChangeProtection = FALSE; MMPTE TempPte; - PMMPTE PointerPte, PointerPde, LastPte; + PMMPTE PointerPte, LastPte; + PMMPDE PointerPde; TABLE_SEARCH_RESULT Result; PAGED_CODE(); @@ -4891,7 +4896,7 @@ // // Get the PDE and now make it valid too // - PointerPde = MiAddressToPte(PointerPte); + PointerPde = MiPteToPde(PointerPte); MiMakePdeExistAndMakeValid(PointerPde, Process, MM_NOIRQL); }
9 years, 4 months
1
0
0
0
[tkreuzer] 67631: [XDK/DDK/NDK/PSDK/ARMDDK] - Move stuff from armddk.h to XDK/DDK - Fix ARM CONTEXT flags - Add missing KeGetCurrentIrql() for ARM - Improve some amd64 based definitions - Use Nativ...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun May 10 19:34:38 2015 New Revision: 67631 URL:
http://svn.reactos.org/svn/reactos?rev=67631&view=rev
Log: [XDK/DDK/NDK/PSDK/ARMDDK] - Move stuff from armddk.h to XDK/DDK - Fix ARM CONTEXT flags - Add missing KeGetCurrentIrql() for ARM - Improve some amd64 based definitions - Use Native math for Int64Sh**Mod32 on ARM Modified: trunk/reactos/include/ddk/ntddk.h trunk/reactos/include/ddk/wdm.h trunk/reactos/include/ndk/inline_ntcurrentteb.h trunk/reactos/include/ndk/psfuncs.h trunk/reactos/include/psdk/ntdef.h trunk/reactos/include/psdk/winnt.h trunk/reactos/include/reactos/arm/armddk.h trunk/reactos/include/xdk/amd64/ke.h trunk/reactos/include/xdk/amd64/mm.h trunk/reactos/include/xdk/arm/ke.h trunk/reactos/include/xdk/ketypes.h trunk/reactos/include/xdk/ntbasedef.h trunk/reactos/include/xdk/ntddk.template.h trunk/reactos/include/xdk/winnt_old.h trunk/reactos/ntoskrnl/include/internal/arm/ke.h trunk/reactos/ntoskrnl/include/internal/arm/mm.h Modified: trunk/reactos/include/ddk/ntddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntddk.h?rev=67…
============================================================================== --- trunk/reactos/include/ddk/ntddk.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/ntddk.h [iso-8859-1] Sun May 10 19:34:38 2015 @@ -2023,10 +2023,10 @@ #define XSTATE_LEGACY_SSE 1 #define XSTATE_GSSE 2 -#define XSTATE_MASK_LEGACY_FLOATING_POINT (1i64 << (XSTATE_LEGACY_FLOATING_POINT)) -#define XSTATE_MASK_LEGACY_SSE (1i64 << (XSTATE_LEGACY_SSE)) +#define XSTATE_MASK_LEGACY_FLOATING_POINT (1LL << (XSTATE_LEGACY_FLOATING_POINT)) +#define XSTATE_MASK_LEGACY_SSE (1LL << (XSTATE_LEGACY_SSE)) #define XSTATE_MASK_LEGACY (XSTATE_MASK_LEGACY_FLOATING_POINT | XSTATE_MASK_LEGACY_SSE) -#define XSTATE_MASK_GSSE (1i64 << (XSTATE_GSSE)) +#define XSTATE_MASK_GSSE (1LL << (XSTATE_GSSE)) #define MAXIMUM_XSTATE_FEATURES 64 @@ -3327,13 +3327,17 @@ extern NTKERNELAPI PVOID MmSystemRangeStart; extern NTKERNELAPI ULONG64 MmUserProbeAddress; -#define MM_HIGHEST_USER_ADDRESS MmHighestUserAddress -#define MM_SYSTEM_RANGE_START MmSystemRangeStart -#define MM_USER_PROBE_ADDRESS MmUserProbeAddress -#define MM_LOWEST_USER_ADDRESS (PVOID)0x10000 +#define MM_HIGHEST_USER_ADDRESS MmHighestUserAddress +#define MM_SYSTEM_RANGE_START MmSystemRangeStart +#if defined(_LOCAL_COPY_USER_PROBE_ADDRESS_) +#define MM_USER_PROBE_ADDRESS _LOCAL_COPY_USER_PROBE_ADDRESS_ +extern ULONG64 _LOCAL_COPY_USER_PROBE_ADDRESS_; +#else +#define MM_USER_PROBE_ADDRESS MmUserProbeAddress +#endif +#define MM_LOWEST_USER_ADDRESS (PVOID)0x10000 #define MM_LOWEST_SYSTEM_ADDRESS (PVOID)0xFFFF080000000000ULL - #elif defined(_M_IA64) #elif defined(_M_PPC) @@ -3343,7 +3347,184 @@ #elif defined(_M_ARM) -#define KeMemoryBarrierWithoutFence() _ReadWriteBarrier() +#define PAUSE_PROCESSOR __yield(); + +#define KERNEL_STACK_SIZE 0x3000 +#define KERNEL_LARGE_STACK_SIZE 0xF000 +#define KERNEL_LARGE_STACK_COMMIT KERNEL_STACK_SIZE + +#define KERNEL_MCA_EXCEPTION_STACK_SIZE 0x2000 + +#define EXCEPTION_READ_FAULT 0 +#define EXCEPTION_WRITE_FAULT 1 +#define EXCEPTION_EXECUTE_FAULT 8 + +/* The following flags control the contents of the CONTEXT structure. */ +#define CONTEXT_ARM 0x200000L +#define CONTEXT_CONTROL (CONTEXT_ARM | 0x00000001L) +#define CONTEXT_INTEGER (CONTEXT_ARM | 0x00000002L) +#define CONTEXT_FLOATING_POINT (CONTEXT_ARM | 0x00000004L) +#define CONTEXT_DEBUG_REGISTERS (CONTEXT_ARM | 0x00000008L) +#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT) + +typedef struct _NEON128 +{ + ULONGLONG Low; + LONGLONG High; +} NEON128, *PNEON128; + +#define ARM_MAX_BREAKPOINTS 8 +#define ARM_MAX_WATCHPOINTS 1 + +typedef struct _CONTEXT +{ + /* The flags values within this flag control the contents of + a CONTEXT record. + + If the context record is used as an input parameter, then + for each portion of the context record controlled by a flag + whose value is set, it is assumed that that portion of the + context record contains valid context. If the context record + is being used to modify a thread's context, then only that + portion of the threads context will be modified. + + If the context record is used as an IN OUT parameter to capture + the context of a thread, then only those portions of the thread's + context corresponding to set flags will be returned. + + The context record is never used as an OUT only parameter. */ + ULONG ContextFlags; + + /* This section is specified/returned if the ContextFlags word contains + the flag CONTEXT_INTEGER. */ + ULONG R0; + ULONG R1; + ULONG R2; + ULONG R3; + ULONG R4; + ULONG R5; + ULONG R6; + ULONG R7; + ULONG R8; + ULONG R9; + ULONG R10; + ULONG R11; + ULONG R12; + + ULONG Sp; + ULONG Lr; + ULONG Pc; + ULONG Cpsr; + + /* Floating Point/NEON Registers */ + ULONG Fpscr; + ULONG Padding; + union + { + NEON128 Q[16]; + ULONGLONG D[32]; + ULONG S[32]; + } DUMMYUNIONNAME; + + /* Debug registers */ + ULONG Bvr[ARM_MAX_BREAKPOINTS]; + ULONG Bcr[ARM_MAX_BREAKPOINTS]; + ULONG Wvr[ARM_MAX_WATCHPOINTS]; + ULONG Wcr[ARM_MAX_WATCHPOINTS]; + + ULONG Padding2[2]; +} CONTEXT; + +#define PCR_MINOR_VERSION 1 +#define PCR_MAJOR_VERSION 1 + +typedef struct _KPCR +{ + _ANONYMOUS_UNION union + { + NT_TIB NtTib; + _ANONYMOUS_STRUCT struct + { + ULONG TibPad0[2]; + PVOID Spare1; + struct _KPCR *Self; + struct _KPRCB *CurrentPrcb; + PKSPIN_LOCK_QUEUE LockArray; + PVOID Used_Self; + }; + }; + KIRQL CurrentIrql; + UCHAR SecondLevelCacheAssociativity; + ULONG Unused0[3]; + USHORT MajorVersion; + USHORT MinorVersion; + ULONG StallScaleFactor; + PVOID Unused1[3]; + ULONG KernelReserved[15]; + ULONG SecondLevelCacheSize; + _ANONYMOUS_UNION union + { + USHORT SoftwareInterruptPending; // Software Interrupt Pending Flag + struct + { + UCHAR ApcInterrupt; // 0x01 if APC int pending + UCHAR DispatchInterrupt; // 0x01 if dispatch int pending + }; + }; + USHORT InterruptPad; + ULONG HalReserved[32]; + PVOID KdVersionBlock; + PVOID Unused3; + ULONG PcrAlign1[8]; +} KPCR, *PKPCR; + +#define CP15_PCR_RESERVED_MASK 0xFFF +//#define KIPCR() ((ULONG_PTR)(_MoveFromCoprocessor(CP15_TPIDRPRW)) & ~CP15_PCR_RESERVED_MASK) + +FORCEINLINE +PKPCR +KeGetPcr( + VOID) +{ + return (PKPCR)(_MoveFromCoprocessor(CP15_TPIDRPRW) & ~CP15_PCR_RESERVED_MASK); +} + +#if (NTDDI_VERSION < NTDDI_WIN7) || !defined(NT_PROCESSOR_GROUPS) +FORCEINLINE +ULONG +KeGetCurrentProcessorNumber( + VOID) + +{ + return *((PUCHAR)KeGetPcr() + 0x580); +} +#endif /* (NTDDI_VERSION < NTDDI_WIN7) || !defined(NT_PROCESSOR_GROUPS) */ + + +#define PTI_SHIFT 12 +#define PDI_SHIFT 22 + +#define PDE_BASE 0xC0300000 +#define PTE_BASE 0xC0000000 +#define PDE_TOP 0xC0300FFF +#define PTE_TOP 0xC03FFFFF + +extern NTKERNELAPI PVOID MmHighestUserAddress; +extern NTKERNELAPI PVOID MmSystemRangeStart; +extern NTKERNELAPI ULONG MmUserProbeAddress; + +#define MM_HIGHEST_USER_ADDRESS MmHighestUserAddress +#define MM_SYSTEM_RANGE_START MmSystemRangeStart +#if defined(_LOCAL_COPY_USER_PROBE_ADDRESS_) +#define MM_USER_PROBE_ADDRESS _LOCAL_COPY_USER_PROBE_ADDRESS_ +extern ULONG _LOCAL_COPY_USER_PROBE_ADDRESS_; +#else +#define MM_USER_PROBE_ADDRESS MmUserProbeAddress +#endif +#define MM_LOWEST_USER_ADDRESS (PVOID)0x10000 +#define MM_KSEG0_BASE MM_SYSTEM_RANGE_START +#define MM_SYSTEM_SPACE_END 0xFFFFFFFF + #else #error Unknown Architecture #endif Modified: trunk/reactos/include/ddk/wdm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=6763…
============================================================================== --- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Sun May 10 19:34:38 2015 @@ -8623,7 +8623,7 @@ #define HIGH_LEVEL 15 #define KI_USER_SHARED_DATA 0xFFFFF78000000000ULL -#define SharedUserData ((PKUSER_SHARED_DATA const)KI_USER_SHARED_DATA) +#define SharedUserData ((KUSER_SHARED_DATA * const)KI_USER_SHARED_DATA) #define SharedInterruptTime (KI_USER_SHARED_DATA + 0x8) #define SharedSystemTime (KI_USER_SHARED_DATA + 0x14) #define SharedTickCount (KI_USER_SHARED_DATA + 0x320) @@ -8635,8 +8635,9 @@ #define EFLAG_ZERO 0x4000 #define EFLAG_SELECT (EFLAG_SIGN | EFLAG_ZERO) -typedef struct _KFLOATING_SAVE { - ULONG Dummy; +typedef struct _KFLOATING_SAVE +{ + ULONG Dummy; } KFLOATING_SAVE, *PKFLOATING_SAVE; typedef XSAVE_FORMAT XMM_SAVE_AREA32, *PXMM_SAVE_AREA32; @@ -8662,78 +8663,101 @@ FORCEINLINE VOID -KeMemoryBarrier(VOID) +KeMemoryBarrier( + VOID) { - // FIXME: Do we really need lfence after the __faststorefence ? - FastFence(); - LFENCE_ACQUIRE(); + // FIXME: Do we really need lfence after the __faststorefence ? + FastFence(); + LFENCE_ACQUIRE(); } #define KeMemoryBarrierWithoutFence() _ReadWriteBarrier() +_IRQL_requires_max_(HIGH_LEVEL) +_IRQL_saves_ FORCEINLINE KIRQL KeGetCurrentIrql(VOID) { - return (KIRQL)__readcr8(); + return (KIRQL)__readcr8(); } +_IRQL_requires_max_(HIGH_LEVEL) FORCEINLINE VOID -KeLowerIrql(IN KIRQL NewIrql) +KeLowerIrql( + _In_ _IRQL_restores_ _Notliteral_ KIRQL NewIrql) { - //ASSERT((KIRQL)__readcr8() >= NewIrql); - __writecr8(NewIrql); + //ASSERT((KIRQL)__readcr8() >= NewIrql); + __writecr8(NewIrql); } +_IRQL_requires_max_(HIGH_LEVEL) +_IRQL_raises_(NewIrql) +_IRQL_saves_ FORCEINLINE KIRQL -KfRaiseIrql(IN KIRQL NewIrql) +KfRaiseIrql( + _In_ KIRQL NewIrql) { - KIRQL OldIrql; - - OldIrql = (KIRQL)__readcr8(); - //ASSERT(OldIrql <= NewIrql); - __writecr8(NewIrql); - return OldIrql; + KIRQL OldIrql; + + OldIrql = (KIRQL)__readcr8(); + //ASSERT(OldIrql <= NewIrql); + __writecr8(NewIrql); + return OldIrql; } #define KeRaiseIrql(a,b) *(b) = KfRaiseIrql(a) +_IRQL_requires_max_(DISPATCH_LEVEL) +_IRQL_saves_ +_IRQL_raises_(DISPATCH_LEVEL) FORCEINLINE KIRQL -KeRaiseIrqlToDpcLevel(VOID) +KeRaiseIrqlToDpcLevel( + VOID) { - return KfRaiseIrql(DISPATCH_LEVEL); + return KfRaiseIrql(DISPATCH_LEVEL); } FORCEINLINE KIRQL KeRaiseIrqlToSynchLevel(VOID) { - return KfRaiseIrql(12); // SYNCH_LEVEL = IPI_LEVEL - 2 + return KfRaiseIrql(12); // SYNCH_LEVEL = IPI_LEVEL - 2 } FORCEINLINE PKTHREAD KeGetCurrentThread(VOID) { - return (struct _KTHREAD *)__readgsqword(0x188); + return (struct _KTHREAD *)__readgsqword(0x188); } +_Always_(_Post_satisfies_(return<=0)) +_Must_inspect_result_ +_IRQL_requires_max_(DISPATCH_LEVEL) +_Kernel_float_saved_ +_At_(*FloatSave, _Kernel_requires_resource_not_held_(FloatState) _Kernel_acquires_resource_(FloatState)) FORCEINLINE NTSTATUS -KeSaveFloatingPointState(PVOID FloatingState) +KeSaveFloatingPointState( + _Out_ PKFLOATING_SAVE FloatSave) { - UNREFERENCED_PARAMETER(FloatingState); - return STATUS_SUCCESS; + UNREFERENCED_PARAMETER(FloatSave); + return STATUS_SUCCESS; } +_Success_(1) +_Kernel_float_restored_ +_At_(*FloatSave, _Kernel_requires_resource_held_(FloatState) _Kernel_releases_resource_(FloatState)) FORCEINLINE NTSTATUS -KeRestoreFloatingPointState(PVOID FloatingState) +KeRestoreFloatingPointState( + _In_ PKFLOATING_SAVE FloatSave) { - UNREFERENCED_PARAMETER(FloatingState); - return STATUS_SUCCESS; + UNREFERENCED_PARAMETER(FloatSave); + return STATUS_SUCCESS; } /* VOID @@ -8956,9 +8980,206 @@ #elif defined(_M_ARM) -#include <armddk.h> +/** Kernel definitions for ARM **/ + +/* Interrupt request levels */ +#define PASSIVE_LEVEL 0 +#define LOW_LEVEL 0 +#define APC_LEVEL 1 +#define DISPATCH_LEVEL 2 +#define CLOCK_LEVEL 13 +#define IPI_LEVEL 14 +#define DRS_LEVEL 14 +#define POWER_LEVEL 14 +#define PROFILE_LEVEL 15 +#define HIGH_LEVEL 15 + +#define KIP0PCRADDRESS 0xFFDFF000 +#define KI_USER_SHARED_DATA 0xFFFF9000 +#define SharedUserData ((KUSER_SHARED_DATA * const)KI_USER_SHARED_DATA) + +#define PAGE_SIZE 0x1000 +#define PAGE_SHIFT 12L + +typedef struct _KFLOATING_SAVE +{ + ULONG Reserved; +} KFLOATING_SAVE, *PKFLOATING_SAVE; + +extern NTKERNELAPI volatile KSYSTEM_TIME KeTickCount; + +FORCEINLINE +VOID +YieldProcessor( + VOID) +{ + __dmb(_ARM_BARRIER_ISHST); + __yield(); +} + +#define MemoryBarrier() __dmb(_ARM_BARRIER_SY) +#define PreFetchCacheLine(l,a) __prefetch((const void *) (a)) +#define PrefetchForWrite(p) __prefetch((const void *) (p)) +#define ReadForWriteAccess(p) (*(p)) + +FORCEINLINE +VOID +KeMemoryBarrier( + VOID) +{ + _ReadWriteBarrier(); + MemoryBarrier(); +} #define KeMemoryBarrierWithoutFence() _ReadWriteBarrier() + +_IRQL_requires_max_(HIGH_LEVEL) +_IRQL_saves_ +NTHALAPI +KIRQL +NTAPI +KeGetCurrentIrql( + VOID); + +_IRQL_requires_max_(HIGH_LEVEL) +NTHALAPI +VOID +FASTCALL +KfLowerIrql( + _In_ _IRQL_restores_ _Notliteral_ KIRQL NewIrql); +#define KeLowerIrql(a) KfLowerIrql(a) + +_IRQL_requires_max_(HIGH_LEVEL) +_IRQL_raises_(NewIrql) +_IRQL_saves_ +NTHALAPI +KIRQL +FASTCALL +KfRaiseIrql( + _In_ KIRQL NewIrql); +#define KeRaiseIrql(a,b) *(b) = KfRaiseIrql(a) + +_IRQL_requires_max_(DISPATCH_LEVEL) +_IRQL_saves_ +_IRQL_raises_(DISPATCH_LEVEL) +NTHALAPI +KIRQL +NTAPI +KeRaiseIrqlToDpcLevel(VOID); + +NTHALAPI +KIRQL +NTAPI +KeRaiseIrqlToSynchLevel(VOID); + +_Requires_lock_not_held_(*SpinLock) +_Acquires_lock_(*SpinLock) +_IRQL_requires_max_(DISPATCH_LEVEL) +_IRQL_saves_ +_IRQL_raises_(DISPATCH_LEVEL) +NTHALAPI +KIRQL +FASTCALL +KfAcquireSpinLock( + _Inout_ PKSPIN_LOCK SpinLock); +#define KeAcquireSpinLock(a,b) *(b) = KfAcquireSpinLock(a) + +_Requires_lock_held_(*SpinLock) +_Releases_lock_(*SpinLock) +_IRQL_requires_(DISPATCH_LEVEL) +NTHALAPI +VOID +FASTCALL +KfReleaseSpinLock( + _Inout_ PKSPIN_LOCK SpinLock, + _In_ _IRQL_restores_ KIRQL NewIrql); +#define KeReleaseSpinLock(a,b) KfReleaseSpinLock(a,b) + +_Requires_lock_not_held_(*SpinLock) +_Acquires_lock_(*SpinLock) +_IRQL_requires_min_(DISPATCH_LEVEL) +NTKERNELAPI +VOID +FASTCALL +KefAcquireSpinLockAtDpcLevel( + _Inout_ PKSPIN_LOCK SpinLock); +#define KeAcquireSpinLockAtDpcLevel(SpinLock) KefAcquireSpinLockAtDpcLevel(SpinLock) + +_Requires_lock_held_(*SpinLock) +_Releases_lock_(*SpinLock) +_IRQL_requires_min_(DISPATCH_LEVEL) +NTKERNELAPI +VOID +FASTCALL +KefReleaseSpinLockFromDpcLevel( + _Inout_ PKSPIN_LOCK SpinLock); +#define KeReleaseSpinLockFromDpcLevel(SpinLock) KefReleaseSpinLockFromDpcLevel(SpinLock) + +NTSYSAPI +PKTHREAD +NTAPI +KeGetCurrentThread(VOID); + +_Always_(_Post_satisfies_(return<=0)) +_Must_inspect_result_ +_IRQL_requires_max_(DISPATCH_LEVEL) +_Kernel_float_saved_ +_At_(*FloatSave, _Kernel_requires_resource_not_held_(FloatState) _Kernel_acquires_resource_(FloatState)) +FORCEINLINE +NTSTATUS +KeSaveFloatingPointState( + _Out_ PKFLOATING_SAVE FloatSave) +{ + UNREFERENCED_PARAMETER(FloatSave); + return STATUS_SUCCESS; +} + +_Success_(1) +_Kernel_float_restored_ +_At_(*FloatSave, _Kernel_requires_resource_held_(FloatState) _Kernel_releases_resource_(FloatState)) +FORCEINLINE +NTSTATUS +KeRestoreFloatingPointState( + _In_ PKFLOATING_SAVE FloatSave) +{ + UNREFERENCED_PARAMETER(FloatSave); + return STATUS_SUCCESS; +} + +VOID +KeFlushIoBuffers( + _In_ PMDL Mdl, + _In_ BOOLEAN ReadOperation, + _In_ BOOLEAN DmaOperation); + +#define DbgRaiseAssertionFailure() __emit(0xdefc) + +FORCEINLINE +VOID +_KeQueryTickCount( + OUT PLARGE_INTEGER CurrentCount) +{ + for (;;) { +#ifdef NONAMELESSUNION + CurrentCount->s.HighPart = KeTickCount.High1Time; + CurrentCount->s.LowPart = KeTickCount.LowPart; + if (CurrentCount->s.HighPart == KeTickCount.High2Time) break; +#else + CurrentCount->HighPart = KeTickCount.High1Time; + CurrentCount->LowPart = KeTickCount.LowPart; + if (CurrentCount->HighPart == KeTickCount.High2Time) break; +#endif + YieldProcessor(); + } +} +#define KeQueryTickCount(CurrentCount) _KeQueryTickCount(CurrentCount) + +#define CP15_PMSELR 15, 0, 9, 12, 5 /* Event Counter Selection Register */ +#define CP15_PMXEVCNTR 15, 0, 9, 13, 2 /* Event Count Register */ +#define CP15_TPIDRURW 15, 0, 13, 0, 2 /* Software Thread ID Register, UsRW */ +#define CP15_TPIDRURO 15, 0, 13, 0, 3 /* Software Thread ID Register, UsRO */ +#define CP15_TPIDRPRW 15, 0, 13, 0, 4 /* Software Thread ID Register, Kernel */ + #else #error Unknown Architecture #endif Modified: trunk/reactos/include/ndk/inline_ntcurrentteb.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/inline_ntcurre…
============================================================================== --- trunk/reactos/include/ndk/inline_ntcurrentteb.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/inline_ntcurrentteb.h [iso-8859-1] Sun May 10 19:34:38 2015 @@ -7,12 +7,11 @@ return (struct _TEB *)__readfsdword(0x18); } #elif defined(_M_ARM) - -// -// NT-ARM is not documented -// -#include <armddk.h> - +FORCEINLINE struct _TEB * NtCurrentTeb(void) +{ + __debugbreak(); + return (struct _TEB *)0; +} #elif defined(_M_AMD64) FORCEINLINE struct _TEB * NtCurrentTeb(void) { Modified: trunk/reactos/include/ndk/psfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/psfuncs.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/psfuncs.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/psfuncs.h [iso-8859-1] Sun May 10 19:34:38 2015 @@ -410,7 +410,6 @@ _In_ BOOLEAN CreateSuspended ); -#ifndef _M_ARM #ifndef NTOS_MODE_USER FORCEINLINE struct _TEB * NtCurrentTeb(VOID) { @@ -418,11 +417,12 @@ return (PTEB)__readfsdword(0x18); #elif defined (_M_AMD64) return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self)); +#elif defined (_M_ARM) + return (struct _TEB *)KeGetPcr()->Used_Self; #endif } #else struct _TEB * NtCurrentTeb(void); -#endif #endif NTSYSCALLAPI Modified: trunk/reactos/include/psdk/ntdef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntdef.h?rev=6…
============================================================================== --- trunk/reactos/include/psdk/ntdef.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/ntdef.h [iso-8859-1] Sun May 10 19:34:38 2015 @@ -838,7 +838,7 @@ #define UInt32x32To64(a,b) ((unsigned __int64)(unsigned int)(a)*(unsigned __int64)(unsigned int)(b)) #endif -#if defined(MIDL_PASS)|| defined(RC_INVOKED) || defined(_M_CEE_PURE) +#if defined(MIDL_PASS)|| defined(RC_INVOKED) || defined(_M_CEE_PURE) || defined(_M_ARM) /* Use native math */ #define Int64ShllMod32(a,b) ((unsigned __int64)(a)<<(b)) #define Int64ShraMod32(a,b) (((__int64)(a))>>(b)) Modified: trunk/reactos/include/psdk/winnt.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=6…
============================================================================== --- trunk/reactos/include/psdk/winnt.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winnt.h [iso-8859-1] Sun May 10 19:34:38 2015 @@ -772,7 +772,7 @@ #define UInt32x32To64(a,b) ((unsigned __int64)(unsigned int)(a)*(unsigned __int64)(unsigned int)(b)) #endif -#if defined(MIDL_PASS)|| defined(RC_INVOKED) || defined(_M_CEE_PURE) +#if defined(MIDL_PASS)|| defined(RC_INVOKED) || defined(_M_CEE_PURE) || defined(_M_ARM) /* Use native math */ #define Int64ShllMod32(a,b) ((unsigned __int64)(a)<<(b)) #define Int64ShraMod32(a,b) (((__int64)(a))>>(b)) @@ -4307,13 +4307,19 @@ /* The following flags control the contents of the CONTEXT structure. */ -#define CONTEXT_ARM 0x0000040 +#define CONTEXT_ARM 0x200000L #define CONTEXT_CONTROL (CONTEXT_ARM | 0x00000001L) #define CONTEXT_INTEGER (CONTEXT_ARM | 0x00000002L) - -#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER) - -typedef struct _NEON128 { +#define CONTEXT_FLOATING_POINT (CONTEXT_ARM | 0x00000004L) +#define CONTEXT_DEBUG_REGISTERS (CONTEXT_ARM | 0x00000008L) +#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT) + +#define EXCEPTION_READ_FAULT 0 +#define EXCEPTION_WRITE_FAULT 1 +#define EXCEPTION_EXECUTE_FAULT 8 + +typedef struct _NEON128 +{ ULONGLONG Low; LONGLONG High; } NEON128, *PNEON128; @@ -4321,7 +4327,8 @@ #define ARM_MAX_BREAKPOINTS 8 #define ARM_MAX_WATCHPOINTS 1 -typedef struct _CONTEXT { +typedef struct _CONTEXT +{ /* The flags values within this flag control the contents of a CONTEXT record. @@ -4337,7 +4344,6 @@ context corresponding to set flags will be returned. The context record is never used as an OUT only parameter. */ - DWORD ContextFlags; /* This section is specified/returned if the ContextFlags word contains @@ -4364,7 +4370,8 @@ /* Floating Point/NEON Registers */ DWORD Fpscr; DWORD Padding; - union { + union + { NEON128 Q[16]; ULONGLONG D[32]; DWORD S[32]; Modified: trunk/reactos/include/reactos/arm/armddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/arm/armddk…
============================================================================== --- trunk/reactos/include/reactos/arm/armddk.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/arm/armddk.h [iso-8859-1] Sun May 10 19:34:38 2015 @@ -1,41 +1,12 @@ #ifndef _ARMDDK_ #define _ARMDDK_ -// -// Page size -// -#ifndef PAGE_SIZE -#define PAGE_SIZE 0x1000 -#endif +#define USPCR 0x7FFF0000 +#define USERPCR ((volatile KPCR * const)USPCR) + #ifndef _WINNT_ -// -// IRQLs -// -#define PASSIVE_LEVEL 0 -#define LOW_LEVEL 0 -#define APC_LEVEL 1 -#define DISPATCH_LEVEL 2 -#define SYNCH_LEVEL DISPATCH_LEVEL -#define PROFILE_LEVEL 27 -#define CLOCK1_LEVEL 28 -#define CLOCK2_LEVEL 28 -#define IPI_LEVEL 29 -#define POWER_LEVEL 30 -#define HIGH_LEVEL 31 -#endif -// -// FIXME: mmtypes.h? -// -#define KIP0PCRADDRESS 0xFFDFF000 -#define KI_USER_SHARED_DATA 0xFFFF9000 -#define USPCR 0x7FFF0000 -#define PCR ((KPCR * const)KIP0PCRADDRESS) -#define USERPCR ((volatile KPCR * const)USPCR) -#define KeGetPcr() PCR -#ifndef _WINNT_ -#define SharedUserData ((KUSER_SHARED_DATA * const)KI_USER_SHARED_DATA) // // Address space layout @@ -49,14 +20,7 @@ #define MM_LOWEST_USER_ADDRESS (PVOID)0x10000 #define MM_LOWEST_SYSTEM_ADDRESS (PVOID)0xC0800000 -// -// Maximum IRQs -// -#define MAXIMUM_VECTOR 16 -#define KERNEL_STACK_SIZE 12288 -#define KERNEL_LARGE_STACK_SIZE 61440 -#define KERNEL_LARGE_STACK_COMMIT 12288 // // Used to contain PFNs and PFN counts @@ -65,86 +29,7 @@ //typedef ULONG PFN_NUMBER, *PPFN_NUMBER; //typedef LONG SPFN_NUMBER, *PSPFN_NUMBER; -// -// Stub -// -typedef struct _KFLOATING_SAVE -{ - ULONG Reserved; -} KFLOATING_SAVE, *PKFLOATING_SAVE; -/* The following flags control the contents of the CONTEXT structure. */ -#define CONTEXT_ARM 0x0000040 -#define CONTEXT_CONTROL (CONTEXT_ARM | 0x00000001L) -#define CONTEXT_INTEGER (CONTEXT_ARM | 0x00000002L) -#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER) - - -typedef struct _NEON128 { - ULONGLONG Low; - LONGLONG High; -} NEON128, *PNEON128; - -#define ARM_MAX_BREAKPOINTS 8 -#define ARM_MAX_WATCHPOINTS 1 - -typedef struct _CONTEXT { - /* The flags values within this flag control the contents of - a CONTEXT record. - - If the context record is used as an input parameter, then - for each portion of the context record controlled by a flag - whose value is set, it is assumed that that portion of the - context record contains valid context. If the context record - is being used to modify a thread's context, then only that - portion of the threads context will be modified. - - If the context record is used as an IN OUT parameter to capture - the context of a thread, then only those portions of the thread's - context corresponding to set flags will be returned. - - The context record is never used as an OUT only parameter. */ - - ULONG ContextFlags; - - /* This section is specified/returned if the ContextFlags word contains - the flag CONTEXT_INTEGER. */ - ULONG R0; - ULONG R1; - ULONG R2; - ULONG R3; - ULONG R4; - ULONG R5; - ULONG R6; - ULONG R7; - ULONG R8; - ULONG R9; - ULONG R10; - ULONG R11; - ULONG R12; - - ULONG Sp; - ULONG Lr; - ULONG Pc; - ULONG Cpsr; - - /* Floating Point/NEON Registers */ - ULONG Fpscr; - ULONG Padding; - union { - NEON128 Q[16]; - ULONGLONG D[32]; - ULONG S[32]; - } DUMMYUNIONNAME; - - /* Debug registers */ - ULONG Bvr[ARM_MAX_BREAKPOINTS]; - ULONG Bcr[ARM_MAX_BREAKPOINTS]; - ULONG Wvr[ARM_MAX_WATCHPOINTS]; - ULONG Wcr[ARM_MAX_WATCHPOINTS]; - - ULONG Padding2[2]; -} CONTEXT; #endif @@ -155,210 +40,11 @@ #define KIRQL ULONG #endif -typedef struct _NT_TIB_KPCR { - struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList; - PVOID StackBase; - PVOID StackLimit; - PVOID SubSystemTib; - _ANONYMOUS_UNION union { - PVOID FiberData; - ULONG Version; - } DUMMYUNIONNAME; - PVOID ArbitraryUserPointer; - struct _NT_TIB_KPCR *Self; -} NT_TIB_KPCR,*PNT_TIB_KPCR; - -typedef struct _KPCR -{ - union - { - NT_TIB_KPCR NtTib; - struct - { - struct _EXCEPTION_REGISTRATION_RECORD *Used_ExceptionList; // Unused - PVOID Used_StackBase; // Unused - PVOID PerfGlobalGroupMask; - PVOID TssCopy; // Unused - ULONG ContextSwitches; - KAFFINITY SetMemberCopy; // Unused - PVOID Used_Self; - }; - }; - struct _KPCR *Self; - struct _KPRCB *Prcb; - KIRQL Irql; - ULONG IRR; // Unused - ULONG IrrActive; // Unused - ULONG IDR; // Unused - PVOID KdVersionBlock; - PVOID IDT; // Unused - PVOID GDT; // Unused - PVOID TSS; // Unused - USHORT MajorVersion; - USHORT MinorVersion; - KAFFINITY SetMember; - ULONG StallScaleFactor; - UCHAR SpareUnused; - UCHAR Number; - UCHAR Spare0; - UCHAR SecondLevelCacheAssociativity; - ULONG VdmAlert; - ULONG KernelReserved[14]; - ULONG SecondLevelCacheSize; - ULONG HalReserved[16]; -} KPCR, *PKPCR; - -// -// Get the current TEB -// -FORCEINLINE -struct _TEB* NtCurrentTeb(VOID) -{ - return (struct _TEB*)USERPCR->Used_Self; -} - -NTSYSAPI -struct _KTHREAD* -NTAPI -KeGetCurrentThread(VOID); - -FORCEINLINE -NTSTATUS -KeSaveFloatingPointState(PVOID FloatingState) -{ - UNREFERENCED_PARAMETER(FloatingState); - return STATUS_SUCCESS; -} - -FORCEINLINE -NTSTATUS -KeRestoreFloatingPointState(PVOID FloatingState) -{ - UNREFERENCED_PARAMETER(FloatingState); - return STATUS_SUCCESS; -} - -extern volatile struct _KSYSTEM_TIME KeTickCount; - -#ifndef YieldProcessor -#define YieldProcessor __yield -#endif - #define ASSERT_BREAKPOINT BREAKPOINT_COMMAND_STRING + 1 - -#define DbgRaiseAssertionFailure() __emit(0xdefc) - -#define PCR_MINOR_VERSION 1 -#define PCR_MAJOR_VERSION 1 #define RESULT_ZERO 0 #define RESULT_NEGATIVE 1 #define RESULT_POSITIVE 2 - -#if 0 -DECLSPEC_IMPORT -VOID -__fastcall -KfReleaseSpinLock( - IN OUT ULONG_PTR* SpinLock, - IN KIRQL NewIrql); - -DECLSPEC_IMPORT -KIRQL -__fastcall -KfAcquireSpinLock( - IN OUT ULONG_PTR* SpinLock); -#endif - -#ifndef _WINNT_ -// -// IRQL Support on ARM is similar to MIPS/ALPHA -// -KIRQL -KfRaiseIrql( - IN KIRQL NewIrql -); - -VOID -KfLowerIrql( - IN KIRQL NewIrql -); - -KIRQL -KeRaiseIrqlToSynchLevel( - VOID -); - -KIRQL -KeRaiseIrqlToDpcLevel( - VOID -); - -#define KeLowerIrql(NewIrql) KfLowerIrql(NewIrql) -#define KeRaiseIrql(NewIrql, OldIrql) *(OldIrql) = KfRaiseIrql(NewIrql) - -NTHALAPI -KIRQL -FASTCALL -KfAcquireSpinLock( - IN OUT PKSPIN_LOCK SpinLock); -#define KeAcquireSpinLock(a,b) *(b) = KfAcquireSpinLock(a) - -NTHALAPI -VOID -FASTCALL -KfReleaseSpinLock( - IN OUT PKSPIN_LOCK SpinLock, - IN KIRQL NewIrql); -#define KeReleaseSpinLock(a,b) KfReleaseSpinLock(a,b) - -NTKERNELAPI -VOID -FASTCALL -KefAcquireSpinLockAtDpcLevel( - IN OUT PKSPIN_LOCK SpinLock); -#define KeAcquireSpinLockAtDpcLevel(SpinLock) KefAcquireSpinLockAtDpcLevel(SpinLock) - -NTKERNELAPI -VOID -FASTCALL -KefReleaseSpinLockFromDpcLevel( - IN OUT PKSPIN_LOCK SpinLock); -#define KeReleaseSpinLockFromDpcLevel(SpinLock) KefReleaseSpinLockFromDpcLevel(SpinLock) - -// -// Cache clean and flush -// -VOID -HalSweepDcache( - VOID -); - -VOID -HalSweepIcache( - VOID -); - -FORCEINLINE -VOID -_KeQueryTickCount( - OUT PLARGE_INTEGER CurrentCount) -{ - for (;;) { -#ifdef NONAMELESSUNION - CurrentCount->s.HighPart = KeTickCount.High1Time; - CurrentCount->s.LowPart = KeTickCount.LowPart; - if (CurrentCount->s.HighPart == KeTickCount.High2Time) break; -#else - CurrentCount->HighPart = KeTickCount.High1Time; - CurrentCount->LowPart = KeTickCount.LowPart; - if (CurrentCount->HighPart == KeTickCount.High2Time) break; -#endif - YieldProcessor(); - } -} -#define KeQueryTickCount(CurrentCount) _KeQueryTickCount(CurrentCount) -#endif // // Intrinsics Modified: trunk/reactos/include/xdk/amd64/ke.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/amd64/ke.h?rev…
============================================================================== --- trunk/reactos/include/xdk/amd64/ke.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/amd64/ke.h [iso-8859-1] Sun May 10 19:34:38 2015 @@ -15,7 +15,7 @@ #define HIGH_LEVEL 15 #define KI_USER_SHARED_DATA 0xFFFFF78000000000ULL -#define SharedUserData ((PKUSER_SHARED_DATA const)KI_USER_SHARED_DATA) +#define SharedUserData ((KUSER_SHARED_DATA * const)KI_USER_SHARED_DATA) #define SharedInterruptTime (KI_USER_SHARED_DATA + 0x8) #define SharedSystemTime (KI_USER_SHARED_DATA + 0x14) #define SharedTickCount (KI_USER_SHARED_DATA + 0x320) @@ -27,8 +27,9 @@ #define EFLAG_ZERO 0x4000 #define EFLAG_SELECT (EFLAG_SIGN | EFLAG_ZERO) -typedef struct _KFLOATING_SAVE { - ULONG Dummy; +typedef struct _KFLOATING_SAVE +{ + ULONG Dummy; } KFLOATING_SAVE, *PKFLOATING_SAVE; typedef XSAVE_FORMAT XMM_SAVE_AREA32, *PXMM_SAVE_AREA32; @@ -54,78 +55,101 @@ FORCEINLINE VOID -KeMemoryBarrier(VOID) -{ - // FIXME: Do we really need lfence after the __faststorefence ? - FastFence(); - LFENCE_ACQUIRE(); +KeMemoryBarrier( + VOID) +{ + // FIXME: Do we really need lfence after the __faststorefence ? + FastFence(); + LFENCE_ACQUIRE(); } #define KeMemoryBarrierWithoutFence() _ReadWriteBarrier() +_IRQL_requires_max_(HIGH_LEVEL) +_IRQL_saves_ FORCEINLINE KIRQL KeGetCurrentIrql(VOID) { - return (KIRQL)__readcr8(); -} - + return (KIRQL)__readcr8(); +} + +_IRQL_requires_max_(HIGH_LEVEL) FORCEINLINE VOID -KeLowerIrql(IN KIRQL NewIrql) -{ - //ASSERT((KIRQL)__readcr8() >= NewIrql); - __writecr8(NewIrql); -} - +KeLowerIrql( + _In_ _IRQL_restores_ _Notliteral_ KIRQL NewIrql) +{ + //ASSERT((KIRQL)__readcr8() >= NewIrql); + __writecr8(NewIrql); +} + +_IRQL_requires_max_(HIGH_LEVEL) +_IRQL_raises_(NewIrql) +_IRQL_saves_ FORCEINLINE KIRQL -KfRaiseIrql(IN KIRQL NewIrql) -{ - KIRQL OldIrql; - - OldIrql = (KIRQL)__readcr8(); - //ASSERT(OldIrql <= NewIrql); - __writecr8(NewIrql); - return OldIrql; +KfRaiseIrql( + _In_ KIRQL NewIrql) +{ + KIRQL OldIrql; + + OldIrql = (KIRQL)__readcr8(); + //ASSERT(OldIrql <= NewIrql); + __writecr8(NewIrql); + return OldIrql; } #define KeRaiseIrql(a,b) *(b) = KfRaiseIrql(a) +_IRQL_requires_max_(DISPATCH_LEVEL) +_IRQL_saves_ +_IRQL_raises_(DISPATCH_LEVEL) FORCEINLINE KIRQL -KeRaiseIrqlToDpcLevel(VOID) -{ - return KfRaiseIrql(DISPATCH_LEVEL); +KeRaiseIrqlToDpcLevel( + VOID) +{ + return KfRaiseIrql(DISPATCH_LEVEL); } FORCEINLINE KIRQL KeRaiseIrqlToSynchLevel(VOID) { - return KfRaiseIrql(12); // SYNCH_LEVEL = IPI_LEVEL - 2 + return KfRaiseIrql(12); // SYNCH_LEVEL = IPI_LEVEL - 2 } FORCEINLINE PKTHREAD KeGetCurrentThread(VOID) { - return (struct _KTHREAD *)__readgsqword(0x188); -} - + return (struct _KTHREAD *)__readgsqword(0x188); +} + +_Always_(_Post_satisfies_(return<=0)) +_Must_inspect_result_ +_IRQL_requires_max_(DISPATCH_LEVEL) +_Kernel_float_saved_ +_At_(*FloatSave, _Kernel_requires_resource_not_held_(FloatState) _Kernel_acquires_resource_(FloatState)) FORCEINLINE NTSTATUS -KeSaveFloatingPointState(PVOID FloatingState) -{ - UNREFERENCED_PARAMETER(FloatingState); - return STATUS_SUCCESS; -} - +KeSaveFloatingPointState( + _Out_ PKFLOATING_SAVE FloatSave) +{ + UNREFERENCED_PARAMETER(FloatSave); + return STATUS_SUCCESS; +} + +_Success_(1) +_Kernel_float_restored_ +_At_(*FloatSave, _Kernel_requires_resource_held_(FloatState) _Kernel_releases_resource_(FloatState)) FORCEINLINE NTSTATUS -KeRestoreFloatingPointState(PVOID FloatingState) -{ - UNREFERENCED_PARAMETER(FloatingState); - return STATUS_SUCCESS; +KeRestoreFloatingPointState( + _In_ PKFLOATING_SAVE FloatSave) +{ + UNREFERENCED_PARAMETER(FloatSave); + return STATUS_SUCCESS; } /* VOID Modified: trunk/reactos/include/xdk/amd64/mm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/amd64/mm.h?rev…
============================================================================== --- trunk/reactos/include/xdk/amd64/mm.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/amd64/mm.h [iso-8859-1] Sun May 10 19:34:38 2015 @@ -27,11 +27,15 @@ extern NTKERNELAPI PVOID MmSystemRangeStart; extern NTKERNELAPI ULONG64 MmUserProbeAddress; -#define MM_HIGHEST_USER_ADDRESS MmHighestUserAddress -#define MM_SYSTEM_RANGE_START MmSystemRangeStart -#define MM_USER_PROBE_ADDRESS MmUserProbeAddress -#define MM_LOWEST_USER_ADDRESS (PVOID)0x10000 +#define MM_HIGHEST_USER_ADDRESS MmHighestUserAddress +#define MM_SYSTEM_RANGE_START MmSystemRangeStart +#if defined(_LOCAL_COPY_USER_PROBE_ADDRESS_) +#define MM_USER_PROBE_ADDRESS _LOCAL_COPY_USER_PROBE_ADDRESS_ +extern ULONG64 _LOCAL_COPY_USER_PROBE_ADDRESS_; +#else +#define MM_USER_PROBE_ADDRESS MmUserProbeAddress +#endif +#define MM_LOWEST_USER_ADDRESS (PVOID)0x10000 #define MM_LOWEST_SYSTEM_ADDRESS (PVOID)0xFFFF080000000000ULL $endif /* _NTDDK_ */ - Modified: trunk/reactos/include/xdk/arm/ke.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/arm/ke.h?rev=6…
============================================================================== --- trunk/reactos/include/xdk/arm/ke.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/arm/ke.h [iso-8859-1] Sun May 10 19:34:38 2015 @@ -1,5 +1,358 @@ $if (_WDMDDK_) -#include <armddk.h> +/** Kernel definitions for ARM **/ + +/* Interrupt request levels */ +#define PASSIVE_LEVEL 0 +#define LOW_LEVEL 0 +#define APC_LEVEL 1 +#define DISPATCH_LEVEL 2 +#define CLOCK_LEVEL 13 +#define IPI_LEVEL 14 +#define DRS_LEVEL 14 +#define POWER_LEVEL 14 +#define PROFILE_LEVEL 15 +#define HIGH_LEVEL 15 + +#define KIP0PCRADDRESS 0xFFDFF000 +#define KI_USER_SHARED_DATA 0xFFFF9000 +#define SharedUserData ((KUSER_SHARED_DATA * const)KI_USER_SHARED_DATA) + +#define PAGE_SIZE 0x1000 +#define PAGE_SHIFT 12L + +typedef struct _KFLOATING_SAVE +{ + ULONG Reserved; +} KFLOATING_SAVE, *PKFLOATING_SAVE; + +extern NTKERNELAPI volatile KSYSTEM_TIME KeTickCount; + +FORCEINLINE +VOID +YieldProcessor( + VOID) +{ + __dmb(_ARM_BARRIER_ISHST); + __yield(); +} + +#define MemoryBarrier() __dmb(_ARM_BARRIER_SY) +#define PreFetchCacheLine(l,a) __prefetch((const void *) (a)) +#define PrefetchForWrite(p) __prefetch((const void *) (p)) +#define ReadForWriteAccess(p) (*(p)) + +FORCEINLINE +VOID +KeMemoryBarrier( + VOID) +{ + _ReadWriteBarrier(); + MemoryBarrier(); +} + +#define KeMemoryBarrierWithoutFence() _ReadWriteBarrier() + +_IRQL_requires_max_(HIGH_LEVEL) +_IRQL_saves_ +NTHALAPI +KIRQL +NTAPI +KeGetCurrentIrql( + VOID); + +_IRQL_requires_max_(HIGH_LEVEL) +NTHALAPI +VOID +FASTCALL +KfLowerIrql( + _In_ _IRQL_restores_ _Notliteral_ KIRQL NewIrql); +#define KeLowerIrql(a) KfLowerIrql(a) + +_IRQL_requires_max_(HIGH_LEVEL) +_IRQL_raises_(NewIrql) +_IRQL_saves_ +NTHALAPI +KIRQL +FASTCALL +KfRaiseIrql( + _In_ KIRQL NewIrql); +#define KeRaiseIrql(a,b) *(b) = KfRaiseIrql(a) + +_IRQL_requires_max_(DISPATCH_LEVEL) +_IRQL_saves_ +_IRQL_raises_(DISPATCH_LEVEL) +NTHALAPI +KIRQL +NTAPI +KeRaiseIrqlToDpcLevel(VOID); + +NTHALAPI +KIRQL +NTAPI +KeRaiseIrqlToSynchLevel(VOID); + +_Requires_lock_not_held_(*SpinLock) +_Acquires_lock_(*SpinLock) +_IRQL_requires_max_(DISPATCH_LEVEL) +_IRQL_saves_ +_IRQL_raises_(DISPATCH_LEVEL) +NTHALAPI +KIRQL +FASTCALL +KfAcquireSpinLock( + _Inout_ PKSPIN_LOCK SpinLock); +#define KeAcquireSpinLock(a,b) *(b) = KfAcquireSpinLock(a) + +_Requires_lock_held_(*SpinLock) +_Releases_lock_(*SpinLock) +_IRQL_requires_(DISPATCH_LEVEL) +NTHALAPI +VOID +FASTCALL +KfReleaseSpinLock( + _Inout_ PKSPIN_LOCK SpinLock, + _In_ _IRQL_restores_ KIRQL NewIrql); +#define KeReleaseSpinLock(a,b) KfReleaseSpinLock(a,b) + +_Requires_lock_not_held_(*SpinLock) +_Acquires_lock_(*SpinLock) +_IRQL_requires_min_(DISPATCH_LEVEL) +NTKERNELAPI +VOID +FASTCALL +KefAcquireSpinLockAtDpcLevel( + _Inout_ PKSPIN_LOCK SpinLock); +#define KeAcquireSpinLockAtDpcLevel(SpinLock) KefAcquireSpinLockAtDpcLevel(SpinLock) + +_Requires_lock_held_(*SpinLock) +_Releases_lock_(*SpinLock) +_IRQL_requires_min_(DISPATCH_LEVEL) +NTKERNELAPI +VOID +FASTCALL +KefReleaseSpinLockFromDpcLevel( + _Inout_ PKSPIN_LOCK SpinLock); +#define KeReleaseSpinLockFromDpcLevel(SpinLock) KefReleaseSpinLockFromDpcLevel(SpinLock) + +NTSYSAPI +PKTHREAD +NTAPI +KeGetCurrentThread(VOID); + +_Always_(_Post_satisfies_(return<=0)) +_Must_inspect_result_ +_IRQL_requires_max_(DISPATCH_LEVEL) +_Kernel_float_saved_ +_At_(*FloatSave, _Kernel_requires_resource_not_held_(FloatState) _Kernel_acquires_resource_(FloatState)) +FORCEINLINE +NTSTATUS +KeSaveFloatingPointState( + _Out_ PKFLOATING_SAVE FloatSave) +{ + UNREFERENCED_PARAMETER(FloatSave); + return STATUS_SUCCESS; +} + +_Success_(1) +_Kernel_float_restored_ +_At_(*FloatSave, _Kernel_requires_resource_held_(FloatState) _Kernel_releases_resource_(FloatState)) +FORCEINLINE +NTSTATUS +KeRestoreFloatingPointState( + _In_ PKFLOATING_SAVE FloatSave) +{ + UNREFERENCED_PARAMETER(FloatSave); + return STATUS_SUCCESS; +} + +VOID +KeFlushIoBuffers( + _In_ PMDL Mdl, + _In_ BOOLEAN ReadOperation, + _In_ BOOLEAN DmaOperation); + +#define DbgRaiseAssertionFailure() __emit(0xdefc) + +FORCEINLINE +VOID +_KeQueryTickCount( + OUT PLARGE_INTEGER CurrentCount) +{ + for (;;) { +#ifdef NONAMELESSUNION + CurrentCount->s.HighPart = KeTickCount.High1Time; + CurrentCount->s.LowPart = KeTickCount.LowPart; + if (CurrentCount->s.HighPart == KeTickCount.High2Time) break; +#else + CurrentCount->HighPart = KeTickCount.High1Time; + CurrentCount->LowPart = KeTickCount.LowPart; + if (CurrentCount->HighPart == KeTickCount.High2Time) break; +#endif + YieldProcessor(); + } +} +#define KeQueryTickCount(CurrentCount) _KeQueryTickCount(CurrentCount) + +#define CP15_PMSELR 15, 0, 9, 12, 5 /* Event Counter Selection Register */ +#define CP15_PMXEVCNTR 15, 0, 9, 13, 2 /* Event Count Register */ +#define CP15_TPIDRURW 15, 0, 13, 0, 2 /* Software Thread ID Register, UsRW */ +#define CP15_TPIDRURO 15, 0, 13, 0, 3 /* Software Thread ID Register, UsRO */ +#define CP15_TPIDRPRW 15, 0, 13, 0, 4 /* Software Thread ID Register, Kernel */ + +$endif (_WDMDDK_) +$if (_NTDDK_) + +#define PAUSE_PROCESSOR __yield(); + +#define KERNEL_STACK_SIZE 0x3000 +#define KERNEL_LARGE_STACK_SIZE 0xF000 +#define KERNEL_LARGE_STACK_COMMIT KERNEL_STACK_SIZE + +#define KERNEL_MCA_EXCEPTION_STACK_SIZE 0x2000 + +#define EXCEPTION_READ_FAULT 0 +#define EXCEPTION_WRITE_FAULT 1 +#define EXCEPTION_EXECUTE_FAULT 8 + +/* The following flags control the contents of the CONTEXT structure. */ +#define CONTEXT_ARM 0x200000L +#define CONTEXT_CONTROL (CONTEXT_ARM | 0x00000001L) +#define CONTEXT_INTEGER (CONTEXT_ARM | 0x00000002L) +#define CONTEXT_FLOATING_POINT (CONTEXT_ARM | 0x00000004L) +#define CONTEXT_DEBUG_REGISTERS (CONTEXT_ARM | 0x00000008L) +#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT) + +typedef struct _NEON128 +{ + ULONGLONG Low; + LONGLONG High; +} NEON128, *PNEON128; + +#define ARM_MAX_BREAKPOINTS 8 +#define ARM_MAX_WATCHPOINTS 1 + +typedef struct _CONTEXT +{ + /* The flags values within this flag control the contents of + a CONTEXT record. + + If the context record is used as an input parameter, then + for each portion of the context record controlled by a flag + whose value is set, it is assumed that that portion of the + context record contains valid context. If the context record + is being used to modify a thread's context, then only that + portion of the threads context will be modified. + + If the context record is used as an IN OUT parameter to capture + the context of a thread, then only those portions of the thread's + context corresponding to set flags will be returned. + + The context record is never used as an OUT only parameter. */ + ULONG ContextFlags; + + /* This section is specified/returned if the ContextFlags word contains + the flag CONTEXT_INTEGER. */ + ULONG R0; + ULONG R1; + ULONG R2; + ULONG R3; + ULONG R4; + ULONG R5; + ULONG R6; + ULONG R7; + ULONG R8; + ULONG R9; + ULONG R10; + ULONG R11; + ULONG R12; + + ULONG Sp; + ULONG Lr; + ULONG Pc; + ULONG Cpsr; + + /* Floating Point/NEON Registers */ + ULONG Fpscr; + ULONG Padding; + union + { + NEON128 Q[16]; + ULONGLONG D[32]; + ULONG S[32]; + } DUMMYUNIONNAME; + + /* Debug registers */ + ULONG Bvr[ARM_MAX_BREAKPOINTS]; + ULONG Bcr[ARM_MAX_BREAKPOINTS]; + ULONG Wvr[ARM_MAX_WATCHPOINTS]; + ULONG Wcr[ARM_MAX_WATCHPOINTS]; + + ULONG Padding2[2]; +} CONTEXT; + +#define PCR_MINOR_VERSION 1 +#define PCR_MAJOR_VERSION 1 + +typedef struct _KPCR +{ + _ANONYMOUS_UNION union + { + NT_TIB NtTib; + _ANONYMOUS_STRUCT struct + { + ULONG TibPad0[2]; + PVOID Spare1; + struct _KPCR *Self; + struct _KPRCB *CurrentPrcb; + PKSPIN_LOCK_QUEUE LockArray; + PVOID Used_Self; + }; + }; + KIRQL CurrentIrql; + UCHAR SecondLevelCacheAssociativity; + ULONG Unused0[3]; + USHORT MajorVersion; + USHORT MinorVersion; + ULONG StallScaleFactor; + PVOID Unused1[3]; + ULONG KernelReserved[15]; + ULONG SecondLevelCacheSize; + _ANONYMOUS_UNION union + { + USHORT SoftwareInterruptPending; // Software Interrupt Pending Flag + struct + { + UCHAR ApcInterrupt; // 0x01 if APC int pending + UCHAR DispatchInterrupt; // 0x01 if dispatch int pending + }; + }; + USHORT InterruptPad; + ULONG HalReserved[32]; + PVOID KdVersionBlock; + PVOID Unused3; + ULONG PcrAlign1[8]; +} KPCR, *PKPCR; + +#define CP15_PCR_RESERVED_MASK 0xFFF +//#define KIPCR() ((ULONG_PTR)(_MoveFromCoprocessor(CP15_TPIDRPRW)) & ~CP15_PCR_RESERVED_MASK) + +FORCEINLINE +PKPCR +KeGetPcr( + VOID) +{ + return (PKPCR)(_MoveFromCoprocessor(CP15_TPIDRPRW) & ~CP15_PCR_RESERVED_MASK); +} + +#if (NTDDI_VERSION < NTDDI_WIN7) || !defined(NT_PROCESSOR_GROUPS) +FORCEINLINE +ULONG +KeGetCurrentProcessorNumber( + VOID) + +{ + return *((PUCHAR)KeGetPcr() + 0x580); +} +#endif /* (NTDDI_VERSION < NTDDI_WIN7) || !defined(NT_PROCESSOR_GROUPS) */ + $endif - -#define KeMemoryBarrierWithoutFence() _ReadWriteBarrier() Modified: trunk/reactos/include/xdk/ketypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/ketypes.h?rev=…
============================================================================== --- trunk/reactos/include/xdk/ketypes.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/ketypes.h [iso-8859-1] Sun May 10 19:34:38 2015 @@ -1097,10 +1097,10 @@ #define XSTATE_LEGACY_SSE 1 #define XSTATE_GSSE 2 -#define XSTATE_MASK_LEGACY_FLOATING_POINT (1i64 << (XSTATE_LEGACY_FLOATING_POINT)) -#define XSTATE_MASK_LEGACY_SSE (1i64 << (XSTATE_LEGACY_SSE)) +#define XSTATE_MASK_LEGACY_FLOATING_POINT (1LL << (XSTATE_LEGACY_FLOATING_POINT)) +#define XSTATE_MASK_LEGACY_SSE (1LL << (XSTATE_LEGACY_SSE)) #define XSTATE_MASK_LEGACY (XSTATE_MASK_LEGACY_FLOATING_POINT | XSTATE_MASK_LEGACY_SSE) -#define XSTATE_MASK_GSSE (1i64 << (XSTATE_GSSE)) +#define XSTATE_MASK_GSSE (1LL << (XSTATE_GSSE)) #define MAXIMUM_XSTATE_FEATURES 64 Modified: trunk/reactos/include/xdk/ntbasedef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/ntbasedef.h?re…
============================================================================== --- trunk/reactos/include/xdk/ntbasedef.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/ntbasedef.h [iso-8859-1] Sun May 10 19:34:38 2015 @@ -757,7 +757,7 @@ #define UInt32x32To64(a,b) ((unsigned __int64)(unsigned int)(a)*(unsigned __int64)(unsigned int)(b)) #endif -#if defined(MIDL_PASS)|| defined(RC_INVOKED) || defined(_M_CEE_PURE) +#if defined(MIDL_PASS)|| defined(RC_INVOKED) || defined(_M_CEE_PURE) || defined(_M_ARM) /* Use native math */ #define Int64ShllMod32(a,b) ((unsigned __int64)(a)<<(b)) #define Int64ShraMod32(a,b) (((__int64)(a))>>(b)) Modified: trunk/reactos/include/xdk/ntddk.template.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/ntddk.template…
============================================================================== --- trunk/reactos/include/xdk/ntddk.template.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/ntddk.template.h [iso-8859-1] Sun May 10 19:34:38 2015 @@ -117,6 +117,7 @@ $include(mips/ke.h) #elif defined(_M_ARM) $include(arm/ke.h) +$include(arm/mm.h) #else #error Unknown Architecture #endif Modified: trunk/reactos/include/xdk/winnt_old.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/winnt_old.h?re…
============================================================================== --- trunk/reactos/include/xdk/winnt_old.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/winnt_old.h [iso-8859-1] Sun May 10 19:34:38 2015 @@ -2412,13 +2412,19 @@ /* The following flags control the contents of the CONTEXT structure. */ -#define CONTEXT_ARM 0x0000040 +#define CONTEXT_ARM 0x200000L #define CONTEXT_CONTROL (CONTEXT_ARM | 0x00000001L) #define CONTEXT_INTEGER (CONTEXT_ARM | 0x00000002L) - -#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER) - -typedef struct _NEON128 { +#define CONTEXT_FLOATING_POINT (CONTEXT_ARM | 0x00000004L) +#define CONTEXT_DEBUG_REGISTERS (CONTEXT_ARM | 0x00000008L) +#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT) + +#define EXCEPTION_READ_FAULT 0 +#define EXCEPTION_WRITE_FAULT 1 +#define EXCEPTION_EXECUTE_FAULT 8 + +typedef struct _NEON128 +{ ULONGLONG Low; LONGLONG High; } NEON128, *PNEON128; @@ -2426,7 +2432,8 @@ #define ARM_MAX_BREAKPOINTS 8 #define ARM_MAX_WATCHPOINTS 1 -typedef struct _CONTEXT { +typedef struct _CONTEXT +{ /* The flags values within this flag control the contents of a CONTEXT record. @@ -2442,7 +2449,6 @@ context corresponding to set flags will be returned. The context record is never used as an OUT only parameter. */ - DWORD ContextFlags; /* This section is specified/returned if the ContextFlags word contains @@ -2469,7 +2475,8 @@ /* Floating Point/NEON Registers */ DWORD Fpscr; DWORD Padding; - union { + union + { NEON128 Q[16]; ULONGLONG D[32]; DWORD S[32]; Modified: trunk/reactos/ntoskrnl/include/internal/arm/ke.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/arm/ke.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/arm/ke.h [iso-8859-1] Sun May 10 19:34:38 2015 @@ -3,6 +3,9 @@ #include "intrin_i.h" #define KiServiceExit2 KiExceptionExit + +#define SYNCH_LEVEL DISPATCH_LEVEL +#define PCR ((KPCR * const)KIP0PCRADDRESS) // //Lockdown TLB entries @@ -16,6 +19,11 @@ #define KD_BREAKPOINT_TYPE ULONG #define KD_BREAKPOINT_SIZE sizeof(ULONG) //#define KD_BREAKPOINT_VALUE + +// +// Maximum IRQs +// +#define MAXIMUM_VECTOR 16 // // Macros for getting and setting special purpose registers in portable code @@ -137,6 +145,19 @@ VOID ); +// +// Cache clean and flush +// +VOID +HalSweepDcache( + VOID +); + +VOID +HalSweepIcache( + VOID +); + #define Ki386PerfEnd() #define KiEndInterrupt(x,y) Modified: trunk/reactos/ntoskrnl/include/internal/arm/mm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/arm/mm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/arm/mm.h [iso-8859-1] Sun May 10 19:34:38 2015 @@ -14,11 +14,6 @@ #define MI_PAGED_POOL_START (PVOID)0xE1000000 #define MI_NONPAGED_POOL_END (PVOID)0xFFBE0000 #define MI_DEBUG_MAPPING (PVOID)0xFFBFF000 - -#define PTE_BASE 0xC0000000 -#define PDE_BASE 0xC0400000 -#define PDE_TOP 0xC04FFFFF -#define PTE_TOP 0xC03FFFFF #define PTE_PER_PAGE 256 #define PDE_PER_PAGE 4096
9 years, 4 months
1
0
0
0
[tkreuzer] 67630: [NDK] - Remove unused HYPERSPACE_BASE (which was broken for x86, too) - Add PAE values for HYPER_SPACE and HYPER_SPACE_END on x86 - Add missing MM_HAL_VA_START and MM_HAL_VA_END f...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun May 10 19:33:56 2015 New Revision: 67630 URL:
http://svn.reactos.org/svn/reactos?rev=67630&view=rev
Log: [NDK] - Remove unused HYPERSPACE_BASE (which was broken for x86, too) - Add PAE values for HYPER_SPACE and HYPER_SPACE_END on x86 - Add missing MM_HAL_VA_START and MM_HAL_VA_END for ARM Modified: trunk/reactos/include/ndk/amd64/ketypes.h trunk/reactos/include/ndk/arm/ketypes.h trunk/reactos/include/ndk/i386/ketypes.h trunk/reactos/ntoskrnl/include/internal/i386/mm.h Modified: trunk/reactos/include/ndk/amd64/ketypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/amd64/ketypes.…
============================================================================== --- trunk/reactos/include/ndk/amd64/ketypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/amd64/ketypes.h [iso-8859-1] Sun May 10 19:33:56 2015 @@ -253,7 +253,6 @@ // HAL Variables // #define INITIAL_STALL_COUNT 100 -#define HYPERSPACE_BASE 0xfffff70000000000ULL #define MM_HAL_VA_START 0xFFFFFFFFFFC00000ULL /* This is Vista+ */ #define MM_HAL_VA_END 0xFFFFFFFFFFFFFFFFULL #define APIC_BASE 0xFFFFFFFFFFFE0000ULL Modified: trunk/reactos/include/ndk/arm/ketypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/arm/ketypes.h?…
============================================================================== --- trunk/reactos/include/ndk/arm/ketypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/arm/ketypes.h [iso-8859-1] Sun May 10 19:33:56 2015 @@ -142,6 +142,8 @@ // HAL Variables // #define INITIAL_STALL_COUNT 100 +#define MM_HAL_VA_START 0xFFC00000 +#define MM_HAL_VA_END 0xFFFFFFFF // // Static Kernel-Mode Address start (use MM_KSEG0_BASE for actual) Modified: trunk/reactos/include/ndk/i386/ketypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/i386/ketypes.h…
============================================================================== --- trunk/reactos/include/ndk/i386/ketypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/i386/ketypes.h [iso-8859-1] Sun May 10 19:33:56 2015 @@ -166,11 +166,6 @@ // HAL Variables // #define INITIAL_STALL_COUNT 100 -#ifdef PAE -#define HYPERSPACE_BASE 0xc0400000 -#else -#define HYPERSPACE_BASE 0xc0800000 -#endif #define MM_HAL_VA_START 0xFFC00000 #define MM_HAL_VA_END 0xFFFFFFFF #define APIC_BASE 0xFFFE0000 Modified: trunk/reactos/ntoskrnl/include/internal/i386/mm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/i386/mm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/i386/mm.h [iso-8859-1] Sun May 10 19:33:56 2015 @@ -12,8 +12,13 @@ /* Memory layout base addresses */ #define MI_USER_PROBE_ADDRESS (PVOID)0x7FFF0000 #define MI_DEFAULT_SYSTEM_RANGE_START (PVOID)0x80000000 +#ifndef PAE #define HYPER_SPACE 0xC0400000 #define HYPER_SPACE_END 0xC07FFFFF +#else +#define HYPER_SPACE 0xC0800000 +#define HYPER_SPACE_END 0xC0BFFFFF +#endif #define MI_SYSTEM_CACHE_WS_START (PVOID)0xC0C00000 #define MI_PAGED_POOL_START (PVOID)0xE1000000 #define MI_NONPAGED_POOL_END (PVOID)0xFFBE0000
9 years, 4 months
1
0
0
0
[hbelusca] 67629: [NTVDM]: Implement support for DMA transfers, single-mode only for now, and fix its support for VDDs.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun May 10 18:02:45 2015 New Revision: 67629 URL:
http://svn.reactos.org/svn/reactos?rev=67629&view=rev
Log: [NTVDM]: Implement support for DMA transfers, single-mode only for now, and fix its support for VDDs. Modified: trunk/reactos/subsystems/mvdm/ntvdm/hardware/dma.c trunk/reactos/subsystems/mvdm/ntvdm/hardware/dma.h Modified: trunk/reactos/subsystems/mvdm/ntvdm/hardware/dma.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/hard…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/hardware/dma.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/hardware/dma.c [iso-8859-1] Sun May 10 18:02:45 2015 @@ -2,7 +2,7 @@ * COPYRIGHT: GPL - See COPYING in the top level directory * PROJECT: ReactOS Virtual DOS Machine * FILE: dma.c - * PURPOSE: Direct Memory Access Controller emulation - + * PURPOSE: ISA DMA - Direct Memory Access Controller emulation - * i8237A compatible with 74LS612 Memory Mapper extension * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca(a)sfr.fr) */ @@ -16,6 +16,7 @@ #include "dma.h" #include "io.h" +#include "memory.h" /* PRIVATE VARIABLES **********************************************************/ @@ -41,7 +42,7 @@ #define READ_CNT(CtrlIndex, ChanIndex, Data) \ do { \ (Data) = \ - *((PBYTE)&DmaControllers[(CtrlIndex)].DmaChannel[(ChanIndex)].CurrWordCnt + \ + *((PBYTE)&DmaControllers[(CtrlIndex)].DmaChannel[(ChanIndex)].CurrElemCnt + \ (DmaControllers[(CtrlIndex)].FlipFlop & 0x01)); \ DmaControllers[(CtrlIndex)].FlipFlop ^= 1; \ } while(0) @@ -49,6 +50,8 @@ static BYTE WINAPI DmaReadPort(USHORT Port) { BYTE ReadValue = 0xFF; + + DPRINT1("DmaReadPort(Port = 0x%04X)\n", Port); switch (Port) { @@ -122,6 +125,14 @@ return DmaControllers[0].TempReg; case 0xDA: return DmaControllers[1].TempReg; + } + + /* Multi-Channel Mask Registers */ + { + case 0x0F: + return DmaControllers[0].Mask; + case 0xDE: + return DmaControllers[1].Mask; } } @@ -139,15 +150,17 @@ #define WRITE_CNT(CtrlIndex, ChanIndex, Data) \ do { \ - *((PBYTE)&DmaControllers[(CtrlIndex)].DmaChannel[(ChanIndex)].BaseWordCnt + \ + *((PBYTE)&DmaControllers[(CtrlIndex)].DmaChannel[(ChanIndex)].BaseElemCnt + \ (DmaControllers[(CtrlIndex)].FlipFlop & 0x01)) = (Data); \ - *((PBYTE)&DmaControllers[(CtrlIndex)].DmaChannel[(ChanIndex)].CurrWordCnt + \ + *((PBYTE)&DmaControllers[(CtrlIndex)].DmaChannel[(ChanIndex)].CurrElemCnt + \ (DmaControllers[(CtrlIndex)].FlipFlop & 0x01)) = (Data); \ DmaControllers[(CtrlIndex)].FlipFlop ^= 1; \ } while(0) static VOID WINAPI DmaWritePort(USHORT Port, BYTE Data) { + DPRINT1("DmaWritePort(Port = 0x%04X, Data = 0x%02X)\n", Port, Data); + switch (Port) { /* Start Address Registers */ @@ -216,6 +229,16 @@ break; } + /* Mode Registers */ + { + case 0x0B: + DmaControllers[0].DmaChannel[Data & 0x03].Mode = (Data & ~0x03); + break; + case 0xD6: + DmaControllers[1].DmaChannel[Data & 0x03].Mode = (Data & ~0x03); + break; + } + /* Request Registers */ { case 0x09: @@ -226,6 +249,32 @@ break; } + /* Single Channel Mask Registers */ + { + case 0x0A: + if (Data & 0x04) + DmaControllers[0].Mask |= (1 << (Data & 0x03)); + else + DmaControllers[0].Mask &= ~(1 << (Data & 0x03)); + break; + case 0xD4: + if (Data & 0x04) + DmaControllers[1].Mask |= (1 << (Data & 0x03)); + else + DmaControllers[1].Mask &= ~(1 << (Data & 0x03)); + break; + } + + /* Multi-Channel Mask Registers */ + { + case 0x0F: + DmaControllers[0].Mask = (Data & 0x0F); + break; + case 0xDE: + DmaControllers[1].Mask = (Data & 0x0F); + break; + } + /* Flip-Flop Reset */ { case 0x0C: @@ -236,7 +285,7 @@ break; } - /* DMA Master Reset */ + /* DMA Master Reset Registers */ { case 0x0D: DmaControllers[0].Command = 0x00; @@ -255,6 +304,16 @@ DmaControllers[1].Mask = 0x0F; break; } + + /* Mask Reset Registers */ + { + case 0x0E: + DmaControllers[0].Mask = 0x00; + break; + case 0xDC: + DmaControllers[1].Mask = 0x00; + break; + } } } @@ -262,6 +321,8 @@ static BYTE WINAPI DmaPageReadPort(USHORT Port) { + DPRINT1("DmaPageReadPort(Port = 0x%04X)\n", Port); + switch (Port) { case 0x87: @@ -287,6 +348,8 @@ static VOID WINAPI DmaPageWritePort(USHORT Port, BYTE Data) { + DPRINT1("DmaPageWritePort(Port = 0x%04X, Data = 0x%02X)\n", Port, Data); + switch (Port) { case 0x87: @@ -317,6 +380,169 @@ } /* PUBLIC FUNCTIONS ***********************************************************/ + +DWORD DmaRequest(IN WORD iChannel, + IN OUT PVOID Buffer, + IN DWORD length) +{ +/* + * NOTE: This function is adapted from Wine's krnl386.exe, + * DMA emulation by Christian Costa. + */ + PDMA_CONTROLLER pDcp; + WORD Channel; + + DWORD i, Size, ret = 0; + BYTE RegMode, OpMode, Increment, Autoinit, TrMode; + PBYTE dmabuf = Buffer; + + ULONG CurrAddress; + + if (iChannel >= DMA_CONTROLLERS * DMA_CONTROLLER_CHANNELS) + { + SetLastError(ERROR_INVALID_ADDRESS); + return 0; + } + + pDcp = &DmaControllers[iChannel / DMA_CONTROLLER_CHANNELS]; + Channel = iChannel % DMA_CONTROLLER_CHANNELS; // == (iChannel & 0x03) + + RegMode = pDcp->DmaChannel[Channel].Mode; + + DPRINT1("DMA_Command = %x length=%d\n", RegMode, length); + + /* Exit if the controller is disabled or the channel is masked */ + if ((pDcp->Command & 0x04) || (pDcp->Mask & (1 << Channel))) + return 0; + + OpMode = (RegMode & 0xC0) >> 6; + Increment = !(RegMode & 0x20); + Autoinit = RegMode & 0x10; + TrMode = (RegMode & 0x0C) >> 2; + + /* Process operating mode */ + switch (OpMode) + { + case 0: + /* Request mode */ + DPRINT1("Request Mode - Not Implemented\n"); + return 0; + case 1: + /* Single Mode */ + break; + case 2: + /* Request mode */ + DPRINT1("Block Mode - Not Implemented\n"); + return 0; + case 3: + /* Cascade Mode */ + DPRINT1("Cascade Mode should not be used by regular apps\n"); + return 0; + } + + /* Perform one the 4 transfer modes */ + if (TrMode == 4) + { + /* Illegal */ + DPRINT1("DMA Transfer Type Illegal\n"); + return 0; + } + + /* Transfer size : 8 bits for channels 0..3, 16 bits for channels 4..7 */ + Size = (iChannel < 4) ? sizeof(BYTE) : sizeof(WORD); + + // FIXME: Handle wrapping? + /* Get the number of elements to transfer */ + ret = min(pDcp->DmaChannel[Channel].CurrElemCnt, length / Size); + length = ret * Size; + + /* 16-bit mode addressing, see:
http://wiki.osdev.org/ISA_DMA#16_bit_issues
*/ + CurrAddress = (iChannel < 4) ? (DmaPageRegisters[iChannel].Page << 16) | (pDcp->DmaChannel[Channel].CurrAddress << 0) + : (DmaPageRegisters[iChannel].Page << 16) | (pDcp->DmaChannel[Channel].CurrAddress << 1); + + switch (TrMode) + { + /* Verification (no real transfer) */ + case 0: + { + DPRINT1("Verification DMA operation\n"); + break; + } + + /* Write */ + case 1: + { + DPRINT1("Perform Write transfer of %d elements (%d bytes) at 0x%x %s with count %x\n", + ret, length, CurrAddress, Increment ? "up" : "down", pDcp->DmaChannel[Channel].CurrElemCnt); + + if (Increment) + { + MemWrite(CurrAddress, dmabuf, length); + } + else + { + for (i = 0; i < length; i++) + { + MemWrite(CurrAddress - i, dmabuf + i, sizeof(BYTE)); + } + } + + break; + } + + /* Read */ + case 2: + { + DPRINT1("Perform Read transfer of %d elements (%d bytes) at 0x%x %s with count %x\n", + ret, length, CurrAddress, Increment ? "up" : "down", pDcp->DmaChannel[Channel].CurrElemCnt); + + if (Increment) + { + MemRead(CurrAddress, dmabuf, length); + } + else + { + for (i = 0; i < length; i++) + { + MemRead(CurrAddress - i, dmabuf + i, sizeof(BYTE)); + } + } + + break; + } + } + + /* Update DMA registers */ + pDcp->DmaChannel[Channel].CurrElemCnt -= ret; + if (Increment) + pDcp->DmaChannel[Channel].CurrAddress += ret; + else + pDcp->DmaChannel[Channel].CurrAddress -= ret; + + /* Check for end of transfer */ + if (pDcp->DmaChannel[Channel].CurrElemCnt == 0) + { + DPRINT1("DMA buffer empty\n"); + + /* Update status register of the DMA chip corresponding to the channel */ + pDcp->Status |= 1 << Channel; /* Mark transfer as finished */ + pDcp->Status &= ~(1 << (Channel + 4)); /* Reset soft request if any */ + + if (Autoinit) + { + /* Reload Current* registers to their initial values */ + pDcp->DmaChannel[Channel].CurrAddress = pDcp->DmaChannel[Channel].BaseAddress; + pDcp->DmaChannel[Channel].CurrElemCnt = pDcp->DmaChannel[Channel].BaseElemCnt; + } + else + { + /* Set the mask bit for the channel */ + pDcp->Mask |= (1 << Channel); + } + } + + return length; +} VOID DmaInitialize(VOID) { @@ -339,7 +565,7 @@ RegisterIoPort(0x0C, NULL, DmaWritePort); /* Flip-Flop Reset Register */ RegisterIoPort(0x0D, DmaReadPort, DmaWritePort); /* Intermediate (Read) / Master Reset (Write) Registers */ RegisterIoPort(0x0E, NULL, DmaWritePort); /* Mask Reset Register */ - RegisterIoPort(0x0F, DmaReadPort, DmaWritePort); /* Multi-Channel Mask Reset Register */ + RegisterIoPort(0x0F, DmaReadPort, DmaWritePort); /* Multi-Channel Mask Register */ /* Channels 4(Reserved)..7 */ @@ -359,7 +585,7 @@ RegisterIoPort(0xD8, NULL, DmaWritePort); /* Flip-Flop Reset Register */ RegisterIoPort(0xDA, DmaReadPort, DmaWritePort); /* Intermediate (Read) / Master Reset (Write) Registers */ RegisterIoPort(0xDC, NULL, DmaWritePort); /* Mask Reset Register */ - RegisterIoPort(0xDE, DmaReadPort, DmaWritePort); /* Multi-Channel Mask Reset Register */ + RegisterIoPort(0xDE, DmaReadPort, DmaWritePort); /* Multi-Channel Mask Register */ /* Channels Page Address Registers */ @@ -390,8 +616,13 @@ return FALSE; } - UNIMPLEMENTED; - return 0; + /* + * We assume success first. If something fails, + * DmaRequest sets an adequate last error. + */ + SetLastError(ERROR_SUCCESS); + + return DmaRequest(iChannel, Buffer, length); } BOOL @@ -415,9 +646,9 @@ Channel = iChannel % DMA_CONTROLLER_CHANNELS; pDmaInfo->addr = pDcp->DmaChannel[Channel].CurrAddress; - pDmaInfo->count = pDcp->DmaChannel[Channel].CurrWordCnt; - - // pDmaInfo->page = DmaPageRegisters[iChannel].Page; + pDmaInfo->count = pDcp->DmaChannel[Channel].CurrElemCnt; + + pDmaInfo->page = DmaPageRegisters[iChannel].Page; pDmaInfo->status = pDcp->Status; pDmaInfo->mode = pDcp->DmaChannel[Channel].Mode; pDmaInfo->mask = pDcp->Mask; @@ -450,10 +681,10 @@ pDcp->DmaChannel[Channel].CurrAddress = pDmaInfo->addr; if (fDMA & VDD_DMA_COUNT) - pDcp->DmaChannel[Channel].CurrWordCnt = pDmaInfo->count; - - // if (fDMA & VDD_DMA_PAGE) - // DmaPageRegisters[iChannel].Page = pDmaInfo->page; + pDcp->DmaChannel[Channel].CurrElemCnt = pDmaInfo->count; + + if (fDMA & VDD_DMA_PAGE) + DmaPageRegisters[iChannel].Page = pDmaInfo->page; if (fDMA & VDD_DMA_STATUS) pDcp->Status = pDmaInfo->status; Modified: trunk/reactos/subsystems/mvdm/ntvdm/hardware/dma.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/hard…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/hardware/dma.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/hardware/dma.h [iso-8859-1] Sun May 10 18:02:45 2015 @@ -2,7 +2,7 @@ * COPYRIGHT: GPL - See COPYING in the top level directory * PROJECT: ReactOS Virtual DOS Machine * FILE: dma.h - * PURPOSE: Direct Memory Access Controller emulation - + * PURPOSE: ISA DMA - Direct Memory Access Controller emulation - * i8237A compatible with 74LS612 Memory Mapper extension * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca(a)sfr.fr) */ @@ -18,9 +18,9 @@ typedef struct _DMA_CHANNEL { WORD BaseAddress; - WORD BaseWordCnt; + WORD BaseElemCnt; WORD CurrAddress; - WORD CurrWordCnt; + WORD CurrElemCnt; BYTE Mode; } DMA_CHANNEL, *PDMA_CHANNEL; @@ -29,7 +29,7 @@ DMA_CHANNEL DmaChannel[DMA_CONTROLLER_CHANNELS]; WORD TempAddress; - WORD TempWordCnt; + WORD TempElemCnt; BYTE TempReg; @@ -49,9 +49,13 @@ } DMA_PAGE_REGISTER, *PDMA_PAGE_REGISTER; // The 74LS612 contains 16 bytes, each of them being a page register. -// They are accessible via ports 0x80 through 0x8F . +// They are accessible via ports 0x80 through 0x8F. /* FUNCTIONS ******************************************************************/ + +DWORD DmaRequest(IN WORD iChannel, + IN OUT PVOID Buffer, + IN DWORD length); VOID DmaInitialize(VOID);
9 years, 4 months
1
0
0
0
[tkreuzer] 67628: [RICHED20_WINETEST] Hey Arch, stop breaking GCC build, while trying to fix MSVC build!
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun May 10 17:59:10 2015 New Revision: 67628 URL:
http://svn.reactos.org/svn/reactos?rev=67628&view=rev
Log: [RICHED20_WINETEST] Hey Arch, stop breaking GCC build, while trying to fix MSVC build! Modified: trunk/rostests/winetests/riched20/editor.c Modified: trunk/rostests/winetests/riched20/editor.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/riched20/editor…
============================================================================== --- trunk/rostests/winetests/riched20/editor.c [iso-8859-1] (original) +++ trunk/rostests/winetests/riched20/editor.c [iso-8859-1] Sun May 10 17:59:10 2015 @@ -194,7 +194,7 @@ {10, -1, "winewine", FR_DOWN | FR_WHOLEWORD, 23}, {11, -1, "winewine", FR_WHOLEWORD, 0}, {31, -1, "winewine", FR_WHOLEWORD, 23}, - + /* Bad ranges */ {5, 200, "XXX", FR_DOWN, -1}, {-20, 20, "Wine", FR_DOWN, -1}, @@ -1327,7 +1327,7 @@ ok((cf2.dwMask == cf2test.dwMask) && (cf2.dwEffects == cf2test.dwEffects), "two selections' formats differ - cf2.dwMask: %x, cf2test.dwMask %x, cf2.dwEffects: %x, cf2test.dwEffects: %x\n", cf2.dwMask, cf2test.dwMask, cf2.dwEffects, cf2test.dwEffects); - + /*Fill the control with a "wine" string, which when inserted will be bold*/ SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"wine"); @@ -1399,7 +1399,7 @@ "WM_GETTEXT returned %d, expected %d\n", result, lstrlenA(buffer)); SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); result = strcmp(buffer,text); - ok(result == 0, + ok(result == 0, "WM_GETTEXT: settext and gettext differ. strcmp: %d\n", result); /* Test for returned value of WM_GETTEXTLENGTH */ @@ -1586,7 +1586,7 @@ /* testing no readonly by sending 'a' to the control*/ SendMessageA(hwndRichEdit, WM_CHAR, 'a', 0x1E0001); SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); - ok(buffer[0]=='a', + ok(buffer[0]=='a', "EM_SETOPTIONS: Text not changed! s1:%s s2:%s\n", text, buffer); SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); @@ -1595,8 +1595,8 @@ SendMessageA(hwndRichEdit, EM_SETOPTIONS, ECOOP_SET, ECO_READONLY); SendMessageA(hwndRichEdit, WM_CHAR, 'a', 0x1E0001); SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); - ok(buffer[0]==text[0], - "EM_SETOPTIONS: Text changed! s1:%s s2:%s\n", text, buffer); + ok(buffer[0]==text[0], + "EM_SETOPTIONS: Text changed! s1:%s s2:%s\n", text, buffer); /* EM_SETOPTIONS changes the window style, but changing the * window style does not change the options. */ @@ -1634,11 +1634,11 @@ BOOL link_present = FALSE; link_present = check_CFE_LINK_selection(hwnd, 0, 1); - if (is_url) + if (is_url) { /* control text is url; should get CFE_LINK */ ok(link_present, "URL Case: CFE_LINK not set for [%s].\n", url); } - else + else { ok(!link_present, "Non-URL Case: CFE_LINK set for [%s].\n", url); } @@ -2414,7 +2414,7 @@ "(line %d scrolled to line %d\n", y_before, y_after); y_before = y_after; - + r = SendMessageA(hwndRichEdit, EM_SCROLL, SB_PAGEUP, 0); /* page up */ y_after = SendMessageA(hwndRichEdit, EM_GETFIRSTVISIBLELINE, 0, 0); ok(((r & 0xffffff00) == 0x0001ff00), @@ -2422,7 +2422,7 @@ "(r == 0x%08x)\n", r); ok(y_after < y_before, "EM_SCROLL page up not functioning (line " "%d scrolled to line %d\n", y_before, y_after); - + y_before = y_after; r = SendMessageA(hwndRichEdit, EM_SCROLL, SB_LINEDOWN, 0); /* line down */ @@ -3220,16 +3220,16 @@ static void test_EM_SETUNDOLIMIT(void) { /* cases we test for: - * default behaviour - limiting at 100 undo's + * default behaviour - limiting at 100 undo's * undo disabled - setting a limit of 0 * undo limited - undo limit set to some to some number, like 2 * bad input - sending a negative number should default to 100 undo's */ - + HWND hwndRichEdit = new_richedit(NULL); CHARRANGE cr; int i; int result; - + SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"x"); cr.cpMin = 0; cr.cpMax = 1; @@ -3270,13 +3270,13 @@ SendMessageA(hwndRichEdit, WM_UNDO, 0, 0); ok(!SendMessageA(hwndRichEdit, EM_CANUNDO, 0, 0), "EM_SETUNDOLIMIT allowed a third undo with UNDOLIMIT set to 2\n"); - + /* fourth case - setting negative numbers should default to 100 undos */ SendMessageA(hwndRichEdit,EM_EMPTYUNDOBUFFER, 0,0); result = SendMessageA(hwndRichEdit, EM_SETUNDOLIMIT, -1, 0); - ok (result == 100, + ok (result == 100, "EM_SETUNDOLIMIT returned %d when set to -1, instead of 100\n",result); - + DestroyWindow(hwndRichEdit); } @@ -3515,9 +3515,9 @@ int sel_start, sel_end; SETTEXTEX setText; GETTEXTEX getText; - WCHAR TestItem1[] = {'T', 'e', 's', 't', - 'S', 'o', 'm', 'e', - 'T', 'e', 'x', 't', 0}; + WCHAR TestItem1[] = {'T', 'e', 's', 't', + 'S', 'o', 'm', 'e', + 'T', 'e', 'x', 't', 0}; WCHAR TestItem1alt[] = {'T', 'T', 'e', 's', 't', 'S', 'o', 'm', 'e', 'T', 'e', 'x', @@ -3732,8 +3732,8 @@ /* !ST_SELECTION && Unicode && !\rtf */ result = SendMessageA(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, 0); SendMessageA(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM)buf); - - ok (result == 1, + + ok (result == 1, "EM_SETTEXTEX returned %d, instead of 1\n",result); ok(!buf[0], "EM_SETTEXTEX with NULL lParam should clear rich edit.\n"); @@ -3751,7 +3751,7 @@ "EM_SETTEXTEX with NULL lParam to replace selection" " with no text should return 0. Got %i\n", result); - + /* put some text back: !ST_SELECTION && Unicode && !\rtf */ setText.flags = 0; SendMessageA(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM)TestItem1); @@ -3962,68 +3962,68 @@ char buffer[1024 + 1]; int textlimit = 0; /* multiple of 100 */ HWND hwndRichEdit = new_richedit(NULL); - + i = SendMessageA(hwndRichEdit, EM_GETLIMITTEXT, 0, 0); ok(32767 == i, "EM_EXLIMITTEXT: expected: %d, actual: %d\n", 32767, i); /* default */ - + textlimit = 256000; SendMessageA(hwndRichEdit, EM_EXLIMITTEXT, 0, textlimit); i = SendMessageA(hwndRichEdit, EM_GETLIMITTEXT, 0, 0); /* set higher */ ok(textlimit == i, "EM_EXLIMITTEXT: expected: %d, actual: %d\n", textlimit, i); - + textlimit = 1000; SendMessageA(hwndRichEdit, EM_EXLIMITTEXT, 0, textlimit); i = SendMessageA(hwndRichEdit, EM_GETLIMITTEXT, 0, 0); /* set lower */ ok(textlimit == i, "EM_EXLIMITTEXT: expected: %d, actual: %d\n", textlimit, i); - + SendMessageA(hwndRichEdit, EM_EXLIMITTEXT, 0, 0); i = SendMessageA(hwndRichEdit, EM_GETLIMITTEXT, 0, 0); /* default for WParam = 0 */ ok(65536 == i, "EM_EXLIMITTEXT: expected: %d, actual: %d\n", 65536, i); - + textlimit = sizeof(text)-1; memset(text, 'W', textlimit); text[sizeof(text)-1] = 0; SendMessageA(hwndRichEdit, EM_EXLIMITTEXT, 0, textlimit); /* maxed out text */ SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); - + SendMessageA(hwndRichEdit, EM_SETSEL, 0, -1); /* select everything */ SendMessageA(hwndRichEdit, EM_GETSEL, (WPARAM)&selBegin, (LPARAM)&selEnd); len1 = selEnd - selBegin; - + SendMessageA(hwndRichEdit, WM_KEYDOWN, VK_BACK, 1); SendMessageA(hwndRichEdit, WM_CHAR, VK_BACK, 1); SendMessageA(hwndRichEdit, WM_KEYUP, VK_BACK, 1); SendMessageA(hwndRichEdit, EM_SETSEL, 0, -1); SendMessageA(hwndRichEdit, EM_GETSEL, (WPARAM)&selBegin, (LPARAM)&selEnd); len2 = selEnd - selBegin; - + ok(len1 != len2, "EM_EXLIMITTEXT: Change Expected\nOld Length: %d, New Length: %d, Limit: %d\n", len1,len2,i); - + SendMessageA(hwndRichEdit, WM_KEYDOWN, 'A', 1); SendMessageA(hwndRichEdit, WM_CHAR, 'A', 1); SendMessageA(hwndRichEdit, WM_KEYUP, 'A', 1); SendMessageA(hwndRichEdit, EM_SETSEL, 0, -1); SendMessageA(hwndRichEdit, EM_GETSEL, (WPARAM)&selBegin, (LPARAM)&selEnd); len1 = selEnd - selBegin; - + ok(len1 != len2, "EM_EXLIMITTEXT: Change Expected\nOld Length: %d, New Length: %d, Limit: %d\n", len1,len2,i); - + SendMessageA(hwndRichEdit, WM_KEYDOWN, 'A', 1); SendMessageA(hwndRichEdit, WM_CHAR, 'A', 1); SendMessageA(hwndRichEdit, WM_KEYUP, 'A', 1); /* full; should be no effect */ SendMessageA(hwndRichEdit, EM_SETSEL, 0, -1); SendMessageA(hwndRichEdit, EM_GETSEL, (WPARAM)&selBegin, (LPARAM)&selEnd); len2 = selEnd - selBegin; - - ok(len1 == len2, + + ok(len1 == len2, "EM_EXLIMITTEXT: No Change Expected\nOld Length: %d, New Length: %d, Limit: %d\n", len1,len2,i); @@ -4103,26 +4103,26 @@ static void test_WM_SETFONT(void) { /* There is no invalid input or error conditions for this function. - * NULL wParam and lParam just fall back to their default values + * NULL wParam and lParam just fall back to their default values * It should be noted that even if you use a gibberish name for your fonts * here, it will still work because the name is stored. They will display as * System, but will report their name to be whatever they were created as */ - + HWND hwndRichEdit = new_richedit(NULL); - HFONT testFont1 = CreateFontA (0,0,0,0,FW_LIGHT, 0, 0, 0, ANSI_CHARSET, - OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | + HFONT testFont1 = CreateFontA (0,0,0,0,FW_LIGHT, 0, 0, 0, ANSI_CHARSET, + OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Marlett"); - HFONT testFont2 = CreateFontA (0,0,0,0,FW_LIGHT, 0, 0, 0, ANSI_CHARSET, - OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | + HFONT testFont2 = CreateFontA (0,0,0,0,FW_LIGHT, 0, 0, 0, ANSI_CHARSET, + OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "MS Sans Serif"); - HFONT testFont3 = CreateFontA (0,0,0,0,FW_LIGHT, 0, 0, 0, ANSI_CHARSET, - OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | + HFONT testFont3 = CreateFontA (0,0,0,0,FW_LIGHT, 0, 0, 0, ANSI_CHARSET, + OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Courier"); LOGFONTA sentLogFont; CHARFORMAT2A returnedCF2A; - + returnedCF2A.cbSize = sizeof(returnedCF2A); - + SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"x"); SendMessageA(hwndRichEdit, WM_SETFONT, (WPARAM)testFont1, MAKELPARAM(TRUE, 0)); SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_DEFAULT, (LPARAM)&returnedCF2A); @@ -4138,26 +4138,26 @@ ok (!strcmp(sentLogFont.lfFaceName,returnedCF2A.szFaceName), "EM_GETCHARFORMAT: Returned wrong font on test 2. Sent: %s, Returned: %s\n", sentLogFont.lfFaceName,returnedCF2A.szFaceName); - + SendMessageA(hwndRichEdit, WM_SETFONT, (WPARAM)testFont3, MAKELPARAM(TRUE, 0)); SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_DEFAULT, (LPARAM)&returnedCF2A); GetObjectA(testFont3, sizeof(LOGFONTA), &sentLogFont); ok (!strcmp(sentLogFont.lfFaceName,returnedCF2A.szFaceName), "EM_GETCHARFORMAT: Returned wrong font on test 3. Sent: %s, Returned: %s\n", sentLogFont.lfFaceName,returnedCF2A.szFaceName); - + /* This last test is special since we send in NULL. We clear the variables * and just compare to "System" instead of the sent in font name. */ ZeroMemory(&returnedCF2A,sizeof(returnedCF2A)); ZeroMemory(&sentLogFont,sizeof(sentLogFont)); returnedCF2A.cbSize = sizeof(returnedCF2A); - + SendMessageA(hwndRichEdit, WM_SETFONT, 0, MAKELPARAM((WORD) TRUE, 0)); SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_DEFAULT, (LPARAM)&returnedCF2A); GetObjectA(NULL, sizeof(LOGFONTA), &sentLogFont); ok (!strcmp("System",returnedCF2A.szFaceName), "EM_GETCHARFORMAT: Returned wrong font on test 4. Sent: NULL, Returned: %s. Expected \"System\".\n",returnedCF2A.szFaceName); - + DestroyWindow(hwndRichEdit); } @@ -4187,43 +4187,43 @@ HWND hwndRichEdit = new_richedit(NULL); LRESULT result; SETTEXTEX setText; - WCHAR TestItem1[] = {'T', 'e', 's', 't', - 'S', 'o', 'm', 'e', - 'T', 'e', 'x', 't', 0}; - WCHAR TestItem2[] = {'T', 'e', 's', 't', - 'S', 'o', 'm', 'e', + WCHAR TestItem1[] = {'T', 'e', 's', 't', + 'S', 'o', 'm', 'e', + 'T', 'e', 'x', 't', 0}; + WCHAR TestItem2[] = {'T', 'e', 's', 't', + 'S', 'o', 'm', 'e', 'O', 't', 'h', 'e', 'r', - 'T', 'e', 'x', 't', 0}; + 'T', 'e', 'x', 't', 0}; const char* streamText = "hello world"; CHARFORMAT2A cf2; PARAFORMAT2 pf2; EDITSTREAM es; - - HFONT testFont = CreateFontA (0,0,0,0,FW_LIGHT, 0, 0, 0, ANSI_CHARSET, - OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | + + HFONT testFont = CreateFontA (0,0,0,0,FW_LIGHT, 0, 0, 0, ANSI_CHARSET, + OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Courier"); - + setText.codepage = 1200; /* no constant for unicode */ setText.flags = ST_KEEPUNDO; - + /* modify flag shouldn't be set when richedit is first created */ result = SendMessageA(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result == 0, + ok (result == 0, "EM_GETMODIFY returned non-zero, instead of zero on create\n"); - + /* setting modify flag should actually set it */ SendMessageA(hwndRichEdit, EM_SETMODIFY, TRUE, 0); result = SendMessageA(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result != 0, + ok (result != 0, "EM_GETMODIFY returned zero, instead of non-zero on EM_SETMODIFY\n"); - + /* clearing modify flag should actually clear it */ SendMessageA(hwndRichEdit, EM_SETMODIFY, FALSE, 0); result = SendMessageA(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result == 0, + ok (result == 0, "EM_GETMODIFY returned non-zero, instead of zero on EM_SETMODIFY\n"); - + /* setting font doesn't change modify flag */ SendMessageA(hwndRichEdit, EM_SETMODIFY, FALSE, 0); SendMessageA(hwndRichEdit, WM_SETFONT, (WPARAM)testFont, MAKELPARAM(TRUE, 0)); @@ -4237,13 +4237,13 @@ result = SendMessageA(hwndRichEdit, EM_GETMODIFY, 0, 0); ok (result != 0, "EM_GETMODIFY returned zero, instead of non-zero on setting text\n"); - + /* undo previous text doesn't reset modify flag */ SendMessageA(hwndRichEdit, WM_UNDO, 0, 0); result = SendMessageA(hwndRichEdit, EM_GETMODIFY, 0, 0); ok (result != 0, "EM_GETMODIFY returned zero, instead of non-zero on undo after setting text\n"); - + /* set text with no flag to keep undo stack should not set modify flag */ SendMessageA(hwndRichEdit, EM_SETMODIFY, FALSE, 0); setText.flags = 0; @@ -4251,21 +4251,21 @@ result = SendMessageA(hwndRichEdit, EM_GETMODIFY, 0, 0); ok (result == 0, "EM_GETMODIFY returned non-zero, instead of zero when setting text while not keeping undo stack\n"); - + /* WM_SETTEXT doesn't modify */ SendMessageA(hwndRichEdit, EM_SETMODIFY, FALSE, 0); SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)TestItem2); result = SendMessageA(hwndRichEdit, EM_GETMODIFY, 0, 0); ok (result == 0, "EM_GETMODIFY returned non-zero for WM_SETTEXT\n"); - + /* clear the text */ SendMessageA(hwndRichEdit, EM_SETMODIFY, FALSE, 0); SendMessageA(hwndRichEdit, WM_CLEAR, 0, 0); result = SendMessageA(hwndRichEdit, EM_GETMODIFY, 0, 0); ok (result == 0, "EM_GETMODIFY returned non-zero, instead of zero for WM_CLEAR\n"); - + /* replace text */ SendMessageA(hwndRichEdit, EM_SETMODIFY, FALSE, 0); SendMessageA(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM)TestItem1); @@ -4274,7 +4274,7 @@ result = SendMessageA(hwndRichEdit, EM_GETMODIFY, 0, 0); ok (result != 0, "EM_GETMODIFY returned zero, instead of non-zero when replacing text\n"); - + /* copy/paste text 1 */ SendMessageA(hwndRichEdit, EM_SETMODIFY, FALSE, 0); SendMessageA(hwndRichEdit, EM_SETSEL, 0, 2); @@ -4283,7 +4283,7 @@ result = SendMessageA(hwndRichEdit, EM_GETMODIFY, 0, 0); ok (result != 0, "EM_GETMODIFY returned zero, instead of non-zero when pasting identical text\n"); - + /* copy/paste text 2 */ SendMessageA(hwndRichEdit, EM_SETMODIFY, FALSE, 0); SendMessageA(hwndRichEdit, EM_SETSEL, 0, 2); @@ -4293,7 +4293,7 @@ result = SendMessageA(hwndRichEdit, EM_GETMODIFY, 0, 0); ok (result != 0, "EM_GETMODIFY returned zero, instead of non-zero when pasting different text\n"); - + /* press char */ SendMessageA(hwndRichEdit, EM_SETMODIFY, FALSE, 0); SendMessageA(hwndRichEdit, EM_SETSEL, 0, 1); @@ -4309,7 +4309,7 @@ result = SendMessageA(hwndRichEdit, EM_GETMODIFY, 0, 0); ok (result != 0, "EM_GETMODIFY returned zero, instead of non-zero for backspace\n"); - + /* set char format */ SendMessageA(hwndRichEdit, EM_SETMODIFY, FALSE, 0); cf2.cbSize = sizeof(CHARFORMAT2A); @@ -4322,7 +4322,7 @@ result = SendMessageA(hwndRichEdit, EM_GETMODIFY, 0, 0); ok (result != 0, "EM_GETMODIFY returned zero, instead of non-zero for EM_SETCHARFORMAT\n"); - + /* set para format */ SendMessageA(hwndRichEdit, EM_SETMODIFY, FALSE, 0); pf2.cbSize = sizeof(PARAFORMAT2); @@ -5423,8 +5423,8 @@ #define set_textA(hwnd, wm_set_text, txt) \ do { \ SETTEXTEX stex = { ST_DEFAULT, CP_ACP }; \ + WPARAM wparam = (wm_set_text == WM_SETTEXT) ? 0 : (WPARAM)&stex; \ UNREFERENCED_LOCAL_VARIABLE(stex); \ - WPARAM wparam = (wm_set_text == WM_SETTEXT) ? 0 : (WPARAM)&stex; \ assert(wm_set_text == WM_SETTEXT || wm_set_text == EM_SETTEXTEX); \ ret = SendMessageA(hwnd, wm_set_text, wparam, (LPARAM)txt); \ ok(ret, "SendMessageA(%02x) error %u\n", wm_set_text, GetLastError()); \ @@ -5432,8 +5432,8 @@ #define expect_textA(hwnd, wm_get_text, txt) \ do { \ GETTEXTEX gtex = { 64, GT_DEFAULT, CP_ACP, NULL, NULL }; \ + WPARAM wparam = (wm_get_text == WM_GETTEXT) ? 64 : (WPARAM)>ex; \ UNREFERENCED_LOCAL_VARIABLE(gtex); \ - WPARAM wparam = (wm_get_text == WM_GETTEXT) ? 64 : (WPARAM)>ex; \ assert(wm_get_text == WM_GETTEXT || wm_get_text == EM_GETTEXTEX); \ memset(bufA, 0xAA, sizeof(bufA)); \ ret = SendMessageA(hwnd, wm_get_text, wparam, (LPARAM)bufA); \ @@ -5445,8 +5445,8 @@ #define set_textW(hwnd, wm_set_text, txt) \ do { \ SETTEXTEX stex = { ST_DEFAULT, 1200 }; \ + WPARAM wparam = (wm_set_text == WM_SETTEXT) ? 0 : (WPARAM)&stex; \ UNREFERENCED_LOCAL_VARIABLE(stex); \ - WPARAM wparam = (wm_set_text == WM_SETTEXT) ? 0 : (WPARAM)&stex; \ assert(wm_set_text == WM_SETTEXT || wm_set_text == EM_SETTEXTEX); \ ret = SendMessageW(hwnd, wm_set_text, wparam, (LPARAM)txt); \ ok(ret, "SendMessageW(%02x) error %u\n", wm_set_text, GetLastError()); \ @@ -5454,8 +5454,8 @@ #define expect_textW(hwnd, wm_get_text, txt) \ do { \ GETTEXTEX gtex = { 64, GT_DEFAULT, 1200, NULL, NULL }; \ + WPARAM wparam = (wm_get_text == WM_GETTEXT) ? 64 : (WPARAM)>ex; \ UNREFERENCED_LOCAL_VARIABLE(gtex); \ - WPARAM wparam = (wm_get_text == WM_GETTEXT) ? 64 : (WPARAM)>ex; \ assert(wm_get_text == WM_GETTEXT || wm_get_text == EM_GETTEXTEX); \ memset(bufW, 0xAA, sizeof(bufW)); \ ret = SendMessageW(hwnd, wm_get_text, wparam, (LPARAM)bufW); \ @@ -5466,8 +5466,8 @@ #define expect_empty(hwnd, wm_get_text) \ do { \ GETTEXTEX gtex = { 64, GT_DEFAULT, CP_ACP, NULL, NULL }; \ + WPARAM wparam = (wm_get_text == WM_GETTEXT) ? 64 : (WPARAM)>ex; \ UNREFERENCED_LOCAL_VARIABLE(gtex); \ - WPARAM wparam = (wm_get_text == WM_GETTEXT) ? 64 : (WPARAM)>ex; \ assert(wm_get_text == WM_GETTEXT || wm_get_text == EM_GETTEXTEX); \ memset(bufA, 0xAA, sizeof(bufA)); \ ret = SendMessageA(hwnd, wm_get_text, wparam, (LPARAM)bufA); \
9 years, 4 months
1
0
0
0
[tkreuzer] 67627: [RICHED20_WINETEST] Fix a few more set-but-unused warnings. ("Should be sent to wine-staging"(tm))
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun May 10 17:54:02 2015 New Revision: 67627 URL:
http://svn.reactos.org/svn/reactos?rev=67627&view=rev
Log: [RICHED20_WINETEST] Fix a few more set-but-unused warnings. ("Should be sent to wine-staging"(tm)) Modified: trunk/rostests/winetests/riched20/editor.c Modified: trunk/rostests/winetests/riched20/editor.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/riched20/editor…
============================================================================== --- trunk/rostests/winetests/riched20/editor.c [iso-8859-1] (original) +++ trunk/rostests/winetests/riched20/editor.c [iso-8859-1] Sun May 10 17:54:02 2015 @@ -5423,6 +5423,7 @@ #define set_textA(hwnd, wm_set_text, txt) \ do { \ SETTEXTEX stex = { ST_DEFAULT, CP_ACP }; \ + UNREFERENCED_LOCAL_VARIABLE(stex); \ WPARAM wparam = (wm_set_text == WM_SETTEXT) ? 0 : (WPARAM)&stex; \ assert(wm_set_text == WM_SETTEXT || wm_set_text == EM_SETTEXTEX); \ ret = SendMessageA(hwnd, wm_set_text, wparam, (LPARAM)txt); \ @@ -5431,6 +5432,7 @@ #define expect_textA(hwnd, wm_get_text, txt) \ do { \ GETTEXTEX gtex = { 64, GT_DEFAULT, CP_ACP, NULL, NULL }; \ + UNREFERENCED_LOCAL_VARIABLE(gtex); \ WPARAM wparam = (wm_get_text == WM_GETTEXT) ? 64 : (WPARAM)>ex; \ assert(wm_get_text == WM_GETTEXT || wm_get_text == EM_GETTEXTEX); \ memset(bufA, 0xAA, sizeof(bufA)); \ @@ -5443,6 +5445,7 @@ #define set_textW(hwnd, wm_set_text, txt) \ do { \ SETTEXTEX stex = { ST_DEFAULT, 1200 }; \ + UNREFERENCED_LOCAL_VARIABLE(stex); \ WPARAM wparam = (wm_set_text == WM_SETTEXT) ? 0 : (WPARAM)&stex; \ assert(wm_set_text == WM_SETTEXT || wm_set_text == EM_SETTEXTEX); \ ret = SendMessageW(hwnd, wm_set_text, wparam, (LPARAM)txt); \ @@ -5451,6 +5454,7 @@ #define expect_textW(hwnd, wm_get_text, txt) \ do { \ GETTEXTEX gtex = { 64, GT_DEFAULT, 1200, NULL, NULL }; \ + UNREFERENCED_LOCAL_VARIABLE(gtex); \ WPARAM wparam = (wm_get_text == WM_GETTEXT) ? 64 : (WPARAM)>ex; \ assert(wm_get_text == WM_GETTEXT || wm_get_text == EM_GETTEXTEX); \ memset(bufW, 0xAA, sizeof(bufW)); \ @@ -5462,6 +5466,7 @@ #define expect_empty(hwnd, wm_get_text) \ do { \ GETTEXTEX gtex = { 64, GT_DEFAULT, CP_ACP, NULL, NULL }; \ + UNREFERENCED_LOCAL_VARIABLE(gtex); \ WPARAM wparam = (wm_get_text == WM_GETTEXT) ? 64 : (WPARAM)>ex; \ assert(wm_get_text == WM_GETTEXT || wm_get_text == EM_GETTEXTEX); \ memset(bufA, 0xAA, sizeof(bufA)); \
9 years, 4 months
1
0
0
0
[tkreuzer] 67626: [KMTEST] Hey Arch, if you turn warnings into errors, make sure to fix the warnings before!
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun May 10 17:37:54 2015 New Revision: 67626 URL:
http://svn.reactos.org/svn/reactos?rev=67626&view=rev
Log: [KMTEST] Hey Arch, if you turn warnings into errors, make sure to fix the warnings before! Modified: trunk/rostests/kmtests/ntos_ke/KeSpinLock.c Modified: trunk/rostests/kmtests/ntos_ke/KeSpinLock.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_ke/KeSpinLoc…
============================================================================== --- trunk/rostests/kmtests/ntos_ke/KeSpinLock.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/ntos_ke/KeSpinLock.c [iso-8859-1] Sun May 10 17:37:54 2015 @@ -166,6 +166,7 @@ #define CheckSpinLockLock(SpinLock, CheckData, Value) do \ { \ PKTHREAD Thread = KeGetCurrentThread(); \ + UNREFERENCED_LOCAL_VARIABLE(Thread); \ if (KmtIsMultiProcessorBuild) \ { \ ok_eq_bool(Ret, (Value) == 0); \
9 years, 4 months
1
0
0
0
[hbelusca] 67625: [ROSTESTS]: Move old testdata directory into the new one and add test files by Victor Martinez. ROSTESTS-169 #resolve
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun May 10 14:59:04 2015 New Revision: 67625 URL:
http://svn.reactos.org/svn/reactos?rev=67625&view=rev
Log: [ROSTESTS]: Move old testdata directory into the new one and add test files by Victor Martinez. ROSTESTS-169 #resolve Added: trunk/rostests/testdata/2prong.txt (with props) trunk/rostests/testdata/CREDITS.txt (with props) trunk/rostests/testdata/freefont.txt (with props) trunk/rostests/testdata/old/ - copied from r67592, trunk/rostests/apitests/testdata/ trunk/rostests/testdata/test.otf (with props) trunk/rostests/testdata/test.pfb (with props) trunk/rostests/testdata/test.pfm (with props) trunk/rostests/testdata/test.ttf (with props) Removed: trunk/rostests/apitests/testdata/ Added: trunk/rostests/testdata/2prong.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/testdata/2prong.txt?rev=6…
============================================================================== --- trunk/rostests/testdata/2prong.txt (added) +++ trunk/rostests/testdata/2prong.txt [iso-8859-1] Sun May 10 14:59:04 2015 @@ -0,0 +1,17 @@ +2 Prong Tree v1.0 +Freeware from Unauthorized Type + +This version includes only capital letters, and some commonly used punctuation. plus the new UA Type dingbat (just to amuse myself). + +When I was sitting in Huddle House one night, drinking coffee, I was showing my girlfriend the fonts I was working on. I drew out 3-Prong Tree, and she said that she didn't like it. She told me to do it with just 2 lines on every letter. So I tried that with this one. + +She realized after the finished product of 3-Prong Tree that it was good, but I went on and did 2-Prong Tree just to see the difference. 3-Prong looks better at smaller point sizes (because it's fatter), but 2-Prong Tree looks better at larger point sizes (because the letters are cleaner). + +You use this font in any way that you see fit. If you distribute it, I would like for this text file to accompany it. (That's just so they know who made it.) You may distribute it on CD, disk, or any other medium, but you may not sell it. + +UnAuthorized Type features the creations of: +Ben McGehee +uatype(a)uatype.faithweb.com + +http://uatype.faithweb.com/index.htm +Check back to see when I make new fonts! Propchange: trunk/rostests/testdata/2prong.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/testdata/CREDITS.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/testdata/CREDITS.txt?rev=…
============================================================================== --- trunk/rostests/testdata/CREDITS.txt (added) +++ trunk/rostests/testdata/CREDITS.txt [iso-8859-1] Sun May 10 14:59:04 2015 @@ -0,0 +1,9 @@ +*** Credits *** + +The files used in this testdata folder are properly credited in the following files: + +- test.otf : freefont.txt +- test.ttf : freefont.txt +- test.pfb : 2PRONG.txt +- test.pfm : 2PRONG.txt + Propchange: trunk/rostests/testdata/CREDITS.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/testdata/freefont.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/testdata/freefont.txt?rev…
============================================================================== --- trunk/rostests/testdata/freefont.txt (added) +++ trunk/rostests/testdata/freefont.txt [iso-8859-1] Sun May 10 14:59:04 2015 @@ -0,0 +1,582 @@ +-*- mode:text; coding:utf-8; -*- + GNU FreeFont Credits + ==================== + +This file lists contributors and contributions to the GNU FreeFont project. + + +* URW++ Design & Development GmbH <
http://www.urwpp.de/
> + +URW++ donated a set of 35 core PostScript Type 1 fonts to the +Ghostscript project <
http://www.cs.wisc.edu/~ghost/
>, to be available +under the terms of GNU General Public License (GPL). + + Basic Latin (U+0041-U+007A) + Latin-1 Supplement (U+00C0-U+00FF) + Latin Extended-A (U+0100-U+017F) + Spacing Modifier Letters (U+02B0-U+02FF) + Mathematical Operators (U+2200-U+22FF) + Block Elements (U+2580-U+259F) + Dingbats (U+2700-U+27BF) + + +* Yannis Haralambous <yannis.haralambous AT enst-bretagne.fr> and John + Plaice <plaice AT omega.cse.unsw.edu.au> + +Yannis Haralambous and John Plaice are the authors of Omega typesetting +system, <
http://omega.enstb.org/
>. Omega is an extension of TeX. +Its first release, aims primarily at improving TeX's multilingual abilities. +In Omega all characters and pointers into data-structures are 16-bit wide, +instead of 8-bit, thereby eliminating many of the trivial limitations of TeX. +Omega also allows multiple input and output character sets, and uses +programmable filters to translate from one encoding to another, to perform +contextual analysis, etc. Internally, Omega uses the universal 16-bit Unicode +standard character set, based on ISO-10646. These improvements not only make +it a lot easier for TeX users to cope with multiple or complex languages, +like Arabic, Indic, Khmer, Chinese, Japanese or Korean, in one document, but +will also form the basis for future developments in other areas, such as +native color support and hypertext features. ... Fonts for UT1 (omlgc family) +and UT2 (omah family) are under development: these fonts are in PostScript +format and visually close to Times and Helvetica font families. +Omega fonts are available subject to GPL + + Latin Extended-B (U+0180-U+024F) + IPA Extensions (U+0250-U+02AF) + Greek (U+0370-U+03FF) + Armenian (U+0530-U+058F) + Hebrew (U+0590-U+05FF) + Arabic (U+0600-U+06FF) + Currency Symbols (U+20A0-U+20CF) + Arabic Presentation Forms-A (U+FB50-U+FDFF) + Arabic Presentation Forms-B (U+FE70-U+FEFF) + +Current info: <
http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=omega
> + +* Valek Filippov <frob AT df.ru> + +Valek Filippov added Cyrillic glyphs and composite Latin Extended A to +the whole set of the abovementioned URW set of 35 PostScript core fonts, +<ftp://ftp.gnome.ru/fonts/urw/>. The fonts are available under GPL. + + Latin Extended-A (U+0100-U+017F) + Cyrillic (U+0400-U+04FF) + + +* Wadalab Kanji Comittee + +Between April 1990 and March 1992, Wadalab Kanji Comittee put together +a series of scalable font files with Japanese scripts, in four forms: +Sai Micho, Chu Mincho, Cho Kaku and Saimaru. The font files are +written in custom file format, while tools for conversion into +Metafont and PostScript Type 1 are also supplied. The Wadalab Kanji +Comittee has later been dismissed, and the resulting files can be now +found on the FTP server of the Depertment of Mathematical Engineering +and Information Physics, Faculty of Engineering, University of Tokyo +<ftp://ftp.ipl.t.u-tokyo.ac.jp/Font/>. + + Hiragana (U+3040-U+309F) + Katakana (U+30A0-U+30FF) + + +* Young U. Ryu <ryoung AT
utdallas.edu
> + +Young Ryu is the author of Txfonts, a set of mathematical symbols +designed to accompany text typeset in Times or its variants. In the +documentation, Young adresses the design of mathematical symbols: "The +Adobe Times fonts are thicker than the CM fonts. Designing math fonts +for Times based on the rule thickness of Times = , , + , / , < , +etc. would result in too thick math symbols, in my opinion. In the TX +fonts, these glyphs are thinner than those of original Times +fonts. That is, the rule thickness of these glyphs is around 85% of +that of the Times fonts, but still thicker than that of the CM fonts." +TX fonts are are distributed under the GNU public license (GPL). +<
http://www.ctan.org/tex-archive/fonts/txfonts/
>. + + Arrows (U+2190-U+21FF) + Mathematical Symbols (U+2200-U+22FF) + + +* Angelo Haritsis <ah AT
computer.org
> + +Angelo Haritsis has compiled a set of Greek Type 1 fonts, available on +<ftp://ftp.hellug.gr/pub/unix/linux/GREEK/fonts/greekXfonts-Type1-1.1.tgz>. +The glyphs from this source has been used to compose Greek glyphs in +FreeSans and FreeMono. + +Angelo's licence says: "You can enjoy free use of these fonts for +educational or commercial purposes. All derived works should include +this paragraph. If you want to change something please let me have +your changes (via email) so that they can go into the next +version. You can also send comments etc to the above address." + + Greek (U+0370-U+03FF) + + +* Yannis Haralambous and Virach Sornlertlamvanich + +In 1999, Yannis Haralambous and Virach Sornlertlamvanich made a set of +glyphs covering the Thai national standard Nf3, in both upright and +slanted shape. The collection of glyphs have been made part of GNU +intlfonts 1.2 package and is available under the GPL at +<
ftp://ftp.gnu.org/pub/gnu/intlfonts/
>. + + Thai (U+0E00-U+0E7F) + +* Shaheed R. Haque <srhaque AT
iee.org
> + +Shaheed Haque has developed a basic set of basic Bengali glyphs +(without ligatures), using ISO10646 encoding. They are available under +the XFree86 license at <
http://www.btinternet.com/~shaheedhaque/
>. + +Copyright (C) 2001 S.R.Haque <srhaque AT
iee.org
>. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL S.R.HAQUE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of S.R.Haque shall not be +used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from +S.R.Haque. + + Bengali (U+0980-U+09FF) + + +* Sam Stepanyan <sam AT
arminco.com
> + +Sam Stepanyan created a set of Armenian sans serif glyphs visually +compatible with Helvetica or Arial. Available on +<
http://www.editum.com.ar/mashtots/html/fonts/ara.tar.gz
>. On +2002-01-24, Sam writes: "Arial Armenian font is free for +non-commercial use, so it is OK to use under GPL license." + + Armenian (U+0530-U+058F) + + +* Mohamed Ishan <ishan AT
mitf.f2s.com
> + +Mohamed Ishan has started a Thaana Unicode Project +<
http://thaana.sourceforge.net/
> and among other things created a +couple of Thaana fonts, available under FDL or BDF license. + + Thaana (U+0780-U+07BF) + + +* Sushant Kumar Dash <sushant AT
writeme.com
> (*) + +Sushant Dash has created a font in his mother tongue, Oriya. As he +states on his web page <
http://members.tripod.com/~sushantdash/
>: +"Please feel free to foreword this mail to your Oriya friends. No +copyright law is applied for this font. It is totally free!!! Feel +free to modify this using any font editing tools. This is designed for +people like me, who are away from Orissa and want to write letters +home using Computers, but suffer due to unavailability of Oriya +fonts.(Or the cost of the available packages are too much)." + + Oriya (U+0B00-U+0B7F) + + +* Harsh Kumar <harshkumar AT
vsnl.com
> + +Harsh Kumar has started BharatBhasha <
http://www.bharatbhasha.net/
> - +an effort to provide "FREE software, Tutorial, Source Codes +etc. available for working in Hindi, Marathi, Gujarati, Gurmukhi and +Bangla. You can type text, write Web pages or develop Indian Languages +Applications on Windows and on Linux. We also offer FREE help to +users, enthusiasts and software developers for their work in Indian +languages." + + Devanagari (U+0900-U+097F) + Bengali (U+0980-U+09FF) + Gurmukhi (U+0A00-U+0A7F) + Gujarati (U+0A80-U+0AFF) + + +* Prasad A. Chodavarapu <chprasad AT
hotmail.com
> + +Prasad A. Chodavarapu created Tikkana, a Telugu font available in Type +1 and TrueType format on <
http://chaitanya.bhaavana.net/fonts/
>. +Tikkana exceeds the Unicode Telugu range with some composite glyphs. +Available under the GNU General Public License. + + Telugu (U+0C00-U+0C7F) + + +* Frans Velthuis <velthuis AT rc.rug.nl> and Anshuman Pandey + <apandey AT
u.washington.edu
> + +In 1991, Frans Velthuis from the Groningen University, The +Netherlands, released a Devanagari font as Metafont source, available +under the terms of GNU GPL. Later, Anshuman Pandey from the Washington +University, Seattle, USA, took over the maintenance of font. Fonts can +be found on CTAN, <ftp://ftp.dante.de/tex-archive/language/devanagari/>. I +converted the font to Type 1 format using Péter Szabó's TeXtrace +program <
http://www.inf.bme.hu/~pts/textrace/
> and removed some +redundant control points with PfaEdit. + + Devanagari (U+0900-U+097F) + + +* Hardip Singh Pannu <HSPannu AT
aol.com
> + +In 1991, Hardip Singh Pannu has created a free Gurmukhi TrueType font, +available as regular, bold, oblique and bold oblique form. Its license +says "Please remember that these fonts are copyrighted (by me) and are +for non-profit use only." + + Gurmukhi (U+0A00-U+0A7F) + + +* Jeroen Hellingman <jehe AT kabelfoon.nl> + +Jeroen Hellingman created a set of Malayalam metafonts in 1994, and a +set of Oriya metafonts in 1996. Malayalam fonts were created as +uniform stroke only, while Oriya metafonts exist in both uniform and +modulated stroke. From private communication: "It is my intention to +release the fonts under GPL, but not all copies around have this +notice on them." Metafonts can be found on CTAN, +<ftp://ftp.dante.de/tex-archive/language/oriya/> and +<ftp://ftp.dante.de/tex-archive/language/malayalam/>. + + Oriya (U+0B00-U+0B7F) + Malayalam (U+0D00-U+0D7F) + + +* Thomas Ridgeway <> (*) + +Thomas Ridgeway, then at the Humanities And Arts Computing Center, +Washington University, Seattle, USA, (now defunct), created a Tamil +metafont in 1990. Anshuman Pandey from the same university took over +the maintenance of font. Fonts can be found at CTAN, +<ftp://ftp.dante.de/tex-archive/language/tamil/wntamil/>. + + Tamil (U+0B80-U+0BFF) + + +* Berhanu Beyene <1beyene AT informatik.uni-hamburg.de>, + Prof. Dr. Manfred Kudlek <kudlek AT informatik.uni-hamburg.de>, Olaf + Kummer <kummer AT informatik.uni-hamburg.de>, and Jochen Metzinger <?> + +Beyene, Kudlek, Kummer and Metzinger from the Theoretical Foundations +of Computer Science, University of Hamburg, prepared a set of Ethiopic +metafonts, found on +<ftp://ftp.dante.de/tex-archive/language/ethiopia/ethiop/>. They also +maintain home page on the Ethiopic font project, +<
http://www.informatik.uni-hamburg.de/TGI/mitarbeiter/wimis/kummer/ethiop_en…
>, +and can be reached at <ethiop AT informatik.uni-hamburg.de>. The current +version of fonts is 0.7 (1998), and they are released under GNU GPL. I +converted the fonts to Type 1 format using Péter Szabó's TeXtrace-A +program <
http://www.inf.bme.hu/~pts/textrace/
> and removed some +redundant control points with PfaEdit. + + Ethiopic (U+1200-U+137F) + + +* Maxim Iorsh <iorsh AT
users.sourceforge.net
> + +In 2002, Maxim Iorsh started the Culmus project, aiming at providing +Hebrew-speaking Linux and Unix community with a basic collection of +Hebrew fonts for X Windows. The fonts are visually compatible with +URW++ Century Schoolbook L, URW++ Nimbus Sans L and URW++ Nimbus Mono +L families, respectively, and are released under GNU GPL license. See +also <
http://culmus.sourceforge.net/
>. + + Hebrew (U+0590-U+05FF) + + +* Panayotis Katsaloulis <panayotis AT
panayotis.com
> + +Panayotis Katsaloulis helped fixing Greek accents in the Greek +Extended area. + + Greek Extended (U+1F00-U+1FFF) + + +* Vyacheslav Dikonov <sdiconov AT mail.ru> + +Vyacheslav Dikonov made a Braille unicode font that could be merged +with the UCS fonts to fill the 2800-28FF range completely. (uniform +scaling is possible to adapt it to any cell size). He also contributed +a free syriac font, whose glyphs (about half of them) are borrowed +from the "Carlo Ator" font freely downloadable from +<
http://www.aacf.asso.fr/
>. Vyacheslav also filled in a few missing +spots in the U+2000-U+27FF area, e.g. the box drawing section, sets of +subscript and superscript digits and capital Roman numbers. + + Syriac (U+0700-U+074A) + Box Drawing (U+2500-U+257F) + Braille (U+2800-U+28FF) + + +* M.S. Sridhar <mssridhar AT
vsnl.com
> + +M/S Cyberscape Multimedia Limited, Mumbai, developers of Akruti +Software for Indian Languages (
http://www.akruti.com/
), have released +a set of TTF fonts for nine Indian scripts (Devanagari, Gujarati, +Telugu, Tamil, Malayalam, Kannada, Bengali, Oriya, and Gurumukhi) +under the GNU General Public License (GPL). You can download the fonts +from the Free Software Foundation of India WWW site +(http://www.gnu.org.in/akruti-fonts/) or from the Akruti website. + +For any further information or assistance regarding these fonts, +please contact mssridhar AT
vsnl.com
. + + Devanagari (U+0900-U+097F) + Bengali (U+0980-U+09FF) + Gurmukhi (U+0A00-U+0A7F) + Gujarati (U+0A80-U+0AFF) + Oriya (U+0B00-U+0B7F) + Tamil (U+0B80-U+0BFF) + Telugu (U+0C00-U+0C7F) + Kannada (U+0C80-U+0CFF) + Malayalam (U+0D00-U+0D7F) + + +* DMS Electronics, The Sri Lanka Tipitaka Project, and Noah Levitt + <nlevitt AT
columbia.edu
> + +Noah Levitt found out that the Sinhalese fonts available on the site +<
http://www.metta.lk/fonts/
> are released under GNU GPL, or, +precisely, "Public Domain under GNU Licence + Produced by DMS +Electronics for The Sri Lanka Tipitaka Project" (taken from the font +comment), and took the effort of recoding the font to Unicode. + +These glyphs were later replaced by those from the LKLUG font +<
http://www.lug.lk/fonts/lklug
> + +Finally the range was completely replaced by glyphs from the sinh TeX +font, with much help and advice from Harshula Jayasuriya. + + Sinhala (U+0D80-U+0DFF) + + +* Daniel Shurovich Chirkov <dansh AT
chirkov.com
> + +Dan Chirkov updated the FreeSerif font with the missing Cyrillic +glyphs needed for conformance to Unicode 3.2. The effort is part of +the Slavjanskij package for Mac OS X, +<
http://www.versiontracker.com/dyn/moreinfo/macosx/18680
>. + + Cyrillic (U+0400-U+04FF) + + +* Denis Jacquerye <moyogo AT
gmail.com
> + +Denis Jacquerye added new glyphs and corrected existing ones in the +Latin Extended-B and IPA Extensions ranges. + + Latin Extended-B (U+0180-U+024F) + IPA Extensions (U+0250-U+02AF) + + +* K.H. Hussain <hussain AT
kfri.org
> and R. Chitrajan + +`Rachana' in Malayalam means `to write', `to create'. Rachana Akshara Vedi, +a team of socially committed information technology professionals and +philologists, has applied developments in computer technology and desktop +publishing to resurrect the Malayalam language from the disorder, +fragmentation and degeneration it had suffered since the attempt to adapt +the Malayalam script for using with a regular mechanical typewriter, which +took place in 1967-69. K.H. Hussein at the Kerala Forest Research Institute +has released "Rachana Normal" fonts with approximately 900 glyphs required +to typeset traditional Malayalam. R. Chitrajan apparently encoded the +glyphs in the OpenType table. + +In 2008, the Malayalam ranges in FreeSerif were updated under the advise +and supervision of Hiran Venugopalan of Swathanthra Malayalam Computing, +to reflect the revised edition Rachana_04. + + Malayalam (U+0D00-U+0D7F) + + +* Solaiman Karim <solaiman AT
ekushey.org
> + + Bengali (U+0980-U+09FF) + +Solaiman Karim has developed several OpenType Bangla fonts and +released them under GNU GPL on <
http://www.ekushey.org
>. + + +* Sonali Sonania <sonalisonania AT
gmail.com
> and Monika Shah + <monikapatira AT
gmail.com
> + + Devanagari (U+0900-U+097F) + Gujarati (U+0A80-U+0AFF) + +Glyphs were drawn by Cyberscape Multimedia Ltd., #101,Mahalakshmi +Mansion 21st Main 22nd "A" Cross Banashankari 2nd stage Banglore +560070, India. Converted to OTF by IndicTrans Team, Powai, Mumbai, +lead by Prof. Jitendra Shah. Maintained by Monika Shah and Sonali +Sonania of janabhaaratii Team, C-DAC, Mumbai. This font is released +under GPL by Dr. Alka Irani and Prof Jitendra Shah, janabhaaratii +Team, C-DAC, Mumabi. janabhaaratii is localisation project at C-DAC +Mumbai (formerly National Centre for Software Technology); funded by +TDIL, Govt. of India. Contact:monika_shah AT
lycos.com
, +sonalisonania AT
yahoo.com
, jitendras AT
vsnl.com
, alka AT ncst.ernet.in. +website:
www.janabhaaratii.org.in
. + + +* Pravin Satpute <pravin_ind21 AT
hotmail.com
>, Bageshri Salvi + <sbagrshri AT yahoo.co.in>, Rahul Bhalerao <rahul_pb_india AT +
yahoo.com
> and Sandeep Shedmake <surgs2k47 AT yahoo.co.in> + + Devanagari (U+0900-U+097F) + Gujarati (U+0A80-U+0AFF) + Oriya (U+0B00-U+0B7F) + Malayalam (U+0D00-U+0D7F) + Tamil (U+0B80-U+0BFF) + +In December 2005 the team at
www.gnowledge.org
released a set of two +Unicode pan-Indic fonts: "Samyak" and "Samyak Sans". "Samyak" font +belongs to serif style and is an original work of the team; "Samyak +Sans" font belongs to sans serif style and is actually a compilation +of already released Indic fonts (Gargi, Padma, Mukti, Utkal, Akruti +and ThendralUni). Both fonts are based on Unicode standard. You can +download the font files (released under GNU/GPL License) from +http://www.gnowledge.org/Gnoware/localization/font.htm + + +* Kulbir Singh Thind + + Gurmukhi (U+0A00-U+0A7F) + +Dr. Kulbir Singh Thind designed a set of Gurmukhi Unicode fonts, +AnmolUni and AnmolUni-Bold, which are available under the terms of GNU +Generel Public Licens from the Punjabu Computing Resource Center, +http://guca.sourceforge.net/typography/fonts/anmoluni/. + + +* Gia Shervashidze <giasher AT telenet.ge> + + Georgian (U+10A0-U+10FF) + +Starting in mid-1990s, Gia Shervashidze designed many +Unicode-compliant Georgian fonts: Times New Roman Georgian, Arial +Georgian, Courier New Georgian. His work on Georgian localization can +be reached at
http://www.gia.ge/
. + + +* Primož Peterlin <primoz.peterlin AT biofiz.mf.uni-lj.si> + +Primož Peterlin filled in missing glyphs here and there (e.g. Latin +Extended-B and IPA Extensions ranges in the FreeMono familiy), and +created the following UCS blocks: + + Latin Extended-B (U+0180-U+024F) + IPA Extensions (U+0250-U+02AF) + Arrows (U+2190-U+21FF) + Box Drawing (U+2500-U+257F) + Block Elements (U+2580-U+259F) + Geometrical Shapes (U+25A0-U+25FF) + +* Mark Williamson + +Made the MPH 2 Damase font, from which + Hanunóo (U+1720-U+173F) + Buginese (U+1A00-U+1A1F) + Tai Le (U+1950-U+197F) + Ugaritic (U+10380-U+1039F) + Old Persian (U+103A0-U+103DF) + +* Jacob Poon + +Submitted a very thorough survey of glyph problems and other suggestions. + +* Alexey Kryukov + +Made the TemporaLCGUni fonts, based on the URW++ fonts, from which at one +point FreeSerif Cyrillic, and some of the Greek, was drawn. He also provided +valuable direction about Cyrillic and Greek typesetting. + +* George Douros + +The creator of several fonts focusing on ancient scripts and symbols. +Many of the glyphs are created by making outlines from scanned images +of ancient sources. + + Aegean: Phoenecian + Analecta: Gothic (U+10330-U+1034F) + Musical: Byzantine & Western + Unicode: many Miscellaneous Symbols, Miscellaneous Technical, + supplemental Symbols, and Mathematical Alphanumeric symbols, + Mah Jong, and the outline of the Domino. + +* Daniel Johnson + +Created by hand a Cherokee range specially for FreeFont to be "in line with +the classic Cherokee typefaces used in 19th century printing", but also to +fit well with ranges previously in FreeFont. Then he made Unified Canadian +Syllabics in Sans, and a Cherokee and Kayah Li in Mono! And never to be +outdone by himself, then did UCAS Extended and Osmanya.... What next? + + Armenian (serif) (U+0530-U+058F) + Cherokee (U+13A0-U+13FF) + Unified Canadian Aboriginal Syllabics (U+1400-U+167F) + UCAS Extended (U+18B0-U+18F5) + Kayah Li (U+A900-U+A92F) + Tifinagh (U+2D30-U+2D7F) + Vai (U+A500-U+A62B) + Latin Extended-D (Mayanist letters) (U+A720-U+A7FF) + Osmanya (U+10480-U+104a7) + +* Yannis Haralambous and Wellcome Institute + +In 1994, The Wellcome Library + The Wellcome Institute for the History of Medicine + 183 Euston Road, London NW1 2BE, England. +commissioned Mr. Haralambous to produce a Sinhalese font for them. + +We have received 03/09 official notice from Robert Kiley, Head of e-Strategy +for the Wellcome Library, that Yannis' font could be included in GNU +FreeFont under its GNU license. + +Thanks to Dominik Wujastyk, for providing us with feedback and contacts +to repsonsible people at the Trust. + + Sinhala (U+0D80-U+0DFF) + +* The Sinhala font project
http://sinhala.sourceforge.net/
+ +The Sinhala font project has taken the glyphs from Yannis Haralambous' +Sinhala font, to produce a Unicode TrueType font, LKLUG. These glyphs +were for a while included in FreeFont. + + Sinhala (U+0D80-U+0DFF) + +* Steve White <stevan_white AT
googlemail.com
> + +Filled in a lot of missing characters, got some font features working, +left fingerprints almost everywhere, and is responsible for these blocks: + + Glagolitic (U+2C00-U+2C5F) + Coptic (U+2C80-U+2CFF) + +* Pavel Skrylev is responsible for + Cyrillic Extended-A (U+2DEO-U+2DFF) + as well as many of the additions to + Cyrillic Extended-B (U+A640-U+A65F) + +Notes: + +*: The glyph collection looks license-compatible, but its author has + not yet replied and agreed on their work being used in part of + this glyph collection. + +-------------------------------------------------------------------------- +$Id: CREDITS,v 1.28 2010/09/11 13:24:11 Stevan_White Exp $ Propchange: trunk/rostests/testdata/freefont.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/testdata/test.otf URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/testdata/test.otf?rev=676…
============================================================================== Binary file - no diff available. Propchange: trunk/rostests/testdata/test.otf ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/rostests/testdata/test.pfb URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/testdata/test.pfb?rev=676…
============================================================================== Binary file - no diff available. Propchange: trunk/rostests/testdata/test.pfb ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/rostests/testdata/test.pfm URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/testdata/test.pfm?rev=676…
============================================================================== Binary file - no diff available. Propchange: trunk/rostests/testdata/test.pfm ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/rostests/testdata/test.ttf URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/testdata/test.ttf?rev=676…
============================================================================== Binary file - no diff available. Propchange: trunk/rostests/testdata/test.ttf ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream
9 years, 4 months
1
0
0
0
← Newer
1
...
33
34
35
36
37
38
39
...
50
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Results per page:
10
25
50
100
200