From aa72d2fa49af3f721c7589df84c9f97fa1d1045e Mon Sep 17 00:00:00 2001 From: guillaume didier Date: Mon, 17 Feb 2020 13:36:20 +0100 Subject: [PATCH] Changes to the main --- src/main.rs | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 40426dd..5bda228 100644 --- a/src/main.rs +++ b/src/main.rs @@ -39,7 +39,7 @@ entry_point!(kernel_main); // Kernel entry point fn kernel_main(boot_info: &'static BootInfo) -> ! { - // TODO: Take care of cpuid stuff and set-up all floating point exetnsions + // TODO: Take care of cpuid stuff and set-up all floating point extensions // TODO: We may also need to enable debug registers ? println!("Hello Blue Frog"); @@ -92,13 +92,34 @@ fn kernel_main(boot_info: &'static BootInfo) -> ! { cache_utils::prefetcher::prefetcher_status() ); - // serial_print!("Input a character: "); + // Calibration + // disable pretechers + // Calibrate hit / miss rdtsc threshold + // evaluate cflush hit / miss threshold ? + // enable prefetcher + // do the same - // let c = { polling_serial::SERIAL1.lock().read() }; + // access the page + // for i from 1 to 10 + // with prefetcher disabled and then enabled + // repeat a few time + // access i consectutive cache line with timing + // average / plot the times + + // plot any difference + + // Calibration probably deserves some kind of helper function in cache_util + // This may be tricky to do in a generic way without adding some fixed noise ? + + // Old stuff below + + /* serial_print!("Input a character: "); + + let c = { polling_serial::SERIAL1.lock().read() }; + + serial_println!("\nYoutyped '{:x}'", c); - // serial_println!("\nYoutyped '{:x}'", c); - /* serial_println!("Preparing nasty fault..."); unsafe { *(0xdead_beef as *mut u64) = 42;