[rtems commit] bsps: Add BSP_FDT_BLOB_COPY_TO_READ_ONLY_LOAD_AREA
Sebastian Huber
sebh at rtems.org
Tue Aug 22 14:53:28 UTC 2017
Module: rtems
Branch: master
Commit: d8012bbd659e0d230014206c6182c19534a1a125
Changeset: http://git.rtems.org/rtems/commit/?id=d8012bbd659e0d230014206c6182c19534a1a125
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Aug 1 08:37:12 2017 +0200
bsps: Add BSP_FDT_BLOB_COPY_TO_READ_ONLY_LOAD_AREA
---
c/src/lib/libbsp/arm/beagle/configure.ac | 3 +++
c/src/lib/libbsp/shared/src/bsp-fdt.c | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/c/src/lib/libbsp/arm/beagle/configure.ac b/c/src/lib/libbsp/arm/beagle/configure.ac
index f5352b5..f327354 100644
--- a/c/src/lib/libbsp/arm/beagle/configure.ac
+++ b/c/src/lib/libbsp/arm/beagle/configure.ac
@@ -27,6 +27,9 @@ RTEMS_BSPOPTS_HELP([BSP_FDT_BLOB_SIZE_MAX],[maximum size of the FDT blob in byte
RTEMS_BSPOPTS_SET([BSP_FDT_BLOB_READ_ONLY],[*],[1])
RTEMS_BSPOPTS_HELP([BSP_FDT_BLOB_READ_ONLY],[place the FDT blob into the read-only data area])
+RTEMS_BSPOPTS_SET([BSP_FDT_BLOB_COPY_TO_READ_ONLY_LOAD_AREA],[*],[1])
+RTEMS_BSPOPTS_HELP([BSP_FDT_BLOB_COPY_TO_READ_ONLY_LOAD_AREA],[copy the FDT blob into the read-only load area via bsp_fdt_copy()])
+
RTEMS_BSPOPTS_SET([IS_DM3730],[beagleboard*],[1])
RTEMS_BSPOPTS_HELP([IS_DM3730],[true if SOC is DM3730])
diff --git a/c/src/lib/libbsp/shared/src/bsp-fdt.c b/c/src/lib/libbsp/shared/src/bsp-fdt.c
index faf59be..f49eec2 100644
--- a/c/src/lib/libbsp/shared/src/bsp-fdt.c
+++ b/c/src/lib/libbsp/shared/src/bsp-fdt.c
@@ -38,12 +38,12 @@ bsp_fdt_blob[BSP_FDT_BLOB_SIZE_MAX / sizeof(uint32_t)];
void bsp_fdt_copy(const void *src)
{
const uint32_t *s = (const uint32_t *) src;
-#ifdef BSP_FDT_BLOB_READ_ONLY
+#ifdef BSP_FDT_BLOB_COPY_TO_READ_ONLY_LOAD_AREA
uint32_t *d = (uint32_t *) ((uintptr_t) &bsp_fdt_blob[0]
- (uintptr_t) bsp_section_rodata_begin
+ (uintptr_t) bsp_section_rodata_load_begin);
#else
- uint32_t *d = &bsp_fdt_blob[0];
+ uint32_t *d = RTEMS_DECONST(uint32_t *, &bsp_fdt_blob[0]);
#endif
if (s != d) {
More information about the vc
mailing list