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
3d6313c9
Commit
3d6313c9
authored
Nov 03, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Return more correct information for SystemBasicInformation and GetSystemInfo.
parent
4ee2d9d8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
18 deletions
+29
-18
cpu.c
dlls/kernel32/cpu.c
+8
-7
nt.c
dlls/ntdll/nt.c
+1
-11
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+1
-0
virtual.c
dlls/ntdll/virtual.c
+19
-0
No files found.
dlls/kernel32/cpu.c
View file @
3d6313c9
...
...
@@ -367,6 +367,7 @@ VOID WINAPI GetSystemInfo(
{
static
int
cache
=
0
;
static
SYSTEM_INFO
cachedsi
;
SYSTEM_BASIC_INFORMATION
sbi
;
TRACE
(
"si=0x%p
\n
"
,
si
);
if
(
cache
)
{
...
...
@@ -375,19 +376,19 @@ 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
;
/* choose sensible defaults ...
* FIXME: perhaps overridable with precompiler flags?
*/
cachedsi
.
u
.
s
.
wProcessorArchitecture
=
PROCESSOR_ARCHITECTURE_INTEL
;
cachedsi
.
dwPageSize
=
getpagesize
();
/* FIXME: the two entries below should be computed somehow... */
cachedsi
.
lpMinimumApplicationAddress
=
(
void
*
)
0x00010000
;
cachedsi
.
lpMaximumApplicationAddress
=
(
void
*
)
0x7FFEFFFF
;
cachedsi
.
dwActiveProcessorMask
=
0
;
cachedsi
.
dwNumberOfProcessors
=
1
;
cachedsi
.
dwProcessorType
=
PROCESSOR_INTEL_PENTIUM
;
cachedsi
.
dwAllocationGranularity
=
0x10000
;
cachedsi
.
wProcessorLevel
=
5
;
/* 586 */
cachedsi
.
wProcessorRevision
=
0
;
...
...
dlls/ntdll/nt.c
View file @
3d6313c9
...
...
@@ -708,17 +708,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
{
SYSTEM_BASIC_INFORMATION
sbi
;
sbi
.
dwUnknown1
=
0
;
sbi
.
uKeMaximumIncrement
=
0
;
sbi
.
uPageSize
=
1024
;
/* FIXME */
sbi
.
uMmNumberOfPhysicalPages
=
12345
;
/* FIXME */
sbi
.
uMmLowestPhysicalPage
=
0
;
/* FIXME */
sbi
.
uMmHighestPhysicalPage
=
12345
;
/* FIXME */
sbi
.
uAllocationGranularity
=
65536
;
/* FIXME */
sbi
.
pLowestUserAddress
=
0
;
/* FIXME */
sbi
.
pMmHighestUserAddress
=
(
void
*
)
~
0
;
/* FIXME */
sbi
.
uKeActiveProcessors
=
1
;
/* FIXME */
sbi
.
bKeNumberProcessors
=
1
;
/* FIXME */
virtual_get_system_info
(
&
sbi
);
len
=
sizeof
(
sbi
);
if
(
Length
==
len
)
...
...
dlls/ntdll/ntdll_misc.h
View file @
3d6313c9
...
...
@@ -135,6 +135,7 @@ extern NTSTATUS DIR_get_unix_cwd( char **cwd );
extern
unsigned
int
DIR_get_drives_info
(
struct
drive_info
info
[
MAX_DOS_DRIVES
]
);
/* virtual memory */
extern
void
virtual_get_system_info
(
SYSTEM_BASIC_INFORMATION
*
info
);
extern
NTSTATUS
virtual_alloc_thread_stack
(
void
*
base
,
SIZE_T
stack_size
);
extern
void
virtual_clear_thread_stack
(
void
);
extern
BOOL
virtual_handle_stack_fault
(
void
*
addr
);
...
...
dlls/ntdll/virtual.c
View file @
3d6313c9
...
...
@@ -1234,6 +1234,25 @@ void virtual_init_threading(void)
/***********************************************************************
* virtual_get_system_info
*/
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
;
}
/***********************************************************************
* virtual_alloc_thread_stack
*/
NTSTATUS
virtual_alloc_thread_stack
(
void
*
base
,
SIZE_T
size
)
...
...
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