Changeset d7ef14b in mainline for kernel/arch/arm32/src/mm/frame.c


Ignore:
Timestamp:
2010-06-25T20:58:06Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
12b0d51
Parents:
1590e23
Message:

Link kernel to the proper base address for gta02. Change machine_get_memory_size() to machine_get_memory_extents() and trivially implement for gta02.

File:
1 edited

Legend:

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

    r1590e23 rd7ef14b  
    3838#include <arch/machine_func.h>
    3939#include <config.h>
     40#include <align.h>
    4041
    4142/** Address of the last frame in the memory. */
     
    4546void frame_arch_init(void)
    4647{
    47         last_frame = machine_get_memory_size();
     48        uintptr_t mem_start, mem_size;
     49        uintptr_t first_frame;
     50        uintptr_t num_frames;
     51
     52        machine_get_memory_extents(&mem_start, &mem_size);
     53        first_frame = ALIGN_UP(mem_start, FRAME_SIZE);
     54        last_frame = ALIGN_DOWN(mem_start + mem_size, FRAME_SIZE);
     55        num_frames = (last_frame - first_frame) >> FRAME_WIDTH;
    4856       
    4957        /* All memory as one zone */
    50         zone_create(0, ADDR2PFN(last_frame),
     58        zone_create(first_frame, num_frames,
    5159            BOOT_PAGE_TABLE_START_FRAME + BOOT_PAGE_TABLE_SIZE_IN_FRAMES, 0);
    5260       
Note: See TracChangeset for help on using the changeset viewer.