mirror of
https://github.com/reactos/wine.git
synced 2025-02-02 18:25:19 +00:00
ntdll: Fix a couple of system information structures for 64-bit.
This commit is contained in:
parent
b8ae3f073b
commit
2be006e497
@ -379,11 +379,11 @@ VOID WINAPI GetSystemInfo(
|
||||
memset(PF,0,sizeof(PF));
|
||||
|
||||
NtQuerySystemInformation( SystemBasicInformation, &sbi, sizeof(sbi), NULL );
|
||||
cachedsi.dwPageSize = sbi.uPageSize;
|
||||
cachedsi.lpMinimumApplicationAddress = sbi.pLowestUserAddress;
|
||||
cachedsi.lpMaximumApplicationAddress = sbi.pMmHighestUserAddress;
|
||||
cachedsi.dwNumberOfProcessors = sbi.uKeActiveProcessors;
|
||||
cachedsi.dwAllocationGranularity = sbi.uAllocationGranularity;
|
||||
cachedsi.dwPageSize = sbi.PageSize;
|
||||
cachedsi.lpMinimumApplicationAddress = sbi.LowestUserAddress;
|
||||
cachedsi.lpMaximumApplicationAddress = sbi.HighestUserAddress;
|
||||
cachedsi.dwNumberOfProcessors = sbi.ActiveProcessors;
|
||||
cachedsi.dwAllocationGranularity = sbi.AllocationGranularity;
|
||||
|
||||
/* choose sensible defaults ...
|
||||
* FIXME: perhaps overridable with precompiler flags?
|
||||
|
@ -1038,9 +1038,9 @@ NTSTATUS WINAPI NtQuerySystemInformation(
|
||||
{
|
||||
sppi = RtlAllocateHeap(GetProcessHeap(), 0,
|
||||
sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION));
|
||||
sppi->liIdleTime.QuadPart = idle;
|
||||
sppi->liKernelTime.QuadPart = sys;
|
||||
sppi->liUserTime.QuadPart = usr;
|
||||
sppi->IdleTime.QuadPart = idle;
|
||||
sppi->KernelTime.QuadPart = sys;
|
||||
sppi->UserTime.QuadPart = usr;
|
||||
cpus = 1;
|
||||
len = sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION);
|
||||
}
|
||||
@ -1057,17 +1057,17 @@ NTSTATUS WINAPI NtQuerySystemInformation(
|
||||
out_cpus --;
|
||||
if (name[3]=='0') /* first cpu */
|
||||
{
|
||||
sppi->liIdleTime.QuadPart = idle;
|
||||
sppi->liKernelTime.QuadPart = sys;
|
||||
sppi->liUserTime.QuadPart = usr;
|
||||
sppi->IdleTime.QuadPart = idle;
|
||||
sppi->KernelTime.QuadPart = sys;
|
||||
sppi->UserTime.QuadPart = usr;
|
||||
}
|
||||
else /* new cpu */
|
||||
{
|
||||
len = sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION) * (cpus+1);
|
||||
sppi = RtlReAllocateHeap(GetProcessHeap(), 0, sppi, len);
|
||||
sppi[cpus].liIdleTime.QuadPart = idle;
|
||||
sppi[cpus].liKernelTime.QuadPart = sys;
|
||||
sppi[cpus].liUserTime.QuadPart = usr;
|
||||
sppi[cpus].IdleTime.QuadPart = idle;
|
||||
sppi[cpus].KernelTime.QuadPart = sys;
|
||||
sppi[cpus].UserTime.QuadPart = usr;
|
||||
cpus++;
|
||||
}
|
||||
}
|
||||
@ -1090,9 +1090,9 @@ NTSTATUS WINAPI NtQuerySystemInformation(
|
||||
|
||||
/* many programs expect these values to change so fake change */
|
||||
len = sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION);
|
||||
sppi->liKernelTime.QuadPart = 1 * i;
|
||||
sppi->liUserTime.QuadPart = 2 * i;
|
||||
sppi->liIdleTime.QuadPart = 3 * i;
|
||||
sppi->KernelTime.QuadPart = 1 * i;
|
||||
sppi->UserTime.QuadPart = 2 * i;
|
||||
sppi->IdleTime.QuadPart = 3 * i;
|
||||
i++;
|
||||
}
|
||||
|
||||
|
@ -1364,17 +1364,17 @@ void virtual_init_threading(void)
|
||||
*/
|
||||
void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info )
|
||||
{
|
||||
info->dwUnknown1 = 0;
|
||||
info->uKeMaximumIncrement = 0; /* FIXME */
|
||||
info->uPageSize = page_size;
|
||||
info->uMmLowestPhysicalPage = 1;
|
||||
info->uMmHighestPhysicalPage = 0x7fffffff / page_size;
|
||||
info->uMmNumberOfPhysicalPages = info->uMmHighestPhysicalPage - info->uMmLowestPhysicalPage;
|
||||
info->uAllocationGranularity = get_mask(0) + 1;
|
||||
info->pLowestUserAddress = (void *)0x10000;
|
||||
info->pMmHighestUserAddress = (char *)user_space_limit - 1;
|
||||
info->uKeActiveProcessors = NtCurrentTeb()->Peb->NumberOfProcessors;
|
||||
info->bKeNumberProcessors = info->uKeActiveProcessors;
|
||||
info->unknown = 0;
|
||||
info->KeMaximumIncrement = 0; /* FIXME */
|
||||
info->PageSize = page_size;
|
||||
info->MmLowestPhysicalPage = 1;
|
||||
info->MmHighestPhysicalPage = 0x7fffffff / page_size;
|
||||
info->MmNumberOfPhysicalPages = info->MmHighestPhysicalPage - info->MmLowestPhysicalPage;
|
||||
info->AllocationGranularity = get_mask(0) + 1;
|
||||
info->LowestUserAddress = (void *)0x10000;
|
||||
info->HighestUserAddress = (char *)user_space_limit - 1;
|
||||
info->ActiveProcessors = NtCurrentTeb()->Peb->NumberOfProcessors;
|
||||
info->NumberOfProcessors = NtCurrentTeb()->Peb->NumberOfProcessors;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1187,19 +1187,17 @@ typedef struct _RTL_RWLOCK {
|
||||
|
||||
typedef struct _SYSTEM_BASIC_INFORMATION {
|
||||
#ifdef __WINESRC__
|
||||
DWORD dwUnknown1;
|
||||
ULONG uKeMaximumIncrement;
|
||||
ULONG uPageSize;
|
||||
ULONG uMmNumberOfPhysicalPages;
|
||||
ULONG uMmLowestPhysicalPage;
|
||||
ULONG uMmHighestPhysicalPage;
|
||||
ULONG uAllocationGranularity;
|
||||
PVOID pLowestUserAddress;
|
||||
PVOID pMmHighestUserAddress;
|
||||
ULONG uKeActiveProcessors;
|
||||
BYTE bKeNumberProcessors;
|
||||
BYTE bUnknown2;
|
||||
WORD wUnknown3;
|
||||
DWORD unknown;
|
||||
ULONG KeMaximumIncrement;
|
||||
ULONG PageSize;
|
||||
ULONG MmNumberOfPhysicalPages;
|
||||
ULONG MmLowestPhysicalPage;
|
||||
ULONG MmHighestPhysicalPage;
|
||||
ULONG_PTR AllocationGranularity;
|
||||
PVOID LowestUserAddress;
|
||||
PVOID HighestUserAddress;
|
||||
ULONG_PTR ActiveProcessors;
|
||||
BYTE NumberOfProcessors;
|
||||
#else
|
||||
BYTE Reserved1[24];
|
||||
PVOID Reserved2[4];
|
||||
@ -1260,18 +1258,11 @@ typedef struct _SYSTEM_TIMEOFDAY_INFORMATION {
|
||||
/* System Information Class 0x08 */
|
||||
|
||||
typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION {
|
||||
#ifdef __WINESRC__
|
||||
LARGE_INTEGER liIdleTime;
|
||||
LARGE_INTEGER liKernelTime;
|
||||
LARGE_INTEGER liUserTime;
|
||||
DWORD dwSpare[5];
|
||||
#else
|
||||
LARGE_INTEGER IdleTime;
|
||||
LARGE_INTEGER KernelTime;
|
||||
LARGE_INTEGER UserTime;
|
||||
LARGE_INTEGER Reserved1[2];
|
||||
ULONG Reserved2;
|
||||
#endif
|
||||
} SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
|
||||
|
||||
/* System Information Class 0x0b */
|
||||
|
Loading…
x
Reference in New Issue
Block a user