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
5fc46a25
Commit
5fc46a25
authored
Jun 22, 2001
by
Andreas Mohr
Committed by
Alexandre Julliard
Jun 22, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GetSystemInfo() Pentium 4 support.
parent
585e976f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
11 deletions
+24
-11
cpu.c
misc/cpu.c
+24
-11
No files found.
misc/cpu.c
View file @
5fc46a25
...
...
@@ -25,7 +25,7 @@ static BYTE PF[64] = {0,};
*
* Gets the current system information.
*
* On the first call it
read
s cached values, so it doesn't have to determine
* On the first call it
create
s cached values, so it doesn't have to determine
* them repeatedly. On Linux, the /proc/cpuinfo special file is used.
*
* It creates a registry subhierarchy, looking like:
...
...
@@ -36,6 +36,8 @@ static BYTE PF[64] = {0,};
*
* It also creates a cached flag array for IsProcessorFeaturePresent().
*
* No NULL ptr check for LPSYSTEM_INFO in Win9x.
*
* RETURNS
* nothing, really
*/
...
...
@@ -113,13 +115,20 @@ VOID WINAPI GetSystemInfo(
case
4
:
cachedsi
.
dwProcessorType
=
PROCESSOR_INTEL_486
;
cachedsi
.
wProcessorLevel
=
4
;
break
;
case
5
:
cachedsi
.
dwProcessorType
=
PROCESSOR_INTEL_PENTIUM
;
cachedsi
.
wProcessorLevel
=
5
;
break
;
case
6
:
cachedsi
.
dwProcessorType
=
PROCESSOR_INTEL_PENTIUM
;
case
5
:
case
6
:
/* PPro/2/3 has same info as P1 */
cachedsi
.
dwProcessorType
=
PROCESSOR_INTEL_PENTIUM
;
cachedsi
.
wProcessorLevel
=
5
;
break
;
case
1
:
/* two-figure levels */
switch
(
value
[
1
]
-
'0'
)
{
case
5
:
/* P4; FIXME: data correct ? */
cachedsi
.
dwProcessorType
=
PROCESSOR_INTEL_PENTIUM
;
cachedsi
.
wProcessorLevel
=
5
;
break
;
}
/* fall through to prev. default */
default:
FIXME
(
"unknown cpu family '%s', please report ! (-> setting to 386)
\n
"
,
value
);
break
;
}
}
...
...
@@ -141,17 +150,21 @@ VOID WINAPI GetSystemInfo(
case
4
:
cachedsi
.
dwProcessorType
=
PROCESSOR_INTEL_486
;
cachedsi
.
wProcessorLevel
=
4
;
break
;
case
5
:
cachedsi
.
dwProcessorType
=
PROCESSOR_INTEL_PENTIUM
;
cachedsi
.
wProcessorLevel
=
5
;
break
;
case
6
:
cachedsi
.
dwProcessorType
=
PROCESSOR_INTEL_PENTIUM
;
case
5
:
case
6
:
/* PPro/2/3 has same info as P1 */
cachedsi
.
dwProcessorType
=
PROCESSOR_INTEL_PENTIUM
;
cachedsi
.
wProcessorLevel
=
5
;
break
;
default:
FIXME
(
"unknown Linux 2.0 cpu family '%s', please report ! (-> setting to 386)
\n
"
,
value
);
break
;
}
}
/* set the CPU type of the current processor */
/* set the CPU type of the current processor
* FIXME: someone reported P4 as being set to
* " Intel(R) Pentium(R) 4 CPU 1500MHz"
* Do we need to do the same ?
* */
sprintf
(
buf
,
"CPU %ld"
,
cachedsi
.
dwProcessorType
);
if
(
xhkey
)
RegSetValueExA
(
xhkey
,
"Identifier"
,
0
,
REG_SZ
,
buf
,
strlen
(
buf
));
...
...
@@ -222,7 +235,7 @@ VOID WINAPI GetSystemInfo(
/***********************************************************************
* IsProcessorFeaturePresent [KERNEL32.@]
* RETURNS:
* TRUE if processorfeature present
* TRUE if processor
feature present
* FALSE otherwise
*/
BOOL
WINAPI
IsProcessorFeaturePresent
(
...
...
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