diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-09-28 14:38:26 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-09-28 14:38:26 +0000 |
commit | f140fdc244e082f612eaae60a1feae542e0e19d3 (patch) | |
tree | 4654d0e5fabfdc2f9e9f5edab8c2607436b40be4 /c/src/lib/libbsp/arm/lpc32xx/misc/mmu.c | |
parent | 2010-09-28 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff) | |
download | rtems-f140fdc244e082f612eaae60a1feae542e0e19d3.tar.bz2 |
2010-09-28 Sebastian Huber <sebastian.huber@embedded-brains.de>
* misc/mmu.c: New file.
* Makefile.am: Reflect change above.
* configure.ac, include/bspopts.h.in, include/irq.h,
include/lpc32xx.h, include/mmu.h, misc/emc.c, misc/restart.c,
startup/bspstarthooks.c: Changes throughout.
Diffstat (limited to 'c/src/lib/libbsp/arm/lpc32xx/misc/mmu.c')
-rw-r--r-- | c/src/lib/libbsp/arm/lpc32xx/misc/mmu.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/arm/lpc32xx/misc/mmu.c b/c/src/lib/libbsp/arm/lpc32xx/misc/mmu.c new file mode 100644 index 0000000000..9eeee9a11e --- /dev/null +++ b/c/src/lib/libbsp/arm/lpc32xx/misc/mmu.c @@ -0,0 +1,39 @@ +/** + * @file + * + * @ingroup lpc32xx_mmu + * + * @brief MMU support implementation. + */ + +/* + * Copyright (c) 2010 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Obere Lagerstr. 30 + * 82178 Puchheim + * Germany + * <rtems@embedded-brains.de> + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + */ + +#include <bsp/mmu.h> + +void lpc32xx_set_translation_table_entries( + void *begin, + void *end, + uint32_t section_flags +) +{ + uint32_t *ttb = arm_cp15_get_translation_table_base(); + uint32_t i = ARM_MMU_SECT_GET_INDEX(begin); + uint32_t iend = ARM_MMU_SECT_GET_INDEX(ARM_MMU_SECT_MVA_ALIGN_UP(end)); + + while (i < iend) { + ttb [i] = (i << ARM_MMU_SECT_BASE_SHIFT) | section_flags; + ++i; + } +} |