]>
Commit | Line | Data |
---|---|---|
fb0b259e | 1 | /** @file\r |
636578d3 | 2 | Produce the UEFI boot service GetNextMonotonicCount() and runtime service\r |
3 | GetNextHighMonotonicCount().\r | |
e70d34ca | 4 | \r |
52c7a544 | 5 | Copyright (c) 2006 - 2008, Intel Corporation\r |
e70d34ca | 6 | All rights reserved. This program and the accompanying materials\r |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
fb0b259e | 14 | **/\r |
e70d34ca | 15 | \r |
636578d3 | 16 | #include <Uefi.h>\r |
e70d34ca | 17 | \r |
636578d3 | 18 | #include <Protocol/MonotonicCounter.h>\r |
19 | \r | |
20 | #include <Library/BaseLib.h>\r | |
21 | #include <Library/UefiDriverEntryPoint.h>\r | |
22 | #include <Library/UefiRuntimeLib.h>\r | |
23 | #include <Library/DebugLib.h>\r | |
24 | #include <Library/UefiBootServicesTableLib.h>\r | |
25 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
e70d34ca | 26 | \r |
27 | //\r | |
636578d3 | 28 | // The handle to install Monotonic Counter Architctural Protocol\r |
e70d34ca | 29 | //\r |
30 | EFI_HANDLE mMonotonicCounterHandle = NULL;\r | |
31 | \r | |
32 | //\r | |
636578d3 | 33 | // The current monotonic counter value\r |
e70d34ca | 34 | //\r |
35 | UINT64 mEfiMtc;\r | |
36 | \r | |
37 | //\r | |
636578d3 | 38 | // Event to update the monotonic Counter's high part when low part overflows.\r |
e70d34ca | 39 | //\r |
40 | EFI_EVENT mEfiMtcEvent;\r | |
41 | \r | |
42 | //\r | |
636578d3 | 43 | // Name of the variable for the high part of monotonic counter\r |
e70d34ca | 44 | //\r |
45 | CHAR16 *mEfiMtcName = (CHAR16 *) L"MTC";\r | |
46 | \r | |
47 | //\r | |
636578d3 | 48 | // Vendor GUID of the variable for the high part of monotonic counter\r |
e70d34ca | 49 | //\r |
50 | EFI_GUID mEfiMtcGuid = { 0xeb704011, 0x1402, 0x11d3, { 0x8e, 0x77, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } };\r | |
51 | \r | |
52c7a544 | 52 | /**\r |
636578d3 | 53 | Returns a monotonically increasing count for the platform.\r |
52c7a544 | 54 | \r |
636578d3 | 55 | This function returns a 64-bit value that is numerically larger then the last\r |
56 | time the function was called.\r | |
57 |