From f3e90cdd5b59bc18b392faea08b2b5cabb46c12a Mon Sep 17 00:00:00 2001 From: pjht Date: Tue, 19 Mar 2024 12:50:52 -0500 Subject: [PATCH] Add support for vmem_set_flags syscall --- include/syscalls.i | 2 ++ syscalls.68k | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/include/syscalls.i b/include/syscalls.i index 01060cd..160777c 100644 --- a/include/syscalls.i +++ b/include/syscalls.i @@ -19,4 +19,6 @@ __STD_SYSCALLS_I equ 1 ; Returns the range start in a0 ; Permission flags in d2 xref syscall_vmem_map_free_to +; Sets the permission flags of the range of virtual pages starting at address a0 with length d1 to d0 + xref syscall_vmem_set_flags endif diff --git a/syscalls.68k b/syscalls.68k index 9ebb13d..a9c5525 100644 --- a/syscalls.68k +++ b/syscalls.68k @@ -67,4 +67,14 @@ syscall_vmem_map_free_to: trap #0 move.l (a7)+, d3 rts - + + public syscall_vmem_set_flags +; Sets the permission flags of the range of virtual pages starting at address a0 with length d1 to d0 +syscall_vmem_set_flags: + move.l d2, -(a7) + move.l d1, d2 + move.l d0, d1 + move.l #7, d0 + trap #0 + move.l (a7)+, d2 + rts