From 0df358a55023df6038c4578a1342e6e720575674 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 26 Mar 2020 12:13:47 +0100 Subject: [PATCH] nova: early message on successful boot This patch fixes a regression with run/log_core introduced by 2064ffd64b41a6 nova: support multidimensional affinity space The run tool uses a log message 'run_boot_string' to detect successful boot as well as to detect unexpected reboots. This message should never be logged twice and, thus, should not be part of the core_log. The patch mentioned above moved the former run_boot_string after the core_log initialization. --- repos/base-nova/src/core/platform.cc | 8 ++++++++ repos/os/run/log_core.run | 2 -- tool/run/boot_dir/nova | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/repos/base-nova/src/core/platform.cc b/repos/base-nova/src/core/platform.cc index ea32fa6e1c..3d3919f687 100644 --- a/repos/base-nova/src/core/platform.cc +++ b/repos/base-nova/src/core/platform.cc @@ -336,6 +336,14 @@ Platform::Platform() * Now that we can access the I/O ports for comport 0, printf works... */ + /* + * Mark successful boot of hypervisor for automatic tests. This must be + * done before core_log is initialized to prevent unexpected-reboot + * detection. + */ + log("\nHypervisor ", String((char const *)&hip.signature), + " (API v", hip.api_version, ")"); + /* * remap main utcb to default utcb address * we do this that early, because Core_mem_allocator uses diff --git a/repos/os/run/log_core.run b/repos/os/run/log_core.run index fff02cd483..f86612d688 100644 --- a/repos/os/run/log_core.run +++ b/repos/os/run/log_core.run @@ -14,8 +14,6 @@ proc log_service { } { if {[have_spec nova]} { proc kernel_output { } { return "novga logmem" } - # differs because \n is missing, since kernel serial is off - proc run_boot_string { } { return "Hypervisor reports "} } build "core init timer server/vfs server/fs_log app/log_core" diff --git a/tool/run/boot_dir/nova b/tool/run/boot_dir/nova index 73f0e4d934..a230d43aeb 100644 --- a/tool/run/boot_dir/nova +++ b/tool/run/boot_dir/nova @@ -6,7 +6,7 @@ proc kernel_files { } { return hypervisor } proc kernel_output { } { return "novga serial" } proc run_boot_string { } { - return "\nHypervisor reports " + return "\nHypervisor NOVA " } proc apply_microcode { } { return false }