From 2f23473f16285355e96f2eb00b20a21ecbe4dcdd Mon Sep 17 00:00:00 2001 From: qwang12 Date: Tue, 1 Aug 2006 05:23:54 +0000 Subject: Add EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event for MonotonicCounter driver. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1163 6f19259b-4bc3-4df7-8a09-765794883524 --- .../MonotonicCounter/RuntimeDxe/MonotonicCounter.c | 37 +++++++++++++++++++++- .../RuntimeDxe/MonotonicCounter.msa | 29 +++++++++-------- 2 files changed, 52 insertions(+), 14 deletions(-) (limited to 'EdkModulePkg') diff --git a/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.c b/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.c index 6e4350f0ed..4a79e54a00 100644 --- a/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.c +++ b/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.c @@ -33,7 +33,6 @@ EFI_HANDLE mMonotonicCounterHandle = NULL; // UINT64 mEfiMtc; - // // Event to use to update the Mtc's high part when wrapping // @@ -100,6 +99,42 @@ Returns: return EFI_SUCCESS; } + + +/** + Call back function on EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event. + + Fixup internal data so that the driver is callable in EFI runtime + in virtual mode. Convert gRT to virtual address. gRT is from + UefiRuntimeServicesTableLib class. It is not fixed up by + UefiRuntimeServicesTableLib instance. + + @param Event Event whose notification function is being invoked. + @param Context The context of the Notification context. Not used in + this call back function. + +**/ +VOID +EFIAPI +MonotonicCounterDriverSetVirtualAddressMap ( + IN EFI_EVENT Event, + IN VOID *Context + ) +/*++ + +Routine Description: + +Arguments: + +Returns: + +--*/ +{ + gRT->ConvertPointer (0, (VOID **) &gRT); +} + + + EFI_STATUS EFIAPI MonotonicCounterDriverGetNextHighMonotonicCount ( diff --git a/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.msa b/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.msa index 1fad33cc61..de62a4b8c9 100644 --- a/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.msa +++ b/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.msa @@ -1,11 +1,11 @@ - @@ -16,11 +16,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.--> Component description file for MonotonicCounter module. This module Produced the Monotonic Counter Services as defined in the DXE CIS. Copyright (c) 2006, Intel Corporation - 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 - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + 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 + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052 @@ -81,5 +81,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.--> MonotonicCounterDriverInitialize + + MonotonicCounterDriverSetVirtualAddressMap + - \ No newline at end of file + -- cgit v1.2.3