2 * This file is part of the coreboot project.
4 * Copyright (C) 2011 The ChromiumOS Authors. All rights reserved.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
20 #ifndef __TIMESTAMP_H__
21 #define __TIMESTAMP_H__
23 #include <cpu/x86/tsc.h>
25 struct timestamp_entry {
28 } __attribute__((packed));
30 struct timestamp_table {
34 struct timestamp_entry entries[0]; /* Variable number of entries */
35 } __attribute__((packed));
38 TS_START_ROMSTAGE = 1,
39 TS_BEFORE_INITRAM = 2,
44 TS_START_RAMSTAGE = 10,
45 TS_DEVICE_ENUMERATE = 30,
46 TS_DEVICE_CONFIGURE = 40,
47 TS_DEVICE_ENABLE = 50,
48 TS_DEVICE_INITIALIZE = 60,
52 TS_ACPI_WAKE_JUMP = 98,
53 TS_SELFBOOT_JUMP = 99,
56 #if CONFIG_COLLECT_TIMESTAMPS
57 void timestamp_init(tsc_t base);
58 void timestamp_add(enum timestamp_id id, tsc_t ts_time);
59 void timestamp_add_now(enum timestamp_id id);
61 #define timestamp_init(base)
62 #define timestamp_add(id, time)
63 #define timestamp_add_now(id)