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
F102913017: D20008.id56488.diff
Mon, Nov 18, 4:26 PM
Unknown Object (File)
Sun, Nov 17, 6:21 PM
Unknown Object (File)
Sun, Nov 17, 4:23 PM
Unknown Object (File)
Sun, Nov 17, 4:14 PM
Unknown Object (File)
Sun, Nov 17, 2:42 PM
Unknown Object (File)
Mon, Oct 21, 6:49 AM
Unknown Object (File)
Sep 29 2024, 11:07 PM
Unknown Object (File)
Sep 11 2024, 5:09 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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 23818
Build 22759: arc lint + arc unit