Skip to content

Commit

Permalink
fast-reboot: move fdt freeing into init
Browse files Browse the repository at this point in the history
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
npiggin authored and stewartsmith committed Dec 4, 2017
1 parent 4cfd44c commit 09a2319
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 2 additions & 6 deletions core/fast-reboot.c
Expand Up @@ -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)
Expand Down Expand Up @@ -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();

Expand Down
8 changes: 7 additions & 1 deletion core/init.c
Expand Up @@ -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();

Expand Down

0 comments on commit 09a2319

Please sign in to comment.