mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 10:46:25 +00:00
base: add platform_info to microkernel platforms
Add to older platforms also the info ROM to avoid confusion/red messages. Issue #4016
This commit is contained in:
parent
509e5aa776
commit
933de21339
@ -16,6 +16,7 @@
|
||||
#include <base/allocator_avl.h>
|
||||
#include <base/sleep.h>
|
||||
#include <util/misc_math.h>
|
||||
#include <util/xml_generator.h>
|
||||
|
||||
/* base-internal includes */
|
||||
#include <base/internal/crt0.h>
|
||||
@ -466,6 +467,29 @@ Platform::Platform()
|
||||
|
||||
init_core_log(Core_log_range { core_local_addr, log_size } );
|
||||
}
|
||||
|
||||
/* export platform specific infos */
|
||||
{
|
||||
void * phys_ptr = nullptr;
|
||||
size_t const size = 1 << get_page_size_log2();
|
||||
|
||||
if (ram_alloc().alloc_aligned(size, &phys_ptr,
|
||||
get_page_size_log2()).ok()) {
|
||||
addr_t const phys_addr = reinterpret_cast<addr_t>(phys_ptr);
|
||||
addr_t const core_local_addr = phys_addr;
|
||||
|
||||
region_alloc().remove_range(core_local_addr, size);
|
||||
|
||||
Genode::Xml_generator xml(reinterpret_cast<char *>(core_local_addr),
|
||||
size, "platform_info", [&] ()
|
||||
{
|
||||
xml.node("kernel", [&] () { xml.attribute("name", "fiasco"); });
|
||||
});
|
||||
|
||||
_rom_fs.insert(new (core_mem_alloc()) Rom_module(phys_addr, size,
|
||||
"platform_info"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <base/allocator_avl.h>
|
||||
#include <base/sleep.h>
|
||||
#include <util/misc_math.h>
|
||||
#include <util/xml_generator.h>
|
||||
|
||||
/* base-internal includes */
|
||||
#include <base/internal/crt0.h>
|
||||
@ -208,6 +209,33 @@ Platform::Platform()
|
||||
|
||||
init_core_log(Core_log_range { core_local_addr, log_size } );
|
||||
}
|
||||
|
||||
/* export platform specific infos */
|
||||
{
|
||||
void * core_local_ptr = nullptr;
|
||||
void * phys_ptr = nullptr;
|
||||
unsigned const pages = 1;
|
||||
size_t const size = pages << get_page_size_log2();
|
||||
|
||||
if (ram_alloc().alloc_aligned(size, &phys_ptr, get_page_size_log2()).ok()) {
|
||||
addr_t const phys_addr = reinterpret_cast<addr_t>(phys_ptr);
|
||||
|
||||
/* let one page free after the log buffer */
|
||||
region_alloc().alloc_aligned(size, &core_local_ptr, get_page_size_log2());
|
||||
addr_t const core_local_addr = reinterpret_cast<addr_t>(core_local_ptr);
|
||||
|
||||
if (map_local(phys_addr, core_local_addr, pages)) {
|
||||
|
||||
Genode::Xml_generator xml(reinterpret_cast<char *>(core_local_addr),
|
||||
size, "platform_info", [&] () {
|
||||
xml.node("kernel", [&] () { xml.attribute("name", "okl4"); });
|
||||
});
|
||||
|
||||
_rom_fs.insert(new (core_mem_alloc()) Rom_module(phys_addr, size,
|
||||
"platform_info"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <base/sleep.h>
|
||||
#include <base/capability.h>
|
||||
#include <util/misc_math.h>
|
||||
#include <util/xml_generator.h>
|
||||
|
||||
/* base-internal includes */
|
||||
#include <base/internal/crt0.h>
|
||||
@ -626,6 +627,29 @@ Platform::Platform()
|
||||
|
||||
init_core_log(Core_log_range { core_local_addr, log_size } );
|
||||
}
|
||||
|
||||
/* export platform specific infos */
|
||||
{
|
||||
void * phys_ptr = nullptr;
|
||||
size_t const size = 1 << get_page_size_log2();
|
||||
|
||||
if (ram_alloc().alloc_aligned(size, &phys_ptr,
|
||||
get_page_size_log2()).ok()) {
|
||||
addr_t const phys_addr = reinterpret_cast<addr_t>(phys_ptr);
|
||||
addr_t const core_local_addr = phys_addr;
|
||||
|
||||
region_alloc().remove_range(core_local_addr, size);
|
||||
|
||||
Genode::Xml_generator xml(reinterpret_cast<char *>(core_local_addr),
|
||||
size, "platform_info", [&] () {
|
||||
xml.node("kernel", [&] () { xml.attribute("name", "pistachio"); });
|
||||
});
|
||||
|
||||
_rom_fs.insert(new (core_mem_alloc()) Rom_module(phys_addr, size,
|
||||
"platform_info"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -224,9 +224,6 @@ if {[get_cmd_switch --autopilot]} {
|
||||
# remove Error messages which are not fatal, mostly
|
||||
unify_output {(?n)^.*platform_drv] Error:.*ACPI table information is wrong.*$} ""
|
||||
unify_output {(?n)^.*platform_drv] Error: adjust size from.*$} ""
|
||||
unify_output {(?n)^.*platform_drv] Error: IRQ-session creation failed.*$} ""
|
||||
unify_output {(?n)^.*platform_drv] Error:.*platform_info.*$} ""
|
||||
unify_output {(?n)^.*acpi_drv] Error:.*platform_info.*$} ""
|
||||
unify_output {(?n)^.*ps2_drv] Error: no data available.*$} ""
|
||||
unify_output {(?n)^.*ps2_drv] Error: failed to read from port.*$} ""
|
||||
unify_output {(?n)^.*] Error: RAM preservation exceeds available memory.*$} ""
|
||||
|
Loading…
Reference in New Issue
Block a user