1 | /* |
---|
2 | * hal_gpt.c - implementation of the Generic Page Table API for TSAR-MIPS32 |
---|
3 | * |
---|
4 | * Author Alain Greiner (2016) |
---|
5 | * |
---|
6 | * Copyright (c) UPMC Sorbonne Universites |
---|
7 | * |
---|
8 | * This file is part of ALMOS-MKH. |
---|
9 | * |
---|
10 | * ALMOS-MKH.is free software; you can redistribute it and/or modify it |
---|
11 | * under the terms of the GNU General Public License as published by |
---|
12 | * the Free Software Foundation; version 2.0 of the License. |
---|
13 | * |
---|
14 | * ALMOS-MKH.is distributed in the hope that it will be useful, but |
---|
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
17 | * General Public License for more details. |
---|
18 | * |
---|
19 | * You should have received a copy of the GNU General Public License |
---|
20 | * along with ALMOS-MKH.; if not, write to the Free Software Foundation, |
---|
21 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
22 | */ |
---|
23 | |
---|
24 | #include <hal_types.h> |
---|
25 | #include <hal_gpt.h> |
---|
26 | #include <hal_special.h> |
---|
27 | #include <printk.h> |
---|
28 | #include <bits.h> |
---|
29 | #include <process.h> |
---|
30 | #include <kmem.h> |
---|
31 | #include <thread.h> |
---|
32 | #include <cluster.h> |
---|
33 | #include <ppm.h> |
---|
34 | #include <page.h> |
---|
35 | |
---|
36 | /**************************************************************************************** |
---|
37 | * These global variables defines the masks for the Generic Page Table Entry attributes, |
---|
38 | * and must be defined in all GPT implementation. |
---|
39 | ***************************************************************************************/ |
---|
40 | |
---|
41 | uint32_t GPT_MAPPED; |
---|
42 | uint32_t GPT_SMALL; |
---|
43 | uint32_t GPT_READABLE; |
---|
44 | uint32_t GPT_WRITABLE; |
---|
45 | uint32_t GPT_EXECUTABLE; |
---|
46 | uint32_t GPT_CACHABLE; |
---|
47 | uint32_t GPT_USER; |
---|
48 | uint32_t GPT_DIRTY; |
---|
49 | uint32_t GPT_ACCESSED; |
---|
50 | uint32_t GPT_GLOBAL; |
---|
51 | uint32_t GPT_COW; |
---|
52 | uint32_t GPT_SWAP; |
---|
53 | uint32_t GPT_LOCKED; |
---|
54 | |
---|
55 | error_t hal_gpt_create( gpt_t * gpt ) |
---|
56 | { |
---|
57 | return 0; |
---|
58 | } |
---|
59 | |
---|
60 | void hal_gpt_destroy( gpt_t * gpt ) |
---|
61 | { |
---|
62 | |
---|
63 | } |
---|
64 | |
---|
65 | void hal_gpt_print( gpt_t * gpt ) |
---|
66 | { |
---|
67 | |
---|
68 | } |
---|
69 | |
---|
70 | error_t hal_gpt_set_pte( gpt_t * gpt, |
---|
71 | vpn_t vpn, |
---|
72 | ppn_t ppn, |
---|
73 | uint32_t attr ) |
---|
74 | { |
---|
75 | return 0; |
---|
76 | } |
---|
77 | |
---|
78 | void hal_gpt_get_pte( gpt_t * gpt, |
---|
79 | vpn_t vpn, |
---|
80 | uint32_t * attr, |
---|
81 | ppn_t * ppn ) |
---|
82 | { |
---|
83 | |
---|
84 | } |
---|
85 | |
---|
86 | void hal_gpt_reset_pte( gpt_t * gpt, |
---|
87 | vpn_t vpn ) |
---|
88 | { |
---|
89 | |
---|
90 | } |
---|
91 | |
---|
92 | error_t hal_gpt_lock_pte( gpt_t * gpt, |
---|
93 | vpn_t vpn ) |
---|
94 | { |
---|
95 | return 0; |
---|
96 | } |
---|
97 | |
---|
98 | error_t hal_gpt_unlock_pte( gpt_t * gpt, |
---|
99 | vpn_t vpn ) |
---|
100 | { |
---|
101 | return 0; |
---|
102 | } |
---|
103 | |
---|
104 | error_t hal_gpt_copy( gpt_t * dst_gpt, |
---|
105 | gpt_t * src_gpt, |
---|
106 | bool_t cow ) |
---|
107 | { |
---|
108 | return 0; |
---|
109 | } |
---|
110 | |
---|