Author: jhibbits
Date: Tue Apr 23 03:05:26 2019
New Revision: 346589
URL: https://svnweb.freebsd.org/changeset/base/346589

Log:
  powerpc64/pseries: Fix hypervisor call with extra arguments
  
  Some hypervisor calls, such as H_SEND_LOGICAL_LAN, take more arguments than
  are traditionally passed in registers.  The HCALL ABI will accept these
  arguments in r11 and r12.  With ELFv2 ABI, these arguments are 2
  double-words lower than ELFv1 ABI, as two double-words in the stack frame
  are no longer used, and therefore removed from the frame.  Fix the offsets
  for loading the registers for the HCALL.  This fixes the phyp_llan driver
  with ELFv2 kernel.
  
  Submitted by: alfredo.junior_eldorado.org.br
  Differential Revision:        https://reviews.freebsd.org/D20008

Modified:
  head/sys/powerpc/pseries/phyp-hvcall.S

Modified: head/sys/powerpc/pseries/phyp-hvcall.S
==============================================================================
--- head/sys/powerpc/pseries/phyp-hvcall.S      Tue Apr 23 02:53:53 2019        
(r346588)
+++ head/sys/powerpc/pseries/phyp-hvcall.S      Tue Apr 23 03:05:26 2019        
(r346589)
@@ -36,8 +36,13 @@
 ASENTRY(phyp_hcall)
        mflr    %r0
        std     %r0,16(%r1)
+#if defined(_CALL_ELF) && _CALL_ELF == 2
+       ld      %r11,96(%r1)            /* Last couple args into volatile regs*/
+       ld      %r12,104(%r1)
+#else
        ld      %r11,112(%r1)           /* Last couple args into volatile regs*/
        ld      %r12,120(%r1)
+#endif
        hc                              /* invoke the hypervisor */
        ld      %r0,16(%r1)
        mtlr    %r0


_______________________________________________
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"

Reply via email to