Subversion Repositories HelenOS-historic

Rev

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

Rev 1678 Rev 1686
Line 26... Line 26...
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
 */
27
 */
28
 
28
 
29
 
29
 
30
#include <arch.h>
30
#include <arch.h>
-
 
31
#include <arch/boot.h>
31
#include <arch/cp0.h>
32
#include <arch/cp0.h>
32
#include <arch/exception.h>
33
#include <arch/exception.h>
33
#include <arch/asm.h>
34
#include <arch/asm.h>
34
#include <mm/as.h>
35
#include <mm/as.h>
35
 
36
 
Line 58... Line 59...
58
 
59
 
59
#define TLB_EXC ((char *) 0x80000000)
60
#define TLB_EXC ((char *) 0x80000000)
60
#define NORM_EXC ((char *) 0x80000180)
61
#define NORM_EXC ((char *) 0x80000180)
61
#define CACHE_EXC ((char *) 0x80000100)
62
#define CACHE_EXC ((char *) 0x80000100)
62
 
63
 
-
 
64
bootinfo_t bootinfo;
-
 
65
 
63
void arch_pre_main(void)
66
void arch_pre_main(void)
64
{
67
{
65
    /* Setup usermode */
68
    /* Setup usermode */
66
    init.cnt = 8;
69
    init.cnt = bootinfo.cnt;
67
    init.tasks[0].addr = INIT_ADDRESS;
-
 
68
    init.tasks[0].size = INIT_SIZE;
-
 
69
    init.tasks[1].addr = INIT_ADDRESS + 0x100000;
-
 
70
    init.tasks[1].size = INIT_SIZE;
-
 
71
    init.tasks[2].addr = INIT_ADDRESS + 0x200000;
-
 
-
 
70
   
72
    init.tasks[2].size = INIT_SIZE;
71
    __u32 i;
73
    init.tasks[3].addr = INIT_ADDRESS + 0x300000;
-
 
-
 
72
   
74
    init.tasks[3].size = INIT_SIZE;
73
    for (i = 0; i < bootinfo.cnt; i++) {
75
    init.tasks[4].addr = INIT_ADDRESS + 0x400000;
-
 
76
    init.tasks[4].size = INIT_SIZE;
-
 
77
    init.tasks[5].addr = INIT_ADDRESS + 0x500000;
-
 
78
    init.tasks[5].size = INIT_SIZE;
-
 
79
    init.tasks[6].addr = INIT_ADDRESS + 0x600000;
-
 
80
    init.tasks[6].size = INIT_SIZE;
-
 
81
    init.tasks[7].addr = INIT_ADDRESS + 0x700000;
74
        init.tasks[i].addr = bootinfo.tasks[i].addr;
82
    init.tasks[7].size = INIT_SIZE;
75
        init.tasks[i].size = bootinfo.tasks[i].size;
-
 
76
    }
83
}
77
}
84
 
78
 
85
void arch_pre_mm_init(void)
79
void arch_pre_mm_init(void)
86
{
80
{
87
    /* It is not assumed by default */
81
    /* It is not assumed by default */