Changeset 6323989 in mainline for arch/ppc32/loader/main.c


Ignore:
Timestamp:
2006-03-14T09:11:07Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2d69ee6
Parents:
eebd172
Message:

ofw code cleanup
get memory map from ofw

File:
1 edited

Legend:

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

    reebd172 r6323989  
    2929#include "main.h"
    3030#include "printf.h"
    31 #include "ofw.h"
    3231#include "asm.h"
    3332
     
    3837#define KERNEL_SIZE ((unsigned int) KERNEL_END - (unsigned int) KERNEL_START)
    3938
     39memmap_t memmap;
     40
    4041void bootstrap(void)
    4142{
     
    4445        void *phys = ofw_translate(&start);
    4546        printf("loaded at %L (physical %L)\n", &start, phys);
     47       
     48        if (!ofw_memmap(&memmap)) {
     49                printf("Unable to get memory map\n");
     50                halt();
     51        }
     52        printf("total memory %d MB\n", memmap.total >> 20);
    4653       
    4754        // FIXME: map just the kernel
     
    6067       
    6168        flush_instruction_cache();
    62         jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS);
     69        jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS, ofw_translate(&memmap));
    6370}
Note: See TracChangeset for help on using the changeset viewer.