[libcpu][riscv]纠正pv_offset的对齐检查

This commit is contained in:
heyuanjie87 2024-11-20 15:58:50 +08:00 committed by Meco Man
parent bb0a1ea453
commit 2a684126c0
1 changed files with 1 additions and 1 deletions

View File

@ -536,7 +536,7 @@ void rt_hw_mem_setup_early(void)
if (pv_off) if (pv_off)
{ {
if (pv_off & (1ul << (ARCH_INDEX_WIDTH * 2 + ARCH_PAGE_SHIFT))) if (pv_off & ((1ul << (ARCH_INDEX_WIDTH * 2 + ARCH_PAGE_SHIFT)) - 1))
{ {
LOG_E("%s: not aligned virtual address. pv_offset %p", __func__, LOG_E("%s: not aligned virtual address. pv_offset %p", __func__,
pv_off); pv_off);