wow64: Allow the CPU backend to override CPU information.

This commit is contained in:
Alexandre Julliard 2023-03-22 13:20:00 +01:00
parent ccd9640493
commit d41117b61e
3 changed files with 6 additions and 2 deletions

View file

@ -110,7 +110,7 @@ static void (WINAPI *pBTCpuSimulate)(void);
static NTSTATUS (WINAPI *pBTCpuResetToConsistentState)( EXCEPTION_POINTERS * );
static void * (WINAPI *p__wine_get_unix_opcode)(void);
static void * (WINAPI *pKiRaiseUserExceptionDispatcher)(void);
void (WINAPI *pBTCpuUpdateProcessorInformation)( SYSTEM_CPU_INFORMATION * ) = NULL;
void *dummy = RtlUnwind;
@ -842,6 +842,7 @@ static DWORD WINAPI process_init( RTL_RUN_ONCE *once, void *param, void **contex
GET_PTR( BTCpuResetToConsistentState );
GET_PTR( BTCpuSetContext );
GET_PTR( BTCpuSimulate );
GET_PTR( BTCpuUpdateProcessorInformation );
GET_PTR( __wine_get_unix_opcode );
module = load_64bit_module( L"wow64win.dll" );

View file

@ -337,7 +337,9 @@ NTSTATUS WINAPI wow64_NtQuerySystemInformation( UINT *args )
case SystemCpuInformation: /* SYSTEM_CPU_INFORMATION */
case SystemEmulationProcessorInformation: /* SYSTEM_CPU_INFORMATION */
return NtQuerySystemInformation( SystemEmulationProcessorInformation, ptr, len, retlen );
status = NtQuerySystemInformation( SystemEmulationProcessorInformation, ptr, len, retlen );
if (!status && pBTCpuUpdateProcessorInformation) pBTCpuUpdateProcessorInformation( ptr );
return status;
case SystemBasicInformation: /* SYSTEM_BASIC_INFORMATION */
case SystemEmulationBasicInformation: /* SYSTEM_BASIC_INFORMATION */

View file

@ -38,6 +38,7 @@ extern ULONG_PTR args_alignment DECLSPEC_HIDDEN;
extern ULONG_PTR highest_user_address DECLSPEC_HIDDEN;
extern ULONG_PTR default_zero_bits DECLSPEC_HIDDEN;
extern SYSTEM_DLL_INIT_BLOCK *pLdrSystemDllInitBlock DECLSPEC_HIDDEN;
extern void (WINAPI *pBTCpuUpdateProcessorInformation)( SYSTEM_CPU_INFORMATION * ) DECLSPEC_HIDDEN;
struct object_attr64
{