+++ /dev/null
-/** @file\r
- MicroSecondDelay implementation of ACPI Timer.\r
- \r
- Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>\r
- \r
- SPDX-License-Identifier: BSD-2-Clause-Patent\r
- \r
---*/\r
-\r
-#include "PiPei.h"\r
-#include "I2CAccess.h"\r
-#include "I2CDelayPei.h"\r
-#include <Library/DebugLib.h>\r
-#include <Library/PeiServicesTablePointerLib.h>\r
-#include <Ppi/Stall.h>\r
-\r
-/**\r
- Stalls the CPU for at least the given number of microseconds.\r
- Stalls the CPU for the number of microseconds specified by MicroSeconds.\r
-\r
- @param MicroSeconds The minimum number of microseconds to delay.\r
-\r
- @return EFI_STATUS\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-MicroSecondDelay (\r
- IN UINTN MicroSeconds\r
- )\r
-{\r
-\r
- EFI_PEI_STALL_PPI *StallPpi;\r
- EFI_STATUS Status;\r
- CONST EFI_PEI_SERVICES **PeiServices;\r
- \r
- PeiServices = GetPeiServicesTablePointer();\r
-\r
-\r
- Status = (**PeiServices).LocatePpi (PeiServices, &gEfiPeiStallPpiGuid, 0, NULL, &StallPpi);\r
- ASSERT(!EFI_ERROR(Status));\r
-\r
- StallPpi->Stall (PeiServices, StallPpi, MicroSeconds);\r
-\r
- return EFI_SUCCESS;\r
-}\r