diff --git a/Makefile b/Makefile index 4207db983..27076ca38 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -51,7 +51,6 @@ FEATURES ?= APP_FEATURES ?= # QEMU options -CONSOLE ?= n BLK ?= n NET ?= n GRAPHIC ?= n @@ -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 @@ -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 \ No newline at end of file diff --git a/modules/ruxdriver/src/virtio.rs b/modules/ruxdriver/src/virtio.rs index 09cd2c742..3379c0852 100644 --- a/modules/ruxdriver/src/virtio.rs +++ b/modules/ruxdriver/src/virtio.rs @@ -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}; diff --git a/modules/ruxhal/src/virtio/virtio_console.rs b/modules/ruxhal/src/virtio/virtio_console.rs index 394e2393e..c86cba5a2 100644 --- a/modules/ruxhal/src/virtio/virtio_console.rs +++ b/modules/ruxhal/src/virtio/virtio_console.rs @@ -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); @@ -177,7 +180,7 @@ pub fn ack_interrupt() { } pub fn is_probe(addr: usize) -> bool { - unsafe { return addr == UART.addr; } + unsafe { addr == UART.addr } }