[coreboot] [commit] r5270 - trunk/src/southbridge/intel/i82801dx

Joseph Smith joe at settoplinux.org
Tue Mar 23 12:14:26 CET 2010




On Tue, 23 Mar 2010 10:38:57 +0100, Stefan Reinauer <stepan at coresystems.de>
wrote:
> On 3/23/10 12:10 AM, repository service wrote:
>> +	/* Check to see whether it took */
>> +	reg32 = pci_read_config32(dev, GEN_CNTL);
>> +	val = reg32 >> 15;
>> +	val &= 0x7;
>> +
>> +	if ((val & 0x4) && (hpet == (val & 0x3))) {
>> +		printk_debug("HPET enabled at 0x%x\n", HPET_ADDR);
>> +	} else {
>> +		printk_err("HPET was not enabled correctly\n");
>> +		reg32 &= ~(1 << 17);	/* Clear Enable */
>> +		pci_write_config32(dev, GEN_CNTL, reg32);
>> +	}
>>
> 
> What kind of errr condition does that check for?

Good question. It does two checks. First to see if HPET is enabled, and
second to verify the hpet base address bits match the input value (hpet).
If either one of these are false it leaves with a err message, makes sure
HPET is disabled and continues on. Maybe printk_err() is a bit harsh here
because it doesn't actually die() if there is an error, but I wanted to
make sure it is _KNOWN_ in the bootlog if there was an issue enabling HPET.
Does that make sense?

-- 
Thanks,
Joseph Smith
Set-Top-Linux
www.settoplinux.org





More information about the coreboot mailing list