Author: kib Date: Mon Jun 10 17:43:33 2019 New Revision: 348871 URL: https://svnweb.freebsd.org/changeset/base/348871
Log: MFC r348539: amd64 ef_rt_arch_call: Preserve %rflags around call into EFI RT service. Modified: stable/12/sys/amd64/amd64/efirt_support.S stable/12/sys/amd64/amd64/genassym.c stable/12/sys/amd64/include/efi.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/efirt_support.S ============================================================================== --- stable/12/sys/amd64/amd64/efirt_support.S Mon Jun 10 17:40:31 2019 (r348870) +++ stable/12/sys/amd64/amd64/efirt_support.S Mon Jun 10 17:43:33 2019 (r348871) @@ -47,6 +47,9 @@ ENTRY(efi_rt_arch_call) movq %r13, EC_R13(%rdi) movq %r14, EC_R14(%rdi) movq %r15, EC_R15(%rdi) + pushfq + popq %rax + movq %rax, EC_RFLAGS(%rdi) movq PCPU(CURTHREAD), %rax movq %rdi, TD_MD+MD_EFIRT_TMP(%rax) movq PCPU(CURPCB), %rsi @@ -98,6 +101,8 @@ efi_rt_arch_call_tail: movq EC_RBP(%rdi), %rbp movq EC_RSP(%rdi), %rsp movq EC_RBX(%rdi), %rbx + pushq EC_RFLAGS(%rdi) + popfq popq %rbp ret Modified: stable/12/sys/amd64/amd64/genassym.c ============================================================================== --- stable/12/sys/amd64/amd64/genassym.c Mon Jun 10 17:40:31 2019 (r348870) +++ stable/12/sys/amd64/amd64/genassym.c Mon Jun 10 17:43:33 2019 (r348871) @@ -272,3 +272,4 @@ ASSYM(EC_R12, offsetof(struct efirt_callinfo, ec_r12)) ASSYM(EC_R13, offsetof(struct efirt_callinfo, ec_r13)); ASSYM(EC_R14, offsetof(struct efirt_callinfo, ec_r14)); ASSYM(EC_R15, offsetof(struct efirt_callinfo, ec_r15)); +ASSYM(EC_RFLAGS, offsetof(struct efirt_callinfo, ec_rflags)); Modified: stable/12/sys/amd64/include/efi.h ============================================================================== --- stable/12/sys/amd64/include/efi.h Mon Jun 10 17:40:31 2019 (r348870) +++ stable/12/sys/amd64/include/efi.h Mon Jun 10 17:43:33 2019 (r348871) @@ -72,6 +72,7 @@ struct efirt_callinfo { register_t ec_r13; register_t ec_r14; register_t ec_r15; + register_t ec_rflags; }; #endif /* __AMD64_INCLUDE_EFI_H_ */ _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"