|
@@ -21,6 +21,7 @@
|
|
#include <Library/QemuFwCfgLib.h>
|
|
#include <Library/QemuFwCfgLib.h>
|
|
#include "MmuLibCore.h"
|
|
#include "MmuLibCore.h"
|
|
#include <Library/CacheMaintenanceLib.h>
|
|
#include <Library/CacheMaintenanceLib.h>
|
|
|
|
+#include <Library/MmuLib.h>
|
|
|
|
|
|
/**
|
|
/**
|
|
Return the Virtual Memory Map of your platform
|
|
Return the Virtual Memory Map of your platform
|
|
@@ -170,6 +171,10 @@ ConfigureMmu (VOID)
|
|
MemoryTable++;
|
|
MemoryTable++;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (PcdGet8 (PcdNullPointerDetectionPropertyMask) & BIT0) {
|
|
|
|
+ LoongArchSetMemoryAttributes (0, EFI_PAGE_SIZE, EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_WP);
|
|
|
|
+ }
|
|
|
|
+
|
|
TlbReEntry = AllocatePages (1);
|
|
TlbReEntry = AllocatePages (1);
|
|
if (TlbReEntry == NULL) {
|
|
if (TlbReEntry == NULL) {
|
|
goto FreeTranslationTable;
|
|
goto FreeTranslationTable;
|