littlekernel / lk

LK embedded kernel
MIT License
3.11k stars 613 forks source link

[arch][arm64] determine the correct TCR_EL1.IPS at runtime #328

Closed pcc closed 1 year ago

pcc commented 2 years ago

Change the early startup code to set TCR_EL1.IPS to ID_AA64MMFR0_EL1.PARange if it has a defined value (the currently defined values have the same meanings), but use 48-bit PAs if 52-bit PAs are supported because 52-bit PAs have a different translation table format that we don't support. Stash the computed TCR_EL1 in a variable and use it in the context switch code.

pcc commented 1 year ago

(Rebased to head.)