* Copyright (c) 2011, Google Inc. All rights reserved.
*/
-
/*
* This module records the progress of boot and arbitrary commands, and
* permits accurate timestamping of each.
u32 next_id; /* Next ID to use for bootstage */
};
-int bootstage_relocate(void)
+int bootstage_relocate(void *to)
{
- struct bootstage_data *data = gd->bootstage;
+ struct bootstage_data *data;
int i;
char *ptr;
+ debug("Copying bootstage from %p to %p\n", gd->bootstage, to);
+ memcpy(to, gd->bootstage, sizeof(struct bootstage_data));
+ data = gd->bootstage = to;
+
/* Figure out where to relocate the strings to */
ptr = (char *)(data + 1);
for (rec = data->record + data->next_id, i = 0; i < hdr->count;
i++, rec++) {
rec->name = ptr;
- if (spl_phase() == PHASE_SPL)
+ if (xpl_phase() == PHASE_SPL)
rec->name = strdup(ptr);
/* Assume no data corruption here */
return 0;
}
+#if IS_ENABLED(CONFIG_BOOTSTAGE_STASH)
int _bootstage_stash_default(void)
{
return bootstage_stash(map_sysmem(CONFIG_BOOTSTAGE_STASH_ADDR, 0),
return bootstage_unstash(stash, CONFIG_BOOTSTAGE_STASH_SIZE);
}
+#endif
int bootstage_get_size(void)
{