/** @file\r
\r
- Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
UINTN CurrentStack;\r
UINTN FspStackBase;\r
\r
+ //\r
+ // Override OnSeparateStack to 1 because this function will switch stack to permanent memory\r
+ // which makes FSP running on different stack from bootloader temporary ram stack.\r
+ //\r
+ GetFspGlobalDataPointer ()->OnSeparateStack = 1;\r
+\r
if (PcdGet8 (PcdFspHeapSizePercentage) == 0) {\r
\r
CurrentStack = AsmReadEsp();\r