16dbe0cceSVadim Bendebury /* 26dbe0cceSVadim Bendebury * This file is part of the coreboot project. 36dbe0cceSVadim Bendebury * 46dbe0cceSVadim Bendebury * Copyright (C) 2011 The ChromiumOS Authors. All rights reserved. 56dbe0cceSVadim Bendebury * 6*5b8031ccSTom Rini * SPDX-License-Identifier: GPL-2.0 76dbe0cceSVadim Bendebury */ 86dbe0cceSVadim Bendebury 96dbe0cceSVadim Bendebury #ifndef __COREBOOT_TIMESTAMP_H__ 106dbe0cceSVadim Bendebury #define __COREBOOT_TIMESTAMP_H__ 116dbe0cceSVadim Bendebury 126dbe0cceSVadim Bendebury enum timestamp_id { 136dbe0cceSVadim Bendebury /* coreboot specific timestamp IDs */ 146dbe0cceSVadim Bendebury TS_START_ROMSTAGE = 1, 156dbe0cceSVadim Bendebury TS_BEFORE_INITRAM = 2, 166dbe0cceSVadim Bendebury TS_AFTER_INITRAM = 3, 176dbe0cceSVadim Bendebury TS_END_ROMSTAGE = 4, 186dbe0cceSVadim Bendebury TS_START_COPYRAM = 8, 196dbe0cceSVadim Bendebury TS_END_COPYRAM = 9, 206dbe0cceSVadim Bendebury TS_START_RAMSTAGE = 10, 216dbe0cceSVadim Bendebury TS_DEVICE_ENUMERATE = 30, 226dbe0cceSVadim Bendebury TS_DEVICE_CONFIGURE = 40, 236dbe0cceSVadim Bendebury TS_DEVICE_ENABLE = 50, 246dbe0cceSVadim Bendebury TS_DEVICE_INITIALIZE = 60, 256dbe0cceSVadim Bendebury TS_DEVICE_DONE = 70, 266dbe0cceSVadim Bendebury TS_CBMEM_POST = 75, 276dbe0cceSVadim Bendebury TS_WRITE_TABLES = 80, 286dbe0cceSVadim Bendebury TS_LOAD_PAYLOAD = 90, 296dbe0cceSVadim Bendebury TS_ACPI_WAKE_JUMP = 98, 306dbe0cceSVadim Bendebury TS_SELFBOOT_JUMP = 99, 316dbe0cceSVadim Bendebury 326dbe0cceSVadim Bendebury /* U-Boot entry IDs start at 1000 */ 336dbe0cceSVadim Bendebury TS_U_BOOT_INITTED = 1000, /* This is where u-boot starts */ 343cdc18a8SVadim Bendebury TS_U_BOOT_START_KERNEL = 1100, /* Right before jumping to kernel. */ 356dbe0cceSVadim Bendebury }; 366dbe0cceSVadim Bendebury 376dbe0cceSVadim Bendebury void timestamp_init(void); 386dbe0cceSVadim Bendebury void timestamp_add(enum timestamp_id id, uint64_t ts_time); 396dbe0cceSVadim Bendebury void timestamp_add_now(enum timestamp_id id); 406dbe0cceSVadim Bendebury 415397d805SSimon Glass /** 425397d805SSimon Glass * timestamp_add_to_bootstage - Add important coreboot timestamps to bootstage 435397d805SSimon Glass * 445397d805SSimon Glass * @return 0 if ok, -1 if no timestamps were found 455397d805SSimon Glass */ 465397d805SSimon Glass int timestamp_add_to_bootstage(void); 475397d805SSimon Glass 486dbe0cceSVadim Bendebury #endif 49