Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 964 → Rev 963

/boot/trunk/arch/ppc32/loader/main.c
28,6 → 28,7
 
#include "main.h"
#include "printf.h"
#include "ofw.h"
#include "asm.h"
 
#define KERNEL_PHYSICAL_ADDRESS 0x1000
36,8 → 37,6
#define KERNEL_END &_binary_____________kernel_kernel_bin_end
#define KERNEL_SIZE ((unsigned int) KERNEL_END - (unsigned int) KERNEL_START)
 
memmap_t memmap;
 
void bootstrap(void)
{
printf("\nHelenOS PPC Bootloader\n");
45,12 → 44,6
void *phys = ofw_translate(&start);
printf("loaded at %L (physical %L)\n", &start, phys);
if (!ofw_memmap(&memmap)) {
printf("Unable to get memory map\n");
halt();
}
printf("total memory %d MB\n", memmap.total >> 20);
// FIXME: map just the kernel
if (ofw_map((void *) KERNEL_PHYSICAL_ADDRESS, (void *) KERNEL_VIRTUAL_ADDRESS, 1024 * 1024, 0) != 0) {
printf("Unable to map kernel memory at %L (physical %L)\n", KERNEL_VIRTUAL_ADDRESS, KERNEL_PHYSICAL_ADDRESS);
66,5 → 59,5
printf("Booting the kernel...\n");
flush_instruction_cache();
jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS, ofw_translate(&memmap));
jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS);
}