diff --git a/repos/base-nova/include/nova/syscall-generic.h b/repos/base-nova/include/nova/syscall-generic.h
index d81158b54d..e2df2960ac 100644
--- a/repos/base-nova/include/nova/syscall-generic.h
+++ b/repos/base-nova/include/nova/syscall-generic.h
@@ -91,6 +91,7 @@ namespace Nova {
struct Mem_desc
{
enum Type {
+ HYPERVISOR_LOG = -6,
FRAMEBUFFER = -5,
ACPI_XSDT = -4,
ACPI_RSDT = -3,
diff --git a/repos/base-nova/src/core/platform.cc b/repos/base-nova/src/core/platform.cc
index 0f68086078..616f3fa30d 100644
--- a/repos/base-nova/src/core/platform.cc
+++ b/repos/base-nova/src/core/platform.cc
@@ -527,6 +527,9 @@ Platform::Platform() :
ram_alloc()->add_range(base, size);
}
+ uint64_t hyp_log = 0;
+ uint64_t hyp_log_size = 0;
+
/*
* Exclude all non-available memory from physical allocator AFTER all
* available RAM was added - otherwise the non-available memory gets not
@@ -536,6 +539,14 @@ Platform::Platform() :
for (unsigned i = 0; i < num_mem_desc; i++, mem_desc++) {
if (mem_desc->type == Hip::Mem_desc::AVAILABLE_MEMORY) continue;
+ if (verbose_boot_info)
+ log("detected res memory: ", Hex(mem_desc->addr), " - size: ",
+ Hex(mem_desc->size), " type=", (int)mem_desc->type);
+ if (mem_desc->type == Hip::Mem_desc::HYPERVISOR_LOG) {
+ hyp_log = mem_desc->addr;
+ hyp_log_size = mem_desc->size;
+ }
+
/* skip regions above 4G on 32 bit, no op on 64 bit */
if (mem_desc->addr > ~0UL) continue;
@@ -711,6 +722,11 @@ Platform::Platform() :
init_core_log( Core_log_range { core_local_addr, log_size } );
}
+ /* export hypervisor log memory */
+ if (hyp_log && hyp_log_size)
+ _rom_fs.insert(new (core_mem_alloc()) Rom_module(hyp_log, hyp_log_size,
+ "kernel_log"));
+
/* I/O port allocator (only meaningful for x86) */
_io_port_alloc.add_range(0, 0x10000);
diff --git a/repos/os/run/log_core.run b/repos/os/run/log_core.run
index 25666e783c..ea4e4fc007 100644
--- a/repos/os/run/log_core.run
+++ b/repos/os/run/log_core.run
@@ -12,11 +12,15 @@ proc log_service { } {
return ram
}
+if {[have_spec nova]} {
+ proc kernel_output { } { return "novga logmem" }
+}
+
build "core init drivers/timer server/vfs server/fs_log app/log_core"
create_boot_directory
-install_config {
+append config {
@@ -76,9 +80,28 @@ install_config {
-
-
-}
+ }
+
+append_if [have_spec nova] config {
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+
+append config {
+}
+
+install_config $config
build_boot_image "core init timer ld.lib.so vfs fs_log log_core vfs.lib.so"
diff --git a/tool/run/boot_dir/nova b/tool/run/boot_dir/nova
index 368ec90022..694b006af8 100644
--- a/tool/run/boot_dir/nova
+++ b/tool/run/boot_dir/nova
@@ -3,10 +3,10 @@ proc binary_name_core_o { } { return "core-nova.o" }
proc binary_name_timer { } { return "nova_timer_drv" }
proc kernel_files { } { return hypervisor }
-
+proc kernel_output { } { return "novga serial" }
proc run_boot_string { } {
- return "\n\r\fNOVA Microhypervisor"
+ return "\nHypervisor reports "
}
@@ -126,7 +126,7 @@ proc run_boot_dir {binaries} {
puts $fh " insmod multiboot2"
puts $fh " insmod gzio"
puts $fh " multiboot2 /boot/bender $serial_bender_opt"
- puts $fh " module2 /boot/hypervisor hypervisor iommu serial novpid novga"
+ puts $fh " module2 /boot/hypervisor hypervisor iommu novpid [kernel_output]"
puts $fh " module2 /boot/image.elf.gz image.elf"
puts $fh "}"
close $fh
@@ -148,7 +148,7 @@ proc run_boot_dir {binaries} {
#
set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"]
puts $fh " exec /boot/bender"
- puts $fh " load /boot/hypervisor iommu serial novpid novga"
+ puts $fh " load /boot/hypervisor iommu novpid [kernel_output]"
puts $fh " load /boot/image.elf"
close $fh