Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amd64 Introduce smap_enable()/smap_disable() functi...
details: https://anonhg.NetBSD.org/src/rev/ae02c8ce3ef8
branches: trunk
changeset: 946533:ae02c8ce3ef8
user: bouyer <bouyer%NetBSD.org@localhost>
date: Mon Nov 30 17:02:27 2020 +0000
description:
Introduce smap_enable()/smap_disable() functions, to be used from
C code.
diffstat:
sys/arch/amd64/amd64/cpufunc.S | 12 +++++++++++-
sys/arch/amd64/include/cpufunc.h | 5 ++++-
2 files changed, 15 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r 01f72484d6da -r ae02c8ce3ef8 sys/arch/amd64/amd64/cpufunc.S
--- a/sys/arch/amd64/amd64/cpufunc.S Mon Nov 30 14:27:23 2020 +0000
+++ b/sys/arch/amd64/amd64/cpufunc.S Mon Nov 30 17:02:27 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpufunc.S,v 1.64 2020/07/19 07:35:08 maxv Exp $ */
+/* $NetBSD: cpufunc.S,v 1.65 2020/11/30 17:02:27 bouyer Exp $ */
/*
* Copyright (c) 1998, 2007, 2008, 2020 The NetBSD Foundation, Inc.
@@ -167,6 +167,16 @@
STRONG_ALIAS(x86_write_psl,x86_write_flags)
+ENTRY(smap_enable)
+ SMAP_ENABLE
+ ret
+END(smap_enable)
+
+ENTRY(smap_disable)
+ SMAP_DISABLE
+ ret
+END(smap_disable)
+
/*
* %rdi = name
* %rsi = sel
diff -r 01f72484d6da -r ae02c8ce3ef8 sys/arch/amd64/include/cpufunc.h
--- a/sys/arch/amd64/include/cpufunc.h Mon Nov 30 14:27:23 2020 +0000
+++ b/sys/arch/amd64/include/cpufunc.h Mon Nov 30 17:02:27 2020 +0000
@@ -1,3 +1,6 @@
-/* $NetBSD: cpufunc.h,v 1.19 2007/10/17 19:53:03 garbled Exp $ */
+/* $NetBSD: cpufunc.h,v 1.20 2020/11/30 17:02:27 bouyer Exp $ */
#include <x86/cpufunc.h>
+
+void smap_enable(void);
+void smap_disable(void);
Home |
Main Index |
Thread Index |
Old Index