1// vi:set ft=cpp: -*- Mode: C++ -*-
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
14extern char __L4_KIP_ADDR__[1];
15
16namespace Ldr {
17template< typename Base >
18class Local_app_model : public Base
19{
20public:
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,
33                         L4Re::Rm::F::RX,
34                         "attaching KIP segment");
35  }
36
37  void prog_attach_stack(typename Base::Dataspace)
38  {}
39};
40
41
42}
43