mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-20 16:10:29 +00:00
core: generic ROM module initialization
For most base platforms (except linux and sel4), the initialization of boot modules is the same. Thus, merge this default implementation in the new unit base/src/core/platform_rom_modules.cc. Ref #2490
This commit is contained in:
committed by
Christian Helmuth
parent
abc80b7782
commit
23f35370a2
32
repos/base/src/core/platform_rom_modules.cc
Normal file
32
repos/base/src/core/platform_rom_modules.cc
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* \brief Default implementation of the ROM modules initialization
|
||||
* \author Martin Stein
|
||||
* \date 2017-08-17
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2017 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* core includes */
|
||||
#include <boot_modules.h>
|
||||
#include <platform.h>
|
||||
|
||||
using namespace Genode;
|
||||
|
||||
|
||||
void Platform::_init_rom_modules()
|
||||
{
|
||||
/* add boot modules to ROM FS */
|
||||
Boot_modules_header *header = &_boot_modules_headers_begin;
|
||||
for (; header < &_boot_modules_headers_end; header++) {
|
||||
|
||||
Rom_module *rom_module = new (core_mem_alloc())
|
||||
Rom_module(_rom_module_phys(header->base), header->size,
|
||||
(const char*)header->name);
|
||||
_rom_fs.insert(rom_module);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user