From cc8c7e14538184e9ce9a53992ca9cdea1de13347 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Sat, 2 May 2026 23:38:05 +0800 Subject: fix: update physical and virtual address handling in self-tests Co-authored-by: Copilot --- na/test/test_slab.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'na/test/test_slab.cc') 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(base_ptr)); - Frame* f = pa_to_frame(page_pa); + uint64 page_pa = va_to_pa(virt_addr(reinterpret_cast(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); -- cgit v1.2.3