summaryrefslogtreecommitdiff
path: root/arch/x86/cpu/coreboot/timestamp.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-10-18 22:32:45 -0600
committerTom Rini <trini@konsulko.com>2024-10-18 22:32:45 -0600
commit7036abbd5c3934059b020d5fd5bcb8b3bf3c788c (patch)
tree0fb8fd19b51862cf5742ec68ef889e4ad441dde7 /arch/x86/cpu/coreboot/timestamp.c
parentf83e36fd83c74b4e28a45a9d56abc4ad9b7848b9 (diff)
parent44917d586657eeae0401bc29af80011a264002e7 (diff)
Merge tag 'dm-pull-17oct24-take2' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
A few new x86 commands and minor improvements expo improvements binman support for signing FIT images
Diffstat (limited to 'arch/x86/cpu/coreboot/timestamp.c')
-rw-r--r--arch/x86/cpu/coreboot/timestamp.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/x86/cpu/coreboot/timestamp.c b/arch/x86/cpu/coreboot/timestamp.c
index ec4003c4e77..681191d85bb 100644
--- a/arch/x86/cpu/coreboot/timestamp.c
+++ b/arch/x86/cpu/coreboot/timestamp.c
@@ -6,13 +6,12 @@
*/
#include <bootstage.h>
+#include <errno.h>
#include <asm/arch/timestamp.h>
#include <asm/cb_sysinfo.h>
#include <asm/u-boot-x86.h>
#include <linux/compiler.h>
-static struct timestamp_table *ts_table __section(".data");
-
void timestamp_init(void)
{
timestamp_add_now(TS_U_BOOT_INITTED);
@@ -20,6 +19,8 @@ void timestamp_init(void)
void timestamp_add(enum timestamp_id id, uint64_t ts_time)
{
+ const struct sysinfo_t *info = cb_get_sysinfo();
+ struct timestamp_table *ts_table = info->tstamp_table;
struct timestamp_entry *tse;
if (!ts_table || (ts_table->num_entries == ts_table->max_entries))
@@ -37,13 +38,15 @@ void timestamp_add_now(enum timestamp_id id)
int timestamp_add_to_bootstage(void)
{
+ const struct sysinfo_t *info = cb_get_sysinfo();
+ const struct timestamp_table *ts_table = info->tstamp_table;
uint i;
if (!ts_table)
- return -1;
+ return -ENOENT;
for (i = 0; i < ts_table->num_entries; i++) {
- struct timestamp_entry *tse = &ts_table->entries[i];
+ const struct timestamp_entry *tse = &ts_table->entries[i];
const char *name = NULL;
switch (tse->entry_id) {