ARMv8-A相關(guān)歷史文章:
系統(tǒng)寄存器(SCTLR)是用于控制標(biāo)準(zhǔn)內(nèi)存、system facilities的寄存器,并提供狀態(tài)信息。

比特位代表的含義如下:


要訪問SCTLR_ELn寄存器,使用如下方式:
MRS <Xt>, SCTLR_ELn // Read SCTLR_ELn into Xt
MSR SCTLR_ELn, <Xt> // Write Xt to SCTLR_ELn
比如:
MRS X0, SCTLR_EL1 // Read System Control Register configuration data
ORR X0, X0, #(1 << 2) // Set [C] bit (bit [2]) to enable data caching
ORR X0, X0, #(1 << 12) // Set [I] bit (bit [12]) to enable instruction caching
MSR SCTLR_EL1, X0 // Write System Control Register configuration data
注意:在任何一個(gè)Exception Level下,處理器中的Cache在數(shù)據(jù)cache和指令cache使能之前需要保持invalidated。