Make timestamp collection conditional in hardwaremain.c
Otherwise it breaks 486 boards without RDTSC, ending with exception 6. It ends like this on bifferboard: Jumping to image. Unexpected Exception: 6 @ 10:001007e3 - Halting Code: 0 eflags: 00000016 eax: 001001fe ebx: 00100118 ecx: 00000000 edx: 00108e00 edi: 0010aaf8 esi: 00000000 ebp: 00117ff4 esp: 00117fd8 Please keep in mind 486, dont use rdtsc/cpuid in generic code, or if you do make sure make it non-default option. Change that broke it: http://review.coreboot.org/#/c/749/7/src/boot/hardwaremain.c Change-Id: I974b25377c20a11430b35b24dcc275d8cbfd2b9a Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Reviewed-on: http://review.coreboot.org/925 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
parent
02c204706f
commit
3294a0f1ca
|
@ -57,9 +57,10 @@ void hardwaremain(int boot_complete);
|
||||||
void hardwaremain(int boot_complete)
|
void hardwaremain(int boot_complete)
|
||||||
{
|
{
|
||||||
struct lb_memory *lb_mem;
|
struct lb_memory *lb_mem;
|
||||||
|
#if CONFIG_COLLECT_TIMESTAMPS
|
||||||
tsc_t timestamps[6];
|
tsc_t timestamps[6];
|
||||||
|
|
||||||
timestamps[0] = rdtsc();
|
timestamps[0] = rdtsc();
|
||||||
|
#endif
|
||||||
post_code(POST_ENTRY_RAMSTAGE);
|
post_code(POST_ENTRY_RAMSTAGE);
|
||||||
|
|
||||||
/* console_init() MUST PRECEDE ALL printk()! */
|
/* console_init() MUST PRECEDE ALL printk()! */
|
||||||
|
@ -81,26 +82,37 @@ void hardwaremain(int boot_complete)
|
||||||
/* FIXME: Is there a better way to handle this? */
|
/* FIXME: Is there a better way to handle this? */
|
||||||
init_timer();
|
init_timer();
|
||||||
|
|
||||||
|
#if CONFIG_COLLECT_TIMESTAMPS
|
||||||
timestamps[1] = rdtsc();
|
timestamps[1] = rdtsc();
|
||||||
|
#endif
|
||||||
/* Find the devices we don't have hard coded knowledge about. */
|
/* Find the devices we don't have hard coded knowledge about. */
|
||||||
dev_enumerate();
|
dev_enumerate();
|
||||||
post_code(POST_DEVICE_ENUMERATION_COMPLETE);
|
post_code(POST_DEVICE_ENUMERATION_COMPLETE);
|
||||||
|
|
||||||
|
#if CONFIG_COLLECT_TIMESTAMPS
|
||||||
timestamps[2] = rdtsc();
|
timestamps[2] = rdtsc();
|
||||||
|
#endif
|
||||||
/* Now compute and assign the bus resources. */
|
/* Now compute and assign the bus resources. */
|
||||||
dev_configure();
|
dev_configure();
|
||||||
post_code(POST_DEVICE_CONFIGURATION_COMPLETE);
|
post_code(POST_DEVICE_CONFIGURATION_COMPLETE);
|
||||||
|
|
||||||
|
#if CONFIG_COLLECT_TIMESTAMPS
|
||||||
timestamps[3] = rdtsc();
|
timestamps[3] = rdtsc();
|
||||||
|
#endif
|
||||||
/* Now actually enable devices on the bus */
|
/* Now actually enable devices on the bus */
|
||||||
dev_enable();
|
dev_enable();
|
||||||
|
|
||||||
|
#if CONFIG_COLLECT_TIMESTAMPS
|
||||||
timestamps[4] = rdtsc();
|
timestamps[4] = rdtsc();
|
||||||
|
#endif
|
||||||
/* And of course initialize devices on the bus */
|
/* And of course initialize devices on the bus */
|
||||||
dev_initialize();
|
dev_initialize();
|
||||||
post_code(POST_DEVICES_ENABLED);
|
post_code(POST_DEVICES_ENABLED);
|
||||||
|
|
||||||
|
#if CONFIG_COLLECT_TIMESTAMPS
|
||||||
timestamps[5] = rdtsc();
|
timestamps[5] = rdtsc();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if CONFIG_WRITE_HIGH_TABLES == 1
|
#if CONFIG_WRITE_HIGH_TABLES == 1
|
||||||
cbmem_initialize();
|
cbmem_initialize();
|
||||||
#if CONFIG_CONSOLE_CBMEM
|
#if CONFIG_CONSOLE_CBMEM
|
||||||
|
|
Loading…
Reference in New Issue