projects
/
reactos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[ROSLOAD]: Fix NX enabling
[reactos.git]
/
boot
/
environ
/
lib
/
misc
/
util.c
diff --git
a/boot/environ/lib/misc/util.c
b/boot/environ/lib/misc/util.c
index
d6e5459
..
18f21cc
100644
(file)
--- a/
boot/environ/lib/misc/util.c
+++ b/
boot/environ/lib/misc/util.c
@@
-904,12
+904,12
@@
BlArchGetPerformanceCounter (
)
{
#if defined(_M_IX86) || defined(_M_X64)
)
{
#if defined(_M_IX86) || defined(_M_X64)
-
INT CpuInfo[4]
;
+
CPU_INFO CpuInfo
;
/* Serialize with CPUID, if it exists */
if (Archx86IsCpuidSupported())
{
/* Serialize with CPUID, if it exists */
if (Archx86IsCpuidSupported())
{
- BlArchCpuId(0, 0, CpuInfo);
+ BlArchCpuId(0, 0,
&
CpuInfo);
}
/* Read the TSC */
}
/* Read the TSC */
@@
-924,12
+924,12
@@
VOID
BlArchCpuId (
_In_ ULONG Function,
_In_ ULONG SubFunction,
BlArchCpuId (
_In_ ULONG Function,
_In_ ULONG SubFunction,
- _Out_
INT*
Result
+ _Out_
PCPU_INFO
Result
)
{
#if defined(_M_IX86) || defined(_M_X64)
/* Use the intrinsic */
)
{
#if defined(_M_IX86) || defined(_M_X64)
/* Use the intrinsic */
- __cpuidex(
Result
, Function, SubFunction);
+ __cpuidex(
(INT*)Result->AsUINT32
, Function, SubFunction);
#endif
}
#endif
}
@@
-938,37
+938,37
@@
BlArchGetCpuVendor (
VOID
)
{
VOID
)
{
-
INT CpuInfo[4]
;
+
CPU_INFO CpuInfo
;
INT Temp;
/* Get the CPU Vendor */
INT Temp;
/* Get the CPU Vendor */
- BlArchCpuId(0, 0, CpuInfo);
- Temp = CpuInfo
[2]
;
- CpuInfo
[2] = CpuInfo[3]
;
- CpuInfo
[3]
= Temp;
+ BlArchCpuId(0, 0,
&
CpuInfo);
+ Temp = CpuInfo
.Ecx
;
+ CpuInfo
.Ecx = CpuInfo.Edx
;
+ CpuInfo
.Edx
= Temp;
/* Check against supported values */
/* Check against supported values */
- if (!strncmp((PCHAR)&CpuInfo
[1]
, "GenuineIntel", 12))
+ if (!strncmp((PCHAR)&CpuInfo
.Ebx
, "GenuineIntel", 12))
{
return CPU_INTEL;
}
{
return CPU_INTEL;
}
- if (!strncmp((PCHAR)&CpuInfo
[1]
, "AuthenticAMD", 12))
+ if (!strncmp((PCHAR)&CpuInfo
.Ebx
, "AuthenticAMD", 12))
{
return CPU_AMD;
}
{
return CPU_AMD;
}
- if (!strncmp((PCHAR)&CpuInfo
[1]
, "CentaurHauls", 12))
+ if (!strncmp((PCHAR)&CpuInfo
.Ebx
, "CentaurHauls", 12))
{
return CPU_VIA;
}
{
return CPU_VIA;
}
- if (!strncmp((PCHAR)&CpuInfo
[1]
, "CyrixInstead", 12))
+ if (!strncmp((PCHAR)&CpuInfo
.Ebx
, "CyrixInstead", 12))
{
return CPU_CYRIX;
}
{
return CPU_CYRIX;
}
- if (!strncmp((PCHAR)&CpuInfo
[1]
, "GenuineTMx86", 12))
+ if (!strncmp((PCHAR)&CpuInfo
.Ebx
, "GenuineTMx86", 12))
{
return CPU_TRANSMETA;
}
{
return CPU_TRANSMETA;
}
- if (!strncmp((PCHAR)&CpuInfo
[1]
, "RiseRiseRise", 12))
+ if (!strncmp((PCHAR)&CpuInfo
.Ebx
, "RiseRiseRise", 12))
{
return CPU_RISE;
}
{
return CPU_RISE;
}