Switch i287 fpu, if present, into protected mode (ignored on i387) and
authorguido <guido@svn.reactos.org>
Sun, 15 Sep 2002 10:45:05 +0000 (10:45 +0000)
committerguido <guido@svn.reactos.org>
Sun, 15 Sep 2002 10:45:05 +0000 (10:45 +0000)
properly initialize some variables.

svn path=/trunk/; revision=3503

reactos/ntoskrnl/cc/view.c
reactos/ntoskrnl/cm/ntfunc.c
reactos/ntoskrnl/ex/stree.c
reactos/ntoskrnl/ke/catch.c
reactos/ntoskrnl/ke/i386/fpu.c
reactos/ntoskrnl/ke/i386/v86m.c
reactos/ntoskrnl/ke/main.c
reactos/ntoskrnl/mm/i386/page.c
reactos/ntoskrnl/mm/region.c
reactos/ntoskrnl/mm/section.c
reactos/ntoskrnl/rtl/message.c

index 08c108f..42d9de1 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: view.c,v 1.49 2002/09/08 10:23:16 chorns Exp $
+/* $Id: view.c,v 1.50 2002/09/15 10:45:00 guido Exp $
  *
  * PROJECT:         ReactOS kernel
  * FILE:            ntoskrnl/cc/view.c
@@ -414,7 +414,7 @@ CcRosGetCacheSegmentChain(PBCB Bcb,
   PCACHE_SEGMENT current;
   ULONG i;
   PCACHE_SEGMENT* CacheSegList;
-  PCACHE_SEGMENT Previous;
+  PCACHE_SEGMENT Previous = NULL;
 
   Length = ROUND_UP(Length, Bcb->CacheSegmentSize);
 
index 0863173..359a8e1 100644 (file)
@@ -1423,7 +1423,7 @@ NtQueryMultipleValueKey(IN HANDLE KeyHandle,
   PVALUE_CELL ValueCell;
   PKEY_OBJECT KeyObject;
   PDATA_CELL DataCell;
-  ULONG BufferLength;
+  ULONG BufferLength = 0;
   PKEY_CELL KeyCell;
   NTSTATUS Status;
   PUCHAR DataPtr;
index 1a79ce0..2342756 100644 (file)
@@ -471,7 +471,7 @@ ExpSearchSplayTreeWeight(PSPLAY_TREE Tree,
   PSPLAY_TREE_NODE Node,
   PSPLAY_TREE_NODE * ReturnNode)
 {
-  PSPLAY_TREE_NODE x;
+  PSPLAY_TREE_NODE x = NULL;
   LONG Equality;
 #ifdef WEIGHT
   LONG tweight;
index 29df611..3293377 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: catch.c,v 1.24 2002/09/08 10:23:28 chorns Exp $
+/* $Id: catch.c,v 1.25 2002/09/15 10:45:02 guido Exp $
  *
  * PROJECT:              ReactOS kernel
  * FILE:                 ntoskrnl/ke/catch.c
@@ -268,7 +268,7 @@ KiDispatchException(PEXCEPTION_RECORD ExceptionRecord,
     }
   else
     {
-      KD_CONTINUE_TYPE Action;
+      KD_CONTINUE_TYPE Action = 0;
 
       /* PreviousMode == KernelMode */
       
@@ -479,7 +479,7 @@ RtlUnwind(
   DWORD EaxValue)
 {
   PEXCEPTION_REGISTRATION ERHead;
-  PEXCEPTION_RECORD pExceptRec;
+  PEXCEPTION_RECORD pExceptRec = NULL;
   EXCEPTION_RECORD TempER;    
   CONTEXT Context;
   //PVOID Stack;
index f295014..30e8cbc 100644 (file)
@@ -68,6 +68,7 @@ KiCheckFPU(VOID)
                : "a" (cr0));
        return;
      }
-   /* FIXME: Do fsetpm */
-   HardwareMathSupport = 1;   
+   /* fsetpm for i287, ignored by i387 */
+   __asm__(".byte 0xDB, 0xE4\n\t");
+   HardwareMathSupport = 1;
 }
