aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-04-16 12:46:51 -0400
committerIan Moffett <ian@osmora.org>2024-04-16 12:47:38 -0400
commit9a26f4d453b1742c6249d66a077a175120e23338 (patch)
tree3dce52f8d48b9f562a2fdf79675d18897088c779
parent5bd702ec90d57bd131e90bdc97845b3e11b9c42b (diff)
kernel: vm_map: Add more detail to comment
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--sys/vm/vm_map.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index f65bad2..7d79108 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -83,7 +83,10 @@ vm_map_create(struct vas vas, vaddr_t va, paddr_t pa, vm_prot_t prot, size_t byt
struct vm_ctx *ctx = vm_get_ctx();
- /* We want bytes to be aligned by the granule */
+ /*
+ * The amount of bytes to be mapped should fully span pages,
+ * so we ensure it is aligned by the page granularity.
+ */
bytes = __ALIGN_UP(bytes + misalign, granule);
/* Align VA/PA by granule */