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
9b0a8f5f
Commit
9b0a8f5f
authored
Apr 29, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Use RtlWow64GetProcessMachines() to get native system information.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4f8ede8e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
67 deletions
+11
-67
memory.c
dlls/kernelbase/memory.c
+10
-3
process.c
dlls/kernelbase/process.c
+1
-64
No files found.
dlls/kernelbase/memory.c
View file @
9b0a8f5f
...
...
@@ -74,14 +74,21 @@ SIZE_T WINAPI GetLargePageMinimum(void)
*/
void
WINAPI
DECLSPEC_HOTPATCH
GetNativeSystemInfo
(
SYSTEM_INFO
*
si
)
{
USHORT
current_machine
,
native_machine
;
GetSystemInfo
(
si
);
if
(
!
is_wow64
)
return
;
switch
(
si
->
u
.
s
.
wProcessorArchitecture
)
RtlWow64GetProcessMachines
(
GetCurrentProcess
(),
&
current_machine
,
&
native_machine
);
if
(
!
current_machine
)
return
;
switch
(
native_machine
)
{
case
PROCESSOR_ARCHITECTURE_
INTEL
:
case
PROCESSOR_ARCHITECTURE_
AMD64
:
si
->
u
.
s
.
wProcessorArchitecture
=
PROCESSOR_ARCHITECTURE_AMD64
;
si
->
dwProcessorType
=
PROCESSOR_AMD_X8664
;
break
;
case
PROCESSOR_ARCHITECTURE_ARM64
:
si
->
u
.
s
.
wProcessorArchitecture
=
PROCESSOR_ARCHITECTURE_ARM64
;
si
->
dwProcessorType
=
0
;
break
;
default:
FIXME
(
"Add the proper information for %d in wow64 mode
\n
"
,
si
->
u
.
s
.
wProcessorArchitecture
);
}
...
...
dlls/kernelbase/process.c
View file @
9b0a8f5f
...
...
@@ -952,70 +952,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH IsProcessorFeaturePresent ( DWORD feature )
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
IsWow64Process2
(
HANDLE
process
,
USHORT
*
machine
,
USHORT
*
native_machine
)
{
BOOL
wow64
;
SYSTEM_INFO
si
;
TRACE
(
"(%p,%p,%p)
\n
"
,
process
,
machine
,
native_machine
);
if
(
!
IsWow64Process
(
process
,
&
wow64
))
return
FALSE
;
if
(
wow64
)
{
if
(
process
!=
GetCurrentProcess
())
{
#if defined(__i386__) || defined(__x86_64__)
*
machine
=
IMAGE_FILE_MACHINE_I386
;
#else
FIXME
(
"not implemented for other process
\n
"
);
*
machine
=
IMAGE_FILE_MACHINE_UNKNOWN
;
#endif
}
else
{
IMAGE_NT_HEADERS
*
nt
;
nt
=
RtlImageNtHeader
(
NtCurrentTeb
()
->
Peb
->
ImageBaseAddress
);
*
machine
=
nt
->
FileHeader
.
Machine
;
}
if
(
!
native_machine
)
return
TRUE
;
GetNativeSystemInfo
(
&
si
);
}
else
{
*
machine
=
IMAGE_FILE_MACHINE_UNKNOWN
;
if
(
!
native_machine
)
return
TRUE
;
#ifdef _WIN64
GetSystemInfo
(
&
si
);
#else
GetNativeSystemInfo
(
&
si
);
#endif
}
switch
(
si
.
u
.
s
.
wProcessorArchitecture
)
{
case
PROCESSOR_ARCHITECTURE_INTEL
:
*
native_machine
=
IMAGE_FILE_MACHINE_I386
;
break
;
case
PROCESSOR_ARCHITECTURE_ARM
:
*
native_machine
=
IMAGE_FILE_MACHINE_ARMNT
;
break
;
case
PROCESSOR_ARCHITECTURE_AMD64
:
*
native_machine
=
IMAGE_FILE_MACHINE_AMD64
;
break
;
case
PROCESSOR_ARCHITECTURE_ARM64
:
*
native_machine
=
IMAGE_FILE_MACHINE_ARM64
;
break
;
default
:
FIXME
(
"unknown architecture %u
\n
"
,
si
.
u
.
s
.
wProcessorArchitecture
);
*
native_machine
=
IMAGE_FILE_MACHINE_UNKNOWN
;
break
;
}
return
TRUE
;
return
set_ntstatus
(
RtlWow64GetProcessMachines
(
process
,
machine
,
native_machine
));
}
...
...
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