mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Detect earlier if TCG processor is present
This commit is contained in:
parent
c56bc2c4d7
commit
14bd4e1b96
11
Kernel.cpp
11
Kernel.cpp
@ -200,10 +200,7 @@ EXTERNC NIF void Main(BootInfo *Info)
|
|||||||
CPU::InitializeFeatures(0);
|
CPU::InitializeFeatures(0);
|
||||||
|
|
||||||
if (strcmp(CPU::Hypervisor(), x86_CPUID_VENDOR_TCG) == 0)
|
if (strcmp(CPU::Hypervisor(), x86_CPUID_VENDOR_TCG) == 0)
|
||||||
{
|
KPrint("\eFFA500TCG Virtual Machine detected.");
|
||||||
KPrint("\eFFA500Debugger detected! (TCG Virtual Machine)");
|
|
||||||
DebuggerIsAttached = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
KPrint("Loading Kernel Symbols");
|
KPrint("Loading Kernel Symbols");
|
||||||
KernelSymbolTable = new SymbolResolver::Symbols((uintptr_t)Info->Kernel.FileBase);
|
KernelSymbolTable = new SymbolResolver::Symbols((uintptr_t)Info->Kernel.FileBase);
|
||||||
@ -371,12 +368,14 @@ EXTERNC __no_stack_protector NIF void Entry(BootInfo *Info)
|
|||||||
|
|
||||||
InitializeMemoryManagement(Info);
|
InitializeMemoryManagement(Info);
|
||||||
|
|
||||||
|
if (strcmp(CPU::Hypervisor(), x86_CPUID_VENDOR_TCG) == 0)
|
||||||
|
DebuggerIsAttached = true;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
/* I had to do this because KernelAllocator
|
/* I had to do this because KernelAllocator
|
||||||
* is a global constructor but we need
|
* is a global constructor but we need
|
||||||
* memory management to be initialized first.
|
* memory management to be initialized first.
|
||||||
*/
|
*/
|
||||||
#ifdef DEBUG
|
|
||||||
// Running tests
|
|
||||||
TestString();
|
TestString();
|
||||||
TestMemoryAllocation();
|
TestMemoryAllocation();
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user