mirror of
https://github.com/acidanthera/audk.git
synced 2025-09-24 10:17:45 +02:00
ArmPkg: Disabled UserSpace by default to fix CI,
as WinPE and Linux EFI stub can not boot in EL2&0 translation regime.
This commit is contained in:
parent
a071d15784
commit
5fee574a51
@ -20,6 +20,8 @@
|
|||||||
#include <Library/BaseLib.h>
|
#include <Library/BaseLib.h>
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/HobLib.h>
|
#include <Library/HobLib.h>
|
||||||
|
#include <Library/PcdLib.h>
|
||||||
|
|
||||||
#include "ArmMmuLibInternal.h"
|
#include "ArmMmuLibInternal.h"
|
||||||
|
|
||||||
STATIC ARM_REPLACE_LIVE_TRANSLATION_ENTRY mReplaceLiveEntryFunc = ArmReplaceLiveTranslationEntry;
|
STATIC ARM_REPLACE_LIVE_TRANSLATION_ENTRY mReplaceLiveEntryFunc = ArmReplaceLiveTranslationEntry;
|
||||||
@ -489,7 +491,9 @@ GcdAttributeToPageAttribute (
|
|||||||
PageAttributes |= TT_AP_RW_RW;
|
PageAttributes |= TT_AP_RW_RW;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
PageAttributes |= TT_UXN_MASK;
|
if (PcdGetBool (PcdEnableUserSpace) || (ArmReadCurrentEL () == AARCH64_EL1)) {
|
||||||
|
PageAttributes |= TT_UXN_MASK;
|
||||||
|
}
|
||||||
|
|
||||||
if ((GcdAttributes & EFI_MEMORY_RO) != 0) {
|
if ((GcdAttributes & EFI_MEMORY_RO) != 0) {
|
||||||
PageAttributes |= TT_AP_NO_RO;
|
PageAttributes |= TT_AP_NO_RO;
|
||||||
@ -624,7 +628,12 @@ ArmConfigureMmu (
|
|||||||
T0SZ = 64 - MaxAddressBits;
|
T0SZ = 64 - MaxAddressBits;
|
||||||
RootTableEntryCount = GetRootTableEntryCount (T0SZ);
|
RootTableEntryCount = GetRootTableEntryCount (T0SZ);
|
||||||
|
|
||||||
if (ArmReadCurrentEL () == AARCH64_EL2) {
|
//
|
||||||
|
// Set TCR that allows us to retrieve T0SZ in the subsequent functions
|
||||||
|
//
|
||||||
|
// Ideally we will be running at EL2, but should support EL1 as well.
|
||||||
|
// UEFI should not run at EL3.
|
||||||
|
if (PcdGetBool (PcdEnableUserSpace) && (ArmReadCurrentEL () == AARCH64_EL2)) {
|
||||||
//
|
//
|
||||||
// Switch to EL2&0 translation regime.
|
// Switch to EL2&0 translation regime.
|
||||||
//
|
//
|
||||||
|
@ -34,15 +34,20 @@
|
|||||||
ArmPkg/ArmPkg.dec
|
ArmPkg/ArmPkg.dec
|
||||||
EmbeddedPkg/EmbeddedPkg.dec
|
EmbeddedPkg/EmbeddedPkg.dec
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
ArmLib
|
ArmLib
|
||||||
CacheMaintenanceLib
|
CacheMaintenanceLib
|
||||||
HobLib
|
HobLib
|
||||||
MemoryAllocationLib
|
MemoryAllocationLib
|
||||||
|
PcdLib
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gArmMmuReplaceLiveTranslationEntryFuncGuid
|
gArmMmuReplaceLiveTranslationEntryFuncGuid
|
||||||
|
|
||||||
[Pcd.ARM]
|
[Pcd.ARM]
|
||||||
gArmTokenSpaceGuid.PcdNormalMemoryNonshareableOverride
|
gArmTokenSpaceGuid.PcdNormalMemoryNonshareableOverride
|
||||||
|
|
||||||
|
[Pcd]
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdEnableUserSpace ## CONSUMES
|
||||||
|
@ -26,12 +26,17 @@
|
|||||||
ArmPkg/ArmPkg.dec
|
ArmPkg/ArmPkg.dec
|
||||||
EmbeddedPkg/EmbeddedPkg.dec
|
EmbeddedPkg/EmbeddedPkg.dec
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
ArmLib
|
ArmLib
|
||||||
CacheMaintenanceLib
|
CacheMaintenanceLib
|
||||||
HobLib
|
HobLib
|
||||||
MemoryAllocationLib
|
MemoryAllocationLib
|
||||||
|
PcdLib
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gArmMmuReplaceLiveTranslationEntryFuncGuid
|
gArmMmuReplaceLiveTranslationEntryFuncGuid
|
||||||
|
|
||||||
|
[Pcd]
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdEnableUserSpace ## CONSUMES
|
||||||
|
@ -382,7 +382,7 @@
|
|||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC000000000007FD5
|
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC000000000007FD5
|
||||||
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard|TRUE
|
gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard|TRUE
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdEnableUserSpace|TRUE
|
gEfiMdeModulePkgTokenSpaceGuid.PcdEnableUserSpace|FALSE
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE
|
||||||
|
|
||||||
[Components.common]
|
[Components.common]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user