]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/kern/arm/kmem_space.cpp
update
[l4.git] / kernel / fiasco / src / kern / arm / kmem_space.cpp
1 INTERFACE [arm]:
2
3 #include "kmem.h"
4
5 class Page_table;
6
7 class Kmem_space : public Kmem
8 {
9 public:
10   static void init();
11   static void init_hw();
12   static Page_table *kdir();
13
14 private:
15   static Page_table *_kdir;
16 };
17
18 //---------------------------------------------------------------------------
19 IMPLEMENTATION [arm]:
20
21 #include <cassert>
22 #include <panic.h>
23
24 #include "console.h"
25 #include "pagetable.h"
26 #include "kmem.h"
27 #include "kip_init.h"
28 #include "mem_unit.h"
29
30 #include <cstdio>
31
32 char kernel_page_directory[sizeof(Page_table)] __attribute__((aligned(0x4000)));
33
34 Page_table *Kmem_space::_kdir = (Page_table*)&kernel_page_directory;
35
36 IMPLEMENT inline
37 Page_table *Kmem_space::kdir()
38 { return _kdir; }
39
40 // initialze the kernel space (page table)
41 IMPLEMENT
42 void Kmem_space::init()
43 {
44   Page_table::init();
45
46   Mem_unit::clean_vdcache();
47 }
48