VirtualBox

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

Last change on this file since 99404 was 99404, checked in by vboxsync, 22 months ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 981 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 Stalls the CPU for at least the given number of microseconds and and saves
21 the value in the S3 script to be replayed on S3 resume.
22
23 Stalls the CPU for the number of microseconds specified by MicroSeconds.
24
25 @param MicroSeconds The minimum number of microseconds to delay.
26
27 @return MicroSeconds
28
29**/
30UINTN
31EFIAPI
32S3Stall (
33 IN UINTN MicroSeconds
34 )
35{
36 RETURN_STATUS Status;
37
38 Status = S3BootScriptSaveStall (MicroSecondDelay (MicroSeconds));
39 ASSERT (Status == RETURN_SUCCESS);
40
41 return MicroSeconds;
42}
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