Page MenuHomeFreeBSD

RISC-V: fix global symbol lookups for mpentry with lld
ClosedPublic

Authored by mhorne on Jan 11 2020, 11:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 10, 7:22 AM
Unknown Object (File)
Sat, Dec 7, 6:31 AM
Unknown Object (File)
Sun, Dec 1, 2:03 PM
Unknown Object (File)
Nov 23 2024, 5:47 PM
Unknown Object (File)
Nov 18 2024, 7:09 PM
Unknown Object (File)
Oct 23 2024, 2:23 PM
Unknown Object (File)
Oct 23 2024, 2:23 PM
Unknown Object (File)
Oct 23 2024, 2:23 PM
Subscribers

Details

Summary

This is a follow up to r356481. In locore.S, before virtual memory is
set up, we should avoid using indirect address lookups through the GOT.
Therefore we need to convert uses of the la instruction to lla, which
always generates an auipc/addi pair of instructions. This conversion was
done for the BSP case, but not the AP case, resulting in a fault
somewhere before mpva and a failure to bring APs online.

Reported by: lwhsu

Test Plan

Kernel build with clang + lld boots in qemu with -smp 2

Diff Detail

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

Event Timeline

Ah yes, good point, looks good to me.

Thanks for the patch and this works in my staging CI env.

This revision is now accepted and ready to land.Jan 12 2020, 7:45 AM