1 /* 2 * This file is part of the coreboot project. 3 * 4 * Copyright (C) 2011 The ChromiumOS Authors. All rights reserved. 5 * 6 * SPDX-License-Identifier: GPL-2.0 7 */ 8 9 #ifndef __COREBOOT_TIMESTAMP_H__ 10 #define __COREBOOT_TIMESTAMP_H__ 11 12 enum timestamp_id { 13 /* coreboot specific timestamp IDs */ 14 TS_START_ROMSTAGE = 1, 15 TS_BEFORE_INITRAM = 2, 16 TS_AFTER_INITRAM = 3, 17 TS_END_ROMSTAGE = 4, 18 TS_START_COPYRAM = 8, 19 TS_END_COPYRAM = 9, 20 TS_START_RAMSTAGE = 10, 21 TS_DEVICE_ENUMERATE = 30, 22 TS_DEVICE_CONFIGURE = 40, 23 TS_DEVICE_ENABLE = 50, 24 TS_DEVICE_INITIALIZE = 60, 25 TS_DEVICE_DONE = 70, 26 TS_CBMEM_POST = 75, 27 TS_WRITE_TABLES = 80, 28 TS_LOAD_PAYLOAD = 90, 29 TS_ACPI_WAKE_JUMP = 98, 30 TS_SELFBOOT_JUMP = 99, 31 32 /* U-Boot entry IDs start at 1000 */ 33 TS_U_BOOT_INITTED = 1000, /* This is where u-boot starts */ 34 TS_U_BOOT_START_KERNEL = 1100, /* Right before jumping to kernel. */ 35 }; 36 37 void timestamp_init(void); 38 void timestamp_add(enum timestamp_id id, uint64_t ts_time); 39 void timestamp_add_now(enum timestamp_id id); 40 41 /** 42 * timestamp_add_to_bootstage - Add important coreboot timestamps to bootstage 43 * 44 * @return 0 if ok, -1 if no timestamps were found 45 */ 46 int timestamp_add_to_bootstage(void); 47 48 #endif 49