summaryrefslogtreecommitdiff
path: root/arch/sandbox/include/asm
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-11-23 21:29:29 -0700
committerSimon Glass <sjg@chromium.org>2018-12-05 06:01:34 -0700
commita65d1a06c9f76d3285948a059b861d7534589cfc (patch)
treeea14f430006a34818ec82fe630f84dcafa5bb0a2 /arch/sandbox/include/asm
parent2a07269062a8e63dadc23be0f8b0d4638da7d2d2 (diff)
sandbox: Zero the ram buffer on startup
At present the RAM buffer is not inited unless it is read from a file, likely produced by an earlier phase of U-Boot. This causes valgrind warnings whenever the RAM buffer is used. Correct this by initing it if needed. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/include/asm')
-rw-r--r--arch/sandbox/include/asm/state.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/state.h b/arch/sandbox/include/asm/state.h
index 8fabe70a86..5a14485102 100644
--- a/arch/sandbox/include/asm/state.h
+++ b/arch/sandbox/include/asm/state.h
@@ -90,6 +90,7 @@ struct sandbox_state {
bool show_test_output; /* Don't suppress stdout in tests */
int default_log_level; /* Default log level for sandbox */
bool show_of_platdata; /* Show of-platdata in SPL */
+ bool ram_buf_read; /* true if we read the RAM buffer */
/* Pointer to information for each SPI bus/cs */
struct sandbox_spi_info spi[CONFIG_SANDBOX_SPI_MAX_BUS]