timestamp.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * This file is part of the coreboot project.
  3. *
  4. * Copyright (C) 2011 The ChromiumOS Authors. All rights reserved.
  5. *
  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.
  9. *
  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.
  14. *
  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
  18. */
  19. #ifndef __COREBOOT_TIMESTAMP_H__
  20. #define __COREBOOT_TIMESTAMP_H__
  21. enum timestamp_id {
  22. /* coreboot specific timestamp IDs */
  23. TS_START_ROMSTAGE = 1,
  24. TS_BEFORE_INITRAM = 2,
  25. TS_AFTER_INITRAM = 3,
  26. TS_END_ROMSTAGE = 4,
  27. TS_START_COPYRAM = 8,
  28. TS_END_COPYRAM = 9,
  29. TS_START_RAMSTAGE = 10,
  30. TS_DEVICE_ENUMERATE = 30,
  31. TS_DEVICE_CONFIGURE = 40,
  32. TS_DEVICE_ENABLE = 50,
  33. TS_DEVICE_INITIALIZE = 60,
  34. TS_DEVICE_DONE = 70,
  35. TS_CBMEM_POST = 75,
  36. TS_WRITE_TABLES = 80,
  37. TS_LOAD_PAYLOAD = 90,
  38. TS_ACPI_WAKE_JUMP = 98,
  39. TS_SELFBOOT_JUMP = 99,
  40. /* U-Boot entry IDs start at 1000 */
  41. TS_U_BOOT_INITTED = 1000, /* This is where u-boot starts */
  42. TS_U_BOOT_START_KERNEL = 1100, /* Right before jumping to kernel. */
  43. };
  44. void timestamp_init(void);
  45. void timestamp_add(enum timestamp_id id, uint64_t ts_time);
  46. void timestamp_add_now(enum timestamp_id id);
  47. #endif