From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 991FB1A1DFE for ; Fri, 9 Sep 2016 00:21:40 -0700 (PDT) Received: by mail-wm0-x22a.google.com with SMTP id 1so16327232wmz.1 for ; Fri, 09 Sep 2016 00:21:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=cJVuZrfC3wukIJIhHM6DxTrEV0V4ojxfW7gzbpXyDZ0=; b=Oj0L3rZ/9LblRsR3G18QeZRK625MCWgHjQxINE5XYf28Ki1nLcRFjcY4qb3j6i8DIf PTY30rBD7YGO2x9K8jXncoiHop0tt6xa+uNWUiZVbVw4o+t/RPU08denY+LzNPGqriUk 9jun6vip1ZBiVWoR/ytbvp8NaCih0zMMLNRc4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=cJVuZrfC3wukIJIhHM6DxTrEV0V4ojxfW7gzbpXyDZ0=; b=fyrMM9ITRl5yWCl1oRnvFiuZBYGNl93niHL8fpFvDLgRcVNKVKuz/oZ/EQ5CXqtE1H Nks+Y7ESYh1q1CU5rU/mxpmfbWCriNLf1poVdjNxQ5L8PRGtlez3W1Tq55BsSJl8Leo0 HveTInWU+EzlfvqsMEsSnM2xqM8nFkLbx24g7kdRjPAYgvkfvAN4w2+s9Dtg9vlNY6Vt u6N5J0k59qeuKKRALMnSYlw3nJjGaXanUGT9/ZcuCq1EnZ/R0GWrduwcPXL4zP/M4uIV HvejMeHCfIex7C+ybgVExEoi8h15LvYEytXvG3oVJabzvh/8DunI3Cd5tTzVc7Wsrzhx qRZg== X-Gm-Message-State: AE9vXwMj1Fi9j8WwbiVVSCvvWU/QWHGvCTOCwuOXxKyQKTscF2WiVFEkH+vxz5UA0v8isonG X-Received: by 10.28.28.70 with SMTP id c67mr1483866wmc.8.1473405699242; Fri, 09 Sep 2016 00:21:39 -0700 (PDT) Received: from localhost.localdomain ([197.253.238.91]) by smtp.gmail.com with ESMTPSA id bt5sm1892705wjb.35.2016.09.09.00.21.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Sep 2016 00:21:38 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, liming.gao@intel.com Cc: leif.lindholm@linaro.org, Ard Biesheuvel Date: Fri, 9 Sep 2016 08:21:26 +0100 Message-Id: <1473405686-5465-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [PATCH] MdePkg/BaseLib AARCH64: terminate stack frame list on stack switch X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2016 07:21:41 -0000 When switching to the DXE phase stack, set the frame pointer to zero so that code walking the stack frame will not try to access stack frames\ belonging to the old stack. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- MdePkg/Library/BaseLib/AArch64/SwitchStack.S | 1 + 1 file changed, 1 insertion(+) diff --git a/MdePkg/Library/BaseLib/AArch64/SwitchStack.S b/MdePkg/Library/BaseLib/AArch64/SwitchStack.S index 2bce9c998f4f..c3ac8d7e4dfe 100644 --- a/MdePkg/Library/BaseLib/AArch64/SwitchStack.S +++ b/MdePkg/Library/BaseLib/AArch64/SwitchStack.S @@ -40,6 +40,7 @@ InternalSwitchStackAsm ( ); **/ ASM_PFX(InternalSwitchStackAsm): + mov x29, #0 mov x30, x0 mov sp, x3 mov x0, x1 -- 2.7.4