- Use DBG_STATUS_CONTROL_C instead of magic "1"
authorStefan Ginsberg <stefanginsberg@gmail.com>
Sun, 18 Oct 2009 11:50:34 +0000 (11:50 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Sun, 18 Oct 2009 11:50:34 +0000 (11:50 +0000)
- Add missing KdPollBreakIn + DbgBreakPointWithStatus to ARM initialization
- Fix initialization of the D and I cache fields in the PCR -- it was always setting the second level

svn path=/trunk/; revision=43549

reactos/ntoskrnl/ke/arm/kiinit.c
reactos/ntoskrnl/ke/i386/kiinit.c
reactos/ntoskrnl/ke/powerpc/kiinit.c

index 71aa7d2..2a15609 100644 (file)
@@ -186,6 +186,11 @@ KiInitializeKernel(IN PKPROCESS InitProcess,
         //
         KdInitSystem(0, LoaderBlock);
 
         //
         KdInitSystem(0, LoaderBlock);
 
+        //
+        // Check for break-in
+        //
+        if (KdPollBreakIn()) DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C);
+
         //
         // Cleanup the rest of the processor block array
         //
         //
         // Cleanup the rest of the processor block array
         //
@@ -372,12 +377,12 @@ KiInitializeSystem(IN ULONG Magic,
     //
     // Set global d-cache fill and alignment values
     //
     //
     // Set global d-cache fill and alignment values
     //
-    if (Pcr->SecondLevelDcacheSize)
+    if (!Pcr->SecondLevelDcacheSize)
     {
         //
         // Use the first level
         //
     {
         //
         // Use the first level
         //
-        Pcr->DcacheFillSize = Pcr->SecondLevelDcacheSize;
+        Pcr->DcacheFillSize = Pcr->FirstLevelDcacheSize;
     }
     else
     {
     }
     else
     {
@@ -395,12 +400,12 @@ KiInitializeSystem(IN ULONG Magic,
     //
     // Set global i-cache fill and alignment values
     //
     //
     // Set global i-cache fill and alignment values
     //
-    if (Pcr->SecondLevelIcacheSize)
+    if (!Pcr->SecondLevelIcacheSize)
     {
         //
         // Use the first level
         //
     {
         //
         // Use the first level
         //
-        Pcr->IcacheFillSize = Pcr->SecondLevelIcacheSize;
+        Pcr->IcacheFillSize = Pcr->FirstLevelIcacheSize;
     }
     else
     {
     }
     else
     {
index 857ab6e..1983aaf 100644 (file)
@@ -752,7 +752,7 @@ AppCpuInit:
         KdInitSystem(0, KeLoaderBlock);
 
         /* Check for break-in */
         KdInitSystem(0, KeLoaderBlock);
 
         /* Check for break-in */
-        if (KdPollBreakIn()) DbgBreakPointWithStatus(1);
+        if (KdPollBreakIn()) DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C);
     }
 
     /* Raise to HIGH_LEVEL */
     }
 
     /* Raise to HIGH_LEVEL */
index 7889947..a08987a 100644 (file)
@@ -329,7 +329,7 @@ AppCpuInit:
     /* Check for break-in */
     if (KdPollBreakIn())
     {
     /* Check for break-in */
     if (KdPollBreakIn())
     {
-       DbgBreakPointWithStatus(1);
+       DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C);
     }
 
     /* Raise to HIGH_LEVEL */
     }
 
     /* Raise to HIGH_LEVEL */