index c4d4b9a..42e8605 100644 (file)
@@ -449,8 +449,8 @@ KeV86GPF(PKV86M_TRAP_FRAME VTf, PKTRAP_FRAME Tf)
            {
              ULONG Count;
              PUCHAR Port;
-             PUSHORT BufferS;
-             PULONG BufferL;
+             PUSHORT BufferS = NULL;
+             PULONG BufferL = NULL;
              ULONG Offset;
              
              Count = 1;
@@ -566,8 +566,8 @@ KeV86GPF(PKV86M_TRAP_FRAME VTf, PKTRAP_FRAME Tf)
            {
              ULONG Count;
              PUCHAR Port;
-             PUSHORT BufferS;
-             PULONG BufferL;
+             PUSHORT BufferS = NULL;
+             PULONG BufferL = NULL;
              ULONG Offset;
              
              Count = 1;
index 7b76eca..8fb909e 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: main.c,v 1.137 2002/09/08 10:23:29 chorns Exp $
+/* $Id: main.c,v 1.138 2002/09/15 10:45:02 guido Exp $
  *
  * PROJECT:         ReactOS kernel
  * FILE:            ntoskrnl/ke/main.c
@@ -638,7 +638,7 @@ _main (ULONG MultiBootMagic, PLOADER_PARAMETER_BLOCK _LoaderBlock)
    */
   if (((PUCHAR)_LoaderBlock->CommandLine)[0] == '(')
     {
-      ULONG DiskNumber, PartNumber;
+      ULONG DiskNumber = 0, PartNumber = 0;
       PCH p;
       CHAR Temp[256];
       PCH options;
index cc345f1..61d843e 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: page.c,v 1.43 2002/09/08 10:23:37 chorns Exp $
+/* $Id: page.c,v 1.44 2002/09/15 10:45:04 guido Exp $
  *
  * PROJECT:     ReactOS kernel
  * FILE:        ntoskrnl/mm/i386/page.c
@@ -534,7 +534,7 @@ MmDeletePageFileMapping(PEPROCESS Process, PVOID Address,
    ULONG Pte;
    PULONG Pde;
    PEPROCESS CurrentProcess = PsGetCurrentProcess();
-   BOOLEAN WasValid;
+   BOOLEAN WasValid = FALSE;
 
    /*
     * If we are setting a page in another process we need to be in its
index 6277261..4ea7180 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: region.c,v 1.3 2002/09/08 10:23:36 chorns Exp $
+/* $Id: region.c,v 1.4 2002/09/15 10:45:03 guido Exp $
  *
  * PROJECT:     ReactOS kernel
  * FILE:        ntoskrnl/mm/region.c
@@ -140,7 +140,7 @@ MmAlterRegion(PMADDRESS_SPACE AddressSpace, PVOID BaseAddress,
   PVOID InitialBaseAddress;  
   PMM_REGION NewRegion;
   PLIST_ENTRY CurrentEntry;
-  PMM_REGION CurrentRegion;
+  PMM_REGION CurrentRegion = NULL;
   PVOID CurrentBaseAddress;
   ULONG RemainingLength;
 
index e2d7ca5..14d3e3a 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: section.c,v 1.97 2002/09/08 10:23:36 chorns Exp $
+/* $Id: section.c,v 1.98 2002/09/15 10:45:03 guido Exp $
  *
  * PROJECT:         ReactOS kernel
  * FILE:            ntoskrnl/mm/section.c
@@ -1520,7 +1520,7 @@ MmWritePageSectionView(PMADDRESS_SPACE AddressSpace,
   BOOLEAN Private;
   NTSTATUS Status;
   PFILE_OBJECT FileObject;
-  PREACTOS_COMMON_FCB_HEADER Fcb;
+  PREACTOS_COMMON_FCB_HEADER Fcb = NULL;
   BOOLEAN DirectMapped;
 
   Address = (PVOID)PAGE_ROUND_DOWN(Address);
@@ -3276,7 +3276,7 @@ MmMapViewOfSection(IN PVOID SectionObject,
    PSECTION_OBJECT Section;
    PMADDRESS_SPACE AddressSpace;
    ULONG ViewOffset;
-   NTSTATUS Status;
+   NTSTATUS Status = STATUS_SUCCESS;
 
    Section = (PSECTION_OBJECT)SectionObject;
    AddressSpace = &Process->AddressSpace;
index 26fedd2..799e37d 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: message.c,v 1.4 2002/09/08 10:23:42 chorns Exp $
+/* $Id: message.c,v 1.5 2002/09/15 10:45:05 guido Exp $
  *
  * COPYRIGHT:         See COPYING in the top level directory
  * PROJECT:           ReactOS kernel
@@ -30,7 +30,7 @@ RtlFindMessage(PVOID BaseAddress,
    PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry;
    PRTL_MESSAGE_RESOURCE_DATA MessageTable;
    NTSTATUS Status;
-   ULONG EntryOffset, IdOffset;
+   ULONG EntryOffset, IdOffset = 0;
    PRTL_MESSAGE_RESOURCE_ENTRY MessageEntry;
 
    ULONG i;