phil-opp / blog_os

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

Where can i see APIC example? #1290

Open Fidius-jko opened 8 months ago

Fidius-jko commented 8 months ago

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

tsatke commented 8 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 8 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 8 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