From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web11.32009.1679914901399619742 for ; Mon, 27 Mar 2023 04:01:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iLoBlQHx; spf=pass (domain: kernel.org, ip: 145.40.68.75, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2F728B80DA9; Mon, 27 Mar 2023 11:01:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67FC0C433A4; Mon, 27 Mar 2023 11:01:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679914897; bh=C5YpbZrbokBs6o/dGGhbtLDZqU2JryJ3vo+zoPmiQ70=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iLoBlQHxYTFJWgBDbfIhUz/Eeqojt7KMyS3m5uwb8+5ZYUe05o0EAAdO40BLLc4W4 ySWulGzGNSnHskXhgc8KdZXpnD4t0RUtqInjbHmfFq0e0DC1ZcoMUAiZH9e6KdThQj dRW0RuwBePVlA6/OTQeOcZrlET1Fh5Bvyhozf+bBYYFIraqz7Yi2suWnRMlHZLhzrG ElsG0htSoRGUOFU625M7xpO7U4Iw57qTR6fD5vouHQNi0EjIqBSNq4LuCHqtS2KLWc 5/slDJClsV8td8SGHVsDEBmbfLuJ3GlBMSXH+JI5QQzSPRrfrq13NpokiV8mxnCePu mIsz0s7AgwiSw== From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Michael Kinney , Liming Gao , Jiewen Yao , Michael Kubacki , Sean Brogan , Rebecca Cran , Leif Lindholm , Sami Mujawar , Taylor Beebe , =?UTF-8?q?Marvin=20H=C3=A4user?= , Bob Feng Subject: [PATCH v2 02/17] MdePkg/BaseCpuLib AARCH64: Make asm files BTI compatible Date: Mon, 27 Mar 2023 13:00:57 +0200 Message-Id: <20230327110112.262503-3-ardb@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230327110112.262503-1-ardb@kernel.org> References: <20230327110112.262503-1-ardb@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Add the BTI instructions and the associated note to make the AArch64 asm objects compatible with BTI enforcement. Signed-off-by: Ard Biesheuvel --- MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.S | 1 + MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.S | 1 + 2 files changed, 2 insertions(+) diff --git a/MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.S b/MdePkg/Libra= ry/BaseCpuLib/AArch64/CpuFlushTlb.S index 82a7232268f59809..12c2421b6d327a7b 100644 --- a/MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.S +++ b/MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.S @@ -26,6 +26,7 @@ GCC_ASM_EXPORT(CpuFlushTlb) # )#=0D #=0D ASM_PFX(CpuFlushTlb):=0D + AARCH64_BTI(c)=0D tlbi vmalle1 // Invalidate Inst TLB and Data TLB=0D dsb sy=0D isb=0D diff --git a/MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.S b/MdePkg/Library/= BaseCpuLib/AArch64/CpuSleep.S index 410a271565edfb68..6853e0c56e0bb135 100644 --- a/MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.S +++ b/MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.S @@ -29,5 +29,6 @@ GCC_ASM_EXPORT(CpuSleep) #=0D =0D ASM_PFX(CpuSleep):=0D + AARCH64_BTI(c)=0D wfi=0D ret=0D --=20 2.39.2