Page MenuHomeFreeBSD

D46984.diff
No OneTemporary

D46984.diff

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

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)

Event Timeline