Changeset 4bb4836d in mainline


Ignore:
Timestamp:
2006-03-14T11:34:13Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5be1923
Parents:
06e6805
Message:

ppc32: move kernel one frame up
frame zones initialization

Location:
arch/ppc32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • arch/ppc32/include/boot/boot.h

    r06e6805 r4bb4836d  
    3030#define __ppc32_BOOT_H__
    3131
    32 #define BOOT_OFFSET             0x1000
     32#define BOOT_OFFSET             0x2000
    3333
    3434#endif
  • arch/ppc32/src/mm/frame.c

    r06e6805 r4bb4836d  
    2828
    2929#include <arch/mm/frame.h>
     30#include <arch/boot/memmap.h>
    3031#include <arch/mm/memory_init.h>
    3132#include <mm/frame.h>
     33#include <align.h>
     34#include <macros.h>
     35
     36__address last_frame = 0;
    3237
    3338void frame_arch_init(void)
    3439{
     40        pfn_t minconf = 2;
     41        count_t i;
     42        pfn_t start, conf;
     43        size_t size;
     44       
     45        for (i = 0; i < memmap.count; i++) {
     46                start = ADDR2PFN(ALIGN_UP(memmap.zones[i].start, FRAME_SIZE));
     47                size = SIZE2FRAMES(ALIGN_DOWN(memmap.zones[i].size, FRAME_SIZE));
     48               
     49                if ((minconf < start) || (minconf >= start + size))
     50                        conf = start;
     51                else
     52                        conf = minconf;
     53               
     54                zone_create(start, size, conf, 0);
     55                if (last_frame < ALIGN_UP(memmap.zones[i].start + memmap.zones[i].size, FRAME_SIZE))
     56                        last_frame = ALIGN_UP(memmap.zones[i].start + memmap.zones[i].size, FRAME_SIZE);
     57        }
     58
    3559        /* First is exception vector, second is 'implementation specific' */
    3660        frame_mark_unavailable(0, 2);
     61       
     62        /* Merge all zones to 1 big zone */
     63        zone_merge_all();
    3764}
Note: See TracChangeset for help on using the changeset viewer.