Subversion Repositories HelenOS

Rev

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

Rev 2254 Rev 2293
Line 31... Line 31...
31
#include "_components.h"
31
#include "_components.h"
32
#include <printf.h>
32
#include <printf.h>
33
 
33
 
34
#include "mm.h"
34
#include "mm.h"
35
 
35
 
36
#define KERNEL_VIRTUAL_ADDRESS 0x80100000
36
#define KERNEL_VIRTUAL_ADDRESS 0x80150000
37
 
37
 
38
char *release = RELEASE;
38
char *release = RELEASE;
39
 
39
 
40
#ifdef REVISION
40
#ifdef REVISION
41
    char *revision = ", revision " REVISION;
41
    char *revision = ", revision " REVISION;
Line 59... Line 59...
59
/** Copies all images to #KERNEL_VIRTUAL_ADDRESS and jumps there. */
59
/** Copies all images to #KERNEL_VIRTUAL_ADDRESS and jumps there. */
60
void bootstrap(void)
60
void bootstrap(void)
61
{
61
{
62
    mmu_start();
62
    mmu_start();
63
    version_print();
63
    version_print();
64
   
64
 
65
    component_t components[COMPONENTS];
65
    component_t components[COMPONENTS];
66
    bootinfo_t bootinfo;
66
    bootinfo_t bootinfo;
67
    init_components(components);
67
    init_components(components);
68
   
68
   
69
    printf("\nMemory statistics\n");
69
    printf("\nMemory statistics\n");
Line 75... Line 75...
75
        printf(" %L: %s image (size %d bytes)\n",
75
        printf(" %L: %s image (size %d bytes)\n",
76
            components[i].start, components[i].name, components[i].size);
76
            components[i].start, components[i].name, components[i].size);
77
    }
77
    }
78
 
78
 
79
    printf("\nCopying components\n");
79
    printf("\nCopying components\n");
-
 
80
 
80
    unsigned int top = 0;
81
    unsigned int top = 0;
81
    bootinfo.cnt = 0;
82
    bootinfo.cnt = 0;
82
    for (i = 0; i < COMPONENTS; i++) {
83
    for (i = 0; i < COMPONENTS; i++) {
83
        printf(" %s...", components[i].name);
84
        printf(" %s...", components[i].name);
84
        top = ALIGN_UP(top, PAGE_SIZE);
85
        top = ALIGN_UP(top, PAGE_SIZE);
Line 86... Line 87...
86
        if (i > 0) {
87
        if (i > 0) {
87
            bootinfo.tasks[bootinfo.cnt].addr = ((void *) KERNEL_VIRTUAL_ADDRESS) + top;
88
            bootinfo.tasks[bootinfo.cnt].addr = ((void *) KERNEL_VIRTUAL_ADDRESS) + top;
88
            bootinfo.tasks[bootinfo.cnt].size = components[i].size;
89
            bootinfo.tasks[bootinfo.cnt].size = components[i].size;
89
            bootinfo.cnt++;
90
            bootinfo.cnt++;
90
        }
91
        }
91
 
-
 
92
        top += components[i].size;
92
        top += components[i].size;
93
        printf("done.\n");
93
        printf("done.\n");
94
    }
94
    }
95
   
95
   
96
    printf("\nBooting the kernel...\n");
96
    printf("\nBooting the kernel...\n");