mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
amd64: add convenience wrappers for INVLPGB and TBLSYNC
(cherry picked from commit 111c7fc2fe)
This commit is contained in:
parent
d66c4853b8
commit
c3cd4db461
1 changed files with 23 additions and 0 deletions
|
|
@ -529,6 +529,29 @@ invpcid(struct invpcid_descr *d, int type)
|
|||
: : "r" (d), "r" ((u_long)type) : "memory");
|
||||
}
|
||||
|
||||
#define INVLPGB_VA 0x0001
|
||||
#define INVLPGB_PCID 0x0002
|
||||
#define INVLPGB_ASID 0x0004
|
||||
#define INVLPGB_GLOB 0x0008
|
||||
#define INVLPGB_FIN 0x0010
|
||||
#define INVLPGB_NEST 0x0020
|
||||
|
||||
#define INVLPGB_DESCR(asid, pcid) (((pcid) << 16) | (asid))
|
||||
|
||||
#define INVLPGB_2M_CNT (1u << 31)
|
||||
|
||||
static __inline void
|
||||
invlpgb(uint64_t rax, uint32_t edx, uint32_t ecx)
|
||||
{
|
||||
__asm __volatile("invlpgb" : : "a" (rax), "d" (edx), "c" (ecx));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
tlbsync(void)
|
||||
{
|
||||
__asm __volatile("tlbsync");
|
||||
}
|
||||
|
||||
static __inline u_short
|
||||
rfs(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue