2 * (c) 2010 Alexander Warg <warg@os.inf.tu-dresden.de>
3 * economic rights: Technische Universität Dresden (Germany)
5 * This file is part of TUD:OS and distributed under the terms of the
6 * GNU General Public License 2.
7 * Please see the COPYING-GPL-2 file for details.
11 #include <l4/cxx/avl_set>
12 #include <l4/cxx/ipc_server>
14 #include <l4/vbus/vbus_types.h>
21 class System_bus : public Device, public Dev_feature, public L4::Server_object
27 // dispatch for the server object
28 int dispatch(l4_umword_t obj, L4::Ipc_iostream &ios);
29 int dispatch(l4_umword_t, l4_uint32_t func, L4::Ipc_iostream &ios);
30 bool match_hw_feature(Hw::Dev_feature const *) const { return false; }
33 int request_resource(L4::Ipc_iostream &ios);
34 int request_iomem(L4::Ipc_iostream &ios);
37 bool resource_allocated(Resource const *) const;
39 void dump_resources() const;
44 bool operator () (Adr_resource const *a, Adr_resource const *b) const
46 if (a->type() == b->type())
47 return a->_data().end() < b->_data().start();
48 return a->type() < b->type();
51 //typedef std::set<Adr_resource*, Res_cmp> Resource_set;
54 typedef cxx::Avl_set<Adr_resource*, Res_cmp> Resource_set;
56 Resource_set const *resource_set() const { return &_resources; }
57 Resource_set *resource_set() { return &_resources; }
60 Resource_set _resources;