Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
2be006e4
Commit
2be006e4
authored
Aug 27, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix a couple of system information structures for 64-bit.
parent
b8ae3f07
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
48 deletions
+39
-48
cpu.c
dlls/kernel32/cpu.c
+5
-5
nt.c
dlls/ntdll/nt.c
+12
-12
virtual.c
dlls/ntdll/virtual.c
+11
-11
winternl.h
include/winternl.h
+11
-20
No files found.
dlls/kernel32/cpu.c
View file @
2be006e4
...
...
@@ -379,11 +379,11 @@ VOID WINAPI GetSystemInfo(
memset
(
PF
,
0
,
sizeof
(
PF
));
NtQuerySystemInformation
(
SystemBasicInformation
,
&
sbi
,
sizeof
(
sbi
),
NULL
);
cachedsi
.
dwPageSize
=
sbi
.
u
PageSize
;
cachedsi
.
lpMinimumApplicationAddress
=
sbi
.
p
LowestUserAddress
;
cachedsi
.
lpMaximumApplicationAddress
=
sbi
.
pMm
HighestUserAddress
;
cachedsi
.
dwNumberOfProcessors
=
sbi
.
uKe
ActiveProcessors
;
cachedsi
.
dwAllocationGranularity
=
sbi
.
u
AllocationGranularity
;
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?
...
...
dlls/ntdll/nt.c
View file @
2be006e4
...
...
@@ -1038,9 +1038,9 @@ NTSTATUS WINAPI NtQuerySystemInformation(
{
sppi
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
sizeof
(
SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
));
sppi
->
li
IdleTime
.
QuadPart
=
idle
;
sppi
->
li
KernelTime
.
QuadPart
=
sys
;
sppi
->
li
UserTime
.
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
->
li
IdleTime
.
QuadPart
=
idle
;
sppi
->
li
KernelTime
.
QuadPart
=
sys
;
sppi
->
li
UserTime
.
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
].
li
IdleTime
.
QuadPart
=
idle
;
sppi
[
cpus
].
li
KernelTime
.
QuadPart
=
sys
;
sppi
[
cpus
].
li
UserTime
.
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
->
li
KernelTime
.
QuadPart
=
1
*
i
;
sppi
->
li
UserTime
.
QuadPart
=
2
*
i
;
sppi
->
li
IdleTime
.
QuadPart
=
3
*
i
;
sppi
->
KernelTime
.
QuadPart
=
1
*
i
;
sppi
->
UserTime
.
QuadPart
=
2
*
i
;
sppi
->
IdleTime
.
QuadPart
=
3
*
i
;
i
++
;
}
...
...
dlls/ntdll/virtual.c
View file @
2be006e4
...
...
@@ -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
->
u
MmLowestPhysicalPage
;
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
->
uKeActive
Processors
;
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
->
NumberOf
Processors
;
}
...
...
include/winternl.h
View file @
2be006e4
...
...
@@ -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 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment