Subversion Repositories HelenOS

Rev

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

Rev 1789 Rev 1790
Line 78... Line 78...
78
    for (i = 0; i < COMPONENTS; i++)
78
    for (i = 0; i < COMPONENTS; i++)
79
        printf(" %P: %s image (size %d bytes)\n", components[i].start, components[i].name, components[i].size);
79
        printf(" %P: %s image (size %d bytes)\n", components[i].start, components[i].name, components[i].size);
80
 
80
 
81
    printf("\nCopying components\n");
81
    printf("\nCopying components\n");
82
    unsigned int top = 0;
82
    unsigned int top = 0;
83
    bootinfo.cnt = 0;
83
    bootinfo.taskmap.count = 0;
84
    for (i = 0; i < COMPONENTS; i++) {
84
    for (i = 0; i < COMPONENTS; i++) {
-
 
85
        void * base = (void *) KERNEL_VIRTUAL_ADDRESS;
-
 
86
   
85
        printf(" %s...", components[i].name);
87
        printf(" %s...", components[i].name);
86
        top = ALIGN_UP(top, PAGE_SIZE);
88
        top = ALIGN_UP(top, PAGE_SIZE);
87
        memcpy(((void *) KERNEL_VIRTUAL_ADDRESS) + top, components[i].start, components[i].size);
89
        memcpy(base + top, components[i].start, components[i].size);
88
        if (i > 0) {
90
        if (i > 0) {
89
            bootinfo.tasks[bootinfo.cnt].addr = ((void *) KERNEL_VIRTUAL_ADDRESS) + top;
91
            bootinfo.taskmap.tasks[bootinfo.taskmap.count].addr = base + top;
90
            bootinfo.tasks[bootinfo.cnt].size = components[i].size;
92
            bootinfo.taskmap.tasks[bootinfo.taskmap.count].size = components[i].size;
91
            bootinfo.cnt++;
93
            bootinfo.taskmap.count++;
92
        }
94
        }
93
        top += components[i].size;
95
        top += components[i].size;
94
        printf("done.\n");
96
        printf("done.\n");
95
    }
97
    }
96
 
98