Author: sir_richard
Date: Thu Jan 28 17:05:54 2010
New Revision: 45299
URL:
http://svn.reactos.org/svn/reactos?rev=45299&view=rev
Log:
[NDK]: Fix KPCR definition.
[DDK]: KeGetCurrentProcessorNumber should not return a 32-bit DWORD combined of
"ProcessorNumer", "VdmAlert" and
"SecondLevelCacheAssociativity" because those 3 fields are probably not equal to
a processor number. Having an L2 Cache will no longer result in ReactOS believing you have
a 32000 core CPU.
Modified:
trunk/reactos/include/ddk/winddk.h
trunk/reactos/include/ndk/i386/ketypes.h
trunk/reactos/ntoskrnl/kdbg/kdb_cli.c
Modified: trunk/reactos/include/ddk/winddk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=4…
==============================================================================
--- trunk/reactos/include/ddk/winddk.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/winddk.h [iso-8859-1] Thu Jan 28 17:05:54 2010
@@ -5149,23 +5149,7 @@
ULONG
KeGetCurrentProcessorNumber(VOID)
{
-#if defined(__GNUC__)
- ULONG ret;
- __asm__ __volatile__ (
- "movl %%fs:%c1, %0\n"
- : "=r" (ret)
- : "i" (FIELD_OFFSET(KPCR, Number))
- );
- return ret;
-#elif defined(_MSC_VER)
-#if _MSC_FULL_VER >= 13012035
- return (ULONG)__readfsbyte(FIELD_OFFSET(KPCR, Number));
-#else
- __asm { movzx eax, fs:[0] KPCR.Number }
-#endif
-#else
-#error Unknown compiler
-#endif
+ return (ULONG)__readfsbyte(FIELD_OFFSET(KPCR, Number));
}
NTHALAPI
Modified: trunk/reactos/include/ndk/i386/ketypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/i386/ketypes.h…
==============================================================================
--- trunk/reactos/include/ndk/i386/ketypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/i386/ketypes.h [iso-8859-1] Thu Jan 28 17:05:54 2010
@@ -705,8 +705,8 @@
ULONG StallScaleFactor;
UCHAR SpareUnused;
UCHAR Number;
- UCHAR Reserved;
- UCHAR L2CacheAssociativity;
+ UCHAR Spare0;
+ UCHAR SecondLevelCacheAssociativity;
ULONG VdmAlert;
ULONG KernelReserved[14];
ULONG SecondLevelCacheSize;
Modified: trunk/reactos/ntoskrnl/kdbg/kdb_cli.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kdbg/kdb_cli.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/kdbg/kdb_cli.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/kdbg/kdb_cli.c [iso-8859-1] Thu Jan 28 17:05:54 2010
@@ -1788,7 +1788,7 @@
Pcr->NtTib.Self, Pcr->Self, Pcr->Prcb, Pcr->Irql, Pcr->IRR,
Pcr->IrrActive,
Pcr->IDR, Pcr->KdVersionBlock, Pcr->IDT, Pcr->GDT,
Pcr->TSS,
Pcr->MajorVersion, Pcr->MinorVersion, Pcr->SetMember,
Pcr->StallScaleFactor,
- Pcr->Number, Pcr->L2CacheAssociativity,
+ Pcr->Number, Pcr->SecondLevelCacheAssociativity,
Pcr->VdmAlert, Pcr->SecondLevelCacheSize, Pcr->InterruptMode);
return TRUE;