phil-opp / blog_os

Writing an OS in Rust
http://os.phil-opp.com
Apache License 2.0
14.27k stars 1.01k forks source link

Where can i see APIC example? #1290

Open Fidius-jko opened 4 months ago

Fidius-jko commented 4 months ago

Where can i see APIC example? I use uefi in qemu and PIC doesn't work with qemu uefi.

tsatke commented 4 months ago

You can check out https://github.com/kennystrawnmusic/cryptos or https://github.com/tsatke/devos if the documentation around https://docs.rs/x2apic/latest/x2apic doesn't suffice.

xuanplus commented 4 months ago

https://github.com/xuanplus/rust-os-dev/blob/main/kernel/src/apic/lapic.rs

It maybe helpful for you. But I don't know how to enable ioapic, I only enable Timer.

kennystrawnmusic commented 4 months ago

Here's an example (mentioned above by @tsatke as well) that makes use of the x2apic crate: https://github.com/kennystrawnmusic/cryptos/blob/master/src/drivers/apic_impl.rs