Add remote_rom proxy component

Fixes #20
This commit is contained in:
Johannes Schlatow
2016-07-05 11:51:45 +02:00
committed by Norman Feske
parent 04c42f34bc
commit 2687de2376
17 changed files with 1441 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
/*
* \brief Backend interface used by the Remote_rom client and server
* \author Johannes Schlatow
* \date 2016-02-17
*/
/*
* Copyright (C) 2016 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 __INCLUDE__REMOTE_ROM__BACKEND_BASE_H_
#define __INCLUDE__REMOTE_ROM__BACKEND_BASE_H_
#include <rom_forwarder.h>
#include <rom_receiver.h>
namespace Remote_rom {
struct Backend_server_base;
struct Backend_client_base;
class Exception : public ::Genode::Exception { };
Backend_server_base &backend_init_server();
Backend_client_base &backend_init_client();
};
struct Remote_rom::Backend_server_base
{
virtual void send_update() = 0;
virtual void register_forwarder(Rom_forwarder_base *forwarder) = 0;
};
struct Remote_rom::Backend_client_base
{
virtual void register_receiver(Rom_receiver_base *receiver) = 0;
};
#endif

View File

@@ -0,0 +1,31 @@
/*
* \brief Interface used by the backend to transfer ROM content to the remote clients.
* \author Johannes Schlatow
* \date 2016-02-17
*/
/*
* Copyright (C) 2016 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 __INCLUDE__REMOTE_ROM__ROM_FORWARDER_H_
#define __INCLUDE__REMOTE_ROM__ROM_FORWARDER_H_
#include <base/stdint.h>
namespace Remote_rom {
using Genode::size_t;
struct Rom_forwarder_base;
}
struct Remote_rom::Rom_forwarder_base
{
virtual const char *module_name() const = 0;
virtual size_t content_size() const = 0;
virtual size_t transfer_content(char *dst, size_t dst_len, size_t offset=0) const = 0;
};
#endif

View File

@@ -0,0 +1,31 @@
/*
* \brief Interface used by the backend to write the ROM data received from the remote server
* \author Johannes Schlatow
* \date 2016-02-18
*/
/*
* Copyright (C) 2016 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 __INCLUDE__REMOTE_ROM__ROM_RECEIVER_H_
#define __INCLUDE__REMOTE_ROM__ROM_RECEIVER_H_
#include <base/stdint.h>
namespace Remote_rom {
using Genode::size_t;
struct Rom_receiver_base;
}
struct Remote_rom::Rom_receiver_base
{
virtual const char *module_name() const = 0;
virtual char* start_new_content(size_t len) = 0;
virtual void commit_new_content(bool abort=false) = 0;
};
#endif