]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/PCD/Dxe/Pcd.c
MdeModulePkg: Add ATTRIBUTE (+/-RT, RO) support in PCD declaration in DSC file.
[mirror_edk2.git] / MdeModulePkg / Universal / PCD / Dxe / Pcd.c
index 4828af2b9dca936fc9747a81f72977bc0b6e3e6d..6afcd18dff828063fdf1a5a87a926431ac30aac2 100644 (file)
@@ -3,7 +3,7 @@
   produce the implementation of native PCD protocol and EFI_PCD_PROTOCOL defined in\r
   PI 1.2 Vol3.\r
 \r
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -129,7 +129,8 @@ PcdDxeInit (
   )\r
 {\r
   EFI_STATUS Status;\r
-  \r
+  VOID       *Registration;\r
+\r
   //\r
   // Make sure the Pcd Protocol is not already installed in the system\r
   //\r
@@ -167,6 +168,18 @@ PcdDxeInit (
     ASSERT_EFI_ERROR (Status);\r
   }\r
 \r
+  //\r
+  // Register callback function upon VariableLockProtocol\r
+  // to lock the variables referenced by DynamicHii PCDs with RO property set in *.dsc.\r
+  //\r
+  EfiCreateProtocolNotifyEvent (\r
+    &gEdkiiVariableLockProtocolGuid,\r
+    TPL_CALLBACK,\r
+    VariableLockCallBack,\r
+    NULL,\r
+    &Registration\r
+    );\r
+\r
   return Status;\r
 }\r
 \r