diff options
| -rw-r--r-- | sys/amd64/amd64/support.S | 10 | ||||
| -rw-r--r-- | sys/i386/i386/support.S | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index 1d7d05843ba8..b037e03f87f2 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -1996,4 +1996,14 @@ ENTRY(cpu_sync_core) iretq END(cpu_sync_core) +/* External Retpoline thunk */ +ENTRY(__x86_indirect_thunk_r11) + callq 2f +1: pause + lfence + jmp 1b +2: movq %r11, (%rsp) + retq +END(__x86_indirect_thunk_r11) + .section .note.GNU-stack,"",%progbits diff --git a/sys/i386/i386/support.S b/sys/i386/i386/support.S index e5e39c9ec5d4..cb6420750f77 100644 --- a/sys/i386/i386/support.S +++ b/sys/i386/i386/support.S @@ -587,4 +587,14 @@ ENTRY(cpu_sync_core) iretl END(cpu_sync_core) +/* External retpoline thunk */ +ENTRY(__x86_indirect_thunk_eax) + calll 2f +1: pause + lfence + jmp 1b +2: movl %eax, (%esp) + retl +END(__x86_indirect_thunk_eax) + .section .note.GNU-stack,"",%progbits |
