[rtems commit] bsps/powerpc: Add .nvram section
Sebastian Huber
sebh at rtems.org
Mon Dec 3 12:14:54 UTC 2012
Module: rtems
Branch: master
Commit: 113768f2cd4497df285667f7391789b7d46b6df7
Changeset: http://git.rtems.org/rtems/commit/?id=113768f2cd4497df285667f7391789b7d46b6df7
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Nov 23 14:16:11 2012 +0100
bsps/powerpc: Add .nvram section
---
.../powerpc/mpc55xxevb/startup/linkcmds.gwlcfm | 1 +
.../powerpc/mpc55xxevb/startup/linkcmds.mpc5566evb | 1 +
.../mpc55xxevb/startup/linkcmds.mpc5643l_evb | 1 +
.../mpc55xxevb/startup/linkcmds.mpc5674f_ecu508 | 2 ++
.../mpc55xxevb/startup/linkcmds.mpc5674fevb | 2 ++
.../mpc55xxevb/startup/linkcmds.phycore_mpc5554 | 1 +
.../powerpc/qoriq/startup/linkcmds.qoriq_core_0 | 6 ++++--
.../powerpc/qoriq/startup/linkcmds.qoriq_core_1 | 6 ++++--
.../powerpc/qoriq/startup/linkcmds.qoriq_p1020rdb | 6 ++++--
.../libbsp/powerpc/shared/include/linker-symbols.h | 6 ++++++
.../libbsp/powerpc/shared/startup/linkcmds.base | 7 +++++++
.../powerpc/t32mppc/startup/linkcmds.t32mppc | 2 ++
12 files changed, 35 insertions(+), 6 deletions(-)
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.gwlcfm b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.gwlcfm
index 391127f..cabaac2 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.gwlcfm
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.gwlcfm
@@ -22,5 +22,6 @@ REGION_ALIAS ("REGION_WORK", RAM_EXT);
REGION_ALIAS ("REGION_STACK", RAM);
REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
REGION_ALIAS ("REGION_NOCACHE_LOAD", NOCACHE);
+REGION_ALIAS ("REGION_NVRAM", NOCACHE);
INCLUDE linkcmds.mpc55xx
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5566evb b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5566evb
index be6b82b..4f63fb0 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5566evb
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5566evb
@@ -22,5 +22,6 @@ REGION_ALIAS ("REGION_WORK", RAM);
REGION_ALIAS ("REGION_STACK", RAM);
REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
REGION_ALIAS ("REGION_NOCACHE_LOAD", NOCACHE);
+REGION_ALIAS ("REGION_NVRAM", NOCACHE);
INCLUDE linkcmds.mpc55xx
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5643l_evb b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5643l_evb
index 07d8f50..1977c92 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5643l_evb
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5643l_evb
@@ -28,5 +28,6 @@ REGION_ALIAS ("REGION_WORK", RAM_1);
REGION_ALIAS ("REGION_STACK", RAM_1);
REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
REGION_ALIAS ("REGION_NOCACHE_LOAD", NOCACHE);
+REGION_ALIAS ("REGION_NVRAM", NOCACHE);
INCLUDE linkcmds.mpc55xx
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5674f_ecu508 b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5674f_ecu508
index 0a3b58f..f38ca47 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5674f_ecu508
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5674f_ecu508
@@ -2,6 +2,7 @@ MEMORY {
RAM : ORIGIN = 0x40000000, LENGTH = 256K - 16k
RAM_EXT : ORIGIN = 0x20000000, LENGTH = 512K
NOCACHE : ORIGIN = 0x4003c000, LENGTH = 16k
+ NVRAM : ORIGIN = 0x3ffa0000, LENGTH = 128k
}
REGION_ALIAS ("REGION_START", STARTROM);
@@ -21,5 +22,6 @@ REGION_ALIAS ("REGION_WORK", RAM);
REGION_ALIAS ("REGION_STACK", RAM);
REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
REGION_ALIAS ("REGION_NOCACHE_LOAD", ROM);
+REGION_ALIAS ("REGION_NVRAM", NVRAM);
INCLUDE linkcmds.mpc55xx
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5674fevb b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5674fevb
index 7f59a07..3113fb2 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5674fevb
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5674fevb
@@ -3,6 +3,7 @@ MEMORY {
RAM : ORIGIN = 0x40000000, LENGTH = 256K - 16k
RAM_EXT : ORIGIN = 0x20000000, LENGTH = 512K
NOCACHE : ORIGIN = 0x4003c000, LENGTH = 16k
+ EMPTY : ORIGIN = 0x0, LENGTH = 0
}
REGION_ALIAS ("REGION_START", ROM);
@@ -22,5 +23,6 @@ REGION_ALIAS ("REGION_WORK", RAM);
REGION_ALIAS ("REGION_STACK", RAM);
REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
REGION_ALIAS ("REGION_NOCACHE_LOAD", ROM);
+REGION_ALIAS ("REGION_NVRAM", EMPTY);
INCLUDE linkcmds.mpc55xx
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.phycore_mpc5554 b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.phycore_mpc5554
index 1db3190..77b8abc 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.phycore_mpc5554
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.phycore_mpc5554
@@ -31,5 +31,6 @@ REGION_ALIAS ("REGION_WORK", RAM_EXT);
REGION_ALIAS ("REGION_STACK", RAM);
REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
REGION_ALIAS ("REGION_NOCACHE_LOAD", NOCACHE);
+REGION_ALIAS ("REGION_NVRAM", NOCACHE);
INCLUDE linkcmds.mpc55xx
diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_0 b/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_0
index 502a26c..b27c10f 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_0
+++ b/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_0
@@ -7,6 +7,7 @@
MEMORY {
LOW : ORIGIN = 0x4000, LENGTH = 16M - 16k
HIGH : ORIGIN = 0x1000000, LENGTH = 32M
+ EMPTY : ORIGIN = 0x0, LENGTH = 0
}
REGION_ALIAS ("REGION_START", LOW);
@@ -24,8 +25,9 @@ REGION_ALIAS ("REGION_BSS", HIGH);
REGION_ALIAS ("REGION_RWEXTRA", HIGH);
REGION_ALIAS ("REGION_WORK", HIGH);
REGION_ALIAS ("REGION_STACK", HIGH);
-REGION_ALIAS ("REGION_NOCACHE", HIGH);
-REGION_ALIAS ("REGION_NOCACHE_LOAD", HIGH);
+REGION_ALIAS ("REGION_NOCACHE", EMPTY);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", EMPTY);
+REGION_ALIAS ("REGION_NVRAM", EMPTY);
bsp_section_robarrier_align = 0x1000000;
bsp_section_rwbarrier_align = 0x1000000;
diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_1 b/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_1
index 82fadf7..21a632b 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_1
+++ b/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_1
@@ -6,6 +6,7 @@
MEMORY {
RAM : ORIGIN = 0x4000000, LENGTH = 64M
+ EMPTY : ORIGIN = 0x0, LENGTH = 0
}
REGION_ALIAS ("REGION_START", RAM);
@@ -23,8 +24,9 @@ REGION_ALIAS ("REGION_BSS", RAM);
REGION_ALIAS ("REGION_RWEXTRA", RAM);
REGION_ALIAS ("REGION_WORK", RAM);
REGION_ALIAS ("REGION_STACK", RAM);
-REGION_ALIAS ("REGION_NOCACHE", RAM);
-REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM);
+REGION_ALIAS ("REGION_NOCACHE", EMPTY);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", EMPTY);
+REGION_ALIAS ("REGION_NVRAM", EMPTY);
bsp_section_robarrier_align = 0x1000000;
bsp_section_rwbarrier_align = 0x1000000;
diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_p1020rdb b/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_p1020rdb
index ef7fd57..7360843 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_p1020rdb
+++ b/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_p1020rdb
@@ -7,6 +7,7 @@
MEMORY {
LOW : ORIGIN = 0x4000, LENGTH = 16M - 16k
HIGH : ORIGIN = 0x1000000, LENGTH = 32M
+ EMPTY : ORIGIN = 0x0, LENGTH = 0
}
REGION_ALIAS ("REGION_START", LOW);
@@ -24,8 +25,9 @@ REGION_ALIAS ("REGION_BSS", HIGH);
REGION_ALIAS ("REGION_RWEXTRA", HIGH);
REGION_ALIAS ("REGION_WORK", HIGH);
REGION_ALIAS ("REGION_STACK", HIGH);
-REGION_ALIAS ("REGION_NOCACHE", HIGH);
-REGION_ALIAS ("REGION_NOCACHE_LOAD", HIGH);
+REGION_ALIAS ("REGION_NOCACHE", EMPTY);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", EMPTY);
+REGION_ALIAS ("REGION_NVRAM", EMPTY);
bsp_section_robarrier_align = 0x1000000;
bsp_section_rwbarrier_align = 0x1000000;
diff --git a/c/src/lib/libbsp/powerpc/shared/include/linker-symbols.h b/c/src/lib/libbsp/powerpc/shared/include/linker-symbols.h
index 80f54bd..7bfc6e2 100644
--- a/c/src/lib/libbsp/powerpc/shared/include/linker-symbols.h
+++ b/c/src/lib/libbsp/powerpc/shared/include/linker-symbols.h
@@ -99,12 +99,18 @@ LINKER_SYMBOL(bsp_section_nocache_size)
LINKER_SYMBOL(bsp_section_nocache_load_begin)
LINKER_SYMBOL(bsp_section_nocache_load_end)
+LINKER_SYMBOL(bsp_section_nvram_begin)
+LINKER_SYMBOL(bsp_section_nvram_end)
+LINKER_SYMBOL(bsp_section_nvram_size)
+
#define BSP_FAST_TEXT_SECTION __attribute__((section(".bsp_fast_text")))
#define BSP_FAST_DATA_SECTION __attribute__((section(".bsp_fast_data")))
#define BSP_NOCACHE_SECTION __attribute__((section(".bsp_nocache")))
+#define BSP_NVRAM_SECTION __attribute__((section(".bsp_nvram")))
+
/** @} */
#ifdef __cplusplus
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base b/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base
index 261b52a..9f04ebe 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base
+++ b/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base
@@ -340,6 +340,13 @@ SECTIONS {
bsp_section_nocache_load_begin = LOADADDR (.nocache);
bsp_section_nocache_load_end = bsp_section_nocache_load_begin + bsp_section_nocache_size;
+ .nvram (NOLOAD) : {
+ bsp_section_nvram_begin = .;
+ *(SORT(.bsp_nvram*))
+ bsp_section_nvram_end = .;
+ } > REGION_NVRAM
+ bsp_section_nvram_size = bsp_section_nvram_end - bsp_section_nvram_begin;
+
/* FIXME */
RamBase = ORIGIN (REGION_WORK);
RamSize = LENGTH (REGION_WORK);
diff --git a/c/src/lib/libbsp/powerpc/t32mppc/startup/linkcmds.t32mppc b/c/src/lib/libbsp/powerpc/t32mppc/startup/linkcmds.t32mppc
index a73da78..165412f 100644
--- a/c/src/lib/libbsp/powerpc/t32mppc/startup/linkcmds.t32mppc
+++ b/c/src/lib/libbsp/powerpc/t32mppc/startup/linkcmds.t32mppc
@@ -1,5 +1,6 @@
MEMORY {
RAM : ORIGIN = 0x0, LENGTH = 128M
+ EMPTY : ORIGIN = 0x0, LENGTH = 0
}
REGION_ALIAS ("REGION_START", RAM);
@@ -19,5 +20,6 @@ REGION_ALIAS ("REGION_WORK", RAM);
REGION_ALIAS ("REGION_STACK", RAM);
REGION_ALIAS ("REGION_NOCACHE", RAM);
REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM);
+REGION_ALIAS ("REGION_NVRAM", EMPTY);
INCLUDE linkcmds.base
More information about the vc
mailing list