OvmfPkg/LoongArchVirt: Clear the PGD series registers
Since the PGD series registers are in an unknown state when reset, some simulators will hang when restarting if these registers are not cleared, so they are cleared in this patch. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Bibo Mao <maobibo@loongson.cn> Signed-off-by: Chao Li <lichao@loongson.cn>
This commit is contained in:
@@ -141,6 +141,12 @@ ConfigureMemoryManagementUnit (
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Clear PGD series registers.
|
||||
//
|
||||
CsrWrite (LOONGARCH_CSR_PGDL, 0x0);
|
||||
CsrWrite (LOONGARCH_CSR_PGDH, 0x0);
|
||||
|
||||
PageTable = 0;
|
||||
while (MemoryTable->NumberOfPages != 0) {
|
||||
DEBUG ((
|
||||
|
||||
Reference in New Issue
Block a user