VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseS3StallLib/S3StallLib.c@ 87965

Last change on this file since 87965 was 80721, checked in by vboxsync, 5 years ago

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • Property svn:eol-style set to native
File size: 1005 bytes
Line 
1/** @file
2 Stall Services that do stall and also enable the Stall operatation
3 to be replayed during an S3 resume. This library class maps directly on top
4 of the Timer class.
5
6 Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
7
8 SPDX-License-Identifier: BSD-2-Clause-Patent
9
10**/
11
12#include <Base.h>
13
14#include <Library/TimerLib.h>
15#include <Library/DebugLib.h>
16#include <Library/S3BootScriptLib.h>
17#include <Library/S3StallLib.h>
18
19
20/**
21 Stalls the CPU for at least the given number of microseconds and and saves
22 the value in the S3 script to be replayed on S3 resume.
23
24 Stalls the CPU for the number of microseconds specified by MicroSeconds.
25
26 @param MicroSeconds The minimum number of microseconds to delay.
27
28 @return MicroSeconds
29
30**/
31UINTN
32EFIAPI
33S3Stall (
34 IN UINTN MicroSeconds
35 )
36{
37 RETURN_STATUS Status;
38
39 Status = S3BootScriptSaveStall (MicroSecondDelay (MicroSeconds));
40 ASSERT (Status == RETURN_SUCCESS);
41
42 return MicroSeconds;
43}
44
45
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette