source: rtems/c/src/lib/libbsp/arm/lpc32xx/misc/mmu.c @ cfe13cb

4.115
Last change on this file since cfe13cb was cfe13cb, checked in by Sebastian Huber <sebastian.huber@…>, on 12/16/10 at 13:35:06

2010-12-16 Sebastian Huber <sebastian.huber@…>

  • configure.ac, include/bspopts.h.in: More options.
  • include/lpc32xx.h: Added watchdog definitions.
  • include/mmu.h, misc/mmu.c: Added const qualifier.
  • startup/bspreset.c: Use watchdog reset.
  • Property mode set to 100644
File size: 843 bytes
Line 
1/**
2 * @file
3 *
4 * @ingroup lpc32xx_mmu
5 *
6 * @brief MMU support implementation.
7 */
8
9/*
10 * Copyright (c) 2010 embedded brains GmbH.  All rights reserved.
11 *
12 *  embedded brains GmbH
13 *  Obere Lagerstr. 30
14 *  82178 Puchheim
15 *  Germany
16 *  <rtems@embedded-brains.de>
17 *
18 * The license and distribution terms for this file may be
19 * found in the file LICENSE in this distribution or at
20 * http://www.rtems.com/license/LICENSE.
21 */
22
23#include <bsp/mmu.h>
24
25void lpc32xx_set_translation_table_entries(
26  const void *begin,
27  const void *end,
28  uint32_t section_flags
29)
30{
31  uint32_t *ttb = arm_cp15_get_translation_table_base();
32  uint32_t i = ARM_MMU_SECT_GET_INDEX(begin);
33  uint32_t iend = ARM_MMU_SECT_GET_INDEX(ARM_MMU_SECT_MVA_ALIGN_UP(end));
34
35  while (i < iend) {
36    ttb [i] = (i << ARM_MMU_SECT_BASE_SHIFT) | section_flags;
37    ++i;
38  }
39}
Note: See TracBrowser for help on using the repository browser.