[NDK][HAL][NTOS] Add missing PRCB_MINOR_VERSION / PRCB_MAJOR_VERSION and use them.

This commit is contained in:
Hermès Bélusca-Maïto 2022-03-08 02:25:53 +01:00
parent cfbb734799
commit 9ea2b803c8
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
8 changed files with 21 additions and 10 deletions

View file

@ -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 */

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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))