File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -475,13 +475,21 @@ else()
475475 # list(APPEND mi_defines MI_WIN_INIT_USE_CRT_TLS=1)
476476endif ()
477477
478- # Check /proc/cpuinfo for an SV39 MMU and limit the virtual address bits.
479- # (this will skip the aligned hinting in that case. Issue #939, #949)
478+ # Check /proc/cpuinfo for an SV39/48/57 MMU and limit the virtual address bits.
479+ # (for sv39, this will skip the aligned hinting in that case. Issue #939, #949)
480480if (EXISTS /proc/cpuinfo)
481481 file (STRINGS /proc/cpuinfo mi_sv39_mmu REGEX "^mmu[ \t ]+:[ \t ]+sv39$" )
482+ file (STRINGS /proc/cpuinfo mi_sv48_mmu REGEX "^mmu[ \t ]+:[ \t ]+sv48$" )
483+ file (STRINGS /proc/cpuinfo mi_sv57_mmu REGEX "^mmu[ \t ]+:[ \t ]+sv57$" )
482484 if (mi_sv39_mmu)
483485 MESSAGE ( STATUS "Set virtual address bits to 39 (SV39 MMU detected)" )
484486 list (APPEND mi_defines MI_DEFAULT_VIRTUAL_ADDRESS_BITS=39)
487+ elseif (mi_sv48_mmu)
488+ MESSAGE ( STATUS "Set virtual address bits to 48 (SV48 MMU detected)" )
489+ list (APPEND mi_defines MI_DEFAULT_VIRTUAL_ADDRESS_BITS=48)
490+ elseif (mi_sv57_mmu)
491+ MESSAGE ( STATUS "Set virtual address bits to 57 (SV57 MMU detected)" )
492+ list (APPEND mi_defines MI_DEFAULT_VIRTUAL_ADDRESS_BITS=57)
485493 endif ()
486494endif ()
487495
You can’t perform that action at this time.
0 commit comments