summaryrefslogtreecommitdiff
path: root/arch/sandbox/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sandbox/cpu')
-rw-r--r--arch/sandbox/cpu/state.c5
-rw-r--r--arch/sandbox/cpu/u-boot-spl.lds2
2 files changed, 5 insertions, 2 deletions
diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c
index 1f794123b3..34b6fff7e7 100644
--- a/arch/sandbox/cpu/state.c
+++ b/arch/sandbox/cpu/state.c
@@ -378,7 +378,10 @@ int state_init(void)
state->ram_size = CONFIG_SYS_SDRAM_SIZE;
state->ram_buf = os_malloc(state->ram_size);
- assert(state->ram_buf);
+ if (!state->ram_buf) {
+ printf("Out of memory\n");
+ os_exit(1);
+ }
state_reset_for_test(state);
/*
diff --git a/arch/sandbox/cpu/u-boot-spl.lds b/arch/sandbox/cpu/u-boot-spl.lds
index de65b01b33..c60eb109b1 100644
--- a/arch/sandbox/cpu/u-boot-spl.lds
+++ b/arch/sandbox/cpu/u-boot-spl.lds
@@ -20,4 +20,4 @@ SECTIONS
__bss_start = .;
}
-INSERT BEFORE .data;
+INSERT AFTER .data;