[SDK:ASM][NDK] Improve and synchronize the definition of the SYNCH_LEVEL symbol (#3943)

In particular, for a given platform (x86, AMD64...) its definition
depends for uniprocessor vs. multiprocessor NT kernel/HAL (controlled
by the CONFIG_SMP define).

Regarding the ASM-generated headers (from asm/ksx.template.h), since
they are generated once for a given platform, and since UP/MP NT builds
are generated at the same time, these headers need to contain both
SYNCH_LEVEL definitions controlled by CONFIG_SMP, instead of a fixed
value. Therefore we need to employ the geninc RAW(...) construct.

[NDK:X86] Add missing x86 CLOCK1_LEVEL and POWER_LEVEL definitions.
This commit is contained in:
Hermès Bélusca-Maïto 2021-09-05 03:58:26 +02:00
parent f350843948
commit 5f477e0e3b
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
5 changed files with 43 additions and 21 deletions

View file

@ -577,8 +577,10 @@ Author:
#define APC_LEVEL 0x1
#define DISPATCH_LEVEL 0x2
#define PROFILE_LEVEL 0x1B
#define CLOCK1_LEVEL 0x1C
#define CLOCK2_LEVEL 0x1C
#define IPI_LEVEL 0x1D
#define POWER_LEVEL 0x1E
#define HIGH_LEVEL 0x1F
//
@ -588,9 +590,9 @@ Author:
#define SYNCH_LEVEL DISPATCH_LEVEL
#else
#if (NTDDI_VERSION < NTDDI_WS03)
#define SYNCH_LEVEL (IPI_LEVEL - 0x1)
#define SYNCH_LEVEL (IPI_LEVEL - 1)
#else
#define SYNCH_LEVEL (IPI_LEVEL - 0x2)
#define SYNCH_LEVEL (IPI_LEVEL - 2)
#endif
#endif