VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/IntelFsp2Pkg/Library/BaseFspSwitchStackLib/FspSwitchStackLib.c@ 106129

Last change on this file since 106129 was 99404, checked in by vboxsync, 2 years ago

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

  • Property svn:eol-style set to native
File size: 756 bytes
Line 
1/** @file
2
3 Copyright (c) 2014 - 2022, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
5
6**/
7
8#include <Base.h>
9#include <Library/BaseLib.h>
10#include <Library/FspCommonLib.h>
11
12/**
13
14 Switch the current stack to the previous saved stack.
15
16 @param[in] NewStack The new stack to be switched.
17
18 @return OldStack After switching to the saved stack,
19 this value will be saved in eax before returning.
20
21
22**/
23UINTN
24EFIAPI
25SwapStack (
26 IN UINTN NewStack
27 )
28{
29 FSP_GLOBAL_DATA *FspData;
30 UINTN OldStack;
31
32 FspData = GetFspGlobalDataPointer ();
33 OldStack = FspData->CoreStack;
34 FspData->CoreStack = (UINTN)NewStack;
35 return OldStack;
36}
Note: See TracBrowser for help on using the repository browser.

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