]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmVirtPkg/HighMemDxe: Relocate HighMemDxe to OvmfPkg
authorAbner Chang <abner.chang@hpe.com>
Mon, 11 Oct 2021 13:27:33 +0000 (21:27 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 14 Oct 2021 06:25:52 +0000 (06:25 +0000)
Relocate HighMemDxe to OvmfPkg/Fdt, this library is leverage by
both ARM and RISC-V archs.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Daniel Schaefer <daniel.schaefer@hpe.com>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
ArmVirtPkg/ArmVirtCloudHv.dsc
ArmVirtPkg/ArmVirtCloudHv.fdf
ArmVirtPkg/ArmVirtKvmTool.dsc
ArmVirtPkg/ArmVirtKvmTool.fdf
ArmVirtPkg/ArmVirtQemu.dsc
ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
ArmVirtPkg/ArmVirtQemuKernel.dsc
ArmVirtPkg/HighMemDxe/HighMemDxe.c [deleted file]
ArmVirtPkg/HighMemDxe/HighMemDxe.inf [deleted file]
OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c [new file with mode: 0644]
OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf [new file with mode: 0644]

index 9ad88e981b42f7453e81eda7990af5dc59024961..2b722917e3d9957346dda25f12056ae673c5c654 100644 (file)
   #\r
   ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf\r
   EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf\r
-  ArmVirtPkg/HighMemDxe/HighMemDxe.inf\r
+  OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf\r
   OvmfPkg/VirtioBlkDxe/VirtioBlk.inf\r
   OvmfPkg/VirtioScsiDxe/VirtioScsi.inf\r
   OvmfPkg/VirtioNetDxe/VirtioNet.inf\r
index 1bb452ebb8d4744e25af5d4cce498fdbb61626f6..7ecf5ca88d13238077e1b149007ce7900520ee26 100644 (file)
@@ -107,7 +107,7 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf\r
   INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf\r
   INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf\r
-  INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf\r
+  INF OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf\r
 \r
   #\r
   # PI DXE Drivers producing Architectural Protocols (EFI Services)\r
index 3cc182545c52c5096d0b9e31a2b1b78a80a20c49..97fc98d778210d918463112ca30befdc66777c3c 100644 (file)
   ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf\r
   ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf\r
   EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf\r
-  ArmVirtPkg/HighMemDxe/HighMemDxe.inf\r
+  OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf\r
   OvmfPkg/VirtioBlkDxe/VirtioBlk.inf\r
   OvmfPkg/VirtioScsiDxe/VirtioScsi.inf\r
   OvmfPkg/VirtioNetDxe/VirtioNet.inf\r
index 1dac8b7880dcfbd350b686ea6500ae19a7fbfb62..0535d36b7d3e44a3d10abab6045ff76254b4c6b1 100644 (file)
@@ -122,7 +122,7 @@ READ_LOCK_STATUS   = TRUE
   INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf\r
   INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf\r
   INF ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf\r
-  INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf\r
+  INF OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf\r
 \r
   #\r
   # PI DXE Drivers producing Architectural Protocols (EFI Services)\r
index 2f1a3cea05ef180f462f3aa14eaa2ca199d49e56..86417f879758d60cda68891ec8dc7a6f5c0ac8ff 100644 (file)
   #\r
   ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf\r
   EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf\r
-  ArmVirtPkg/HighMemDxe/HighMemDxe.inf\r
+  OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf\r
   OvmfPkg/VirtioBlkDxe/VirtioBlk.inf\r
   OvmfPkg/VirtioScsiDxe/VirtioScsi.inf\r
   OvmfPkg/VirtioNetDxe/VirtioNet.inf\r
index e9518dd273532e96a0a2d364d52c7a5cd5de3274..279b905edd589a76480dfc7ddc5cc62e59cf0d9d 100644 (file)
@@ -42,7 +42,7 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf\r
   INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf\r
   INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf\r
-  INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf\r
+  INF OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf\r
 \r
   #\r
   # PI DXE Drivers producing Architectural Protocols (EFI Services)\r
index 3a0c3fb4f00cbe2d55e7630bbe82ce5a11662568..3fad481e29cf051700c3db741ffda30669ccd848 100644 (file)
   #\r
   ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf\r
   EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf\r
-  ArmVirtPkg/HighMemDxe/HighMemDxe.inf\r
+  OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf\r
   OvmfPkg/VirtioBlkDxe/VirtioBlk.inf\r
   OvmfPkg/VirtioScsiDxe/VirtioScsi.inf\r
   OvmfPkg/VirtioNetDxe/VirtioNet.inf\r
diff --git a/ArmVirtPkg/HighMemDxe/HighMemDxe.c b/ArmVirtPkg/HighMemDxe/HighMemDxe.c
deleted file mode 100644 (file)
index c383757..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/** @file\r
-*  High memory node enumeration DXE driver for ARM Virtual Machines\r
-*\r
-*  Copyright (c) 2015-2016, Linaro Ltd. All rights reserved.\r
-*\r
-*  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-*\r
-**/\r
-\r
-#include <Library/BaseLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/DxeServicesTableLib.h>\r
-#include <Library/PcdLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-\r
-#include <Protocol/Cpu.h>\r
-#include <Protocol/FdtClient.h>\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-InitializeHighMemDxe (\r
-  IN EFI_HANDLE           ImageHandle,\r
-  IN EFI_SYSTEM_TABLE     *SystemTable\r
-  )\r
-{\r
-  FDT_CLIENT_PROTOCOL               *FdtClient;\r
-  EFI_CPU_ARCH_PROTOCOL             *Cpu;\r
-  EFI_STATUS                        Status, FindNodeStatus;\r
-  INT32                             Node;\r
-  CONST UINT32                      *Reg;\r
-  UINT32                            RegSize;\r
-  UINTN                             AddressCells, SizeCells;\r
-  UINT64                            CurBase;\r
-  UINT64                            CurSize;\r
-  UINT64                            Attributes;\r
-  EFI_GCD_MEMORY_SPACE_DESCRIPTOR   GcdDescriptor;\r
-\r
-  Status = gBS->LocateProtocol (&gFdtClientProtocolGuid, NULL,\r
-                  (VOID **)&FdtClient);\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  Status = gBS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL,\r
-                  (VOID **)&Cpu);\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  //\r
-  // Check for memory node and add the memory spaces except the lowest one\r
-  //\r
-  for (FindNodeStatus = FdtClient->FindMemoryNodeReg (FdtClient, &Node,\r
-                                     (CONST VOID **) &Reg, &AddressCells,\r
-                                     &SizeCells, &RegSize);\r
-       !EFI_ERROR (FindNodeStatus);\r
-       FindNodeStatus = FdtClient->FindNextMemoryNodeReg (FdtClient, Node,\r
-                                     &Node, (CONST VOID **) &Reg, &AddressCells,\r
-                                     &SizeCells, &RegSize)) {\r
-    ASSERT (AddressCells <= 2);\r
-    ASSERT (SizeCells <= 2);\r
-\r
-    while (RegSize > 0) {\r
-      CurBase = SwapBytes32 (*Reg++);\r
-      if (AddressCells > 1) {\r
-        CurBase = (CurBase << 32) | SwapBytes32 (*Reg++);\r
-      }\r
-      CurSize = SwapBytes32 (*Reg++);\r
-      if (SizeCells > 1) {\r
-        CurSize = (CurSize << 32) | SwapBytes32 (*Reg++);\r
-      }\r
-      RegSize -= (AddressCells + SizeCells) * sizeof (UINT32);\r
-\r
-      Status = gDS->GetMemorySpaceDescriptor (CurBase, &GcdDescriptor);\r
-      if (EFI_ERROR (Status)) {\r
-        DEBUG ((DEBUG_WARN,\r
-          "%a: Region 0x%lx - 0x%lx not found in the GCD memory space map\n",\r
-          __FUNCTION__, CurBase, CurBase + CurSize - 1));\r
-          continue;\r
-      }\r
-      if (GcdDescriptor.GcdMemoryType == EfiGcdMemoryTypeNonExistent) {\r
-        Status = gDS->AddMemorySpace (EfiGcdMemoryTypeSystemMemory, CurBase,\r
-                        CurSize, EFI_MEMORY_WB);\r
-\r
-        if (EFI_ERROR (Status)) {\r
-          DEBUG ((EFI_D_ERROR,\r
-            "%a: Failed to add System RAM @ 0x%lx - 0x%lx (%r)\n",\r
-            __FUNCTION__, CurBase, CurBase + CurSize - 1, Status));\r
-          continue;\r
-        }\r
-\r
-        Status = gDS->SetMemorySpaceAttributes (CurBase, CurSize,\r
-                        EFI_MEMORY_WB);\r
-        if (EFI_ERROR (Status)) {\r
-          DEBUG ((DEBUG_WARN,\r
-            "%a: gDS->SetMemorySpaceAttributes() failed on region 0x%lx - 0x%lx (%r)\n",\r
-            __FUNCTION__, CurBase, CurBase + CurSize - 1, Status));\r
-        }\r
-\r
-        //\r
-        // Due to the ambiguous nature of the RO/XP GCD memory space attributes,\r
-        // it is impossible to add a memory space with the XP attribute in a way\r
-        // that does not result in the XP attribute being set on *all* UEFI\r
-        // memory map entries that are carved from it, including code regions\r
-        // that require executable permissions.\r
-        //\r
-        // So instead, we never set the RO/XP attributes in the GCD memory space\r
-        // capabilities or attribute fields, and apply any protections directly\r
-        // on the page table mappings by going through the cpu arch protocol.\r
-        //\r
-        Attributes = EFI_MEMORY_WB;\r
-        if ((PcdGet64 (PcdDxeNxMemoryProtectionPolicy) &\r
-             (1U << (UINT32)EfiConventionalMemory)) != 0) {\r
-          Attributes |= EFI_MEMORY_XP;\r
-        }\r
-\r
-        Status = Cpu->SetMemoryAttributes (Cpu, CurBase, CurSize, Attributes);\r
-\r
-        if (EFI_ERROR (Status)) {\r
-          DEBUG ((EFI_D_ERROR,\r
-            "%a: Failed to set System RAM @ 0x%lx - 0x%lx attribute (%r)\n",\r
-            __FUNCTION__, CurBase, CurBase + CurSize - 1, Status));\r
-        } else {\r
-          DEBUG ((EFI_D_INFO, "%a: Add System RAM @ 0x%lx - 0x%lx\n",\r
-            __FUNCTION__, CurBase, CurBase + CurSize - 1));\r
-        }\r
-      }\r
-    }\r
-  }\r
-\r
-  return EFI_SUCCESS;\r
-}\r
diff --git a/ArmVirtPkg/HighMemDxe/HighMemDxe.inf b/ArmVirtPkg/HighMemDxe/HighMemDxe.inf
deleted file mode 100644 (file)
index 168fc90..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-## @file\r
-#  High memory node enumeration DXE driver for ARM Virtual Machines\r
-#\r
-#  Copyright (c) 2015-2016, Linaro Ltd. All rights reserved.\r
-#\r
-#  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-#\r
-##\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = HighMemDxe\r
-  FILE_GUID                      = 63EA1463-FBFA-428A-B97F-E222755852D7\r
-  MODULE_TYPE                    = DXE_DRIVER\r
-  VERSION_STRING                 = 1.0\r
-\r
-  ENTRY_POINT                    = InitializeHighMemDxe\r
-\r
-[Sources]\r
-  HighMemDxe.c\r
-\r
-[Packages]\r
-  EmbeddedPkg/EmbeddedPkg.dec\r
-  MdePkg/MdePkg.dec\r
-  MdeModulePkg/MdeModulePkg.dec\r
-  ArmPkg/ArmPkg.dec\r
-  ArmVirtPkg/ArmVirtPkg.dec\r
-\r
-[LibraryClasses]\r
-  BaseLib\r
-  DebugLib\r
-  DxeServicesTableLib\r
-  PcdLib\r
-  UefiBootServicesTableLib\r
-  UefiDriverEntryPoint\r
-\r
-[Protocols]\r
-  gEfiCpuArchProtocolGuid                 ## CONSUMES\r
-  gFdtClientProtocolGuid                  ## CONSUMES\r
-\r
-[Pcd]\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy\r
-\r
-[Depex]\r
-  gEfiCpuArchProtocolGuid AND gFdtClientProtocolGuid\r
diff --git a/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c b/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c
new file mode 100644 (file)
index 0000000..c383757
--- /dev/null
@@ -0,0 +1,128 @@
+/** @file\r
+*  High memory node enumeration DXE driver for ARM Virtual Machines\r
+*\r
+*  Copyright (c) 2015-2016, Linaro Ltd. All rights reserved.\r
+*\r
+*  SPDX-License-Identifier: BSD-2-Clause-Patent\r
+*\r
+**/\r
+\r
+#include <Library/BaseLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/DxeServicesTableLib.h>\r
+#include <Library/PcdLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+\r
+#include <Protocol/Cpu.h>\r
+#include <Protocol/FdtClient.h>\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+InitializeHighMemDxe (\r
+  IN EFI_HANDLE           ImageHandle,\r
+  IN EFI_SYSTEM_TABLE     *SystemTable\r
+  )\r
+{\r
+  FDT_CLIENT_PROTOCOL               *FdtClient;\r
+  EFI_CPU_ARCH_PROTOCOL             *Cpu;\r
+  EFI_STATUS                        Status, FindNodeStatus;\r
+  INT32                             Node;\r
+  CONST UINT32                      *Reg;\r
+  UINT32                            RegSize;\r
+  UINTN                             AddressCells, SizeCells;\r
+  UINT64                            CurBase;\r
+  UINT64                            CurSize;\r
+  UINT64                            Attributes;\r
+  EFI_GCD_MEMORY_SPACE_DESCRIPTOR   GcdDescriptor;\r
+\r
+  Status = gBS->LocateProtocol (&gFdtClientProtocolGuid, NULL,\r
+                  (VOID **)&FdtClient);\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  Status = gBS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL,\r
+                  (VOID **)&Cpu);\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  //\r
+  // Check for memory node and add the memory spaces except the lowest one\r
+  //\r
+  for (FindNodeStatus = FdtClient->FindMemoryNodeReg (FdtClient, &Node,\r
+                                     (CONST VOID **) &Reg, &AddressCells,\r
+                                     &SizeCells, &RegSize);\r
+       !EFI_ERROR (FindNodeStatus);\r
+       FindNodeStatus = FdtClient->FindNextMemoryNodeReg (FdtClient, Node,\r
+                                     &Node, (CONST VOID **) &Reg, &AddressCells,\r
+                                     &SizeCells, &RegSize)) {\r
+    ASSERT (AddressCells <= 2);\r
+    ASSERT (SizeCells <= 2);\r
+\r
+    while (RegSize > 0) {\r
+      CurBase = SwapBytes32 (*Reg++);\r
+      if (AddressCells > 1) {\r
+        CurBase = (CurBase << 32) | SwapBytes32 (*Reg++);\r
+      }\r
+      CurSize = SwapBytes32 (*Reg++);\r
+      if (SizeCells > 1) {\r
+        CurSize = (CurSize << 32) | SwapBytes32 (*Reg++);\r
+      }\r
+      RegSize -= (AddressCells + SizeCells) * sizeof (UINT32);\r
+\r
+      Status = gDS->GetMemorySpaceDescriptor (CurBase, &GcdDescriptor);\r
+      if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_WARN,\r
+          "%a: Region 0x%lx - 0x%lx not found in the GCD memory space map\n",\r
+          __FUNCTION__, CurBase, CurBase + CurSize - 1));\r
+          continue;\r
+      }\r
+      if (GcdDescriptor.GcdMemoryType == EfiGcdMemoryTypeNonExistent) {\r
+        Status = gDS->AddMemorySpace (EfiGcdMemoryTypeSystemMemory, CurBase,\r
+                        CurSize, EFI_MEMORY_WB);\r
+\r
+        if (EFI_ERROR (Status)) {\r
+          DEBUG ((EFI_D_ERROR,\r
+            "%a: Failed to add System RAM @ 0x%lx - 0x%lx (%r)\n",\r
+            __FUNCTION__, CurBase, CurBase + CurSize - 1, Status));\r
+          continue;\r
+        }\r
+\r
+        Status = gDS->SetMemorySpaceAttributes (CurBase, CurSize,\r
+                        EFI_MEMORY_WB);\r
+        if (EFI_ERROR (Status)) {\r
+          DEBUG ((DEBUG_WARN,\r
+            "%a: gDS->SetMemorySpaceAttributes() failed on region 0x%lx - 0x%lx (%r)\n",\r
+            __FUNCTION__, CurBase, CurBase + CurSize - 1, Status));\r
+        }\r
+\r
+        //\r
+        // Due to the ambiguous nature of the RO/XP GCD memory space attributes,\r
+        // it is impossible to add a memory space with the XP attribute in a way\r
+        // that does not result in the XP attribute being set on *all* UEFI\r
+        // memory map entries that are carved from it, including code regions\r
+        // that require executable permissions.\r
+        //\r
+        // So instead, we never set the RO/XP attributes in the GCD memory space\r
+        // capabilities or attribute fields, and apply any protections directly\r
+        // on the page table mappings by going through the cpu arch protocol.\r
+        //\r
+        Attributes = EFI_MEMORY_WB;\r
+        if ((PcdGet64 (PcdDxeNxMemoryProtectionPolicy) &\r
+             (1U << (UINT32)EfiConventionalMemory)) != 0) {\r
+          Attributes |= EFI_MEMORY_XP;\r
+        }\r
+\r
+        Status = Cpu->SetMemoryAttributes (Cpu, CurBase, CurSize, Attributes);\r
+\r
+        if (EFI_ERROR (Status)) {\r
+          DEBUG ((EFI_D_ERROR,\r
+            "%a: Failed to set System RAM @ 0x%lx - 0x%lx attribute (%r)\n",\r
+            __FUNCTION__, CurBase, CurBase + CurSize - 1, Status));\r
+        } else {\r
+          DEBUG ((EFI_D_INFO, "%a: Add System RAM @ 0x%lx - 0x%lx\n",\r
+            __FUNCTION__, CurBase, CurBase + CurSize - 1));\r
+        }\r
+      }\r
+    }\r
+  }\r
+\r
+  return EFI_SUCCESS;\r
+}\r
diff --git a/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf b/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
new file mode 100644 (file)
index 0000000..45779a2
--- /dev/null
@@ -0,0 +1,44 @@
+## @file\r
+#  High memory node enumeration DXE driver for ARM Virtual Machines\r
+#\r
+#  Copyright (c) 2015-2016, Linaro Ltd. All rights reserved.\r
+#\r
+#  SPDX-License-Identifier: BSD-2-Clause-Patent\r
+#\r
+##\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = HighMemDxe\r
+  FILE_GUID                      = 63EA1463-FBFA-428A-B97F-E222755852D7\r
+  MODULE_TYPE                    = DXE_DRIVER\r
+  VERSION_STRING                 = 1.0\r
+\r
+  ENTRY_POINT                    = InitializeHighMemDxe\r
+\r
+[Sources]\r
+  HighMemDxe.c\r
+\r
+[Packages]\r
+  EmbeddedPkg/EmbeddedPkg.dec\r
+  MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
+  OvmfPkg/OvmfPkg.dec\r
+\r
+[LibraryClasses]\r
+  BaseLib\r
+  DebugLib\r
+  DxeServicesTableLib\r
+  PcdLib\r
+  UefiBootServicesTableLib\r
+  UefiDriverEntryPoint\r
+\r
+[Protocols]\r
+  gEfiCpuArchProtocolGuid                 ## CONSUMES\r
+  gFdtClientProtocolGuid                  ## CONSUMES\r
+\r
+[Pcd]\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy\r
+\r
+[Depex]\r
+  gEfiCpuArchProtocolGuid AND gFdtClientProtocolGuid\r