https://bugs.winehq.org/show_bug.cgi?id=46092
Bug ID: 46092 Summary: Multiple ARM64 apps from Windows 10 SDK (10.0.17763.x) want 'kernel32.GetSystemInfo' support for 'PROCESSOR_ARCHITECTURE_ARM64' ('Unknown processor architecture c') Product: Wine Version: 3.19 Hardware: aarch64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
as it says.
Encountered while playing with some 64-bit ARM apps from Win10 SDK (running in qemuarm64 machine). Not a blocker but still might be useful for more complete aarch64 Wine support.
--- snip --- win10sdk-install/Windows Kits/10/Debuggers/arm64$ WINEDEBUG=+seh,+loaddll,+process WINEDLLOVERRIDES=dbgeng=n wine64 ./cdb.exe ... 0009:trace:loaddll:load_native_dll Loaded L"Z:\home\focht\projects\wine\win10sdk-install\Windows Kits\10\Debuggers\arm64\cdb.exe" at 0x140000000: native ... 0029:fixme:ver:GetFileVersionInfoSizeExW flags 0x2 ignored
Microsoft (R) Windows Debugger Version 10.0.17763.1 ARM64 Copyright (c) Microsoft Corporation. All rights reserved.
0029:fixme:ver:GetFileVersionInfoExW flags 0x2 ignored 0009:fixme:reg:GetSystemInfo Unknown processor architecture c 0009:fixme:reg:GetSystemInfo Unknown processor architecture c 0029:trace:loaddll:free_modref Unloaded module L"C:\windows\system32\api-ms-win-core-version-l1-1-0.dll" : builtin Failed to open \.\com1 Kernel debugger failed initialization, Win32 error 0n2 "File not found." --- snip ---
0xC = 12 -> PROCESSOR_ARCHITECTURE_ARM64
Wine source:
https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/kernel32/cpu.c#l104
--- snip --- 104 VOID WINAPI GetSystemInfo( 105 LPSYSTEM_INFO si /* [out] Destination for system information, may not be NULL */) 106 { 107 NTSTATUS nts; 108 SYSTEM_CPU_INFORMATION sci; 109 110 TRACE("si=0x%p\n", si); 111 112 if ((nts = NtQuerySystemInformation( SystemCpuInformation, &sci, sizeof(sci), NULL )) != STATUS_SUCCESS) 113 { 114 SetLastError(RtlNtStatusToDosError(nts)); 115 return; 116 } ... 153 case PROCESSOR_ARCHITECTURE_ARM: 154 switch (sci.Level) 155 { 156 case 4: si->dwProcessorType = PROCESSOR_ARM_7TDMI; break; 157 default: si->dwProcessorType = PROCESSOR_ARM920; 158 } 159 break; 160 default: 161 FIXME("Unknown processor architecture %x\n", sci.Architecture); 162 si->dwProcessorType = 0; 163 } 164 si->dwAllocationGranularity = system_info.AllocationGranularity; 165 si->wProcessorLevel = sci.Level; 166 si->wProcessorRevision = sci.Revision; 167 } --- snip ---
$ sha1sum 17763.1.180914-1434.rs5_release_WindowsSDK.iso e702b5e5f2597d01eaee1eb1be7a34b0da0b6211 17763.1.180914-1434.rs5_release_WindowsSDK.iso
$ du -sh 17763.1.180914-1434.rs5_release_WindowsSDK.iso 815M 17763.1.180914-1434.rs5_release_WindowsSDK.iso
$ wine64 --version wine-3.19-117-g4852130c82
Regards
https://bugs.winehq.org/show_bug.cgi?id=46092
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |https://software-download.m | |icrosoft.com/download/pr/17 | |763.1.180914-1434.rs5_relea | |se_WindowsSDK.iso
https://bugs.winehq.org/show_bug.cgi?id=46092
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de
https://bugs.winehq.org/show_bug.cgi?id=46092
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Multiple ARM64 apps from |Multiple ARM64 apps want |Windows 10 SDK |'kernel32.GetSystemInfo' |(10.0.17763.x) want |support for |'kernel32.GetSystemInfo' |'PROCESSOR_ARCHITECTURE_ARM |support for |64' ('Unknown processor |'PROCESSOR_ARCHITECTURE_ARM |architecture c') |64' ('Unknown processor | |architecture c') |
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello folks,
found another app that makes use of this:
'DtWinVer' - "A comprehensive OS detection Class"
http://www.naughter.com/dtwinver.html
Download:
http://www.naughter.com/download/dtwinver.zip
Interesting tidbit:
https://naughter.wordpress.com/2017/12/29/dtwinver-v2-13/
--- quote --- DtWinVer v2.13 December 29, 2017 PJ Naughter
Just to let everyone know that v2.13 of DtWinVer has been released. Updates for this version include:
Download now includes a VC 2017 solution and project files. These files now support ARM64 in addition to x86, x64 and ARM. ARM64 binaries are now included in the download Added support for detecting PROCESSOR_ARCHITECTURE_NEUTRAL, PROCESSOR_ARCHITECTURE_ARM64, PROCESSOR_ARCHITECTURE_ARM32_ON_WIN64 & PROCESSOR_ARCHITECTURE_IA32_ON_ARM64 architectures --- quote ---
--- snip --- $ file *.exe Winver32.exe: PE32 executable (GUI) Intel 80386, for MS Windows Winver32c.exe: PE32 executable (console) Intel 80386, for MS Windows Winver64.exe: PE32+ executable (GUI) x86-64, for MS Windows Winver64c.exe: PE32+ executable (console) x86-64, for MS Windows WinverARM.exe: PE32 executable (GUI) ARMv7 Thumb, for MS Windows WinverARM64.exe: PE32+ executable (GUI), for MS Windows WinverARM64c.exe: PE32+ executable (console), for MS Windows WinverARMc.exe: PE32 executable (console) ARMv7 Thumb, for MS Windows WriteVer.exe: PE32 executable (console) Intel 80386, for MS Windows
$ wine64 ./WinverARM64c.exe 0009:fixme:reg:GetSystemInfo Unknown processor architecture c 0009:fixme:reg:GetSystemInfo Unknown processor architecture c Emulated OS: Windows 10, (version 1803), (ARM64 Processor) v10.0 Build:17134 Underlying OS: Windows 10, (version 1803), (ARM64 Processor) v10.0 Build:17134.0, ProductType:0x0000001C, (64 Bit Edition), (N Edition), (Uniprocessor Free) 0009:fixme:kernelbase:AppPolicyGetProcessTerminationMethod 0xfffffffffffffffa, 0x22f990 --- snip ---
$ sha1sum dtwinver.zip b9d202ad5c44727f6829a9ca573469d746266cc8 dtwinver.zip
$ du -sh dtwinver.zip 1.5M dtwinver.zip
$ wine64 --version wine-3.20-7-ga0a7090301
Regards
https://bugs.winehq.org/show_bug.cgi?id=46092
--- Comment #2 from André H. nerv@dawncrow.de --- Main problem here is that I don't know expected values and can't guess. For ARM we have PROCESSOR_ARM* defines, but I can't find those for PROCESSOR_ARM64*
https://bugs.winehq.org/show_bug.cgi?id=46092
--- Comment #3 from Anastasius Focht focht@gmx.net --- Hello André,
--- quote --- Main problem here is that I don't know expected values and can't guess. For ARM we have PROCESSOR_ARM* defines, but I can't find those for PROCESSOR_ARM64* --- quote ---
indeed, it seems the Win10 SDK header 'winnt.h' doesn't list any ARMv8 architecture based processors. The level will be for sure 8 since it's derived from 'CPU architecture'.
--- snip --- $ cat /proc/cpuinfo processor : 0 BogoMIPS : 125.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x1 CPU part : 0xd07 CPU revision : 0 ... $ setarch linux32 cat /proc/cpuinfo processor : 0 model name : ARMv8 Processor rev 0 (v8l) BogoMIPS : 125.00 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm aes pmull sha1 sha2 crc32 CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x1 CPU part : 0xd07 CPU revision : 0 --- snip ---
It might take some time until someone has access to Win10 ARM64 machine to run a test case. Anyway, that info might not be used at all, MS states for 'dwProcessorType':
https://docs.microsoft.com/en-us/windows/desktop/api/sysinfoapi/ns-sysinfoap...
--- quote --- dwProcessorType
An obsolete member that is retained for compatibility. Use the wProcessorArchitecture, wProcessorLevel, and wProcessorRevision members to determine the type of processor. --- quote ---
Maybe we could just return zero like in PPC arch default case. Otherwise it would be misleading to have this FIXME spam as the processor architecture is actually known here.
Regards
https://bugs.winehq.org/show_bug.cgi?id=46092
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |014f9c09294dd3945dc4e943e69 | |7ae52c3f2c844 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #4 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commit https://source.winehq.org/git/wine.git/commitdiff/014f9c09294dd3945dc4e943e6...
Thanks André
--- snip --- $ wine64 ./WinverARM64c.exe Emulated OS: Windows 7 (Ultimate), (ARM64 Processor) v6.1 Build:7601 Service Pack:1 Underlying OS: Windows 7 (Ultimate), (ARM64 Processor) v6.1 Build:7601 Service Pack:1, ProductType:0x0000001C, (64 Bit Edition), (N Edition), (Uniprocessor Free) 002c:fixme:kernelbase:AppPolicyGetProcessTerminationMethod 0xfffffffffffffffa, 0x22f8c0 --- snip ---
$ wine64 --version wine-3.20-182-g915c2ae2b9
Regards
https://bugs.winehq.org/show_bug.cgi?id=46092
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.21.
https://bugs.winehq.org/show_bug.cgi?id=46092
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|https://software-download.m |https://web.archive.org/web |icrosoft.com/download/pr/17 |/20190317015617/https://sof |763.1.180914-1434.rs5_relea |tware-download.microsoft.co |se_WindowsSDK.iso |m/download/pr/17763.1.18091 | |4-1434.rs5_release_WindowsS | |DK.iso