Sync to trunk r38500
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 1 Jan 2009 22:38:03 +0000 (22:38 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 1 Jan 2009 22:38:03 +0000 (22:38 +0000)
svn path=/branches/ros-amd64-bringup/; revision=38502

30 files changed:
1  2 
reactos/boot/freeldr/freeldr/include/mm.h
reactos/dll/cpl/main/mouse.c
reactos/dll/win32/advapi32/sec/misc.c
reactos/dll/win32/kernel32/kernel32.rbuild
reactos/dll/win32/kernel32/mem/virtual.c
reactos/dll/win32/kernel32/misc/stubs.c
reactos/dll/win32/riched20/editor.c
reactos/dll/win32/ws2_32/misc/stubs.c
reactos/drivers/storage/scsiport/scsiport.c
reactos/drivers/video/videoprt/int10.c
reactos/drivers/video/videoprt/resource.c
reactos/hal/halx86/mp/apic.c
reactos/include/crt/sys/types.h
reactos/include/ddk/ntdef.h
reactos/include/psdk/windef.h
reactos/include/psdk/winuser.h
reactos/include/reactos/libs/pseh/pseh2.h
reactos/ntoskrnl/ex/harderr.c
reactos/ntoskrnl/ex/sysinfo.c
reactos/ntoskrnl/include/internal/ke.h
reactos/ntoskrnl/include/internal/mm.h
reactos/ntoskrnl/io/iomgr/util.c
reactos/ntoskrnl/kd/kdmain.c
reactos/ntoskrnl/mm/mminit.c
reactos/subsystems/win32/win32k/ntuser/misc.c
reactos/subsystems/win32/win32k/ntuser/simplecall.c
reactos/tools/rbuild/backend/mingw/mingw.cpp
reactos/tools/rbuild/backend/mingw/modulehandler.cpp
reactos/tools/rbuild/backend/msvc/msvc.cpp
reactos/tools/rbuild/module.cpp

Simple merge
Simple merge
@@@ -76,20 -76,26 +76,26 @@@ VirtualFreeEx(IN HANDLE hProcess
  {
      NTSTATUS Status;
  
-     /* Free the memory */
-     Status = NtFreeVirtualMemory(hProcess,
-                                  (PVOID *)&lpAddress,
-                                  &dwSize,
-                                  dwFreeType);
-     if (!NT_SUCCESS(Status))
+     if (dwSize == 0 || !(dwFreeType & MEM_RELEASE))
      {
-         /* We failed */
-         SetLastErrorByStatus(Status);
-         return FALSE;
+         /* Free the memory */
+         Status = NtFreeVirtualMemory(hProcess,
 -                                     (PVOID *)&lpAddress,
 -                                     (PULONG)&dwSize,
++                                     &lpAddress,
++                                     &dwSize,
+                                      dwFreeType);
+         if (!NT_SUCCESS(Status))
+         {
+             /* We failed */
+             SetLastErrorByStatus(Status);
+             return FALSE;
+         }
+         /* Return success */
+         return TRUE;
      }
  
-     /* Return success */
-     return TRUE;
+     SetLastErrorByStatus(STATUS_INVALID_PARAMETER);
+     return FALSE;
  }
  
  /*
Simple merge
Simple merge
@@@ -201,54 -199,48 +201,54 @@@ IntInt10CallBios
  
  VP_STATUS NTAPI
  VideoPortInt10(
-    IN PVOID HwDeviceExtension,
-    IN PVIDEO_X86_BIOS_ARGUMENTS BiosArguments)
+     IN PVOID HwDeviceExtension,
+     IN PVIDEO_X86_BIOS_ARGUMENTS BiosArguments)
  {
-    KV86M_REGISTERS Regs;
-    NTSTATUS Status;
-    PKPROCESS CallingProcess;
-    KAPC_STATE ApcState;
 +#if defined(_M_IX86)
+     CONTEXT BiosContext;
+     NTSTATUS Status;
+     PKPROCESS CallingProcess = (PKPROCESS)PsGetCurrentProcess();
+     KAPC_STATE ApcState;
  
-    TRACE_(VIDEOPRT, "VideoPortInt10\n");
+     if (!CsrssInitialized)
+     {
+        return ERROR_INVALID_PARAMETER;
+     }
  
-    if (!CsrssInitialized)
-    {
-       return ERROR_INVALID_PARAMETER;
-    }
+     /* Attach to CSRSS */
+     IntAttachToCSRSS(&CallingProcess, &ApcState);
  
-    IntAttachToCSRSS(&CallingProcess, &ApcState);
+     /* Clear the context */
+     RtlZeroMemory(&BiosContext, sizeof(CONTEXT));
+     /* Fill out the bios arguments */
+     BiosContext.Eax = BiosArguments->Eax;
+     BiosContext.Ebx = BiosArguments->Ebx;
+     BiosContext.Ecx = BiosArguments->Ecx;
+     BiosContext.Edx = BiosArguments->Edx;
+     BiosContext.Esi = BiosArguments->Esi;
+     BiosContext.Edi = BiosArguments->Edi;
+     BiosContext.Ebp = BiosArguments->Ebp;
  
-    memset(&Regs, 0, sizeof(Regs));
-    INFO_(VIDEOPRT, "- Input register Eax: %x\n", BiosArguments->Eax);
-    Regs.Eax = BiosArguments->Eax;
-    INFO_(VIDEOPRT, "- Input register Ebx: %x\n", BiosArguments->Ebx);
-    Regs.Ebx = BiosArguments->Ebx;
-    INFO_(VIDEOPRT, "- Input register Ecx: %x\n", BiosArguments->Ecx);
-    Regs.Ecx = BiosArguments->Ecx;
-    INFO_(VIDEOPRT, "- Input register Edx: %x\n", BiosArguments->Edx);
-    Regs.Edx = BiosArguments->Edx;
-    INFO_(VIDEOPRT, "- Input register Esi: %x\n", BiosArguments->Esi);
-    Regs.Esi = BiosArguments->Esi;
-    INFO_(VIDEOPRT, "- Input register Edi: %x\n", BiosArguments->Edi);
-    Regs.Edi = BiosArguments->Edi;
-    INFO_(VIDEOPRT, "- Input register Ebp: %x\n", BiosArguments->Ebp);
-    Regs.Ebp = BiosArguments->Ebp;
-    Status = Ke386CallBios(0x10, (PCONTEXT)&Regs);
-    BiosArguments->Eax = Regs.Eax;
-    BiosArguments->Ebx = Regs.Ebx;
-    BiosArguments->Ecx = Regs.Ecx;
-    BiosArguments->Edx = Regs.Edx;
-    BiosArguments->Esi = Regs.Esi;
-    BiosArguments->Edi = Regs.Edi;
-    BiosArguments->Ebp = Regs.Ebp;
+     /* Do the ROM BIOS call */
+     Status = Ke386CallBios(0x10, &BiosContext);
  
-    IntDetachFromCSRSS(&CallingProcess, &ApcState);
+     /* Return the arguments */
+     BiosArguments->Eax = BiosContext.Eax;
+     BiosArguments->Ebx = BiosContext.Ebx;
+     BiosArguments->Ecx = BiosContext.Ecx;
+     BiosArguments->Edx = BiosContext.Edx;
+     BiosArguments->Esi = BiosContext.Esi;
+     BiosArguments->Edi = BiosContext.Edi;
+     BiosArguments->Ebp = BiosContext.Ebp;
  
-    return Status;
+     /* Detach from CSRSS */
+     IntDetachFromCSRSS(&CallingProcess, &ApcState);
+     return Status;
 +#else
 +    /* Not implemented for anything else than X86*/
 +    DPRINT1("Int10 not available on non-x86!\n");
 +    return ERROR_INVALID_FUNCTION;
 +#endif
  }
Simple merge
@@@ -36,4 -36,4 +36,17 @@@ typedef unsigned int dev_t
  # endif
  #endif
  
++// HACK HACK HACK
++#ifndef _PID_T_
++#define       _PID_T_
++#ifndef _WIN64
++typedef int   _pid_t;
++#else
++typedef __int64       _pid_t;
++#endif
++#ifndef       NO_OLDNAMES
++typedef _pid_t        pid_t;
++#endif
++#endif        /* Not _PID_T_ */
++
  #endif /* !_INC_TYPES */
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge