From 1ef41207dc5fe92acb63dc0e4d0e4d9fab2ff3d9 Mon Sep 17 00:00:00 2001 From: andrewfish Date: Tue, 21 Jun 2011 23:41:31 +0000 Subject: InOsEmuPkg: Add TimerLib for PEI, DXE_CORE, and DXE/EFI drivers/applications. Start using MdeModulePkg MetronomeDxe driver. Add PEI and DXE_CORE TimerLibs that just call back to the emulator. Add a DXE/UEFI TimerLib that also does a gBS->WaitForEvent() if the stall is for a long period of time. Change the Thunk API for Sleep to nanoseconds. Signed-off-by: andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11872 6f19259b-4bc3-4df7-8a09-765794883524 --- InOsEmuPkg/TimerDxe/Timer.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'InOsEmuPkg/TimerDxe') diff --git a/InOsEmuPkg/TimerDxe/Timer.c b/InOsEmuPkg/TimerDxe/Timer.c index 143591395a..d19ced7dd9 100644 --- a/InOsEmuPkg/TimerDxe/Timer.c +++ b/InOsEmuPkg/TimerDxe/Timer.c @@ -325,6 +325,14 @@ Returns: Status = gBS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, (void *)&mCpu); ASSERT_EFI_ERROR (Status); + // + // Start the timer thread at the default timer period + // + Status = mTimer.SetTimerPeriod (&mTimer, DEFAULT_TIMER_TICK_DURATION); + if (EFI_ERROR (Status)) { + return Status; + } + // // Install the Timer Architectural Protocol onto a new handle // @@ -339,13 +347,6 @@ Returns: return Status; } - // - // Start the timer thread at the default timer period - // - Status = mTimer.SetTimerPeriod (&mTimer, DEFAULT_TIMER_TICK_DURATION); - if (EFI_ERROR (Status)) { - return Status; - } return EFI_SUCCESS; } -- cgit v1.2.3