]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c
Clean up the private GUID definition in module Level.
[mirror_edk2.git] / MdeModulePkg / Universal / MonotonicCounterRuntimeDxe / MonotonicCounter.c
index 9df64fe1f96c41e5d3deddf767131f6dad251fcd..ddb0d2ed4991258512d258478f6020efb840b425 100644 (file)
@@ -2,7 +2,7 @@
   Produce the UEFI boot service GetNextMonotonicCount() and runtime service\r
   GetNextHighMonotonicCount().\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2011, 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
@@ -16,6 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Uefi.h>\r
 \r
 #include <Protocol/MonotonicCounter.h>\r
+#include <Guid/MtcVendor.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/UefiDriverEntryPoint.h>\r
@@ -39,16 +40,6 @@ UINT64      mEfiMtc;
 //\r
 EFI_EVENT   mEfiMtcEvent;\r
 \r
-//\r
-// Name of the variable for the high part of monotonic counter\r
-//\r
-CHAR16      *mEfiMtcName = (CHAR16 *) L"MTC";\r
-\r
-//\r
-// Vendor GUID of the variable for the high part of monotonic counter\r
-//\r
-EFI_GUID    mEfiMtcGuid = { 0xeb704011, 0x1402, 0x11d3, { 0x8e, 0x77, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } };\r
-\r
 /**\r
   Returns a monotonically increasing count for the platform.\r
 \r
@@ -171,8 +162,8 @@ MonotonicCounterDriverGetNextHighMonotonicCount (
   // Update the NV variable to match the new high part\r
   //\r
   return EfiSetVariable (\r
-           mEfiMtcName,\r
-           &mEfiMtcGuid,\r
+           MTC_VARIABLE_NAME,\r
+           &gMtcVendorGuid,\r
            EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
            sizeof (UINT32),\r
            HighCount\r
@@ -241,8 +232,8 @@ MonotonicCounterDriverInitialize (
   //\r
   BufferSize = sizeof (UINT32);\r
   Status = EfiGetVariable (\r
-             mEfiMtcName,\r
-             &mEfiMtcGuid,\r
+             MTC_VARIABLE_NAME,\r
+             &gMtcVendorGuid,\r
              NULL,\r
              &BufferSize,\r
              &HighCount\r