Rev 2198 | Rev 2254 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2198 | Rev 2236 | ||
---|---|---|---|
Line 72... | Line 72... | ||
72 | for (i = 0; i < COMPONENTS; i++) { |
72 | for (i = 0; i < COMPONENTS; i++) { |
73 | printf(" %L: %s image (size %d bytes)\n", |
73 | printf(" %L: %s image (size %d bytes)\n", |
74 | components[i].start, components[i].name, components[i].size); |
74 | components[i].start, components[i].name, components[i].size); |
75 | } |
75 | } |
76 | 76 | ||
77 | printf("\nAddr of page table : %L\n", page_table); |
- | |
78 | - | ||
79 | printf("\nCopying components\n"); |
77 | printf("\nCopying components\n"); |
80 | unsigned int top = 0; |
78 | unsigned int top = 0; |
81 | bootinfo.cnt = 0; |
79 | bootinfo.cnt = 0; |
82 | for (i = 0; i < COMPONENTS; i++) { |
80 | for (i = 0; i < COMPONENTS; i++) { |
83 | printf(" %s...", components[i].name); |
81 | printf(" %s...", components[i].name); |
84 | top = ALIGN_UP(top, PAGE_SIZE); |
82 | top = ALIGN_UP(top, PAGE_SIZE); |
85 | //printf("top %x", KERNEL_PHY_ADDRESS + top); |
- | |
86 | memcpy(((void *) KERNEL_PHY_ADDRESS) + top, components[i].start, components[i].size); |
83 | memcpy(((void *) KERNEL_PHY_ADDRESS) + top, components[i].start, components[i].size); |
87 | if (i > 0) { |
84 | if (i > 0) { |
88 | bootinfo.tasks[bootinfo.cnt].addr = ((void *) KERNEL_PHY_ADDRESS) + top; |
85 | bootinfo.tasks[bootinfo.cnt].addr = ((void *) KERNEL_PHY_ADDRESS) + top; |
89 | bootinfo.tasks[bootinfo.cnt].size = components[i].size; |
86 | bootinfo.tasks[bootinfo.cnt].size = components[i].size; |
90 | bootinfo.cnt++; |
87 | bootinfo.cnt++; |
91 | } |
88 | } |
92 | 89 | ||
93 | /* TODO: memcpy test -> to be deleted */ |
- | |
94 | /* |
- | |
95 | unsigned char x, y; |
- | |
96 | for (j=0; j < 20; ++j) { |
- | |
97 | x = *((unsigned char *) components[i].start + j); |
- | |
98 | y = *((unsigned char *) KERNEL_PHY_ADDRESS + top + j); |
- | |
99 | if (x != y) { |
- | |
100 | printf("!!! Error, %x != %x\n", x,y); |
- | |
101 | } |
- | |
102 | } |
- | |
103 | */ |
- | |
104 | top += components[i].size; |
90 | top += components[i].size; |
105 | printf("done.\n"); |
91 | printf("done.\n"); |
106 | } |
92 | } |
107 | 93 | ||
108 | mm_kernel_mapping(); |
94 | mm_kernel_mapping(); |