summaryrefslogtreecommitdiff
path: root/na/test/test_slab.cc
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-05-02 23:38:05 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-05-02 23:38:05 +0800
commitcc8c7e14538184e9ce9a53992ca9cdea1de13347 (patch)
treec5b809e03ca242e9c31f281732792c72c05e2b01 /na/test/test_slab.cc
parente7a7c314c94cc390110b450541ccacd8a55e0500 (diff)
downloadlume-cc8c7e14538184e9ce9a53992ca9cdea1de13347.tar.gz
lume-cc8c7e14538184e9ce9a53992ca9cdea1de13347.tar.xz
fix: update physical and virtual address handling in self-tests
Co-authored-by: Copilot <copilot@github.com>
Diffstat (limited to 'na/test/test_slab.cc')
-rw-r--r--na/test/test_slab.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/na/test/test_slab.cc b/na/test/test_slab.cc
index 1035663..e3ac72d 100644
--- a/na/test/test_slab.cc
+++ b/na/test/test_slab.cc
@@ -200,8 +200,8 @@ void selftest_slab()
}
// At this point, we completely own all 32 objects of this slab page.
- uint64 page_pa = ensure_pa(reinterpret_cast<uint64>(base_ptr));
- Frame* f = pa_to_frame(page_pa);
+ uint64 page_pa = va_to_pa(virt_addr(reinterpret_cast<uint64>(base_ptr))).raw;
+ Frame* f = pa_to_frame(phys_addr(page_pa));
ST_ASSERT(f->state == FrameState::Slab);
ST_ASSERT(f->slab.obj_count == 32);