Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108084204
D46984.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
745 B
Referenced Files
None
Subscribers
None
D46984.diff
View Options
diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h
--- a/sys/amd64/include/cpufunc.h
+++ b/sys/amd64/include/cpufunc.h
@@ -942,6 +942,29 @@
return (sgx_encls(SGX_EREMOVE, 0, (uint64_t)epc, 0));
}
+static __inline void
+xrstors(uint8_t *save_area, uint64_t state_bitmap)
+{
+ uint32_t low, hi;
+
+ low = state_bitmap;
+ hi = state_bitmap >> 32;
+ __asm __volatile("xrstors %0" : : "m"(*save_area), "a"(low),
+ "d"(hi));
+}
+
+static __inline void
+xsaves(uint8_t *save_area, uint64_t state_bitmap)
+{
+ uint32_t low, hi;
+
+ low = state_bitmap;
+ hi = state_bitmap >> 32;
+ __asm __volatile("xsaves %0" : "=m"(*save_area) : "a"(low),
+ "d"(hi)
+ : "memory");
+}
+
void reset_dbregs(void);
#ifdef _KERNEL
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 22, 6:05 AM (20 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14304574
Default Alt Text
D46984.diff (745 B)
Attached To
Mode
D46984: amd64: Add wrappers for XRSTORS and XSAVES
Attached
Detach File
Event Timeline
Log In to Comment