Sync to trunk (r44933)
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Tue, 5 Jan 2010 00:11:08 +0000 (00:11 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Tue, 5 Jan 2010 00:11:08 +0000 (00:11 +0000)
svn path=/branches/ros-amd64-bringup/; revision=44938

26 files changed:
1  2 
reactos/base/shell/explorer/utility/utility.cpp
reactos/boot/bootdata/txtsetup.sif
reactos/boot/freeldr/freeldr/windows/i386/wlmemory.c
reactos/dll/win32/gdi32/objects/region.c
reactos/dll/win32/kernel32/thread/thread.c
reactos/hal/halx86/generic/i386/v86.s
reactos/hal/halx86/generic/misc.c
reactos/hal/halx86/include/halp.h
reactos/include/ndk/halfuncs.h
reactos/include/ndk/i386/ketypes.h
reactos/lib/rtl/rtl.rbuild
reactos/ntoskrnl/ex/sysinfo.c
reactos/ntoskrnl/include/internal/ke.h
reactos/ntoskrnl/include/internal/ke_x.h
reactos/ntoskrnl/kdbg/kdb_cli.c
reactos/ntoskrnl/ke/bug.c
reactos/ntoskrnl/ke/i386/cpu.c
reactos/ntoskrnl/ke/i386/trap.s
reactos/ntoskrnl/mm/ARM3/miarm.h
reactos/ntoskrnl/mm/ARM3/pagfault.c
reactos/ntoskrnl/mm/ARM3/procsup.c
reactos/ntoskrnl/mm/mminit.c
reactos/ntoskrnl/ntoskrnl-generic.rbuild
reactos/subsystems/win32/win32k/eng/engwindow.c
reactos/subsystems/win32/win32k/ntuser/painting.c
reactos/subsystems/win32/win32k/objects/gdiobj.c

@@@ -50,7 -50,7 +50,7 @@@ Cabinet=reactos.ca
  [SetupData]
  DefaultPath = \ReactOS
  OsLoadOptions = "/NOGUIBOOT /NODEBUG"
--DbgOsLoadOptions = "/NOGUIBOOT /DEBUGPORT=COM1"
++DbgOsLoadOptions = "/NOGUIBOOT /DEBUGPORT=COM2"
  ;OsLoadOptions = "/NOGUIBOOT /DEBUGPORT=SCREEN"
  ;OsLoadOptions = "/NOGUIBOOT /DEBUGPORT=BOCHS"
  
@@@ -209,12 -411,9 +411,9 @@@ CreateEllipticRgnIndirect
   */
  HRGN
  WINAPI
- CreatePolyPolygonRgn( const POINT* lppt,
-                       const INT* lpPolyCounts,
-                       int nCount,
-                       int fnPolyFillMode)
+ CreatePolygonRgn( const POINT * lppt, int cPoints, int fnPolyFillMode)
  {
-     return (HRGN) NtGdiPolyPolyDraw( ULongToHandle(fnPolyFillMode), (PPOINT) lppt, (PULONG) lpPolyCounts, (ULONG) nCount, GdiPolyPolyRgn );
 -    return (HRGN) NtGdiPolyPolyDraw( (HDC) fnPolyFillMode, (PPOINT) lppt, (PULONG) &cPoints, 1, GdiPolyPolyRgn);
++    return (HRGN) NtGdiPolyPolyDraw(ULongToHandle(fnPolyFillMode), (PPOINT) lppt, (PULONG) &cPoints, 1, GdiPolyPolyRgn);
  }
  
  /*
Simple merge
@@@ -43,27 -52,66 +52,87 @@@ HalpUnmapVirtualAddress(IN PVOID Virtua
      MmUnmapIoSpace(VirtualAddress, NumberPages << PAGE_SHIFT);
  }
  
+ VOID
+ NTAPI
+ HalpFlushTLB(VOID)
+ {
+     ULONG Flags, Cr4;
+     INT CpuInfo[4];
+     ULONG_PTR PageDirectory;
+     //
+     // Disable interrupts
+     //
+     Flags = __readeflags();
+     _disable();
+     //
+     // Get page table directory base
+     //
+     PageDirectory = __readcr3();
+     //
+     // Check for CPUID support
+     //
+     if (KeGetCurrentPrcb()->CpuID)
+     {
+         //
+         // Check for global bit in CPU features
+         //
+         __cpuid(CpuInfo, 1);
+         if (CpuInfo[3] & 0x2000)
+         {
+             //
+             // Get current CR4 value
+             //
+             Cr4 = __readcr4();
+             //
+             // Disable global pit
+             //
+             __writecr4(Cr4 & ~CR4_PGE);
+             //
+             // Flush TLB and re-enable global bit
+             //
+             __writecr3(PageDirectory);
+             __writecr4(Cr4);
+             //
+             // Restore interrupts
+             //
+             __writeeflags(Flags);
+         }
+     }
+     //
+     // Legacy: just flush TLB
+     //
+     __writecr3(PageDirectory);
+     __writeeflags(Flags);
+ }
 +VOID
 +NTAPI
 +HalpSetInterruptGate(ULONG index, PVOID address)
 +{
 +  KIDTENTRY *idt;
 +  KIDT_ACCESS Access;
 +
 +  /* Set the IDT Access Bits */
 +  Access.Reserved = 0;
 +  Access.Present = 1;
 +  Access.Dpl = 0; /* Kernel-Mode */
 +  Access.SystemSegmentFlag = 0;
 +  Access.SegmentType = I386_INTERRUPT_GATE;
 +  
 +  idt = (KIDTENTRY*)((ULONG)KeGetPcr()->IDT + index * sizeof(KIDTENTRY));
 +  idt->Offset = (USHORT)((ULONG_PTR)address & 0xffff);
 +  idt->Selector = KGDT_R0_CODE;
 +  idt->Access = Access.Value;
 +  idt->ExtendedOffset = (USHORT)((ULONG_PTR)address >> 16);
 +}
 +
  /* FUNCTIONS *****************************************************************/
  
  /*
@@@ -121,7 -235,8 +256,9 @@@ VOI
  NTAPI
  KeFlushWriteBuffer(VOID)
  {
-     /* Not implemented on x86 */
+     //
+     // Not implemented on x86
+     //
      return;
  }
 +
Simple merge
@@@ -274,47 -274,12 +274,54 @@@ HalSetRealTimeClock
      IN PTIME_FIELDS RtcTime
  );
  
+ NTHALAPI
+ ULONG
+ NTAPI
+ HalSetTimeIncrement(
+     IN ULONG Increment
+ );
 +// x86 BIOS emulator
 +#ifdef _X86BIOS_
 +NTSTATUS
 +NTAPI
 +x86BiosAllocateBuffer (
 +    ULONG *Size,
 +    USHORT *Segment,
 +    USHORT *Offset
 +);
 +
 +BOOLEAN
 +NTAPI
 +x86BiosCall (
 +    ULONG InterruptNumber,
 +    X86_BIOS_REGISTERS *Registers
 +);
 +
 +NTSTATUS
 +NTAPI
 +x86BiosFreeBuffer (
 +    USHORT Segment,
 +    USHORT Offset
 +);
 +
 +NTSTATUS
 +x86BiosReadMemory (
 +    USHORT Segment,
 +    USHORT Offset,
 +    PVOID Buffer,
 +    ULONG Size
 +);
 +
 +NTSTATUS
 +NTAPI
 +x86BiosWriteMemory (
 +    USHORT Segment,
 +    USHORT Offset,
 +    PVOID Buffer,
 +    ULONG Size
 +);
 +#endif
 +
  #endif
  #endif
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge