Revert "Move IRQ numbers to config lib and annotate with corresp..." Revert "Make PLIC_MAX_NUM_INT match top_matcha.h" Revert "Make camkes IRQ numbers match top_matcha.h" Revert "Make smc_plic.numberOfSources match top_matcha.h" Revert submission 21323-top_matcha_irqs Reason for revert: Breaks TimerService Reverted Changes: I40a840585:Make smc_plic.numberOfSources match top_matcha.h I026a541a6:Move IRQ numbers to config lib and annotate with c... I2873a0561:Make camkes IRQ numbers match top_matcha.h Ida9efaf63:Make PLIC_MAX_NUM_INT match top_matcha.h Change-Id: I1b6cf048c8f5f481769db34b2bfc9e7f0a51d3e5
diff --git a/config/src/lib.rs b/config/src/lib.rs index 155222f..08f6eaf 100644 --- a/config/src/lib.rs +++ b/config/src/lib.rs
@@ -16,7 +16,5 @@ pub const CAPSULE_MAILBOX: usize = 0x50005; pub const CMD_ELFLOADER_BOOT_SEL4: usize = 10; -pub const CMD_DPRINTF_PRINT: usize = 0; -pub const IRQ_UART0_TX_WATERMARK: u32 = 1; // kTopMatchaPlicIrqIdUart0TxWatermark @ top_matcha.h -pub const IRQ_UART0_RX_PARITY_ERR: u32 = 8; // kTopMatchaPlicIrqIdUart0RxParityErr @ top_matcha.h +pub const CMD_DPRINTF_PRINT: usize = 0;
diff --git a/platform/src/chip.rs b/platform/src/chip.rs index f339bbf..dd37838 100644 --- a/platform/src/chip.rs +++ b/platform/src/chip.rs
@@ -12,7 +12,6 @@ use crate::timer; use crate::uart; use matcha_hal::plic_hal; -use matcha_config::*; PMPConfigMacro!(4); @@ -21,6 +20,9 @@ pub const CHIP_PERIPH_FREQ: u32 = 125_000; pub const CHIP_UART_BPS: u32 = 9600; +pub const UART0_TX_WATERMARK: u32 = 1; +pub const UART0_RX_PARITY_ERR: u32 = 8; + pub struct Matcha<A: 'static + Alarm<'static>> { userspace_kernel_boundary: SysCall, pmp: PMP, @@ -45,7 +47,7 @@ unsafe fn handle_plic_interrupts(&self) { while let Some(interrupt) = plic_hal::next_pending() { match interrupt { - IRQ_UART0_TX_WATERMARK..=IRQ_UART0_RX_PARITY_ERR => uart::UART0.handle_interrupt(), + UART0_TX_WATERMARK..=UART0_RX_PARITY_ERR => uart::UART0.handle_interrupt(), _ => debug!("Pidx {}", interrupt), } plic_hal::complete(interrupt);