base: introduce platform_init function

The new 'init_platform' function performs the platform-specific
component-local low-level initialization. It allows for the
differentiation between core and regular components as well as
kernel-dependent peculiarities.

This patch introduces a consistent notion of a 'Platform'. Within core,
the 'Platform' contains the kernel-specific initialization. Outside
core, the platform sets up the interplay with the parent component. In
all cases, the platform is constructed while running on the initial
stack.

Issue #4784
This commit is contained in:
Norman Feske
2023-03-10 16:50:25 +01:00
parent 9e0ef550a8
commit 61926ebc07
29 changed files with 470 additions and 568 deletions

View File

@ -20,7 +20,7 @@
/* base-internal includes */
#include <base/internal/native_thread.h>
#include <base/internal/globals.h>
#include <base/internal/platform_env.h>
#include <base/internal/platform.h>
/**
@ -125,6 +125,7 @@ Genode::size_t Component::stack_size()
int main()
{
Genode::init_platform();
Genode::bootstrap_component();
/* never reached */
@ -558,11 +559,11 @@ Thread::~Thread()
}
/******************
** Platform_env **
******************/
/**************
** Platform **
**************/
void Platform_env::_attach_stack_area()
void Platform::_attach_stack_area()
{
/*
* Omit attaching the stack area to the local address space for hybrid