forked from xt-sys/exectos
Compare commits
1 Commits
cpuid-enha
...
whpx
Author | SHA1 | Date | |
---|---|---|---|
84402a1db4 |
@@ -45,6 +45,18 @@ if(QEMU_EMULATOR)
|
||||
-boot menu=on -d int -no-reboot -no-shutdown -serial stdio
|
||||
VERBATIM USES_TERMINAL)
|
||||
|
||||
if(WIN32)
|
||||
# This target starts up a QEMU+OVMF virtual machine using WHPX accelerator on Windows
|
||||
add_custom_target(testkvm
|
||||
DEPENDS install
|
||||
COMMAND ${QEMU_COMMAND} -name "ExectOS-${ARCH}-WHPX" -machine accel=whpx,kernel-irqchip=off
|
||||
-bios ${EXECTOS_SOURCE_DIR}/sdk/firmware/OVMF-pure-efi.fd
|
||||
-hda fat:rw:${EXECTOS_BINARY_DIR}/output/binaries
|
||||
-no-reboot -no-shutdown -serial stdio
|
||||
COMMENT "Using WHPX acceleration on Windows"
|
||||
VERBATIM USES_TERMINAL)
|
||||
|
||||
else()
|
||||
# This target starts up a QEMU+SEABIOS virtual machine using KVM accelerator
|
||||
add_custom_target(testkvm
|
||||
DEPENDS diskimg
|
||||
@@ -53,6 +65,7 @@ if(QEMU_EMULATOR)
|
||||
-hda ${EXECTOS_BINARY_DIR}/output/disk.img
|
||||
-boot menu=on -d int -no-reboot -no-shutdown -serial stdio
|
||||
VERBATIM USES_TERMINAL)
|
||||
endif()
|
||||
|
||||
# This target starts up a QEMU+SEABIOS virtual machine using TCG accelerator
|
||||
add_custom_target(testtcg
|
||||
|
BIN
sdk/firmware/OVMF-pure-efi.fd
Normal file
BIN
sdk/firmware/OVMF-pure-efi.fd
Normal file
Binary file not shown.
@@ -394,13 +394,6 @@ typedef struct _CPU_IDENTIFICATION
|
||||
USHORT Stepping;
|
||||
CPU_VENDOR Vendor;
|
||||
UCHAR VendorName[13];
|
||||
UINT32 StandardFeaturesEcx;
|
||||
UINT32 StandardFeaturesEdx;
|
||||
UINT32 ExtendedFeaturesEcx;
|
||||
UINT32 ExtendedFeaturesEdx;
|
||||
UINT32 Standard7FeaturesEbx;
|
||||
UINT32 Standard7FeaturesEcx;
|
||||
UINT32 Standard7FeaturesEdx;
|
||||
} CPU_IDENTIFICATION, *PCPU_IDENTIFICATION;
|
||||
|
||||
/* CPUID registers */
|
||||
|
@@ -359,10 +359,6 @@ typedef struct _CPU_IDENTIFICATION
|
||||
USHORT Stepping;
|
||||
CPU_VENDOR Vendor;
|
||||
UCHAR VendorName[13];
|
||||
UINT32 StandardFeaturesEcx;
|
||||
UINT32 StandardFeaturesEdx;
|
||||
UINT32 ExtendedFeaturesEcx;
|
||||
UINT32 ExtendedFeaturesEdx;
|
||||
} CPU_IDENTIFICATION, *PCPU_IDENTIFICATION;
|
||||
|
||||
/* CPUID registers */
|
||||
|
@@ -64,6 +64,9 @@ AR::ProcSup::IdentifyProcessor(VOID)
|
||||
CPUID_REGISTERS CpuRegisters;
|
||||
CPUID_SIGNATURE CpuSignature;
|
||||
|
||||
/* Not fully implemented yet */
|
||||
UNIMPLEMENTED;
|
||||
|
||||
/* Get current processor control block */
|
||||
Prcb = KE::Processor::GetCurrentProcessorControlBlock();
|
||||
|
||||
@@ -119,42 +122,7 @@ AR::ProcSup::IdentifyProcessor(VOID)
|
||||
Prcb->CpuId.Vendor = CPU_VENDOR_UNKNOWN;
|
||||
}
|
||||
|
||||
/* Get CPU standard features */
|
||||
RtlZeroMemory(&CpuRegisters, sizeof(CPUID_REGISTERS));
|
||||
CpuRegisters.Leaf = CPUID_GET_STANDARD1_FEATURES;
|
||||
CpuFunc::CpuId(&CpuRegisters);
|
||||
|
||||
/* Store CPU standard features in processor control block */
|
||||
Prcb->CpuId.StandardFeaturesEcx = CpuRegisters.Ecx;
|
||||
Prcb->CpuId.StandardFeaturesEdx = CpuRegisters.Edx;
|
||||
|
||||
/* Get CPU extended features */
|
||||
RtlZeroMemory(&CpuRegisters, sizeof(CPUID_REGISTERS));
|
||||
CpuRegisters.Leaf = 0x80000001;
|
||||
CpuFunc::CpuId(&CpuRegisters);
|
||||
|
||||
/* Store CPU extended features in processor control block */
|
||||
Prcb->CpuId.ExtendedFeaturesEcx = CpuRegisters.Ecx;
|
||||
Prcb->CpuId.ExtendedFeaturesEdx = CpuRegisters.Edx;
|
||||
|
||||
/* Get CPU leaf 7 features (subleaf 0) */
|
||||
RtlZeroMemory(&CpuRegisters, sizeof(CPUID_REGISTERS));
|
||||
CpuRegisters.Leaf = CPUID_GET_STANDARD7_FEATURES;
|
||||
CpuRegisters.SubLeaf = 0;
|
||||
CpuFunc::CpuId(&CpuRegisters);
|
||||
|
||||
/* Store CPU leaf 7 features in processor control block */
|
||||
Prcb->CpuId.Standard7FeaturesEbx = CpuRegisters.Ebx;
|
||||
Prcb->CpuId.Standard7FeaturesEcx = CpuRegisters.Ecx;
|
||||
Prcb->CpuId.Standard7FeaturesEdx = CpuRegisters.Edx;
|
||||
|
||||
/* Print CPU information */
|
||||
DebugPrint(L"CPU: Vendor %hs, Family 0x%X, Model 0x%X, Stepping 0x%X\n",
|
||||
Prcb->CpuId.VendorName,
|
||||
Prcb->CpuId.Family,
|
||||
Prcb->CpuId.Model,
|
||||
Prcb->CpuId.Stepping);
|
||||
|
||||
/* TODO: Store a list of CPU features in processor control block */
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -59,6 +59,9 @@ AR::ProcSup::IdentifyProcessor(VOID)
|
||||
CPUID_REGISTERS CpuRegisters;
|
||||
CPUID_SIGNATURE CpuSignature;
|
||||
|
||||
/* Not fully implemented yet */
|
||||
UNIMPLEMENTED;
|
||||
|
||||
/* Get current processor control block */
|
||||
Prcb = KE::Processor::GetCurrentProcessorControlBlock();
|
||||
|
||||
@@ -114,30 +117,7 @@ AR::ProcSup::IdentifyProcessor(VOID)
|
||||
Prcb->CpuId.Vendor = CPU_VENDOR_UNKNOWN;
|
||||
}
|
||||
|
||||
/* Get CPU standard features */
|
||||
RtlZeroMemory(&CpuRegisters, sizeof(CPUID_REGISTERS));
|
||||
CpuRegisters.Leaf = CPUID_GET_STANDARD1_FEATURES;
|
||||
CpuFunc::CpuId(&CpuRegisters);
|
||||
|
||||
/* Store CPU standard features in processor control block */
|
||||
Prcb->CpuId.StandardFeaturesEcx = CpuRegisters.Ecx;
|
||||
Prcb->CpuId.StandardFeaturesEdx = CpuRegisters.Edx;
|
||||
|
||||
/* Get CPU extended features */
|
||||
RtlZeroMemory(&CpuRegisters, sizeof(CPUID_REGISTERS));
|
||||
CpuRegisters.Leaf = 0x80000001;
|
||||
CpuFunc::CpuId(&CpuRegisters);
|
||||
|
||||
/* Store CPU extended features in processor control block */
|
||||
Prcb->CpuId.ExtendedFeaturesEcx = CpuRegisters.Ecx;
|
||||
Prcb->CpuId.ExtendedFeaturesEdx = CpuRegisters.Edx;
|
||||
|
||||
/* Print CPU information */
|
||||
DebugPrint(L"CPU: Vendor %hs, Family 0x%X, Model 0x%X, Stepping 0x%X\n",
|
||||
Prcb->CpuId.VendorName,
|
||||
Prcb->CpuId.Family,
|
||||
Prcb->CpuId.Model,
|
||||
Prcb->CpuId.Stepping);
|
||||
/* TODO: Store a list of CPU features in processor control block */
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user