]> git.proxmox.com Git - mirror_edk2.git/blobdiff - InOsEmuPkg/TimerDxe/Timer.c
InOsEmuPkg: Add TimerLib for PEI, DXE_CORE, and DXE/EFI drivers/applications.
[mirror_edk2.git] / InOsEmuPkg / TimerDxe / Timer.c
index 143591395aac6309da9fe52322b6f08a88da4955..d19ced7dd9ac6a3e6e5cdfa30541c8f05cadbfe8 100644 (file)
@@ -325,6 +325,14 @@ Returns:
   Status = gBS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, (void *)&mCpu);\r
   ASSERT_EFI_ERROR (Status);\r
 \r
+  //\r
+  // Start the timer thread at the default timer period\r
+  //\r
+  Status = mTimer.SetTimerPeriod (&mTimer, DEFAULT_TIMER_TICK_DURATION);\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
   //\r
   // Install the Timer Architectural Protocol onto a new handle\r
   //\r
@@ -339,13 +347,6 @@ Returns:
     return Status;\r
   }\r
 \r
-  //\r
-  // Start the timer thread at the default timer period\r
-  //\r
-  Status = mTimer.SetTimerPeriod (&mTimer, DEFAULT_TIMER_TICK_DURATION);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
 \r
   return EFI_SUCCESS;\r
 }\r