summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/memoryzerofreeareas.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2022-07-14 15:06:02 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-07-15 10:46:02 +0200
commit1bf878f7ff6013fe4a0172f0493fcc47b9e26189 (patch)
tree47000ebb076e472a5097efa3f0b20dae4ac6e140 /cpukit/score/src/memoryzerofreeareas.c
parentscore: Place object controls into .noinit sections (diff)
downloadrtems-1bf878f7ff6013fe4a0172f0493fcc47b9e26189.tar.bz2
score: Extend memory dirty/zero actions
Dirty or zero also the part of the .noinit section used by RTEMS. Close #4678.
Diffstat (limited to '')
-rw-r--r--cpukit/score/src/memoryzerofreeareas.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/cpukit/score/src/memoryzerofreeareas.c b/cpukit/score/src/memoryzerofreeareas.c
index 4ea0812426..b1cef47ef9 100644
--- a/cpukit/score/src/memoryzerofreeareas.c
+++ b/cpukit/score/src/memoryzerofreeareas.c
@@ -10,7 +10,7 @@
/*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (C) 2020 embedded brains GmbH
+ * Copyright (C) 2020, 2022 embedded brains GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -40,7 +40,14 @@
#include <rtems/score/memory.h>
+#include <string.h>
+
void _Memory_Zero_free_areas( void )
{
_Memory_Fill( _Memory_Get(), 0 );
+ memset(
+ _Memory_Noinit_begin,
+ 0,
+ (uintptr_t) _Memory_Noinit_end - (uintptr_t) _Memory_Noinit_begin
+ );
}