[coreboot] Patch set updated for coreboot: 395e6db Add timestamps for selfboot and acpi wake

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Wed Mar 7 02:12:57 CET 2012


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/733

-gerrit

commit 395e6db059da6cbc0048ed9a082fe1906df43c11
Author: Duncan Laurie <dlaurie at chromium.org>
Date:   Wed Oct 19 15:32:39 2011 -0700

    Add timestamps for selfboot and acpi wake
    
    Change-Id: I28224867610b947739d940d25c98399d219f10f4
    Signed-off-by: Duncan Laurie <dlaurie at google.com>
---
 src/arch/x86/boot/acpi.c |    7 +++++++
 src/boot/selfboot.c      |    7 +++++++
 src/include/timestamp.h  |    2 ++
 3 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c
index eb2e4e1..d4d554c 100644
--- a/src/arch/x86/boot/acpi.c
+++ b/src/arch/x86/boot/acpi.c
@@ -31,6 +31,9 @@
 #include <arch/acpigen.h>
 #include <device/pci.h>
 #include <cbmem.h>
+#if CONFIG_COLLECT_TIMESTAMPS
+#include <timestamp.h>
+#endif
 #if CONFIG_CHROMEOS
 #include <vendorcode/google/chromeos/chromeos.h>
 #endif
@@ -611,6 +614,10 @@ void acpi_jump_to_wakeup(void *vector)
 	/* Copy wakeup trampoline in place. */
 	memcpy((void *)WAKEUP_BASE, &__wakeup, (size_t)&__wakeup_size);
 
+#if CONFIG_COLLECT_TIMESTAMPS
+	timestamp_add_now(TS_ACPI_WAKE_JUMP);
+#endif
+
 	acpi_do_wakeup((u32)vector, acpi_backup_memory, CONFIG_RAMBASE,
 		       HIGH_MEMORY_SAVE);
 }
diff --git a/src/boot/selfboot.c b/src/boot/selfboot.c
index bbf160e..d4ab8c8 100644
--- a/src/boot/selfboot.c
+++ b/src/boot/selfboot.c
@@ -29,6 +29,9 @@
 #include <string.h>
 #include <cbfs.h>
 #include <lib.h>
+#if CONFIG_COLLECT_TIMESTAMPS
+#include <timestamp.h>
+#endif
 
 /* Maximum physical address we can use for the coreboot bounce buffer. */
 #ifndef MAX_ADDR
@@ -529,6 +532,10 @@ static int selfboot(struct lb_memory *mem, struct cbfs_payload *payload)
 	printk(BIOS_DEBUG, "Jumping to boot code at %x\n", entry);
 	post_code(POST_ENTER_ELF_BOOT);
 
+#if CONFIG_COLLECT_TIMESTAMPS
+	timestamp_add_now(TS_SELFBOOT_JUMP);
+#endif
+
 	/* Jump to kernel */
 	jmp_to_elf_entry((void*)entry, bounce_buffer, bounce_size);
 	return 1;
diff --git a/src/include/timestamp.h b/src/include/timestamp.h
index cfa06e2..8b9a89a 100644
--- a/src/include/timestamp.h
+++ b/src/include/timestamp.h
@@ -37,6 +37,8 @@ struct timestamp_table {
 enum timestamp_id {
 	TS_BEFORE_INITRAM = 1,
 	TS_AFTER_INITRAM = 2,
+	TS_ACPI_WAKE_JUMP = 98,
+	TS_SELFBOOT_JUMP = 99,
 };
 
 void timestamp_init(tsc_t base);




More information about the coreboot mailing list