diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2017-11-29 15:37:04 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-12-03 22:10:56 -0600 |
commit | 09a2319fdebc6664738ad2b2b86f4624036b094d (patch) | |
tree | 1ef6fede2ace7303e98c0ddba1a697aecbb3649a | |
parent | 4cfd44c463e28bffb9dfc1a8987c10c969d032f2 (diff) | |
download | blackbird-skiboot-09a2319fdebc6664738ad2b2b86f4624036b094d.tar.gz blackbird-skiboot-09a2319fdebc6664738ad2b2b86f4624036b094d.zip |
fast-reboot: move fdt freeing into init
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | core/fast-reboot.c | 8 | ||||
-rw-r--r-- | core/init.c | 8 |
2 files changed, 9 insertions, 7 deletions
diff --git a/core/fast-reboot.c b/core/fast-reboot.c index 2547e908..83328eb9 100644 --- a/core/fast-reboot.c +++ b/core/fast-reboot.c @@ -61,9 +61,6 @@ static bool cpu_state_wait_all_others(enum cpu_thread_state state, return true; } -extern void *fdt; -extern struct lock capi_lock; - static const char *fast_reboot_disabled = NULL; void disable_fast_reboot(const char *reason) @@ -104,10 +101,9 @@ void fast_reboot(void) return; } - prlog(PR_NOTICE, "RESET: Initiating fast reboot %d...\n", ++fast_reboot_count); - - free(fdt); + /* Should mem_check() all regions before allowing fast reboot? */ + prlog(PR_NOTICE, "RESET: Initiating fast reboot %d...\n", ++fast_reboot_count); fast_boot_release = false; sync(); diff --git a/core/init.c b/core/init.c index f2747c65..0fdd7f00 100644 --- a/core/init.c +++ b/core/init.c @@ -501,8 +501,14 @@ void __noreturn load_and_boot_kernel(bool is_reboot) /* Wait for FW VPD data read to complete */ fsp_code_update_wait_vpd(true); - } else + + } else { + /* fdt will be rebuilt */ + free(fdt); + fdt = NULL; + nvram_reinit(); + } fsp_console_select_stdout(); |