From ca39672a300196fb3ae4b05c469fa871fa7c13e8 Mon Sep 17 00:00:00 2001 From: Robert Morris Date: Thu, 13 Jun 2019 09:40:17 -0400 Subject: clean up virtio code --- kernel/plic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kernel/plic.c') diff --git a/kernel/plic.c b/kernel/plic.c index cc9a97e..b569492 100644 --- a/kernel/plic.c +++ b/kernel/plic.c @@ -13,7 +13,7 @@ plicinit(void) { // set desired IRQ priorities non-zero (otherwise disabled). *(uint32*)(PLIC + UART0_IRQ*4) = 1; - *(uint32*)(PLIC + VIRTIO_IRQ*4) = 1; + *(uint32*)(PLIC + VIRTIO0_IRQ*4) = 1; } void @@ -22,7 +22,7 @@ plicinithart(void) int hart = cpuid(); // set uart's enable bit for this hart's S-mode. - *(uint32*)PLIC_SENABLE(hart)= (1 << UART0_IRQ) | (1 << VIRTIO_IRQ); + *(uint32*)PLIC_SENABLE(hart)= (1 << UART0_IRQ) | (1 << VIRTIO0_IRQ); // set this hart's S-mode priority threshold to 0. *(uint32*)PLIC_SPRIORITY(hart) = 0; -- cgit v1.2.3