Subversion Repositories HelenOS-historic

Rev

Rev 904 | Rev 1702 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 904 Rev 1210
Line 29... Line 29...
29
 
29
 
30
#include <arch/mm/page.h>
30
#include <arch/mm/page.h>
31
#include <genarch/mm/page_ht.h>
31
#include <genarch/mm/page_ht.h>
32
#include <mm/asid.h>
32
#include <mm/asid.h>
33
#include <arch/mm/asid.h>
33
#include <arch/mm/asid.h>
-
 
34
#include <arch/mm/vhpt.h>
34
#include <arch/types.h>
35
#include <arch/types.h>
35
#include <typedefs.h>
36
#include <typedefs.h>
36
#include <print.h>
37
#include <print.h>
37
#include <mm/page.h>
38
#include <mm/page.h>
38
#include <mm/frame.h>
39
#include <mm/frame.h>
Line 56... Line 57...
56
void set_environment(void)
57
void set_environment(void)
57
{
58
{
58
    region_register rr;
59
    region_register rr;
59
    pta_register pta;  
60
    pta_register pta;  
60
    int i;
61
    int i;
-
 
62
#ifdef CONFIG_VHPT  
-
 
63
    __address vhpt_base;
-
 
64
#endif
61
 
65
 
62
    /*
66
    /*
63
     * First set up kernel region register.
67
     * First set up kernel region register.
64
     * This is redundant (see start.S) but we keep it here just for sure.
68
     * This is redundant (see start.S) but we keep it here just for sure.
65
     */
69
     */
Line 86... Line 90...
86
        rr_write(i, rr.word);
90
        rr_write(i, rr.word);
87
        srlz_i();
91
        srlz_i();
88
        srlz_d();
92
        srlz_d();
89
    }
93
    }
90
 
94
 
-
 
95
#ifdef CONFIG_VHPT  
-
 
96
    vhpt_base = vhpt_set_up();
-
 
97
#endif
91
    /*
98
    /*
92
     * Set up PTA register.
99
     * Set up PTA register.
93
     */
100
     */
94
    pta.word = pta_read();
101
    pta.word = pta_read();
-
 
102
#ifndef CONFIG_VHPT
95
    pta.map.ve = 0;                   /* disable VHPT walker */
103
    pta.map.ve = 0;                   /* disable VHPT walker */
-
 
104
    pta.map.base = 0 >> PTA_BASE_SHIFT;
-
 
105
#else
-
 
106
    pta.map.ve = 1;                   /* enable VHPT walker */
-
 
107
    pta.map.base = vhpt_base >> PTA_BASE_SHIFT;
-
 
108
#endif
96
    pta.map.vf = 1;                   /* large entry format */
109
    pta.map.vf = 1;                   /* large entry format */
97
    pta.map.size = VHPT_WIDTH;
110
    pta.map.size = VHPT_WIDTH;
98
    pta.map.base = VHPT_BASE >> PTA_BASE_SHIFT;
-
 
99
    pta_write(pta.word);
111
    pta_write(pta.word);
100
    srlz_i();
112
    srlz_i();
101
    srlz_d();
113
    srlz_d();
102
}
114
}
103
 
115