Browse Source

Merge pull request #134 from lsgunth/ie_words_fix

Fix the calculation for the number of interrupt enable words
pull/138/head
Palmer Dabbelt 7 years ago
committed by GitHub
parent
commit
e12593841a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      machine/minit.c

3
machine/minit.c

@ -129,7 +129,8 @@ static void hart_plic_init()
if (!plic_ndevs)
return;
size_t ie_words = plic_ndevs / sizeof(uintptr_t) + 1;
size_t ie_words = (plic_ndevs + 8 * sizeof(uintptr_t) - 1) /
(8 * sizeof(uintptr_t));
for (size_t i = 0; i < ie_words; i++) {
if (HLS()->plic_s_ie) {
// Supervisor not always present

Loading…
Cancel
Save