Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144171186
D46984.id144410.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
769 B
Referenced Files
None
Subscribers
None
D46984.id144410.diff
View Options
Index: sys/amd64/include/cpufunc.h
===================================================================
--- sys/amd64/include/cpufunc.h
+++ 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
Fri, Feb 6, 9:54 PM (15 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28450748
Default Alt Text
D46984.id144410.diff (769 B)
Attached To
Mode
D46984: amd64: Add wrappers for XRSTORS and XSAVES
Attached
Detach File
Event Timeline
Log In to Comment