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)
Mon, Oct 21, 6:49 AM
Unknown Object (File)
Sep 29 2024, 11:07 PM
Unknown Object (File)
Sep 11 2024, 5:09 PM
Unknown Object (File)
Sep 11 2024, 5:09 PM
Unknown Object (File)
Sep 5 2024, 5:25 PM
Unknown Object (File)
Sep 3 2024, 7:24 AM
Unknown Object (File)
Sep 3 2024, 7:24 AM
Unknown Object (File)
Sep 3 2024, 7:24 AM

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