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
c72f68ef
Commit
c72f68ef
authored
Mar 20, 2006
by
Paul Vriens
Committed by
Alexandre Julliard
Mar 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: Fix model/stepping in GetSystemInfo.
wProcessorRevision is built from model and stepping.
parent
1e27e1d5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
26 deletions
+36
-26
cpu.c
dlls/kernel/cpu.c
+36
-26
No files found.
dlls/kernel/cpu.c
View file @
c72f68ef
...
...
@@ -157,7 +157,7 @@ static void create_registry_keys( const SYSTEM_INFO *info )
/*TODO: report 64bit processors properly*/
RtlInitUnicodeString
(
&
valueW
,
IdentifierW
);
sprintf
(
id
,
"x86 Family %d Model %d Stepping %d"
,
info
->
wProcessorLevel
/*model and family are messed up*/
,
info
->
wProcessorLevel
,
info
->
wProcessorRevision
);
info
->
wProcessorLevel
,
HIBYTE
(
info
->
wProcessorRevision
),
LOBYTE
(
info
->
wProcessorRevision
)
);
RtlMultiByteToUnicodeN
(
idW
,
sizeof
(
idW
),
NULL
,
id
,
strlen
(
id
)
+
1
);
NtSetValueKey
(
hkey
,
&
valueW
,
0
,
REG_SZ
,
idW
,
(
strlenW
(
idW
)
+
1
)
*
sizeof
(
WCHAR
)
);
...
...
@@ -300,6 +300,26 @@ VOID WINAPI GetSystemInfo(
if
((
s
=
strchr
(
value
,
'\n'
)))
*
s
=
'\0'
;
if
(
!
strcasecmp
(
line
,
"processor"
))
{
/* processor number counts up... */
unsigned
int
x
;
if
(
sscanf
(
value
,
"%d"
,
&
x
))
if
(
x
+
1
>
cachedsi
.
dwNumberOfProcessors
)
cachedsi
.
dwNumberOfProcessors
=
x
+
1
;
continue
;
}
if
(
!
strcasecmp
(
line
,
"model"
))
{
/* First part of wProcessorRevision */
int
x
;
if
(
sscanf
(
value
,
"%d"
,
&
x
))
cachedsi
.
wProcessorRevision
=
cachedsi
.
wProcessorRevision
|
(
x
<<
8
);
continue
;
}
/* 2.1 method */
if
(
!
strcasecmp
(
line
,
"cpu family"
))
{
if
(
isdigit
(
value
[
0
]))
{
...
...
@@ -356,33 +376,12 @@ VOID WINAPI GetSystemInfo(
}
continue
;
}
if
(
!
strcasecmp
(
line
,
"fdiv_bug"
))
{
if
(
!
strncasecmp
(
value
,
"yes"
,
3
))
PF
[
PF_FLOATING_POINT_PRECISION_ERRATA
]
=
TRUE
;
continue
;
}
if
(
!
strcasecmp
(
line
,
"fpu"
))
{
if
(
!
strncasecmp
(
value
,
"no"
,
2
))
PF
[
PF_FLOATING_POINT_EMULATED
]
=
TRUE
;
continue
;
}
if
(
!
strcasecmp
(
line
,
"processor"
))
{
/* processor number counts up... */
unsigned
int
x
;
if
(
sscanf
(
value
,
"%d"
,
&
x
))
if
(
x
+
1
>
cachedsi
.
dwNumberOfProcessors
)
cachedsi
.
dwNumberOfProcessors
=
x
+
1
;
continue
;
}
if
(
!
strcasecmp
(
line
,
"stepping"
))
{
/* Second part of wProcessorRevision */
int
x
;
if
(
sscanf
(
value
,
"%d"
,
&
x
))
cachedsi
.
wProcessorRevision
=
x
;
cachedsi
.
wProcessorRevision
=
cachedsi
.
wProcessorRevision
|
x
;
continue
;
}
...
...
@@ -395,9 +394,20 @@ VOID WINAPI GetSystemInfo(
}
continue
;
}
if
(
!
strcasecmp
(
line
,
"fdiv_bug"
))
{
if
(
!
strncasecmp
(
value
,
"yes"
,
3
))
PF
[
PF_FLOATING_POINT_PRECISION_ERRATA
]
=
TRUE
;
continue
;
}
if
(
!
strcasecmp
(
line
,
"fpu"
))
{
if
(
!
strncasecmp
(
value
,
"no"
,
2
))
PF
[
PF_FLOATING_POINT_EMULATED
]
=
TRUE
;
continue
;
}
if
(
!
strcasecmp
(
line
,
"flags"
)
||
!
strcasecmp
(
line
,
"features"
)
)
{
!
strcasecmp
(
line
,
"features"
))
{
if
(
strstr
(
value
,
"cx8"
))
PF
[
PF_COMPARE_EXCHANGE_DOUBLE
]
=
TRUE
;
if
(
strstr
(
value
,
"mmx"
))
...
...
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