[HAL]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 6 Feb 2010 01:26:52 +0000 (01:26 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 6 Feb 2010 01:26:52 +0000 (01:26 +0000)
- Simplify check for matching kernel/hal
- Remove underscore from _MsgUnimplemented

svn path=/branches/ros-amd64-bringup/; revision=45443

reactos/hal/halx86/generic/amd64/halinit.c
reactos/hal/halx86/generic/amd64/systimer.S

index 2c8ca6c..c582fa4 100644 (file)
 /* GLOBALS *******************************************************************/
 
 BOOLEAN HalpPciLockSettings;
+#ifdef CONFIG_SMP
+#define HAL_BUILD_TYPE (0 | DBG)
+#else
+#define HAL_BUILD_TYPE (2 | DBG)
+#endif
 
 /* PRIVATE FUNCTIONS *********************************************************/
 
@@ -59,30 +64,12 @@ HalInitSystem(IN ULONG BootPhase,
         /* Get command-line parameters */
         HalpGetParameters(LoaderBlock);
 
-#if DBG
-        /* Checked HAL requires checked kernel */
-        if (!(Prcb->BuildType & PRCB_BUILD_DEBUG))
-        {
-            /* No match, bugcheck */
-            KeBugCheckEx(MISMATCHED_HAL, 2, Prcb->BuildType, 1, 0);
-        }
-#else
-        /* Release build requires release HAL */
-        if (Prcb->BuildType & PRCB_BUILD_DEBUG)
-        {
-            /* No match, bugcheck */
-            KeBugCheckEx(MISMATCHED_HAL, 2, Prcb->BuildType, 0, 0);
-        }
-#endif
-
-#ifdef CONFIG_SMP
-        /* SMP HAL requires SMP kernel */
-        if (Prcb->BuildType & PRCB_BUILD_UNIPROCESSOR)
+        /* Check if HAL and kernel have identical build type */
+        if (Prcb->BuildType != HAL_BUILD_TYPE)
         {
             /* No match, bugcheck */
-            KeBugCheckEx(MISMATCHED_HAL, 2, Prcb->BuildType, 0, 0);
+            KeBugCheckEx(MISMATCHED_HAL, 2, Prcb->BuildType, HAL_BUILD_TYPE, 0);
         }
-#endif
 
         /* Validate the PRCB */
         if (Prcb->MajorVersion != PRCB_MAJOR_VERSION)
index 3041d73..1cb3b6e 100644 (file)
@@ -14,8 +14,8 @@
 
 .data
 
-.global _MsgUnimplemented
-_MsgUnimplemented:
+.global MsgUnimplemented
+MsgUnimplemented:
 .asciz "WARNING:  %s at %s:%d is UNIMPLEMENTED!\n"