summaryrefslogtreecommitdiff
path: root/kernel/plic.c
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2019-06-13 09:40:17 -0400
committerRobert Morris <[email protected]>2019-06-13 09:40:17 -0400
commitca39672a300196fb3ae4b05c469fa871fa7c13e8 (patch)
tree0d0fd56db53284f009eca7298a8f1d559713275a /kernel/plic.c
parent4adf01692539c57c7612f105ecf3e8b5291ae018 (diff)
downloadxv6-labs-ca39672a300196fb3ae4b05c469fa871fa7c13e8.tar.gz
xv6-labs-ca39672a300196fb3ae4b05c469fa871fa7c13e8.tar.bz2
xv6-labs-ca39672a300196fb3ae4b05c469fa871fa7c13e8.zip
clean up virtio code
Diffstat (limited to 'kernel/plic.c')
-rw-r--r--kernel/plic.c4
1 files changed, 2 insertions, 2 deletions
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;