On Tue, 23 Mar 2010 10:38:57 +0100, Stefan Reinauer stepan@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?