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)
Mon, Nov 18, 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
Unknown Object (File)
Oct 23 2024, 2:16 PM
Unknown Object (File)
Sep 27 2024, 3:58 AM
Unknown Object (File)
Sep 27 2024, 3:58 AM
Unknown Object (File)
Sep 27 2024, 3:58 AM
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