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
This commit is contained in:
Blue Swirl
2007-11-17 18:56:43 +00:00
parent a4340199fb
commit 1f76ff66bd
2 changed files with 3 additions and 1 deletions

View File

@@ -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

View File

@@ -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;