MCPcopy Create free account
hub / github.com/coreboot/coreboot / timestamp_alloc_cbmem_table

Function timestamp_alloc_cbmem_table

src/lib/timestamp.c:45–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45static struct timestamp_table *timestamp_alloc_cbmem_table(void)
46{
47 struct timestamp_table *tst;
48
49 tst = cbmem_add(CBMEM_ID_TIMESTAMP,
50 sizeof(struct timestamp_table) +
51 MAX_TIMESTAMPS * sizeof(struct timestamp_entry));
52
53 if (!tst)
54 return NULL;
55
56 tst->base_time = 0;
57 tst->max_entries = MAX_TIMESTAMPS;
58 tst->num_entries = 0;
59
60 return tst;
61}
62
63/* Determine if one should proceed into timestamp code. This is for protecting
64 * systems that have multiple processors running in romstage -- namely AMD

Callers 1

timestamp_reinitFunction · 0.85

Calls 1

cbmem_addFunction · 0.70

Tested by

no test coverage detected