Skip to content

Commit

Permalink
riscv/vspace.c: revise comments
Browse files Browse the repository at this point in the history
This revises comments for `map_kernel_window()` to be in line with
the code.

Signed-off-by: Yanfeng Liu <[email protected]>
  • Loading branch information
yf13 authored and lsf37 committed Dec 4, 2024
1 parent b67ff0b commit 5632069
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/arch/riscv/kernel/vspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ BOOT_CODE VISIBLE void map_kernel_window(void)
pptr += RISCV_GET_LVL_PGSIZE(0);
paddr += RISCV_GET_LVL_PGSIZE(0);
}
/* now we should be mapping the 1GiB kernel base */
/* now map KERNEL_ELF_BASE to KERNEL_ELF_PADDR_BASE */
assert(pptr == PPTR_TOP);
pptr = ROUND_DOWN(KERNEL_ELF_BASE, RISCV_GET_LVL_PGSIZE_BITS(0));
paddr = ROUND_DOWN(KERNEL_ELF_PADDR_BASE, RISCV_GET_LVL_PGSIZE_BITS(0));
Expand Down Expand Up @@ -157,7 +157,7 @@ BOOT_CODE VISIBLE void map_kernel_window(void)
pte_next(kpptr_to_paddr(kernel_image_level2_dev_pt), false);
#endif

/* There should be 1GiB free where we put device mapping */
/* There should be free space where we put device mapping */
assert(pptr == UINTPTR_MAX - RISCV_GET_LVL_PGSIZE(0) + 1);
map_kernel_devices();
}
Expand Down

0 comments on commit 5632069

Please sign in to comment.