printf("Failed to read RAM buffer '%s': %d\n", arg, err);
return err;
}
+ state->ram_buf_read = true;
return 0;
}
static void setup_ram_buf(struct sandbox_state *state)
{
+ /* Zero the RAM buffer if we didn't read it, to keep valgrind happy */
+ if (!state->ram_buf_read) {
+ memset(state->ram_buf, '\0', state->ram_size);
+ printf("clear %p %x\n", state->ram_buf, state->ram_size);
+ }
+
gd->arch.ram_buf = state->ram_buf;
gd->ram_size = state->ram_size;
}
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]