forked from xt-sys/exectos
Compare commits
3 Commits
cpuid-enha
...
ce8041754b
| Author | SHA1 | Date | |
|---|---|---|---|
|
ce8041754b
|
|||
|
c4af89946b
|
|||
|
95fecfc095
|
@@ -60,11 +60,10 @@ file(RELATIVE_PATH _PATH_PREFIX ${EXECTOS_BINARY_DIR} ${EXECTOS_SOURCE_DIR})
|
||||
add_compiler_flags(-D__RELFILE__="&__FILE__[__FILE__[0] == '.' ? sizeof \\\"${_PATH_PREFIX}\\\" - 1 : sizeof XTOS_SOURCE_DIR]")
|
||||
|
||||
# Set the virtual disk image size (in MiB)
|
||||
set_disk_image_size(32)
|
||||
set_disk_image_size(48)
|
||||
|
||||
# Build all subprojects
|
||||
add_subdirectory(boot)
|
||||
add_subdirectory(bootdata)
|
||||
add_subdirectory(drivers)
|
||||
add_subdirectory(sdk)
|
||||
add_subdirectory(xtldr)
|
||||
|
||||
22
README.md
22
README.md
@@ -57,16 +57,18 @@ ExectOS is in very early development stage, thus its requirements have been not
|
||||
design, it requires a modern EFI enabled hardware. It is not possible currently to boot ExectOS on a legacy BIOS.
|
||||
|
||||
# Source structure
|
||||
| Directory | Description |
|
||||
|-------------|----------------------------------------------------------|
|
||||
| bootdata | default configuration and data needed to boot XTOS |
|
||||
| drivers | XT native drivers source code |
|
||||
| sdk/cmake | Host toolchain configuration and build-related functions |
|
||||
| sdk/xtdk | XT Software Development Kit headers |
|
||||
| services | integral subsystems services source code |
|
||||
| subsystems | environment subsystems source code |
|
||||
| xtoskrnl | XTOS kernel source code |
|
||||
| xtldr | XTOS boot loader source code |
|
||||
| Directory | Description |
|
||||
|------------------|--------------------------------------------------------------|
|
||||
| boot/bootdata | default configuration and data needed to boot XTOS |
|
||||
| boot/bootsect | boot sector code (MBR & VBR) initializing the boot process |
|
||||
| drivers | XT native drivers source code |
|
||||
| sdk/cmake | host toolchain configuration and build-related functions |
|
||||
| sdk/firmware | firmware enabling XTOS to boot on virtual machines |
|
||||
| sdk/xtdk | XT Software Development Kit headers |
|
||||
| services | integral subsystems services source code |
|
||||
| subsystems | environment subsystems source code |
|
||||
| xtoskrnl | XTOS kernel source code |
|
||||
| xtldr | XTOS boot loader source code |
|
||||
|
||||
# Build
|
||||
XTOS can only be built using [XTchain](https://git.codingworkshop.eu.org/xt-sys/xtchain), a dedicated toolchain designed
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
add_subdirectory(bootdata)
|
||||
add_subdirectory(bootsect)
|
||||
|
||||
@@ -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