summaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-22 11:05:25 (GMT)
committerTom Rini <trini@konsulko.com>2017-06-05 18:13:04 (GMT)
commitb383d6c05e2587a7b3ea13855e4161bacb64feb9 (patch)
tree80f2498137f15567794d49c65deca346817fbb61 /include/asm-generic
parent5a0e275cbbc4f462495e9a7e04acf0f6bfbd13c5 (diff)
downloadu-boot-fsl-qoriq-b383d6c05e2587a7b3ea13855e4161bacb64feb9.tar.xz
bootstage: Convert to use malloc()
At present bootstage uses the data section of the image to store its information. There are a few problems with this: - It does not work on all boards (e.g. those which run from flash before relocation) - Allocated strings still point back to the pre-relocation data after relocation Now that U-Boot has a pre-relocation malloc() we can use this instead, with a pointer to the data in global_data. Update bootstage to do this and set up an init routine to allocate the memory. Now that we have a real init function, we can drop the fake 'reset' record and add a normal one instead. Note that part of the problem with allocated strings remains. They are reallocated but this will only work where pre-relocation memory is accessible after relocation. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/global_data.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index e6f9051..8b3229e 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -110,6 +110,9 @@ typedef struct global_data {
ulong video_top; /* Top of video frame buffer area */
ulong video_bottom; /* Bottom of video frame buffer area */
#endif
+#ifdef CONFIG_BOOTSTAGE
+ struct bootstage_data *bootstage; /* Bootstage information */
+#endif
} gd_t;
#endif