From 1f76ff66bdbb29bb8d05308b067473647cbcfd5a Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Sat, 17 Nov 2007 18:56:43 +0000 Subject: [PATCH] Reset fixes: * recalculate CRC to avoid error message and halt after reset * fix bug that crashed SS10/SMP when reset git-svn-id: svn://coreboot.org/openbios/openbios-devel@177 f158a5a8-5612-0410-a976-696ce0be7e32 --- arch/sparc32/entry.S | 2 +- drivers/obio.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/sparc32/entry.S b/arch/sparc32/entry.S index 520c634..2cba02c 100644 --- a/arch/sparc32/entry.S +++ b/arch/sparc32/entry.S @@ -129,7 +129,7 @@ ss10: ! Check if this not the first SMP CPU, if so, bypass PROM entirely add %g3, SPARC_SMP_VALID, %g1 lduba [%g1] ASI_M_CTL, %g2 - stba %g0, [%g2] ASI_M_CTL + stba %g0, [%g1] ASI_M_CTL set PHYS_SS10_EEPROM + OHW_RAM_SIZE, %g1 ldda [%g1] ASI_M_CTL, %g0 tst %g2 diff --git a/drivers/obio.c b/drivers/obio.c index bfdf1cc..91c8415 100644 --- a/drivers/obio.c +++ b/drivers/obio.c @@ -687,6 +687,7 @@ ob_nvram_init(uint64_t base, uint64_t offset) unsigned int machine_id; struct cpudef *cpu; ohwcfg_v3_t *header; + uint16_t crc; ob_new_obio_device("eeprom", NULL); @@ -721,6 +722,7 @@ ob_nvram_init(uint64_t base, uint64_t offset) header->kernel_image = 0; header->kernel_size = 0; header->cmdline_size = 0; + header->crc = OHW_compute_crc(header, 0x00, 0xF8); boot_device = nv_info.boot_devices[0]; nographic = nv_info.graphic_flags & OHW_GF_NOGRAPHICS;