Subversion Repositories HelenOS

Rev

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

Rev 1789 Rev 1800
Line 29... Line 29...
29
#include "main.h" 
29
#include "main.h" 
30
#include <printf.h>
30
#include <printf.h>
31
#include "asm.h"
31
#include "asm.h"
32
#include "_components.h"
32
#include "_components.h"
33
#include <ofw.h>
33
#include <ofw.h>
-
 
34
#include <align.h>
34
 
35
 
35
#define HEAP_GAP 1024000
36
#define HEAP_GAP 1024000
36
 
37
 
37
bootinfo_t bootinfo;
38
bootinfo_t bootinfo;
38
 
39
 
Line 99... Line 100...
99
    if (!ofw_screen(&bootinfo.screen)) {
100
    if (!ofw_screen(&bootinfo.screen)) {
100
        printf("Error: unable to get screen properties, halting.\n");
101
        printf("Error: unable to get screen properties, halting.\n");
101
        halt();
102
        halt();
102
    }
103
    }
103
   
104
   
-
 
105
    if (!ofw_keyboard(&bootinfo.keyboard)) {
-
 
106
        printf("Error: unable to get keyboard properties, halting.\n");
-
 
107
        halt();
-
 
108
    }
-
 
109
   
104
    printf("\nDevice statistics\n");
110
    printf("\nDevice statistics\n");
105
    printf(" screen at %L, resolution %dx%d, %d bpp (scanline %d bytes)\n", bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline);
111
    printf(" screen at %L, resolution %dx%d, %d bpp (scanline %d bytes)\n", bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline);
-
 
112
    printf(" keyboard at %L (size %d bytes)\n", bootinfo.keyboard.addr, bootinfo.keyboard.size);
106
   
113
   
107
    void *real_mode_pa = ofw_translate(&real_mode);
114
    void *real_mode_pa = ofw_translate(&real_mode);
108
    void *trans_pa = ofw_translate(&trans);
115
    void *trans_pa = ofw_translate(&trans);
109
    void *bootinfo_pa = ofw_translate(&bootinfo);
116
    void *bootinfo_pa = ofw_translate(&bootinfo);
110
   
117
   
Line 149... Line 156...
149
    fix_overlap(&real_mode, &real_mode_pa, "bootstrap trampoline", &top);
156
    fix_overlap(&real_mode, &real_mode_pa, "bootstrap trampoline", &top);
150
    fix_overlap(&trans, &trans_pa, "translation table", &top);
157
    fix_overlap(&trans, &trans_pa, "translation table", &top);
151
    fix_overlap(&bootinfo, &bootinfo_pa, "boot info", &top);
158
    fix_overlap(&bootinfo, &bootinfo_pa, "boot info", &top);
152
   
159
   
153
    printf("\nBooting the kernel...\n");
160
    printf("\nBooting the kernel...\n");
154
    jump_to_kernel(bootinfo_pa, sizeof(bootinfo), trans_pa, pages << PAGE_WIDTH, real_mode_pa);
161
    jump_to_kernel(bootinfo_pa, sizeof(bootinfo), trans_pa, pages << PAGE_WIDTH, real_mode_pa, (void *) bootinfo.screen.addr, bootinfo.screen.scanline);
155
}
162
}