mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:53:06 +00:00
Fixed SystemProcessorInformation.
svn path=/trunk/; revision=9200
This commit is contained in:
parent
87065d0083
commit
e20d930ab0
1 changed files with 14 additions and 24 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: sysinfo.c,v 1.28 2004/04/22 01:55:49 jimtabor Exp $
|
/* $Id: sysinfo.c,v 1.29 2004/04/23 05:37:10 jimtabor Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -31,6 +31,9 @@ VOID STDCALL KeQueryInterruptTime(PLARGE_INTEGER CurrentTime);
|
||||||
|
|
||||||
VOID MmPrintMemoryStatistic(VOID);
|
VOID MmPrintMemoryStatistic(VOID);
|
||||||
|
|
||||||
|
extern ULONG Ke386CpuidFlags;
|
||||||
|
extern ULONG Ke386Cpuid;
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
NTSTATUS STDCALL
|
NTSTATUS STDCALL
|
||||||
|
@ -270,7 +273,6 @@ NtSetSystemEnvironmentValue (IN PUNICODE_STRING UnsafeName,
|
||||||
|
|
||||||
/* --- Query/Set System Information --- */
|
/* --- Query/Set System Information --- */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NOTE: QSI_DEF(n) and SSI_DEF(n) define _cdecl function symbols
|
* NOTE: QSI_DEF(n) and SSI_DEF(n) define _cdecl function symbols
|
||||||
* so the stack is popped only in one place on x86 platform.
|
* so the stack is popped only in one place on x86 platform.
|
||||||
|
@ -283,6 +285,7 @@ static NTSTATUS QSI_USE(n) (PVOID Buffer, ULONG Size, PULONG ReqSize)
|
||||||
#define SSI_DEF(n) \
|
#define SSI_DEF(n) \
|
||||||
static NTSTATUS SSI_USE(n) (PVOID Buffer, ULONG Size)
|
static NTSTATUS SSI_USE(n) (PVOID Buffer, ULONG Size)
|
||||||
|
|
||||||
|
|
||||||
/* Class 0 - Basic Information */
|
/* Class 0 - Basic Information */
|
||||||
QSI_DEF(SystemBasicInformation)
|
QSI_DEF(SystemBasicInformation)
|
||||||
{
|
{
|
||||||
|
@ -324,32 +327,19 @@ QSI_DEF(SystemProcessorInformation)
|
||||||
if (Size < sizeof (SYSTEM_PROCESSOR_INFORMATION))
|
if (Size < sizeof (SYSTEM_PROCESSOR_INFORMATION))
|
||||||
{
|
{
|
||||||
return (STATUS_INFO_LENGTH_MISMATCH);
|
return (STATUS_INFO_LENGTH_MISMATCH);
|
||||||
}
|
}
|
||||||
|
Spi->ProcessorArchitecture = ((Ke386Cpuid >> 8) & 0xf);
|
||||||
|
Spi->ProcessorLevel = ((Ke386Cpuid >> 4) & 0xf);
|
||||||
|
Spi->ProcessorRevision = (Ke386Cpuid & 0xf) | ((Ke386Cpuid >> 4) & 0x300);
|
||||||
|
Spi->Unknown = 0;
|
||||||
|
Spi->FeatureBits = Ke386CpuidFlags;
|
||||||
|
|
||||||
|
DPRINT("Arch %d Level %d Rev %d\n", Spi->ProcessorArchitecture,
|
||||||
|
Spi->ProcessorLevel, Spi->ProcessorRevision);
|
||||||
|
|
||||||
/* FIXME: add CPU type detection code */
|
|
||||||
Spi->ProcessorArchitecture = 0; /* FIXME */
|
|
||||||
Spi->ProcessorLevel = 0; /* FIXME */
|
|
||||||
Spi->ProcessorRevision = 0; /* FIXME */
|
|
||||||
Spi->Unknown = 0;
|
|
||||||
Spi->FeatureBits = 0x00000000; /* FIXME */
|
|
||||||
|
|
||||||
return (STATUS_SUCCESS);
|
return (STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
typedef struct _MM_MEMORY_CONSUMER
|
|
||||||
{
|
|
||||||
ULONG PagesUsed;
|
|
||||||
ULONG PagesTarget;
|
|
||||||
NTSTATUS (*Trim)(ULONG Target, ULONG Priority, PULONG NrFreed);
|
|
||||||
}
|
|
||||||
MM_MEMORY_CONSUMER, *PMM_MEMORY_CONSUMER;
|
|
||||||
|
|
||||||
extern MM_MEMORY_CONSUMER MiMemoryConsumers[MC_MAXIMUM];
|
|
||||||
|
|
||||||
extern ULONG MiFreeSwapPages;
|
|
||||||
extern ULONG MiUsedSwapPages;
|
|
||||||
extern ULONG MmPagedPoolSize;
|
|
||||||
*/
|
|
||||||
/* Class 2 - Performance Information */
|
/* Class 2 - Performance Information */
|
||||||
QSI_DEF(SystemPerformanceInformation)
|
QSI_DEF(SystemPerformanceInformation)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue