Changeset 25a76ab8 in mainline for kernel/arch/ppc32/src/mm/frame.c


Ignore:
Timestamp:
2010-05-08T07:53:23Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
051bc69a
Parents:
6c39a907 (diff), 1317380 (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/ppc32/src/mm/frame.c

    r6c39a907 r25a76ab8  
    2727 */
    2828
    29 /** @addtogroup ppc32mm 
     29/** @addtogroup ppc32mm
    3030 * @{
    3131 */
     
    4141
    4242uintptr_t last_frame = 0;
     43memmap_t memmap;
    4344
    4445void physmem_print(void)
     
    4950        printf("---------- ----------\n");
    5051               
    51         for (i = 0; i < bootinfo.memmap.count; i++) {
    52                 printf("%#10x %#10x\n", bootinfo.memmap.zones[i].start,
    53                         bootinfo.memmap.zones[i].size);
     52        for (i = 0; i < memmap.cnt; i++) {
     53                printf("%#10x %#10x\n", memmap.zones[i].start,
     54                        memmap.zones[i].size);
    5455        }
    5556}
     
    6263        size_t size;
    6364       
    64         for (i = 0; i < bootinfo.memmap.count; i++) {
    65                 start = ADDR2PFN(ALIGN_UP(bootinfo.memmap.zones[i].start, FRAME_SIZE));
    66                 size = SIZE2FRAMES(ALIGN_DOWN(bootinfo.memmap.zones[i].size, FRAME_SIZE));
     65        for (i = 0; i < memmap.cnt; i++) {
     66                start = ADDR2PFN(ALIGN_UP((uintptr_t) memmap.zones[i].start, FRAME_SIZE));
     67                size = SIZE2FRAMES(ALIGN_DOWN(memmap.zones[i].size, FRAME_SIZE));
    6768               
    6869                if ((minconf < start) || (minconf >= start + size))
     
    7273               
    7374                zone_create(start, size, conf, 0);
    74                 if (last_frame < ALIGN_UP(bootinfo.memmap.zones[i].start + bootinfo.memmap.zones[i].size, FRAME_SIZE))
    75                         last_frame = ALIGN_UP(bootinfo.memmap.zones[i].start + bootinfo.memmap.zones[i].size, FRAME_SIZE);
     75                if (last_frame < ALIGN_UP((uintptr_t) memmap.zones[i].start + memmap.zones[i].size, FRAME_SIZE))
     76                        last_frame = ALIGN_UP((uintptr_t) memmap.zones[i].start + memmap.zones[i].size, FRAME_SIZE);
    7677        }
    7778       
Note: See TracChangeset for help on using the changeset viewer.