diff options
| author | salmonik <salmonik@tuta.io> | 2026-08-01 14:21:11 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-08-01 14:21:11 +0200 |
| commit | 6447eb12948d37b74adae2fdbf1db5a9d7b363d5 (patch) | |
| tree | 0aa03cc79db7ff49f5a64a484ff197ba05f9b6bc /rsdosedit | |
| parent | klog: kernel log ring + /dev/klog + klog shell command (diff) | |
| download | rs-dos-6447eb12948d37b74adae2fdbf1db5a9d7b363d5.tar.gz rs-dos-6447eb12948d37b74adae2fdbf1db5a9d7b363d5.zip | |
klog: [ssss.mmm] millisecond timestamps from the PIT
- interrupts::uptime_ms(): monotonic ms since boot — the 100 Hz PIT
tick (10 ms) plus interpolation from the PIT's live 1.19 MHz
down-counter (read twice around the tick load; a count jump means a
tick fired between reads) for true sub-ms resolution. TICKS widened
AtomicU16 -> AtomicU64 (u16 wrapped after ~11 min).
- PIT_READY gates interpolation until interrupts::init configures the
timer, so early-boot lines are deterministically [0000.000] instead
of uninitialised-PIT noise; klog clamps timestamps monotonic.
- The CMOS RTC cannot provide milliseconds (1 Hz BCD device, seconds
only) — millis come from the PIT.
- klog stores ms per line at append time; dump format is now
'[0000.123] 000000 === rsnix boot ===' (user-specified format).
Verified in QEMU: first line [0000.000], Phase-2 lines show real
monotonic ms (fs: vfs ready at [0000.519], self-test [0000.524]),
per-dump monotonicity, boot.log persists timestamps, test-disk round
trip fsck-clean.
Diffstat (limited to 'rsdosedit')
0 files changed, 0 insertions, 0 deletions
