Re: (tiny) patch review: return if RTC diag fails

Greg Troxel <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
Manuel Bouyer <[email protected]> writes:

> I'm not sure what you call "bad/odd RTC behavior". Here we're just
> reading a byte of the sram, its value can be anything from 0 to 0xff.
> This value is supposed to be written by the BIOS.
>
> I think, from our current definition of NVRAM_DIAG_BITS, that some bits
> are not supposed to be set to 1, but I'm not sure if our NVRAM_DIAG_BITS
> is up to date.
>
> Are you suggecting that we should find another way to detect if the
> mc146818 is present ? AFAIK it's the other way round: unless we know it's
> not present (because e.g. we're in an environnement known to not have
> it like some hypervisors or emulators) we have to assume it's present
> (because it's a mandatory part of the hardware).

I am suggesting that if the code is going to decide the RTC is bad
because of a timeout or a bad value, and not use it, then that shouldn't
have anything to do with 'are we a vm'. That's all.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.