DragonOS-Community / DragonOS

使用Rust从0自研内核,具有Linux兼容性的操作系统,面向云计算轻量化场景而设计。DragonOS is an operating system developed from scratch using Rust, with Linux compatibility. It is designed for lightweight cloud computing scenarios.
https://dragonos.org
GNU General Public License v2.0
814 stars 131 forks source link

[BUG REPORT] acpi pm timer 没有更新墙上时间,并且没有触发软中断。 #782

Open fslongjin opened 1 month ago

fslongjin commented 1 month ago

问题

acpi pm timer 没有更新墙上时间,并且没有触发软中断。

这会导致:

  1. 软中断没法触发
  2. 各种定时任务无法运行。

要实现以上功能,我认为需要设置acpi pm timer的定时器中断,然后在中断里面模仿hpet的处理逻辑去做。

参考

  1. https://wiki.osdev.org/ACPI_Timer

    IRQs The ACPI Power Management Timer generates a SCI when the counter has overflown. To know more about SCIs, see FADT#SCI_Interrupt.

  2. https://wiki.osdev.org/FADT#SCI_Interrupt

fslongjin commented 1 month ago

@1037827920

fslongjin commented 1 month ago

我正在修复这个bug

fslongjin commented 1 month ago

目前想了想,感觉应该用这个思路去做,而不是启用acpi pm timer的中断: https://bbs.dragonos.org.cn/t/topic/214