https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9ea2b803c885fc3bd705d…
commit 9ea2b803c885fc3bd705d18709565775fff44dfa
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Tue Mar 8 02:25:53 2022 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sat May 7 18:14:38 2022 +0200
[NDK][HAL][NTOS] Add missing PRCB_MINOR_VERSION / PRCB_MAJOR_VERSION and use them.
---
hal/halarm/generic/halinit.c | 4 ++--
ntoskrnl/ke/amd64/kiinit.c | 4 ++--
ntoskrnl/ke/arm/kiinit.c | 4 ++--
ntoskrnl/ke/i386/kiinit.c | 4 ++--
sdk/include/ndk/amd64/ketypes.h | 1 +
sdk/include/ndk/arm/ketypes.h | 1 +
sdk/include/ndk/i386/ketypes.h | 1 +
sdk/include/ndk/powerpc/ketypes.h | 12 ++++++++++--
8 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/hal/halarm/generic/halinit.c b/hal/halarm/generic/halinit.c
index 532110bd809..24836de2a23 100644
--- a/hal/halarm/generic/halinit.c
+++ b/hal/halarm/generic/halinit.c
@@ -56,7 +56,7 @@ HalInitSystem(IN ULONG BootPhase,
if (!(Prcb->BuildType & PRCB_BUILD_DEBUG))
{
/* No match, bugcheck */
- KeBugCheckEx(MISMATCHED_HAL, 2, Prcb->BuildType, 1, 0);
+ KeBugCheckEx(MISMATCHED_HAL, 2, Prcb->BuildType, PRCB_BUILD_DEBUG, 0);
}
#else
/* Release build requires release HAL */
@@ -80,7 +80,7 @@ HalInitSystem(IN ULONG BootPhase,
if (Prcb->MajorVersion != PRCB_MAJOR_VERSION)
{
/* Validation failed, bugcheck */
- KeBugCheckEx(MISMATCHED_HAL, 1, Prcb->MajorVersion, 1, 0);
+ KeBugCheckEx(MISMATCHED_HAL, 1, Prcb->MajorVersion, PRCB_MAJOR_VERSION,
0);
}
/* Initialize interrupts */
diff --git a/ntoskrnl/ke/amd64/kiinit.c b/ntoskrnl/ke/amd64/kiinit.c
index 9e1c23138f9..d9c8807bf34 100644
--- a/ntoskrnl/ke/amd64/kiinit.c
+++ b/ntoskrnl/ke/amd64/kiinit.c
@@ -108,8 +108,8 @@ KiInitializePcr(IN PKIPCR Pcr,
Pcr->MinorVersion = PCR_MINOR_VERSION;
/* Set the PRCB Version */
- Pcr->Prcb.MajorVersion = 1;
- Pcr->Prcb.MinorVersion = 1;
+ Pcr->Prcb.MajorVersion = PRCB_MAJOR_VERSION;
+ Pcr->Prcb.MinorVersion = PRCB_MINOR_VERSION;
/* Set the Build Type */
Pcr->Prcb.BuildType = 0;
diff --git a/ntoskrnl/ke/arm/kiinit.c b/ntoskrnl/ke/arm/kiinit.c
index c6f4edd594c..86db2d9377f 100644
--- a/ntoskrnl/ke/arm/kiinit.c
+++ b/ntoskrnl/ke/arm/kiinit.c
@@ -195,8 +195,8 @@ KiInitializePcr(IN ULONG ProcessorNumber,
Pcr->MinorVersion = PCR_MINOR_VERSION;
/* Set the PCRB Version */
- Pcr->Prcb.MajorVersion = 1;
- Pcr->Prcb.MinorVersion = 1;
+ Pcr->Prcb.MajorVersion = PRCB_MAJOR_VERSION;
+ Pcr->Prcb.MinorVersion = PRCB_MINOR_VERSION;
/* Set the Build Type */
Pcr->Prcb.BuildType = 0;
diff --git a/ntoskrnl/ke/i386/kiinit.c b/ntoskrnl/ke/i386/kiinit.c
index 7f0651e260a..b0af4c05d53 100644
--- a/ntoskrnl/ke/i386/kiinit.c
+++ b/ntoskrnl/ke/i386/kiinit.c
@@ -307,8 +307,8 @@ KiInitializePcr(IN ULONG ProcessorNumber,
Pcr->MinorVersion = PCR_MINOR_VERSION;
/* Set the PCRB Version */
- Pcr->PrcbData.MajorVersion = 1;
- Pcr->PrcbData.MinorVersion = 1;
+ Pcr->PrcbData.MajorVersion = PRCB_MAJOR_VERSION;
+ Pcr->PrcbData.MinorVersion = PRCB_MINOR_VERSION;
/* Set the Build Type */
Pcr->PrcbData.BuildType = 0;
diff --git a/sdk/include/ndk/amd64/ketypes.h b/sdk/include/ndk/amd64/ketypes.h
index cd2083e20e3..9bdb9e43bc2 100644
--- a/sdk/include/ndk/amd64/ketypes.h
+++ b/sdk/include/ndk/amd64/ketypes.h
@@ -242,6 +242,7 @@ typedef enum
//
// PRCB Flags
//
+#define PRCB_MINOR_VERSION 1
#define PRCB_MAJOR_VERSION 1
#define PRCB_BUILD_DEBUG 1
#define PRCB_BUILD_UNIPROCESSOR 2
diff --git a/sdk/include/ndk/arm/ketypes.h b/sdk/include/ndk/arm/ketypes.h
index 26c40706a31..c047436d769 100644
--- a/sdk/include/ndk/arm/ketypes.h
+++ b/sdk/include/ndk/arm/ketypes.h
@@ -281,6 +281,7 @@ typedef enum
//
// PRCB Flags
//
+#define PRCB_MINOR_VERSION 1
#define PRCB_MAJOR_VERSION 1
#define PRCB_BUILD_DEBUG 1
#define PRCB_BUILD_UNIPROCESSOR 2
diff --git a/sdk/include/ndk/i386/ketypes.h b/sdk/include/ndk/i386/ketypes.h
index cd1bdb1c5ba..8a9ea4c2ad5 100644
--- a/sdk/include/ndk/i386/ketypes.h
+++ b/sdk/include/ndk/i386/ketypes.h
@@ -160,6 +160,7 @@ typedef enum
//
// PRCB Flags
//
+#define PRCB_MINOR_VERSION 1
#define PRCB_MAJOR_VERSION 1
#define PRCB_BUILD_DEBUG 1
#define PRCB_BUILD_UNIPROCESSOR 2
diff --git a/sdk/include/ndk/powerpc/ketypes.h b/sdk/include/ndk/powerpc/ketypes.h
index f8f29a407f5..16554a6c5e7 100644
--- a/sdk/include/ndk/powerpc/ketypes.h
+++ b/sdk/include/ndk/powerpc/ketypes.h
@@ -33,10 +33,18 @@ Author:
#define IPI_SYNCH_REQUEST 10
#define MAXIMUM_VECTOR 0x100
+//
+// Static Kernel-Mode Address start (use MM_KSEG0_BASE for actual)
+//
#define KSEG0_BASE 0x80000000
-#define PRCB_MAJOR_VERSION 1
-#define PRCB_BUILD_DEBUG 1
+//
+// PRCB Flags
+//
+#define PRCB_MINOR_VERSION 1
+#define PRCB_MAJOR_VERSION 1
+#define PRCB_BUILD_DEBUG 1
+#define PRCB_BUILD_UNIPROCESSOR 2
#ifndef ROUND_UP
#define ROUND_UP(x,y) (((x) + ((y)-1)) & ~((y)-1))