From patchwork Fri Sep 9 07:21:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 75843 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp206583qgf; Fri, 9 Sep 2016 00:21:43 -0700 (PDT) X-Received: by 10.98.196.130 with SMTP id h2mr3932034pfk.140.1473405703179; Fri, 09 Sep 2016 00:21:43 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id kg11si2548634pab.248.2016.09.09.00.21.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Sep 2016 00:21:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 416A31A1E02; Fri, 9 Sep 2016 00:21:42 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org 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 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: [edk2] [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: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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(+) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm 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