qemu: use -cpu max

This commit is contained in:
Mark Poliakov 2024-11-05 19:32:24 +02:00
parent 968ce321da
commit 32677721f9
3 changed files with 6 additions and 2 deletions

View File

@ -24,7 +24,7 @@ use crate::{
};
unsafe fn pre_init_mmu() {
if !ID_AA64MMFR0_EL1.matches_all(ID_AA64MMFR0_EL1::TGran4::Supported) {
if ID_AA64MMFR0_EL1.matches_all(ID_AA64MMFR0_EL1::TGran4::NotSupported) {
// TODO early panic
todo!();
}

View File

@ -10,6 +10,7 @@ pub enum Machine {
#[derive(Debug)]
pub enum Cpu {
CortexA57,
Max,
}
#[derive(Debug)]
@ -45,6 +46,9 @@ impl IntoArgs for Cpu {
Self::CortexA57 => {
command.arg("cortex-a57");
}
Self::Max => {
command.arg("max");
}
}
}
}

View File

@ -134,7 +134,7 @@ fn run_aarch64(
qemu.override_qemu(qemu_bin);
}
qemu.with_serial(QemuSerialTarget::MonStdio)
.with_cpu(aarch64::Cpu::CortexA57)
.with_cpu(aarch64::Cpu::Max)
.with_smp(config.machine.smp)
.with_machine(aarch64::Machine::Virt { virtualize: true })
.with_boot_image(aarch64::Image::Kernel {