mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-06-02 17:58:00 +00:00
Wrong strcmp usage
This commit is contained in:
parent
4febfad479
commit
4fb789fbdb
14
Core/CPU.cpp
14
Core/CPU.cpp
@ -214,32 +214,32 @@ namespace CPU
|
|||||||
if (!BSP)
|
if (!BSP)
|
||||||
KPrint("UMIP is supported.");
|
KPrint("UMIP is supported.");
|
||||||
fixme("Not going to enable UMIP.");
|
fixme("Not going to enable UMIP.");
|
||||||
// cr4.UMIP = 1;
|
cr4.UMIP = 1;
|
||||||
}
|
}
|
||||||
if (rdx & x64::CPUID_FEAT_RDX_SMEP)
|
if (rdx & x64::CPUID_FEAT_RDX_SMEP)
|
||||||
{
|
{
|
||||||
if (!BSP)
|
if (!BSP)
|
||||||
KPrint("SMEP is supported.");
|
KPrint("SMEP is supported.");
|
||||||
fixme("Not going to enable SMEP.");
|
fixme("Not going to enable SMEP.");
|
||||||
// cr4.SMEP = 1;
|
cr4.SMEP = 1;
|
||||||
}
|
}
|
||||||
if (rdx & x64::CPUID_FEAT_RDX_SMAP)
|
if (rdx & x64::CPUID_FEAT_RDX_SMAP)
|
||||||
{
|
{
|
||||||
if (!BSP)
|
if (!BSP)
|
||||||
KPrint("SMAP is supported.");
|
KPrint("SMAP is supported.");
|
||||||
fixme("Not going to enable SMAP.");
|
fixme("Not going to enable SMAP.");
|
||||||
// cr4.SMAP = 1;
|
cr4.SMAP = 1;
|
||||||
}
|
}
|
||||||
if (strcmp(Hypervisor(), x86_CPUID_VENDOR_VIRTUALBOX) != 0 &&
|
if (strcmp(Hypervisor(), x86_CPUID_VENDOR_VIRTUALBOX) == 0 &&
|
||||||
strcmp(Hypervisor(), x86_CPUID_VENDOR_TCG) != 0)
|
strcmp(Hypervisor(), x86_CPUID_VENDOR_TCG) == 0)
|
||||||
x64::writecr4(cr4);
|
x64::writecr4(cr4);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!BSP)
|
if (!BSP)
|
||||||
{
|
{
|
||||||
if (strcmp(Hypervisor(), x86_CPUID_VENDOR_VIRTUALBOX) != 0)
|
if (strcmp(Hypervisor(), x86_CPUID_VENDOR_VIRTUALBOX) == 0)
|
||||||
KPrint("VirtualBox detected. Not using UMIP, SMEP & SMAP");
|
KPrint("VirtualBox detected. Not using UMIP, SMEP & SMAP");
|
||||||
else if (strcmp(Hypervisor(), x86_CPUID_VENDOR_TCG) != 0)
|
else if (strcmp(Hypervisor(), x86_CPUID_VENDOR_TCG) == 0)
|
||||||
KPrint("QEMU (TCG) detected. Not using UMIP, SMEP & SMAP");
|
KPrint("QEMU (TCG) detected. Not using UMIP, SMEP & SMAP");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user