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 <elvin.li@intel.com>
Reviewed-by: Li Kevin <kevin.y.li@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13183 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
li-elvin 2012-04-11 01:56:48 +00:00
parent 0779e5bfb0
commit fcbccedb28
1 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,7 @@
/// @file
/// IPF specific SwitchStack() function
///
/// Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
/// Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
/// 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