The initial ROMs (program and linker) are already attached to the region map of a forked process and don't need to be obtained again from an external ROM service when the 'Child' class asks for them. For the program image, the local Noux ROM service already returned an invalid dataspace capability, but not for the linker. Instead of adding another 'magic' ROM name for the local ROM service, this commit implements an 'empty' ROM service, which returns an invalid dataspace for the initial ROMs. Fixes #2272
59 lines
1.3 KiB
C++
59 lines
1.3 KiB
C++
/*
|
|
* \brief ROM session implementation used by Noux processes for initial ROMs
|
|
* \author Christian Prochaska
|
|
* \date 2017-01-31
|
|
*
|
|
* The initial ROMs (binary and linker) are already attached in a forked
|
|
* child and don't need a new ROM dataspace. The invalid dataspace returned
|
|
* by this component is handled in 'Child::Process'.
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2017 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU General Public License version 2.
|
|
*/
|
|
|
|
#ifndef _NOUX__EMPTY_ROM_SESSION_COMPONENT_H_
|
|
#define _NOUX__EMPTY_ROM_SESSION_COMPONENT_H_
|
|
|
|
/* Genode includes */
|
|
#include <base/rpc_server.h>
|
|
|
|
namespace Noux { class Empty_rom_session_component; }
|
|
|
|
class Noux::Empty_rom_session_component : public Rpc_object<Rom_session>
|
|
{
|
|
private:
|
|
|
|
Rpc_entrypoint &_ep;
|
|
|
|
public:
|
|
|
|
Empty_rom_session_component(Rpc_entrypoint &ep)
|
|
: _ep(ep)
|
|
{
|
|
_ep.manage(this);
|
|
}
|
|
|
|
~Empty_rom_session_component()
|
|
{
|
|
_ep.dissolve(this);
|
|
}
|
|
|
|
|
|
/***************************
|
|
** ROM session interface **
|
|
***************************/
|
|
|
|
Rom_dataspace_capability dataspace()
|
|
{
|
|
return Rom_dataspace_capability();
|
|
}
|
|
|
|
void sigh(Signal_context_capability) { }
|
|
};
|
|
|
|
#endif /* _NOUX__EMPTY_ROM_SESSION_COMPONENT_H_ */
|