[coreboot] New patch to review for coreboot: 2b7ed8b Make timestamp collection conditional in hardwaremain.c

Rudolf Marek (r.marek@assembler.cz) gerrit at coreboot.org
Tue Apr 24 16:03:13 CEST 2012


Rudolf Marek (r.marek at assembler.cz) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/925

-gerrit

commit 2b7ed8b0b48be0c12280eaa08b11626fcca598d8
Author: Rudolf Marek <r.marek at assembler.cz>
Date:   Tue Apr 24 16:01:24 2012 +0200

    Make timestamp collection conditional in hardwaremain.c
    
    Otherwise it breaks 486 boards without RDTSC, ending with
    exception 6.
    
    Change-Id: I974b25377c20a11430b35b24dcc275d8cbfd2b9a
    Signed-off-by: Rudolf Marek <r.marek at assembler.cz>
---
 src/boot/hardwaremain.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/src/boot/hardwaremain.c b/src/boot/hardwaremain.c
index 489caa3..532135f 100644
--- a/src/boot/hardwaremain.c
+++ b/src/boot/hardwaremain.c
@@ -57,9 +57,10 @@ void hardwaremain(int boot_complete);
 void hardwaremain(int boot_complete)
 {
 	struct lb_memory *lb_mem;
+#if CONFIG_COLLECT_TIMESTAMPS
 	tsc_t timestamps[6];
-
 	timestamps[0] = rdtsc();
+#endif
 	post_code(POST_ENTRY_RAMSTAGE);
 
 	/* console_init() MUST PRECEDE ALL printk()! */
@@ -81,26 +82,37 @@ void hardwaremain(int boot_complete)
 	/* FIXME: Is there a better way to handle this? */
 	init_timer();
 
+#if CONFIG_COLLECT_TIMESTAMPS
 	timestamps[1] = rdtsc();
+#endif
 	/* Find the devices we don't have hard coded knowledge about. */
 	dev_enumerate();
 	post_code(POST_DEVICE_ENUMERATION_COMPLETE);
 
+#if CONFIG_COLLECT_TIMESTAMPS
 	timestamps[2] = rdtsc();
+#endif
 	/* Now compute and assign the bus resources. */
 	dev_configure();
 	post_code(POST_DEVICE_CONFIGURATION_COMPLETE);
 
+#if CONFIG_COLLECT_TIMESTAMPS
 	timestamps[3] = rdtsc();
+#endif
 	/* Now actually enable devices on the bus */
 	dev_enable();
 
+#if CONFIG_COLLECT_TIMESTAMPS
 	timestamps[4] = rdtsc();
+#endif
 	/* And of course initialize devices on the bus */
 	dev_initialize();
 	post_code(POST_DEVICES_ENABLED);
 
+#if CONFIG_COLLECT_TIMESTAMPS
 	timestamps[5] = rdtsc();
+#endif
+
 #if CONFIG_WRITE_HIGH_TABLES == 1
 	cbmem_initialize();
 #if CONFIG_CONSOLE_CBMEM




More information about the coreboot mailing list