Skip to content

Commit

Permalink
fix Makefile, Specify virtio_console interrupt using aarch64.
Browse files Browse the repository at this point in the history
  • Loading branch information
ForeverYolo committed Oct 27, 2024
1 parent 791aacf commit b8f2621
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
# - `MUSL`: Link C app with musl libc

# General options
ARCH ?= aarch64
ARCH ?= x86_64
PLATFORM ?=
SMP ?= 1
MODE ?= reldebug
LOG ?= debug
MODE ?= release
LOG ?= warn
V ?=

# App options
Expand All @@ -51,7 +51,6 @@ FEATURES ?=
APP_FEATURES ?=

# QEMU options
CONSOLE ?= n
BLK ?= n
NET ?= n
GRAPHIC ?= n
Expand All @@ -75,8 +74,8 @@ IP ?= 10.0.2.15
GW ?= 10.0.2.2

# args and envs
ARGS ?=
ENVS ?=
ARGS ?=
ENVS ?=

# Libc options
MUSL ?= n
Expand Down Expand Up @@ -282,4 +281,4 @@ clean_musl:
rm -rf ulib/ruxmusl/install

.PHONY: all build disasm run justrun debug clippy fmt fmt_c test test_no_fail_fast clean clean_c\
clean_musl doc disk_image debug_no_attach prebuild _force
clean_musl doc disk_image debug_no_attach prebuild _force
1 change: 1 addition & 0 deletions modules/ruxdriver/src/virtio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use core::marker::PhantomData;
use cfg_if::cfg_if;
use driver_common::{BaseDriverOps, DevResult, DeviceType};
#[cfg(bus = "mmio")]
use ruxhal::mem::phys_to_virt;
use crate::{drivers::DriverProbe, AxDeviceEnum};

Expand Down
7 changes: 5 additions & 2 deletions modules/ruxhal/src/virtio/virtio_console.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,11 @@ pub fn directional_probing() {
info!("Output now redirected to VirtIO Console!");
}



// todo: add platform specific interrupt handling
pub fn enable_interrupt() {
#[cfg(feature = "irq")] {
#[cfg(all(feature = "irq",target_arch = "aarch64"))] {
info!("Initiating VirtIO Console interrupt ...");
info!("IRQ ID: {}", crate::platform::irq::UART_IRQ_NUM);
crate::irq::register_handler(crate::platform::irq::UART_IRQ_NUM, irq_handler);
Expand Down Expand Up @@ -177,7 +180,7 @@ pub fn ack_interrupt() {
}

pub fn is_probe(addr: usize) -> bool {
unsafe { return addr == UART.addr; }
unsafe { addr == UART.addr }
}


Expand Down

0 comments on commit b8f2621

Please sign in to comment.