Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
7686cba1
Commit
7686cba1
authored
Mar 24, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: One more fix for CPU information in old Wow64 mode.
parent
75ab8431
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
10 deletions
+13
-10
info.c
dlls/ntdll/tests/info.c
+0
-1
system.c
dlls/ntdll/unix/system.c
+1
-8
virtual.c
dlls/ntdll/unix/virtual.c
+12
-1
No files found.
dlls/ntdll/tests/info.c
View file @
7686cba1
...
...
@@ -322,7 +322,6 @@ static void test_query_cpu(void)
{
ok
(
sci
.
ProcessorArchitecture
==
PROCESSOR_ARCHITECTURE_INTEL
,
"ProcessorArchitecture wrong %x
\n
"
,
sci
.
ProcessorArchitecture
);
todo_wine
ok
(
sci2
.
ProcessorArchitecture
==
PROCESSOR_ARCHITECTURE_AMD64
||
sci2
.
ProcessorArchitecture
==
PROCESSOR_ARCHITECTURE_ARM64
,
"ProcessorArchitecture wrong %x
\n
"
,
sci2
.
ProcessorArchitecture
);
...
...
dlls/ntdll/unix/system.c
View file @
7686cba1
...
...
@@ -2568,14 +2568,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
}
case
SystemCpuInformation
:
/* 1 */
if
(
size
>=
(
len
=
sizeof
(
cpu_info
)))
{
SYSTEM_CPU_INFORMATION
cpu
=
cpu_info
;
if
(
is_old_wow64
()
&&
cpu
.
ProcessorArchitecture
==
PROCESSOR_ARCHITECTURE_INTEL
)
cpu
.
ProcessorArchitecture
=
PROCESSOR_ARCHITECTURE_AMD64
;
memcpy
(
info
,
&
cpu
,
len
);
}
if
(
size
>=
(
len
=
sizeof
(
cpu_info
)))
memcpy
(
info
,
&
cpu_info
,
len
);
else
ret
=
STATUS_INFO_LENGTH_MISMATCH
;
break
;
...
...
dlls/ntdll/unix/virtual.c
View file @
7686cba1
...
...
@@ -5319,10 +5319,21 @@ NTSTATUS WINAPI NtWow64WriteVirtualMemory64( HANDLE process, ULONG64 addr, const
NTSTATUS
WINAPI
NtWow64GetNativeSystemInformation
(
SYSTEM_INFORMATION_CLASS
class
,
void
*
info
,
ULONG
len
,
ULONG
*
retlen
)
{
NTSTATUS
status
;
switch
(
class
)
{
case
SystemBasicInformation
:
case
SystemCpuInformation
:
status
=
NtQuerySystemInformation
(
class
,
info
,
len
,
retlen
);
if
(
!
status
&&
is_old_wow64
())
{
SYSTEM_CPU_INFORMATION
*
cpu
=
info
;
if
(
cpu
->
ProcessorArchitecture
==
PROCESSOR_ARCHITECTURE_INTEL
)
cpu
->
ProcessorArchitecture
=
PROCESSOR_ARCHITECTURE_AMD64
;
}
return
status
;
case
SystemBasicInformation
:
case
SystemEmulationBasicInformation
:
case
SystemEmulationProcessorInformation
:
return
NtQuerySystemInformation
(
class
,
info
,
len
,
retlen
);
...
...
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