Skip to content

fix(x86): attach CMOS RTC on direct boot and declare PNP0B00 in DSDT - #569

Merged
Lencerf merged 1 commit into
google:mainfrom
Lencerf:push-ksuzykuzpvky
Nov 25, 2026
Merged

Lencerf merged 1 commit into
google:mainfrom
Lencerf:push-ksuzykuzpvky

Conversation

@Lencerf

@Lencerf Lencerf commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Attach the emulated CMOS RTC unconditionally on x86_64 (matching PL031 on aarch64) instead of only when booting firmware, and declare it as _SB.RTC0 (PNP0B00, I/O 0x70..0x71, no IRQ) in the x86_64 DSDT.

Without the CMOS device on direct kernel boot, Linux reads 0xff from port 0x71, sees RTC_UIP permanently set, and stalls for ~1.2s in mc146818_does_rtc_work(). Without PNP0B00 in DSDT, Linux falls back to a platform rtc_cmos device with hardcoded legacy IRQ 8, which fails with -EINVAL since Alioth has no legacy 8259 PIC.

Attach the emulated CMOS RTC unconditionally on x86_64 (matching PL031
on aarch64) instead of only when booting firmware, and declare it as
_SB.RTC0 (PNP0B00, I/O 0x70..0x71, no IRQ) in the x86_64 DSDT.

Without the CMOS device on direct kernel boot, Linux reads 0xff from
port 0x71, sees RTC_UIP permanently set, and stalls for ~1.2s in
mc146818_does_rtc_work(). Without PNP0B00 in DSDT, Linux falls back to
a platform rtc_cmos device with hardcoded legacy IRQ 8, which fails
with -EINVAL since Alioth has no legacy 8259 PIC.

Signed-off-by: Changyuan Lyu <changyuanl@google.com>
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 45520487983

Coverage increased (+0.01%) to 45.518%

Details

  • Coverage increased (+0.01%) from the base build.
  • Patch coverage: 2 uncovered changes across 2 files (0 of 2 lines covered, 0.0%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
alioth-cli/src/boot/boot.rs 1 0 0.0%
alioth/src/board/board_amd64/board_amd64.rs 1 0 0.0%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 16613
Covered Lines: 7355
Line Coverage: 44.27%
Relevant Branches: 1806
Covered Branches: 1029
Branch Coverage: 56.98%
Branches in Coverage %: Yes
Coverage Strength: 901.85 hits per line

💛 - Coveralls

@Lencerf
Lencerf added this pull request to the merge queue Nov 25, 2026
Merged via the queue into google:main with commit 95cc372 Nov 25, 2026
20 checks passed
@Lencerf
Lencerf deleted the push-ksuzykuzpvky branch November 25, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants