From nobody Wed Oct 11 15:44:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S5HBZ0THDz4wK23; Wed, 11 Oct 2023 15:44:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S5HBY6twcz3d1K; Wed, 11 Oct 2023 15:44:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697039062; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zl67/QemO5PY+WUZKMkeIzzToNVK3b744yG8jC9+MOA=; b=B8TE9zvnnrDkzniuKe/X1WQkATGMJqpqtGHLVBSFr87W+7NzJt9PUiTq8af20Nuc/cKHWO F1wSUp4Wsuy10jl5uIhwRAEBlUNh9OuEeuWRl0xjs0n4VBIEph9Ls/bLTOdxAnsZqqg/xR vJpTQ0G42BadCB5j3ET5whkSy44s1dTEYv6kXZ2o/NBtzBmEjp3YeQG0fVpVAcOHf87azX 8xe7WQrnFK8t2p3oSezDms/Hhno2DieCslE4pSoTy32lxGGE3M3kKBqAhxL0Hw2hWjlSLX fLJNLuGAczUrmX0Y/Ohu+CAyffoSI0rIFjBUlTmIPUoghTmOJYkrmvC8ymfYBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697039062; a=rsa-sha256; cv=none; b=hZe2W10iKRDOpevODJcID/RQglO6wU7M6EzaS9tznkkUZXMPqV7m4v4ng+rk+/iIIXKC2X 7MXigFaeVUEU5LBiyDRNIZiK2SDCfmkHisYNTMFLsKWuwIaabhIDtRQ83Ca7FPFps45Qh3 lNvHwvWhCUIt6MrCVsnGxHr/G/VZpsariw1VYr7amqOqTwR7LcQSaeAY1x49aaEbKd9Pvk XTQiTVukJx2T011b7y7beyhi9KIQOwgrlOMsEsMhu6jX+DI72EZp54SonyuGGPdtnaYrXL zAMH163GL3bxxqxLmpFkvG6V72Q69H8uRVIQBHAyIiX2uA6ZR7nIZoCJemydKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697039062; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zl67/QemO5PY+WUZKMkeIzzToNVK3b744yG8jC9+MOA=; b=Aafws+WTczobmfiu76UDNK/egRgCUR3x6r82yWFZKUkAc+Jwsv0zBeicMiau57oXi7Mkr+ RjS+Fs96cjy3WH4wyXdPOWORXutongS6OboSF6KVnyGANxIc85fnUIpErMLCkgHSLnhE0F c2tu7i7hMsVAGaJqt6GV5Gchf+mhj7dn/voLqmHAwKXULFJIE9riX0Lwg5zWVjp0Yl+Gs0 YoS8ElVi++eIy0XksNo3Si1rgOrExZJOvaiKZrGUeT0JumNOKXIppfwB/FIbuPB2XWzlaj +qZB+832fNA1Q8QVE4NXwAAf5DrknYiZfXi+iKNZYpqL8jfZJHIVpGjJaIVHug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S5HBY5xJ1zBx6; Wed, 11 Oct 2023 15:44:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39BFiLsU023744; Wed, 11 Oct 2023 15:44:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39BFiLsA023741; Wed, 11 Oct 2023 15:44:21 GMT (envelope-from git) Date: Wed, 11 Oct 2023 15:44:21 GMT Message-Id: <202310111544.39BFiLsA023741@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: b53155d4dfc6 - stable/14 - efirt: Move comment about fpu_kern_enter to where it is called List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b53155d4dfc67ee3754d886a03682e8522d85b31 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b53155d4dfc67ee3754d886a03682e8522d85b31 commit b53155d4dfc67ee3754d886a03682e8522d85b31 Author: John Baldwin AuthorDate: 2023-08-25 19:33:00 +0000 Commit: John Baldwin CommitDate: 2023-10-11 15:10:31 +0000 efirt: Move comment about fpu_kern_enter to where it is called Reviewed by: imp, kib, andrew, markj Differential Revision: https://reviews.freebsd.org/D41576 (cherry picked from commit 8173fa60ddb7e9a805dec9fef7bf07e74ae4144d) --- sys/amd64/amd64/efirt_machdep.c | 5 ----- sys/dev/efidev/efirt.c | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/amd64/amd64/efirt_machdep.c b/sys/amd64/amd64/efirt_machdep.c index 419f27a236bf..22d8cf963880 100644 --- a/sys/amd64/amd64/efirt_machdep.c +++ b/sys/amd64/amd64/efirt_machdep.c @@ -280,11 +280,6 @@ fail: * reason to bother with the virtual map, and no need to add a * complexity into loader. * - * The fpu_kern_enter() call allows firmware to use FPU, as mandated - * by the specification. In particular, CR0.TS bit is cleared. Also - * it enters critical section, giving us neccessary protection against - * context switch. - * * There is no need to disable interrupts around the change of %cr3, * the kernel mappings are correct, while we only grabbed the * userspace portion of VA. Interrupts handlers must not access diff --git a/sys/dev/efidev/efirt.c b/sys/dev/efidev/efirt.c index 535a6caa75bd..2d45b4d6ac66 100644 --- a/sys/dev/efidev/efirt.c +++ b/sys/dev/efidev/efirt.c @@ -285,6 +285,11 @@ rt_ok(void) return (0); } +/* + * The fpu_kern_enter() call in allows firmware to use FPU, as + * mandated by the specification. It also enters a critical section, + * giving us neccessary protection against context switches. + */ static int efi_enter(void) {