Ignore:
Timestamp:
2010-07-12T10:53:30Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bd11d3e
Parents:
c40e6ef (diff), bee2d4c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/mm/sun4v/frame.c

    rc40e6ef rbd48f4c  
    4747void frame_arch_init(void)
    4848{
    49         unsigned int i;
    50         pfn_t confdata;
    51 
    5249        if (config.cpu_active == 1) {
     50                unsigned int i;
     51               
    5352                for (i = 0; i < memmap.cnt; i++) {
    54                         uintptr_t start = (uintptr_t) memmap.zones[i].start;
    55                         size_t size = memmap.zones[i].size;
    56 
     53                        /* To be safe, make the available zone possibly smaller */
     54                        uintptr_t new_start = ALIGN_UP((uintptr_t) memmap.zones[i].start,
     55                            FRAME_SIZE);
     56                        size_t new_size = ALIGN_DOWN(memmap.zones[i].size -
     57                            (new_start - ((uintptr_t) memmap.zones[i].start)), FRAME_SIZE);
     58                       
    5759                        /*
    5860                         * The memmap is created by HelenOS boot loader.
    5961                         * It already contains no holes.
    6062                         */
    61 
    62                         confdata = ADDR2PFN(start);
     63                       
     64                        pfn_t confdata = ADDR2PFN(new_start);
     65                       
    6366                        if (confdata == ADDR2PFN(KA2PA(PFN2ADDR(0))))
    6467                                confdata = ADDR2PFN(KA2PA(PFN2ADDR(2)));
    65                         zone_create(ADDR2PFN(start),
    66                             SIZE2FRAMES(ALIGN_DOWN(size, FRAME_SIZE)),
     68                       
     69                        zone_create(ADDR2PFN(new_start), SIZE2FRAMES(new_size),
    6770                            confdata, 0);
    6871                }
    69 
     72               
    7073                /*
    7174                 * On sparc64, physical memory can start on a non-zero address.
Note: See TracChangeset for help on using the changeset viewer.