Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2253 → Rev 2254

/branches/arm/boot/arch/arm32/loader/main.c
33,7 → 33,7
 
#include "mm.h"
 
#define KERNEL_PHY_ADDRESS 0x00100000
#define KERNEL_VIRTUAL_ADDRESS 0x80100000
 
char *release = RELEASE;
 
56,8 → 56,10
release, revision, timestamp);
}
 
/** Copies all images to #KERNEL_VIRTUAL_ADDRESS and jumps there. */
void bootstrap(void)
{
mmu_start();
version_print();
component_t components[COMPONENTS];
65,7 → 67,7
init_components(components);
printf("\nMemory statistics\n");
printf(" kernel entry point at %L\n", KERNEL_PHY_ADDRESS);
printf(" kernel entry point at %L\n", KERNEL_VIRTUAL_ADDRESS);
printf(" %L: boot info structure\n", &bootinfo);
 
unsigned int i, j;
80,9 → 82,9
for (i = 0; i < COMPONENTS; i++) {
printf(" %s...", components[i].name);
top = ALIGN_UP(top, PAGE_SIZE);
memcpy(((void *) KERNEL_PHY_ADDRESS) + top, components[i].start, components[i].size);
memcpy(((void *) KERNEL_VIRTUAL_ADDRESS) + top, components[i].start, components[i].size);
if (i > 0) {
bootinfo.tasks[bootinfo.cnt].addr = ((void *) KERNEL_PHY_ADDRESS) + top;
bootinfo.tasks[bootinfo.cnt].addr = ((void *) KERNEL_VIRTUAL_ADDRESS) + top;
bootinfo.tasks[bootinfo.cnt].size = components[i].size;
bootinfo.cnt++;
}
91,9 → 93,7
printf("done.\n");
}
mm_kernel_mapping();
printf("\nBooting the kernel...\n");
jump_to_kernel((void *) PA2KA(KERNEL_PHY_ADDRESS), &bootinfo, sizeof(bootinfo));
jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS, &bootinfo, sizeof(bootinfo));
}