mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-18 08:22:04 +00:00
thermosphere: add TCR_TG0 back
This commit is contained in:
parent
47f343cda6
commit
fccadfdbf6
1 changed files with 5 additions and 1 deletions
|
@ -469,7 +469,7 @@ namespace ams::hvisor::cpu {
|
|||
};
|
||||
|
||||
// Could have used enum class here, but can't start identifiers with a digit...
|
||||
enum TranslationGranuleSize {
|
||||
enum TranslationGranuleSize : u64 {
|
||||
TranslationGranule_4K = 0,
|
||||
TranslationGranule_64K = 1,
|
||||
TranslationGranule_16K = 2,
|
||||
|
@ -485,6 +485,10 @@ namespace ams::hvisor::cpu {
|
|||
}
|
||||
}
|
||||
|
||||
constexpr u64 TCR_TG0(TranslationGranuleSize granuleSize)
|
||||
{
|
||||
return (granuleSize & 3) << 14;
|
||||
}
|
||||
constexpr u64 TCR_T0SZ(size_t addressSpaceSize) { return (64ul - (addressSpaceSize & 0x3F)) << 0; }
|
||||
constexpr u64 TCR_PS(u64 n) { return (n & 7) << 16; }
|
||||
constexpr u64 VTCR_SL0(u64 n) { return (n & 3) << 6; }
|
||||
|
|
Loading…
Reference in a new issue