aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJames Clarke <jrtc27@jrtc27.com>2020-02-03 00:53:17 +0000
committerGitHub <noreply@github.com>2020-02-02 16:53:17 -0800
commit2c4e689bc1ed4440d0d95b3b350ce872e7f75865 (patch)
tree136e0fefebe6ec544c101b4e04bb56a85ede57f1 /configure
parent6fa3555cc501ab1dfb034061e991e065e2e54253 (diff)
downloadriscv-pk-2c4e689bc1ed4440d0d95b3b350ce872e7f75865.zip
riscv-pk-2c4e689bc1ed4440d0d95b3b350ce872e7f75865.tar.gz
riscv-pk-2c4e689bc1ed4440d0d95b3b350ce872e7f75865.tar.bz2
Support manually zeroing out BSS when booting (#188)
Some ELF loaders, in particular gdb's load command for dynamically loading files into memory, which is often used to load binaries onto FPGAs over JTAG, do not zero out BSS, leaving the memory in whatever state it was previously in. Thus, introduce a new --enable-zero-bss configure flag, which will include code to zero out BSS when booting.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure15
1 files changed, 15 insertions, 0 deletions
diff --git a/configure b/configure
index 587f1f6..9d2c146 100755
--- a/configure
+++ b/configure
@@ -675,6 +675,7 @@ with_arch
with_abi
enable_print_device_tree
with_mem_start
+enable_zero_bss
enable_optional_subprojects
enable_vm
enable_logo
@@ -1314,6 +1315,7 @@ Optional Features:
--enable-stow Enable stow-based install
--enable-print-device-tree
Print DTS when booting
+ --enable-zero-bss Manually zero out BSS when booting
--enable-optional-subprojects
Enable all optional subprojects
--disable-vm Disable virtual memory
@@ -4122,6 +4124,19 @@ else
fi
+# Check whether --enable-zero-bss was given.
+if test "${enable_zero_bss+set}" = set; then :
+ enableval=$enable_zero_bss;
+fi
+
+if test "x$enable_zero_bss" = "xyes"; then :
+
+
+$as_echo "#define ZERO_BSS /**/" >>confdefs.h
+
+
+fi
+
#-------------------------------------------------------------------------
# MCPPBS subproject list
#-------------------------------------------------------------------------