summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/MonotonicCounterRuntimeDxe')
-rw-r--r--MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c21
-rw-r--r--MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf6
2 files changed, 10 insertions, 17 deletions
diff --git a/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c b/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c
index 9df64fe..ddb0d2e 100644
--- a/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c
+++ b/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c
@@ -2,7 +2,7 @@
Produce the UEFI boot service GetNextMonotonicCount() and runtime service
GetNextHighMonotonicCount().
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -16,6 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Uefi.h>
#include <Protocol/MonotonicCounter.h>
+#include <Guid/MtcVendor.h>
#include <Library/BaseLib.h>
#include <Library/UefiDriverEntryPoint.h>
@@ -39,16 +40,6 @@ UINT64 mEfiMtc;
//
EFI_EVENT mEfiMtcEvent;
-//
-// Name of the variable for the high part of monotonic counter
-//
-CHAR16 *mEfiMtcName = (CHAR16 *) L"MTC";
-
-//
-// Vendor GUID of the variable for the high part of monotonic counter
-//
-EFI_GUID mEfiMtcGuid = { 0xeb704011, 0x1402, 0x11d3, { 0x8e, 0x77, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } };
-
/**
Returns a monotonically increasing count for the platform.
@@ -171,8 +162,8 @@ MonotonicCounterDriverGetNextHighMonotonicCount (
// Update the NV variable to match the new high part
//
return EfiSetVariable (
- mEfiMtcName,
- &mEfiMtcGuid,
+ MTC_VARIABLE_NAME,
+ &gMtcVendorGuid,
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS,
sizeof (UINT32),
HighCount
@@ -241,8 +232,8 @@ MonotonicCounterDriverInitialize (
//
BufferSize = sizeof (UINT32);
Status = EfiGetVariable (
- mEfiMtcName,
- &mEfiMtcGuid,
+ MTC_VARIABLE_NAME,
+ &gMtcVendorGuid,
NULL,
&BufferSize,
&HighCount
diff --git a/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf b/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
index 9182e2f..0a0d937 100644
--- a/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
+++ b/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
@@ -2,7 +2,7 @@
# This module produces the UEFI boot service GetNextMonotonicCount()
# and runtime service GetNextHighMonotonicCount().
#
-# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -34,7 +34,7 @@
[Packages]
MdePkg/MdePkg.dec
-
+ MdeModulePkg/MdeModulePkg.dec
[LibraryClasses]
UefiRuntimeServicesTableLib
@@ -44,6 +44,8 @@
UefiDriverEntryPoint
BaseLib
+[Guids]
+ gMtcVendorGuid
[Protocols]
gEfiMonotonicCounterArchProtocolGuid ## PRODUCES