]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/l4re-core/libloader/include/local_app_model
Update
[l4.git] / l4 / pkg / l4re-core / libloader / include / local_app_model
1 // vi:ft=cpp
2 /*
3  * (c) 2008-2009 Alexander Warg <warg@os.inf.tu-dresden.de>
4  *     economic rights: Technische Universität Dresden (Germany)
5  * This file is part of TUD:OS and distributed under the terms of the
6  * GNU Lesser General Public License 2.1.
7  * Please see the COPYING-LGPL-2.1 file for details.
8  */
9
10 #pragma once
11
12 #include <l4/re/rm>
13
14 extern char __L4_KIP_ADDR__[1];
15
16 namespace Ldr {
17 template< typename Base >
18 class Local_app_model : public Base
19 {
20 public:
21   template< typename A1, typename A2 >
22   Local_app_model(A1 const &a1, A2 const &a2) : Base(a1, a2) {}
23
24   void prog_reserve_utcb_area()
25   {}
26
27   void prog_attach_kip()
28   {
29     if (Base::prog_info()->kip == l4_addr_t(__L4_KIP_ADDR__))
30       return;
31     Base::prog_attach_ds(Base::prog_info()->kip, L4_PAGESIZE,
32                          Base::local_kip_ds(), 0, L4Re::Rm::Read_only,
33                          "attaching KIP segment");
34   }
35
36   void prog_attach_stack(typename Base::Dataspace)
37   {}
38 };
39
40
41 }