]> git.sur5r.net Git - u-boot/commitdiff
x86: Add a CBMEM timestamp generated right before the kernel startup.
authorVadim Bendebury <vbendeb@chromium.org>
Tue, 23 Oct 2012 18:04:34 +0000 (18:04 +0000)
committerSimon Glass <sjg@chromium.org>
Thu, 6 Dec 2012 22:30:39 +0000 (14:30 -0800)
To maintain the initialization state of the timestamp facility, thesq
pointer to the CBMEM section containing the timestamp table should be
kept in the .data section (so that it is maintained across u-boot
relocation).

Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
arch/x86/include/asm/arch-coreboot/timestamp.h
arch/x86/lib/zimage.c

index e48ad8631bd8da0ca9dddc1e5798865d3a91a4ee..d104912e06628fe91f88383b428df21ef2dc2845 100644 (file)
@@ -42,6 +42,7 @@ enum timestamp_id {
 
        /* U-Boot entry IDs start at 1000 */
        TS_U_BOOT_INITTED = 1000, /* This is where u-boot starts */
+       TS_U_BOOT_START_KERNEL = 1100, /* Right before jumping to kernel. */
 };
 
 void timestamp_init(void);
index b8c672babddc23fa06189efa31e09f300180a01f..238ed614e862ba5674d394296305728c5d7e44ce 100644 (file)
@@ -36,6 +36,9 @@
 #include <asm/realmode.h>
 #include <asm/byteorder.h>
 #include <asm/bootparam.h>
+#ifdef CONFIG_SYS_COREBOOT
+#include <asm/arch/timestamp.h>
+#endif
 
 /*
  * Memory lay-out:
@@ -283,6 +286,9 @@ void boot_zimage(void *setup_base, void *load_address)
 {
        printf("\nStarting kernel ...\n\n");
 
+#ifdef CONFIG_SYS_COREBOOT
+       timestamp_add_now(TS_U_BOOT_START_KERNEL);
+#endif
 #if defined CONFIG_ZBOOT_32
        /*
         * Set %ebx, %ebp, and %edi to 0, %esi to point to the boot_params