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 * 66dbe0cceSVadim Bendebury * This program is free software; you can redistribute it and/or modify 76dbe0cceSVadim Bendebury * it under the terms of the GNU General Public License as published by 86dbe0cceSVadim Bendebury * the Free Software Foundation; version 2 of the License. 96dbe0cceSVadim Bendebury * 106dbe0cceSVadim Bendebury * This program is distributed in the hope that it will be useful, 116dbe0cceSVadim Bendebury * but WITHOUT ANY WARRANTY; without even the implied warranty of 126dbe0cceSVadim Bendebury * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 136dbe0cceSVadim Bendebury * GNU General Public License for more details. 146dbe0cceSVadim Bendebury * 156dbe0cceSVadim Bendebury * You should have received a copy of the GNU General Public License 166dbe0cceSVadim Bendebury * along with this program; if not, write to the Free Software 176dbe0cceSVadim Bendebury * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA 186dbe0cceSVadim Bendebury */ 196dbe0cceSVadim Bendebury 206dbe0cceSVadim Bendebury #ifndef __COREBOOT_TIMESTAMP_H__ 216dbe0cceSVadim Bendebury #define __COREBOOT_TIMESTAMP_H__ 226dbe0cceSVadim Bendebury 236dbe0cceSVadim Bendebury enum timestamp_id { 246dbe0cceSVadim Bendebury /* coreboot specific timestamp IDs */ 256dbe0cceSVadim Bendebury TS_START_ROMSTAGE = 1, 266dbe0cceSVadim Bendebury TS_BEFORE_INITRAM = 2, 276dbe0cceSVadim Bendebury TS_AFTER_INITRAM = 3, 286dbe0cceSVadim Bendebury TS_END_ROMSTAGE = 4, 296dbe0cceSVadim Bendebury TS_START_COPYRAM = 8, 306dbe0cceSVadim Bendebury TS_END_COPYRAM = 9, 316dbe0cceSVadim Bendebury TS_START_RAMSTAGE = 10, 326dbe0cceSVadim Bendebury TS_DEVICE_ENUMERATE = 30, 336dbe0cceSVadim Bendebury TS_DEVICE_CONFIGURE = 40, 346dbe0cceSVadim Bendebury TS_DEVICE_ENABLE = 50, 356dbe0cceSVadim Bendebury TS_DEVICE_INITIALIZE = 60, 366dbe0cceSVadim Bendebury TS_DEVICE_DONE = 70, 376dbe0cceSVadim Bendebury TS_CBMEM_POST = 75, 386dbe0cceSVadim Bendebury TS_WRITE_TABLES = 80, 396dbe0cceSVadim Bendebury TS_LOAD_PAYLOAD = 90, 406dbe0cceSVadim Bendebury TS_ACPI_WAKE_JUMP = 98, 416dbe0cceSVadim Bendebury TS_SELFBOOT_JUMP = 99, 426dbe0cceSVadim Bendebury 436dbe0cceSVadim Bendebury /* U-Boot entry IDs start at 1000 */ 446dbe0cceSVadim Bendebury TS_U_BOOT_INITTED = 1000, /* This is where u-boot starts */ 453cdc18a8SVadim Bendebury TS_U_BOOT_START_KERNEL = 1100, /* Right before jumping to kernel. */ 466dbe0cceSVadim Bendebury }; 476dbe0cceSVadim Bendebury 486dbe0cceSVadim Bendebury void timestamp_init(void); 496dbe0cceSVadim Bendebury void timestamp_add(enum timestamp_id id, uint64_t ts_time); 506dbe0cceSVadim Bendebury void timestamp_add_now(enum timestamp_id id); 516dbe0cceSVadim Bendebury 52*5397d805SSimon Glass /** 53*5397d805SSimon Glass * timestamp_add_to_bootstage - Add important coreboot timestamps to bootstage 54*5397d805SSimon Glass * 55*5397d805SSimon Glass * @return 0 if ok, -1 if no timestamps were found 56*5397d805SSimon Glass */ 57*5397d805SSimon Glass int timestamp_add_to_bootstage(void); 58*5397d805SSimon Glass 596dbe0cceSVadim Bendebury #endif 60