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
b5b34220
Commit
b5b34220
authored
May 21, 2015
by
André Hentschel
Committed by
Alexandre Julliard
May 22, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Parse ARM64 CPU info.
parent
48d150dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
1 deletion
+48
-1
nt.c
dlls/ntdll/nt.c
+48
-1
No files found.
dlls/ntdll/nt.c
View file @
b5b34220
...
...
@@ -1146,7 +1146,54 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
static
inline
void
get_cpuinfo
(
SYSTEM_CPU_INFORMATION
*
info
)
{
info
->
Level
=
8
;
#ifdef linux
char
line
[
512
];
char
*
s
,
*
value
;
FILE
*
f
=
fopen
(
"/proc/cpuinfo"
,
"r"
);
if
(
f
)
{
while
(
fgets
(
line
,
sizeof
(
line
),
f
)
!=
NULL
)
{
/* NOTE: the ':' is the only character we can rely on */
if
(
!
(
value
=
strchr
(
line
,
':'
)))
continue
;
/* terminate the valuename */
s
=
value
-
1
;
while
((
s
>=
line
)
&&
isspace
(
*
s
))
s
--
;
*
(
s
+
1
)
=
'\0'
;
/* and strip leading spaces from value */
value
+=
1
;
while
(
isspace
(
*
value
))
value
++
;
if
((
s
=
strchr
(
value
,
'\n'
)))
*
s
=
'\0'
;
if
(
!
strcasecmp
(
line
,
"CPU architecture"
))
{
if
(
isdigit
(
value
[
0
]))
info
->
Level
=
atoi
(
value
);
continue
;
}
if
(
!
strcasecmp
(
line
,
"CPU revision"
))
{
if
(
isdigit
(
value
[
0
]))
info
->
Revision
=
atoi
(
value
);
continue
;
}
if
(
!
strcasecmp
(
line
,
"Features"
))
{
if
(
strstr
(
value
,
"crc32"
))
user_shared_data
->
ProcessorFeatures
[
PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE
]
=
TRUE
;
if
(
strstr
(
value
,
"aes"
))
user_shared_data
->
ProcessorFeatures
[
PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE
]
=
TRUE
;
continue
;
}
}
fclose
(
f
);
}
#else
FIXME
(
"CPU Feature detection not implemented.
\n
"
);
#endif
info
->
Level
=
max
(
info
->
Level
,
8
);
user_shared_data
->
ProcessorFeatures
[
PF_ARM_V8_INSTRUCTIONS_AVAILABLE
]
=
TRUE
;
info
->
Architecture
=
PROCESSOR_ARCHITECTURE_ARM64
;
}
...
...
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