source: trunk/hal/x86_64/hal_gpt.c @ 27

Last change on this file since 27 was 25, checked in by max@…, 7 years ago

First shot of the x86_64 port. It uses Multiboot V1. Most of the HAL functions
are empty, and several TSAR-specific files and comments remain; they will be
cleaned up later. The Makefile and LD script will come in another commit.

File size: 2.5 KB
Line 
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
41uint32_t  GPT_MAPPED;
42uint32_t  GPT_SMALL;
43uint32_t  GPT_READABLE;
44uint32_t  GPT_WRITABLE; 
45uint32_t  GPT_EXECUTABLE;
46uint32_t  GPT_CACHABLE; 
47uint32_t  GPT_USER; 
48uint32_t  GPT_DIRTY;
49uint32_t  GPT_ACCESSED;
50uint32_t  GPT_GLOBAL;
51uint32_t  GPT_COW;
52uint32_t  GPT_SWAP;
53uint32_t  GPT_LOCKED;
54
55error_t hal_gpt_create( gpt_t * gpt )
56{
57        return 0;
58}
59
60void hal_gpt_destroy( gpt_t * gpt )
61{
62
63}
64
65void hal_gpt_print( gpt_t * gpt )
66{
67
68}
69
70error_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
78void hal_gpt_get_pte( gpt_t    * gpt,
79                      vpn_t      vpn,
80                      uint32_t * attr,
81                      ppn_t    * ppn )
82{
83
84}
85
86void hal_gpt_reset_pte( gpt_t * gpt,
87                        vpn_t   vpn )
88{
89
90}
91
92error_t hal_gpt_lock_pte( gpt_t * gpt,
93                          vpn_t   vpn )
94{
95        return 0;
96}
97
98error_t hal_gpt_unlock_pte( gpt_t * gpt,
99                            vpn_t   vpn )
100{
101        return 0;
102}
103
104error_t hal_gpt_copy( gpt_t  * dst_gpt,
105                      gpt_t  * src_gpt,
106                      bool_t   cow )
107{
108    return 0;
109}
110
Note: See TracBrowser for help on using the repository browser.