* @return pointer to name, either from the record or pointing to buf.
*/
static const char *get_record_name(char *buf, int len,
- struct bootstage_record *rec)
+ const struct bootstage_record *rec)
{
if (rec->name)
return rec->name;
int bootstage_stash(void *base, int size)
{
- struct bootstage_data *data = gd->bootstage;
+ const struct bootstage_data *data = gd->bootstage;
struct bootstage_hdr *hdr = (struct bootstage_hdr *)base;
- struct bootstage_record *rec;
+ const struct bootstage_record *rec;
char buf[20];
char *ptr = base, *end = ptr + size;
uint32_t count;
return 0;
}
-int bootstage_unstash(void *base, int size)
+int bootstage_unstash(const void *base, int size)
{
+ const struct bootstage_hdr *hdr = (struct bootstage_hdr *)base;
struct bootstage_data *data = gd->bootstage;
- struct bootstage_hdr *hdr = (struct bootstage_hdr *)base;
+ const char *ptr = base, *end = ptr + size;
struct bootstage_record *rec;
- char *ptr = base, *end = ptr + size;
uint rec_size;
int i;
* there is not space for read the stacked data, or other error if
* something else went wrong
*/
-int bootstage_unstash(void *base, int size);
+int bootstage_unstash(const void *base, int size);
/**
* bootstage_get_size() - Get the size of the bootstage data
return 0; /* Pretend to succeed */
}
-static inline int bootstage_unstash(void *base, int size)
+static inline int bootstage_unstash(const void *base, int size)
{
return 0; /* Pretend to succeed */
}