]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - include/bootstage.h
bootstage: Copy bootstage strings post-relocation
[karo-tx-uboot.git] / include / bootstage.h
index bdda76849fb63441c264b9474ca8d71084561a13..c8235e8ed6ad10a0c7a551b785201d735be290b2 100644 (file)
@@ -236,6 +236,16 @@ void show_boot_progress(int val);
 #if defined(CONFIG_BOOTSTAGE) && !defined(CONFIG_SPL_BUILD)
 /* This is the full bootstage implementation */
 
+/**
+ * Relocate existing bootstage records
+ *
+ * Call this after relocation has happened and after malloc has been initted.
+ * We need to copy any pointers in bootstage records that were added pre-
+ * relocation, since memory can be overritten later.
+ * @return Always returns 0, to indicate success
+ */
+int bootstage_relocate(void);
+
 /**
  * Add a new bootstage record
  *
@@ -326,6 +336,11 @@ static inline ulong bootstage_add_record(enum bootstage_id id,
  * and won't even do that unless CONFIG_SHOW_BOOT_PROGRESS is defined
  */
 
+static inline int bootstage_relocate(void)
+{
+       return 0;
+}
+
 static inline ulong bootstage_mark(enum bootstage_id id)
 {
        show_boot_progress(id);