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
#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
//\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
// 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
//\r
BufferSize = sizeof (UINT32);\r
Status = EfiGetVariable (\r
- mEfiMtcName,\r
- &mEfiMtcGuid,\r
+ MTC_VARIABLE_NAME,\r
+ &gMtcVendorGuid,\r
NULL,\r
&BufferSize,\r
&HighCount\r