OpenBSD cvs log

created 2022-11-24T13:14:58Z
begin 2022-11-08T16:53:40Z
end 2022-11-08T17:34:13Z
path src/sys
commits 2

date 2022-11-08T17:34:12Z
author cheloha
files src/sys/arch/amd64/amd64/acpi_machdep.c log diff annotate
message amd64: switch to clockintr(9)

Switch amd64 to the clockintr(9) subsystem. There are lots of little
changes, but the bigs ones are listed here.

When using the local apic timer:

- Run the timer in one-shot mode.
- lapic_delay() is gone. We can't use it to delay(9) when running
the timer in one-shot mode.
- Add a randomized statclock(); stathz = hz.
- Add support for switching to profhz when profiling is enabled;
profhz = stathz * 10.

When using the i8254/mc146818:

- i8254's clockintr() no longer has a monopoly on hardclock().
- mc146818's rtcintr() no longer has a monopoly on statclock().
- In profiling mode, the statclock() will drift very slightly
because (profhz = 1024) does not divide evenly into one billion.
We could avoid this by setting (profhz = 512) instead and
programming the RTC to run at that rate.

Early revisions reviewed by mlarkin@. Extensively tested by mlarkin@
on a variety of physical and virtual hardware. Additional testing
from dv@ and jmc@.

Link: https://marc.info/?l=openbsd-tech&m=166776339203279&w=2

ok kettenis@ mlarkin@

date 2022-11-08T17:34:13Z
author cheloha
files src/sys/arch/amd64/amd64/cpu.c log diff annotate
src/sys/arch/amd64/amd64/lapic.c log diff annotate
src/sys/arch/amd64/include/_types.h log diff annotate
src/sys/arch/amd64/include/cpu.h log diff annotate
src/sys/arch/amd64/isa/clock.c log diff annotate
message amd64: switch to clockintr(9)

Switch amd64 to the clockintr(9) subsystem. There are lots of little
changes, but the bigs ones are listed here.

When using the local apic timer:

- Run the timer in one-shot mode.
- lapic_delay() is gone. We can't use it to delay(9) when running
the timer in one-shot mode.
- Add a randomized statclock(); stathz = hz.
- Add support for switching to profhz when profiling is enabled;
profhz = stathz * 10.

When using the i8254/mc146818:

- i8254's clockintr() no longer has a monopoly on hardclock().
- mc146818's rtcintr() no longer has a monopoly on statclock().
- In profiling mode, the statclock() will drift very slightly
because (profhz = 1024) does not divide evenly into one billion.
We could avoid this by setting (profhz = 512) instead and
programming the RTC to run at that rate.

Early revisions reviewed by mlarkin@. Extensively tested by mlarkin@
on a variety of physical and virtual hardware. Additional testing
from dv@ and jmc@.

Link: https://marc.info/?l=openbsd-tech&m=166776339203279&w=2

ok kettenis@ mlarkin@