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
ebc7ffd5
Commit
ebc7ffd5
authored
Oct 20, 2012
by
James Eder
Committed by
Alexandre Julliard
Oct 22, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add detection for Revision in get_cpuinfo().
parent
6db42d36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
nt.c
dlls/ntdll/nt.c
+14
-0
No files found.
dlls/ntdll/nt.c
View file @
ebc7ffd5
...
...
@@ -910,6 +910,11 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
if
(
info
->
Level
==
0xf
)
/* AMD says to add the extended family to the family if family is 0xf */
info
->
Level
+=
(
regs2
[
0
]
>>
20
)
&
0xff
;
/* repack model and stepping to make a "revision" */
info
->
Revision
=
((
regs2
[
0
]
>>
16
)
&
0xf
)
<<
12
;
/* extended model */
info
->
Revision
|=
((
regs2
[
0
]
>>
4
)
&
0xf
)
<<
8
;
/* model */
info
->
Revision
|=
regs2
[
0
]
&
0xf
;
/* stepping */
do_cpuid
(
0x80000000
,
regs
);
/* get vendor cpuid level */
if
(
regs
[
0
]
>=
0x80000001
)
{
...
...
@@ -925,6 +930,11 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
info
->
Level
=
((
regs2
[
0
]
>>
8
)
&
0xf
)
+
((
regs2
[
0
]
>>
20
)
&
0xff
);
/* family + extended family */
if
(
info
->
Level
==
15
)
info
->
Level
=
6
;
/* repack model and stepping to make a "revision" */
info
->
Revision
=
((
regs2
[
0
]
>>
16
)
&
0xf
)
<<
12
;
/* extended model */
info
->
Revision
|=
((
regs2
[
0
]
>>
4
)
&
0xf
)
<<
8
;
/* model */
info
->
Revision
|=
regs2
[
0
]
&
0xf
;
/* stepping */
if
(
regs2
[
3
]
&
(
1
<<
21
))
info
->
FeatureSet
|=
CPU_FEATURE_DS
;
user_shared_data
->
ProcessorFeatures
[
PF_VIRT_FIRMWARE_ENABLED
]
=
(
regs2
[
2
]
&
(
1
<<
5
))
>>
5
;
...
...
@@ -938,6 +948,10 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
else
{
info
->
Level
=
(
regs2
[
0
]
>>
8
)
&
0xf
;
/* family */
/* repack model and stepping to make a "revision" */
info
->
Revision
=
((
regs2
[
0
]
>>
4
)
&
0xf
)
<<
8
;
/* model */
info
->
Revision
|=
regs2
[
0
]
&
0xf
;
/* stepping */
}
}
}
...
...
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