mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-08 20:05:54 +00:00
parent
630cb96a54
commit
3d6f4979c3
@ -57,7 +57,7 @@ void Block_driver::Request_cache::remove(void *pkt, void **req)
|
||||
** Block_driver::Device **
|
||||
**************************/
|
||||
|
||||
Block_driver::Device::Device(Entrypoint &ep,
|
||||
Block_driver::Device::Device(Env &env,
|
||||
Xml_node node,
|
||||
Range_allocator &alloc,
|
||||
Id_space<Device> &id_space,
|
||||
@ -66,8 +66,8 @@ Block_driver::Device::Device(Entrypoint &ep,
|
||||
:
|
||||
_vm(vm), _name(node.attribute_value("name", Name())),
|
||||
_irq(node.attribute_value("irq", ~(unsigned)0)),
|
||||
_irq_handler(ep, *this, &Device::_handle_irq),
|
||||
_session(&alloc, TX_BUF_SIZE, _name.string()),
|
||||
_irq_handler(env.ep(), *this, &Device::_handle_irq),
|
||||
_session(env, &alloc, TX_BUF_SIZE, _name.string()),
|
||||
_id_space_elem(*this, id_space, id)
|
||||
{
|
||||
if (_name == Name() || _irq == ~(unsigned)0) {
|
||||
@ -89,13 +89,13 @@ void Block_driver::Device::start_irq_handling()
|
||||
** Block_driver **
|
||||
******************/
|
||||
|
||||
Block_driver::Block_driver(Entrypoint &ep,
|
||||
Xml_node config,
|
||||
Allocator &alloc,
|
||||
Vm_base &vm) : _dev_alloc(&alloc)
|
||||
Block_driver::Block_driver(Env &env,
|
||||
Xml_node config,
|
||||
Allocator &alloc,
|
||||
Vm_base &vm) : _dev_alloc(&alloc)
|
||||
{
|
||||
config.for_each_sub_node("block", [&] (Xml_node node) {
|
||||
try { new (alloc) Device(ep, node, _dev_alloc, _devs,
|
||||
try { new (alloc) Device(env, node, _dev_alloc, _devs,
|
||||
Device::Id { _dev_count++ }, vm); }
|
||||
catch (Device::Invalid) { error("invalid block device"); }
|
||||
});
|
||||
|
@ -97,7 +97,7 @@ class Genode::Block_driver
|
||||
|
||||
struct Invalid : Exception { };
|
||||
|
||||
Device(Entrypoint &ep,
|
||||
Device(Env &env,
|
||||
Xml_node node,
|
||||
Range_allocator &alloc,
|
||||
Id_space<Device> &id_space,
|
||||
@ -151,10 +151,10 @@ class Genode::Block_driver
|
||||
|
||||
void handle_smc(Vm_base &vm);
|
||||
|
||||
Block_driver(Entrypoint &ep,
|
||||
Xml_node config,
|
||||
Allocator &alloc,
|
||||
Vm_base &vm);
|
||||
Block_driver(Env &env,
|
||||
Xml_node config,
|
||||
Allocator &alloc,
|
||||
Vm_base &vm);
|
||||
};
|
||||
|
||||
#endif /* _BLOCK_DRIVER_H_ */
|
||||
|
@ -40,7 +40,8 @@ class Genode::Serial_driver
|
||||
|
||||
void handle_smc(Vm_base &vm);
|
||||
|
||||
Serial_driver(Ram_allocator &ram) : _buf(&ram, BUF_SIZE) { }
|
||||
Serial_driver(Ram_allocator &ram, Region_map &local_rm)
|
||||
: _buf(ram, local_rm, BUF_SIZE) { }
|
||||
};
|
||||
|
||||
#endif /* _SERIAL_DRIVER_H_ */
|
||||
|
@ -55,8 +55,8 @@ class Main
|
||||
Board_revision(BOARD_QSB),
|
||||
_heap, _exception_handler };
|
||||
M4if _m4if { _env, Imx53::M4IF_BASE, Imx53::M4IF_SIZE };
|
||||
Serial_driver _serial { _env.ram() };
|
||||
Block_driver _block { _env.ep(), _config.xml(), _heap, _vm };
|
||||
Serial_driver _serial { _env.ram(), _env.rm() };
|
||||
Block_driver _block { _env, _config.xml(), _heap, _vm };
|
||||
|
||||
void _handle_smc()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user