Page MenuHomeFreeBSD

[PowerPC64] fix pseries llan driver not working on ELFv2 ABI kernel
ClosedPublic

Authored by alfredo on Apr 22 2019, 3:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 3, 1:10 AM
Unknown Object (File)
Fri, Nov 29, 7:29 AM
Unknown Object (File)
Fri, Nov 22, 12:05 AM
Unknown Object (File)
Nov 21 2024, 9:14 AM
Unknown Object (File)
Nov 18 2024, 10:39 PM
Unknown Object (File)
Nov 18 2024, 9:34 PM
Unknown Object (File)
Nov 18 2024, 9:31 PM
Unknown Object (File)
Nov 18 2024, 7:38 PM

Details

Summary

Network interface driver pseries-llan wasn't working on kernel compiled for ELFv2 ABI.
The hyper call "H_SEND_LOGICAL_LAN" [1] returned H_HARDWARE (error) instead of H_SUCCESS, as wrong value for "continue-token" parameter was being received from the driver.

The root cause was identified as the incorrect offset of "Stack Frame - Parameter Save Area" on ELFv2 ABI, that's SP+32 instead of SP+48 [2].

[1] LoPAPR_DRAFT_v11_24March2016 - 16.4.3.5 H_SEND_LOGICAL_LAN
[2] 2.2.2. The Stack Frame - http://openpowerfoundation.org/wp-content/uploads/resources/leabi/content/dbdoclet.50655240___RefHeading___Toc377640582.html#dbdoclet.50655240_97610

Test Plan

Test network interface on QEMU-PowerPC64 with kernel built with both ELFv1 and ELFv2 ABIs

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable