diff options
author | Robert Morris <[email protected]> | 2019-06-13 06:49:02 -0400 |
---|---|---|
committer | Robert Morris <[email protected]> | 2019-06-13 06:49:02 -0400 |
commit | de9d72c9086ec935d5b2b889f50ff611135f80fa (patch) | |
tree | 071952e383057de705c59f9e7894f3154e4bbad2 /kernel/plic.c | |
parent | 5753553213df8f9de851adb68377db43faecb91f (diff) | |
download | xv6-labs-de9d72c9086ec935d5b2b889f50ff611135f80fa.tar.gz xv6-labs-de9d72c9086ec935d5b2b889f50ff611135f80fa.tar.bz2 xv6-labs-de9d72c9086ec935d5b2b889f50ff611135f80fa.zip |
virtio disk driver
Diffstat (limited to 'kernel/plic.c')
-rw-r--r-- | kernel/plic.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/plic.c b/kernel/plic.c index 0f19ab0..cc9a97e 100644 --- a/kernel/plic.c +++ b/kernel/plic.c @@ -11,8 +11,9 @@ void plicinit(void) { - // set uart's priority to be non-zero (otherwise disabled). + // set desired IRQ priorities non-zero (otherwise disabled). *(uint32*)(PLIC + UART0_IRQ*4) = 1; + *(uint32*)(PLIC + VIRTIO_IRQ*4) = 1; } void @@ -21,11 +22,9 @@ plicinithart(void) int hart = cpuid(); // set uart's enable bit for this hart's S-mode. - //*(uint32*)(PLIC + 0x2080)= (1 << UART0_IRQ); - *(uint32*)PLIC_SENABLE(hart)= (1 << UART0_IRQ); + *(uint32*)PLIC_SENABLE(hart)= (1 << UART0_IRQ) | (1 << VIRTIO_IRQ); // set this hart's S-mode priority threshold to 0. - //*(uint32*)(PLIC + 0x201000) = 0; *(uint32*)PLIC_SPRIORITY(hart) = 0; } |