X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=EmbeddedPkg%2FEmbeddedMonotonicCounter%2FEmbeddedMonotonicCounter.c;h=1dec02e65a9424760b72d1df5d7d145b8b9ae37a;hp=66ebe67a92ee537e895b8593fac1ed6b761c2dda;hb=3402aac7d985bf8a9f9d3c639f3fe93609380513;hpb=2ef2b01e07c02db339f34004445734a2dbdd80e1 diff --git a/EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.c b/EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.c index 66ebe67a92..1dec02e65a 100644 --- a/EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.c +++ b/EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.c @@ -1,8 +1,8 @@ /** @file - Copyright (c) 2008-2009, Apple Inc. All rights reserved. - - All rights reserved. This program and the accompanying materials + Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
+ + 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 http://opensource.org/licenses/bsd-license.php @@ -32,7 +32,7 @@ GetNextMonotonicCount ( if (Count == NULL) { return EFI_INVALID_PARAMETER; } - + *Count = gCurrentMonotonicCount++; return EFI_SUCCESS; } @@ -46,10 +46,10 @@ GetNextHighMonotonicCount ( if (HighCount == NULL) { return EFI_INVALID_PARAMETER; } - + gCurrentMonotonicCount += 0x0000000100000000ULL; - - *HighCount = RShiftU64 (gCurrentMonotonicCount, 32) & 0xFFFFFFFF; + + *HighCount = (UINT32)RShiftU64 (gCurrentMonotonicCount, 32) & 0xFFFFFFFF; return EFI_SUCCESS; } @@ -72,7 +72,7 @@ MonotonicCounterDriverInitialize ( gBS->GetNextMonotonicCount = GetNextMonotonicCount; gRT->GetNextHighMonotonicCount = GetNextHighMonotonicCount; - // Install the Monotonic Counter Architctural Protocol onto a new handle + // Install the Monotonic Counter Architectural Protocol onto a new handle Status = gBS->InstallMultipleProtocolInterfaces ( &Handle, &gEfiMonotonicCounterArchProtocolGuid, NULL,