From 799f79ba01ac10803a567c86598519d4a1dfbcd1 Mon Sep 17 00:00:00 2001 From: bluseliu50 <265648257+bluseliu50@users.noreply.github.com> Date: Thu, 22 Oct 2026 20:13:13 +0800 Subject: [PATCH] test(memory): model IODirection and kIOMemoryPersistent in the host fixture --- tests/XnuMemoryFixture.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/XnuMemoryFixture.h b/tests/XnuMemoryFixture.h index 5d1fa13..b894026 100644 --- a/tests/XnuMemoryFixture.h +++ b/tests/XnuMemoryFixture.h @@ -15,7 +15,8 @@ using addr64_t=uint64_t; constexpr IOReturn kIOReturnSuccess=0,kIOReturnBadArgument=1,kIOReturnBusy=2, kIOReturnNoResources=3,kIOReturnNoMemory=4,kIOReturnUnsupported=5, kIOReturnNotReady=6,kIOReturnIOError=7,kIOReturnTimeout=8; -constexpr unsigned kIODirectionOut=2,kIODirectionInOut=3,kIOMemoryMapperNone=0x800,kIOMemoryPhysicallyContiguous=0x10; +using IODirection=unsigned; +constexpr unsigned kIODirectionOut=2,kIODirectionInOut=3,kIOMemoryMapperNone=0x800,kIOMemoryPhysicallyContiguous=0x10,kIOMemoryPersistent=0x10000; inline void *kernel_task=reinterpret_cast(1); using task_t=void *; /* ScatterUnlessContiguous: what the tablet does, one physical page per span unless the caller asked for contiguous memory. */