Commit 6bfe9926 authored by Stefan Lankes's avatar Stefan Lankes
Browse files

pass CPU frequency by the command line

parent 526700fb
......@@ -86,9 +86,12 @@ jobs:
-kernel loader/target/x86_64-unknown-hermit-loader/release/rusty-loader \
-initrd target/x86_64-unknown-hermit/release/rusty_demo
- name: Build minimal profile
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
cargo clean
cargo build --no-default-features --release -p hello_world
- name: Test minimal profile
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
qemu-system-x86_64 -M microvm,x-option-roms=off,pit=off,pic=off,rtc=on -global virtio-mmio.force-legacy=on -nodefaults -no-user-config -display none -smp 1 -m 64M -serial stdio -kernel loader/target/x86_64-unknown-hermit-loader/release/rusty-loader -initrd target/x86_64-unknown-hermit/release/hello_world -cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr -device isa-debug-exit,iobase=0xf4,iosize=0x04
FREQ=`grep 'cpu MHz' /proc/cpuinfo | head -1 | awk -F: '{print $2/1024}'`
qemu-system-x86_64 -M microvm,x-option-roms=off,pit=off,pic=off,rtc=on -global virtio-mmio.force-legacy=on -nodefaults -no-user-config -display none -smp 1 -m 64M -serial stdio -kernel loader/target/x86_64-unknown-hermit-loader/release/rusty-loader -initrd target/x86_64-unknown-hermit/release/hello_world -cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr -device isa-debug-exit,iobase=0xf4,iosize=0x04 -append "-freq $FREQ"
......@@ -425,7 +425,7 @@ impl CpuFrequency {
.or_else(|_e| self.detect_from_cpuid_tsc_info(&cpuid))
.or_else(|_e| self.detect_from_cpuid_hypervisor_info(&cpuid))
.or_else(|_e| self.detect_from_hypervisor())
//.or_else(|_e| self.detect_from_cmdline())
.or_else(|_e| self.detect_from_cmdline())
.or_else(|_e| self.detect_from_cpuid_brand_string(&cpuid))
.or_else(|_e| self.measure_frequency())
.expect("Could not determine the processor frequency");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment