From 25e7dc6a6a798451973b2a3d7c02edc3658b270d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 22 May 2017 05:05:30 -0600 Subject: bootstage: Support relocating boostage data Some boards cannot access pre-relocation data after relocation. Reserve space for this and copy it during preparation for relocation. Signed-off-by: Simon Glass --- include/asm-generic/global_data.h | 1 + include/bootstage.h | 12 ++++++++++++ 2 files changed, 13 insertions(+) (limited to 'include') diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 8b3229e5b8d..fb90be9d3eb 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -112,6 +112,7 @@ typedef struct global_data { #endif #ifdef CONFIG_BOOTSTAGE struct bootstage_data *bootstage; /* Bootstage information */ + struct bootstage_data *new_bootstage; /* Relocated bootstage info */ #endif } gd_t; #endif diff --git a/include/bootstage.h b/include/bootstage.h index 41bd61785c6..8607e887d8b 100644 --- a/include/bootstage.h +++ b/include/bootstage.h @@ -331,6 +331,13 @@ int bootstage_stash(void *base, int size); */ int bootstage_unstash(void *base, int size); +/** + * bootstage_get_size() - Get the size of the bootstage data + * + * @return size of boostage data in bytes + */ +int bootstage_get_size(void); + /** * bootstage_init() - Prepare bootstage for use * @@ -400,6 +407,11 @@ static inline int bootstage_unstash(void *base, int size) return 0; /* Pretend to succeed */ } +static inline int bootstage_get_size(void) +{ + return 0; +} + static inline int bootstage_init(bool first) { return 0; -- cgit