tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: (tiny) patch review: return if RTC diag fails
On Thu, Feb 13, 2025 at 01:47:16PM -0500, Greg Troxel wrote:
> Emile `iMil' Heitor <imil%home.imil.net@localhost> writes:
>
> > Understood. So as this seems to only impact qemu/microvm should we
> > consider an if (vm) test?
>
> I have a bias against "if (vm)" unless that is truly the semantics.
> Here it feels like bad/odd RTC behavior, and real hardware could do
> whatever, so handling the bad behavior without regard to cause seems
> best.
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).
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index