diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2011-10-21 08:44:23 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2011-10-21 08:44:23 +0000 |
commit | d4a95940391a1ee8c1e36a8b10b8800ee526c0e6 (patch) | |
tree | dc2dd05a6e7cc7b8d3bcbf53b10d3a4bfa425f7a /cpukit/score/cpu/nios2/nios2-mpu-disable-protected.c | |
parent | 488dc6be310095362984d1f665db270b5acd847d (diff) |
2011-10-21 Sebastian Huber <sebastian.huber@embedded-brains.de>
* nios2-mpu-configuration.c, nios2-mpu-descriptor.c,
nios2-mpu-disable-protected.c, nios2-mpu-reset.c: New files.
* Makefile.am: Reflect changes above.
* rtems/score/nios2-utility.h, nios2-context-initialize.c: Added
support for the memory protection unit (MPU).
Diffstat (limited to 'cpukit/score/cpu/nios2/nios2-mpu-disable-protected.c')
-rw-r--r-- | cpukit/score/cpu/nios2/nios2-mpu-disable-protected.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/cpukit/score/cpu/nios2/nios2-mpu-disable-protected.c b/cpukit/score/cpu/nios2/nios2-mpu-disable-protected.c new file mode 100644 index 0000000000..797a2072e8 --- /dev/null +++ b/cpukit/score/cpu/nios2/nios2-mpu-disable-protected.c @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2011 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. + * + * $Id$ + */ + +#ifdef HAVE_CONFIG_H + #include "config.h" +#endif + +#include <rtems/score/isr.h> +#include <rtems/score/nios2-utility.h> + +uint32_t _Nios2_MPU_Disable_protected( void ) +{ + ISR_Level level; + uint32_t config; + + _ISR_Disable( level ); + config = _Nios2_MPU_Disable(); + _ISR_Enable( level ); + + return config; +} |