mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
Add CPU feature checking.
Introduces the cpu_features.inc table to enumerate the CPU features that j6 cares about. Features in this table marked CPU_FEATURE_REQ are considered required, and the boot process will log an error and halt when any of these features are not supported. This should save me from banging my head against the wall like I did last night with the missing pdpe1gb feature.
This commit is contained in:
@@ -78,6 +78,9 @@ kernel_main(kernel_args *header)
|
||||
log::debug(logs::boot, "ACPI root table is at: %016lx", header->acpi_table);
|
||||
log::debug(logs::boot, "Runtime service is at: %016lx", header->runtime);
|
||||
|
||||
cpu_id cpu;
|
||||
cpu.validate();
|
||||
|
||||
initrd::disk ird(header->initrd, heap);
|
||||
log::info(logs::boot, "initrd loaded with %d files.", ird.files().count());
|
||||
for (auto &f : ird.files())
|
||||
@@ -94,11 +97,6 @@ kernel_main(kernel_args *header)
|
||||
interrupts_enable();
|
||||
|
||||
/*
|
||||
cpu_id cpu;
|
||||
log::info(logs::boot, "CPU Vendor: %s", cpu.vendor_id());
|
||||
log::info(logs::boot, "CPU Family %x Model %x Stepping %x",
|
||||
cpu.family(), cpu.model(), cpu.stepping());
|
||||
|
||||
auto r = cpu.get(0x15);
|
||||
log::info(logs::boot, "CPU Crystal: %dHz", r.ecx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user