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/sun4u/frame.c

    rc40e6ef rbd48f4c  
    4949void frame_arch_init(void)
    5050{
    51         unsigned int i;
    52         pfn_t confdata;
    53 
    5451        if (config.cpu_active == 1) {
     52                unsigned int i;
     53               
    5554                for (i = 0; i < memmap.cnt; i++) {
    56                         uintptr_t start = (uintptr_t) memmap.zones[i].start;
    57                         size_t size = memmap.zones[i].size;
    58 
     55                        /* To be safe, make the available zone possibly smaller */
     56                        uintptr_t new_start = ALIGN_UP((uintptr_t) memmap.zones[i].start,
     57                            FRAME_SIZE);
     58                        size_t new_size = ALIGN_DOWN(memmap.zones[i].size -
     59                            (new_start - ((uintptr_t) memmap.zones[i].start)), FRAME_SIZE);
     60                       
    5961                        /*
    6062                         * The memmap is created by HelenOS boot loader.
    6163                         * It already contains no holes.
    6264                         */
    63 
    64                         confdata = ADDR2PFN(start);
     65                       
     66                        pfn_t confdata = ADDR2PFN(new_start);
     67                       
    6568                        if (confdata == ADDR2PFN(KA2PA(PFN2ADDR(0))))
    6669                                confdata = ADDR2PFN(KA2PA(PFN2ADDR(2)));
    67                         zone_create(ADDR2PFN(start),
    68                             SIZE2FRAMES(ALIGN_DOWN(size, FRAME_SIZE)),
     70                       
     71                        zone_create(ADDR2PFN(new_start), SIZE2FRAMES(new_size),
    6972                            confdata, 0);
    70                         last_frame = max(last_frame, start + ALIGN_UP(size,
    71                             FRAME_SIZE));
     73                       
     74                        last_frame = max(last_frame, new_start + new_size);
    7275                }
    73 
     76               
    7477                /*
    7578                 * On sparc64, physical memory can start on a non-zero address.
     
    8083                frame_mark_unavailable(ADDR2PFN(KA2PA(PFN2ADDR(0))), 1);
    8184        }
    82 
     85       
    8386        end_of_identity = PA2KA(last_frame);
    8487}
Note: See TracChangeset for help on using the changeset viewer.