Skip to content

Commit

Permalink
fix(rv32): modify literals and add specific casts
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Martins <[email protected]>
  • Loading branch information
josecm committed May 24, 2024
1 parent edcc4d0 commit a8f73d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/arch/riscv/interrupts.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void interrupts_arch_ipi_send(cpuid_t target_cpu, irqid_t ipi_id)
if (ACLINT_PRESENT()) {
aclint_send_ipi(target_cpu);
} else {
sbi_send_ipi(1ULL << target_cpu, 0);
sbi_send_ipi(1UL << target_cpu, 0);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/arch/riscv/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ bool mem_translate(struct addr_space* as, vaddr_t va, paddr_t* pa)
}
if (pte && pte_valid(pte)) {
*pa = pte_addr(pte);
paddr_t mask = (1ULL << as->pt.dscr->lvl_off[lvl]) - 1;
paddr_t mask = (paddr_t)(1UL << as->pt.dscr->lvl_off[lvl]) - 1;
*pa = (*pa & ~mask) | ((paddr_t)va & mask);
return true;
} else {
Expand Down

0 comments on commit a8f73d9

Please sign in to comment.