VirtualBox

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

Last change on this file since 99396 was 80721, checked in by vboxsync, 6 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: 715 bytes
Line 
1/** @file
2
3 Copyright (c) 2014, 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**/
23UINT32
24SwapStack (
25 IN UINT32 NewStack
26 )
27{
28 FSP_GLOBAL_DATA *FspData;
29 UINT32 OldStack;
30
31 FspData = GetFspGlobalDataPointer ();
32 OldStack = FspData->CoreStack;
33 FspData->CoreStack = NewStack;
34 return OldStack;
35}
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