Changeset 9d4e170 in mainline


Ignore:
Timestamp:
2011-11-17T12:59:44Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6b326ea1
Parents:
80d301ab
Message:

Create the identity mapping for the smaller of config.identity_size and
the end of physical memory.

File:
1 edited

Legend:

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

    r80d301ab r9d4e170  
    3737#include <genarch/mm/page_pt.h>
    3838#include <mm/page.h>
     39#include <arch/mm/frame.h>
    3940#include <align.h>
    4041#include <config.h>
     
    4243#include <typedefs.h>
    4344#include <interrupt.h>
    44 #include <arch/mm/frame.h>
     45#include <macros.h>
    4546
    4647/** Initializes page tables.
     
    5859        uintptr_t cur;
    5960        /* Kernel identity mapping */
    60         for (cur = PHYSMEM_START_ADDR; cur < last_frame; cur += FRAME_SIZE)
     61        for (cur = PHYSMEM_START_ADDR;
     62            cur < min(config.identity_base, last_frame); cur += FRAME_SIZE)
    6163                page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags);
    6264       
    6365        /* Create mapping for exception table at high offset */
    6466#ifdef HIGH_EXCEPTION_VECTORS
     67        // XXX: fixme to use proper non-identity page
    6568        void *virtaddr = frame_alloc(ONE_FRAME, FRAME_KA);
    66         page_mapping_insert(AS_KERNEL, EXC_BASE_ADDRESS, KA2PA(virtaddr), flags);
     69        page_mapping_insert(AS_KERNEL, EXC_BASE_ADDRESS, KA2PA(virtaddr),
     70            flags);
    6771#else
    6872#error "Only high exception vector supported now"
Note: See TracChangeset for help on using the changeset viewer.