Changeset 1fbe8da2 in mainline for arch/ppc32/loader/main.c


Ignore:
Timestamp:
2006-03-15T18:25:43Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f9719b58
Parents:
032a9b3
Message:

ppc32: boot using real mode trampoline
setup segment registers so far

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ppc32/loader/main.c

    r032a9b3 r1fbe8da2  
    5353        printf("total memory %d MB\n", memmap.total >> 20);
    5454       
    55         // FIXME: map just the kernel
    56         if (ofw_map((void *) KERNEL_PHYSICAL_ADDRESS, (void *) KERNEL_VIRTUAL_ADDRESS, memmap.total - 64 * 1024 * 1024, 0) != 0) {
     55        if (ofw_map((void *) KERNEL_PHYSICAL_ADDRESS, (void *) KERNEL_VIRTUAL_ADDRESS, KERNEL_SIZE + KERNEL_BOOT_OFFSET, 0) != 0) {
    5756                printf("Unable to map kernel memory at %L (physical %L)\n", KERNEL_VIRTUAL_ADDRESS, KERNEL_PHYSICAL_ADDRESS);
    5857                halt();
     
    6665        ofw_map((void *) 0x80816000, (void *) 0xf2000000, 0x00018000, 0);
    6766       
     67        void *tramp = ofw_translate(&real_mode);
     68        printf("bootstrap trampoline at %L (physical %L)\n", &real_mode, tramp);
    6869        printf("Booting the kernel...\n");
    6970       
    7071        flush_instruction_cache();
    71         jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS + KERNEL_BOOT_OFFSET, ofw_translate(&memmap));
     72        jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS + KERNEL_BOOT_OFFSET, ofw_translate(&memmap), tramp);
    7273}
Note: See TracChangeset for help on using the changeset viewer.