In bare-metal AArch64, rust generates tpidr0 as the default register for thread_local calculations. For scenarios like kernel, tpidr1 should be used instead of tpidr0.
How to make rust compiler generate code to use tpidr1 instead of the default?