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
e3e0c3a9
Commit
e3e0c3a9
authored
Mar 14, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineboot: Use the SystemProcessorBrandString query instead of cpuid.
parent
c44e58c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
22 deletions
+6
-22
wineboot.c
programs/wineboot/wineboot.c
+6
-22
No files found.
programs/wineboot/wineboot.c
View file @
e3e0c3a9
...
...
@@ -386,29 +386,10 @@ static void get_vendorid( WCHAR *buf )
regs_to_str
(
regs
+
1
,
12
,
buf
);
}
static
void
get_namestring
(
WCHAR
*
buf
)
{
int
regs
[
4
]
=
{
0
,
0
,
0
,
0
};
int
i
;
__cpuid
(
regs
,
0x80000000
);
if
(
regs
[
0
]
>=
0x80000004
)
{
__cpuid
(
regs
,
0x80000002
);
regs_to_str
(
regs
,
16
,
buf
);
__cpuid
(
regs
,
0x80000003
);
regs_to_str
(
regs
,
16
,
buf
+
16
);
__cpuid
(
regs
,
0x80000004
);
regs_to_str
(
regs
,
16
,
buf
+
32
);
}
for
(
i
=
lstrlenW
(
buf
)
-
1
;
i
>=
0
&&
buf
[
i
]
==
' '
;
i
--
)
buf
[
i
]
=
0
;
}
#else
/* __i386__ || __x86_64__ */
static
void
get_identifier
(
WCHAR
*
buf
,
size_t
size
,
const
WCHAR
*
arch
)
{
}
static
void
get_vendorid
(
WCHAR
*
buf
)
{
}
static
void
get_namestring
(
WCHAR
*
buf
)
{
}
#endif
/* __i386__ || __x86_64__ */
...
...
@@ -653,11 +634,13 @@ static void create_hardware_registry_keys(void)
SYSTEM_CPU_INFORMATION
sci
;
PROCESSOR_POWER_INFORMATION
*
power_info
;
ULONG
sizeof_power_info
=
sizeof
(
PROCESSOR_POWER_INFORMATION
)
*
NtCurrentTeb
()
->
Peb
->
NumberOfProcessors
;
WCHAR
id
[
60
],
namestr
[
49
],
vendorid
[
13
];
ULONG
name_buffer
[
16
];
WCHAR
id
[
60
],
vendorid
[
13
];
get_namestring
(
namestr
);
get_vendorid
(
vendorid
);
NtQuerySystemInformation
(
SystemCpuInformation
,
&
sci
,
sizeof
(
sci
),
NULL
);
if
(
NtQuerySystemInformation
(
SystemProcessorBrandString
,
name_buffer
,
sizeof
(
name_buffer
),
NULL
))
name_buffer
[
0
]
=
0
;
power_info
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof_power_info
);
if
(
power_info
==
NULL
)
...
...
@@ -724,7 +707,8 @@ static void create_hardware_registry_keys(void)
RegSetValueExW
(
hkey
,
L"FeatureSet"
,
0
,
REG_DWORD
,
(
BYTE
*
)
&
sci
.
ProcessorFeatureBits
,
sizeof
(
DWORD
)
);
set_reg_value
(
hkey
,
L"Identifier"
,
id
);
/* TODO: report ARM properly */
set_reg_value
(
hkey
,
L"ProcessorNameString"
,
namestr
);
RegSetValueExA
(
hkey
,
"ProcessorNameString"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
name_buffer
,
strlen
(
(
char
*
)
name_buffer
)
+
1
);
set_reg_value
(
hkey
,
L"VendorIdentifier"
,
vendorid
);
RegSetValueExW
(
hkey
,
L"~MHz"
,
0
,
REG_DWORD
,
(
BYTE
*
)
&
power_info
[
i
].
MaxMhz
,
sizeof
(
DWORD
)
);
RegCloseKey
(
hkey
);
...
...
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