diff options
author | James Clarke <jrtc27@jrtc27.com> | 2020-02-03 00:53:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-02 16:53:17 -0800 |
commit | 2c4e689bc1ed4440d0d95b3b350ce872e7f75865 (patch) | |
tree | 136e0fefebe6ec544c101b4e04bb56a85ede57f1 /configure.ac | |
parent | 6fa3555cc501ab1dfb034061e991e065e2e54253 (diff) | |
download | riscv-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.ac')
-rw-r--r-- | configure.ac | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 1653f2b..81492de 100644 --- a/configure.ac +++ b/configure.ac @@ -107,6 +107,11 @@ AC_ARG_WITH([mem-start], AS_HELP_STRING([--with-mem-start], [Set physical memory AC_SUBST([MEM_START], [0x80000000], [Physical memory start address]) ]) +AC_ARG_ENABLE([zero-bss], AS_HELP_STRING([--enable-zero-bss], [Manually zero out BSS when booting])) +AS_IF([test "x$enable_zero_bss" = "xyes"], [ + AC_DEFINE([ZERO_BSS],,[Define if BSS should be manually zeroed when booting]) +]) + #------------------------------------------------------------------------- # MCPPBS subproject list #------------------------------------------------------------------------- |