summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-06-01 19:04:47 -0400
committerIan Moffett <ian@osmora.org>2025-06-01 19:04:47 -0400
commit9cfd49d1f39c0a32e13e405efc3903f1f0e4ff19 (patch)
treeac06008d8a1a58bb17a9f8004c176af13b866bb4 /sys
parente29d9d7a9d60b91a19c4f66a8153a8ff67acb69e (diff)
kernel/amd64: cdefs: Add __invlpg() asm wrapper
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-rw-r--r--sys/include/arch/amd64/cdefs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/include/arch/amd64/cdefs.h b/sys/include/arch/amd64/cdefs.h
index bab0c89..0a20324 100644
--- a/sys/include/arch/amd64/cdefs.h
+++ b/sys/include/arch/amd64/cdefs.h
@@ -43,4 +43,13 @@
#define md_inton() __ASMV("sti") /* Enable interrupts */
#define md_hlt() __ASMV("hlt") /* Halt the processor */
+/*
+ * AMD64 specific defines
+ */
+#define __invlpg(VA) \
+ __ASMV("invlpg %0" \
+ : \
+ : "m" ((VA)) \
+ : "memory")
+
#endif /* !_AMD64_CDEFS_H_ */