From fcbccedb28b6847614cc849b6380282ceaafe7bb Mon Sep 17 00:00:00 2001 From: li-elvin Date: Wed, 11 Apr 2012 01:56:48 +0000 Subject: Current IPF version SwitchStack implementation uses loadrs instruction to restore dirty partition of register stack from the backing store, but there is no guarantee to make the backing store valid before. So add flushrs before loadrs to make sure backing store valid. Signed-off-by: Li Elvin Reviewed-by: Li Kevin Reviewed-by: Michael Kinney git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13183 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Library/BaseLib/Ipf/SwitchStack.s | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MdePkg/Library/BaseLib/Ipf/SwitchStack.s b/MdePkg/Library/BaseLib/Ipf/SwitchStack.s index 33f2ed013f..1236bbe947 100644 --- a/MdePkg/Library/BaseLib/Ipf/SwitchStack.s +++ b/MdePkg/Library/BaseLib/Ipf/SwitchStack.s @@ -1,7 +1,7 @@ /// @file /// IPF specific SwitchStack() function /// -/// Copyright (c) 2006, Intel Corporation. All rights reserved.
+/// Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
/// This program and the accompanying materials /// are licensed and made available under the terms and conditions of the BSD License /// which accompanies this distribution. The full text of the license may be found at @@ -27,7 +27,9 @@ AsmSwitchStackAndBackingStore:: mov r17 = in1 mov r18 = in2 and r2 = r14, r2 - + + flushrs + mov ar.rsc = r2 mov sp = in3 mov r19 = in4 -- cgit v1.2.3