From nobody Fri Aug 25 19:34:42 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 4RXVX22wVfz4qhh1; Fri, 25 Aug 2023 19:34:42 +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 4RXVX22Sqjz3Sx5; Fri, 25 Aug 2023 19:34:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692992082; 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=pbWJotOYEwqIhmI9GKFjNjEBNmU6+4814YRNQN7GoKw=; b=iJxpixjFFgWaImwUkjH7+hkyTW7DMWXGwohQDHJmtTk4WYA8ZXd6DYNEqMfmjNFc2YyaCA lZ29tVj5q+n1pxhd7JVtusn0JdtN6ICgYYrqaqAfruePi6rgEIM9N2sK6rW8dCxLBF7sQq oZZb4DljibH2c/FERZUglsJ7xEJQT8HL+3PTx/ME0qXrx1oVUlq8ZUav4uVTPzE4rBfDQd KD5JYu7Mq2W+EziMUsDUSERl2JxyeWlHzv8T4RQf0ZYvhMJhy7SWiCcVEpjrQHpN9/SOah bN7/hRF/Tp1myeX/XMsGAAoQcsxXkp/gt8ubtyOyyMBhjB0LVpQla2El6VHT/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692992082; 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=pbWJotOYEwqIhmI9GKFjNjEBNmU6+4814YRNQN7GoKw=; b=Wq1VNQip7Y0yEFLi4ZmXo4FBMbT8by47hyJDLOiJTR3OObaPdVt5HADq/zvCU8w5hG1RB/ qAdorhuzgOEGLbjeMeWNL34gsTXluszWqjddpFdoT2jg6R2dUfQQNIK2IgY55k3m+loRvX 9ggKPGXZbHNoxBTXBdhuLi98Ca9BHukifp5DpZx5zaUHkltkFzdx/FZWuSqFWL7e2/X9Rw sG63emxrmTxfydSaeIJlyBqm1MvtQw4toha74vWki92LfVNLugMfyXSAza0WPMR41H8rqR 3oKjWQh0E42KBvqPgx/arDYbWvi9jSG5WH1YG1d6x4zJhwUHgmHaVtYXHvuvJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692992082; a=rsa-sha256; cv=none; b=NuhhqLGkAKhZkm7cnTyYvmeByARrfJZdBsk++k2fe4Bc7bgEs6cJ9bvaDSStLErjSb0Tiu T/uyO4Zr7+qMtgywkXeGK+nh34cnm+DC64iA59zMwuoc4RRw5mFZ3nMdatvoaporAnT10A ytVbN03dKSyodk3O4wk4o22lAac+paTTuSexIo4qQzfv99fTCSXRK207hKw2BiLJcBVdRN YrzY6dTOtSFdJZ3/52Gu3q7J4v3LmVYfIrGO8qKb42xLF9+JZurAfjphO5QQg4xCVY9QJM UO0TB6N1qcctX2NO8BKSJK/YXQBPYkYsOEl8bj8PFOxJON7FazJfe7hg5jy3PQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RXVX21XdKz1K7H; Fri, 25 Aug 2023 19:34:42 +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 37PJYgEN099527; Fri, 25 Aug 2023 19:34:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37PJYgrQ099525; Fri, 25 Aug 2023 19:34:42 GMT (envelope-from git) Date: Fri, 25 Aug 2023 19:34:42 GMT Message-Id: <202308251934.37PJYgrQ099525@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 8173fa60ddb7 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 8173fa60ddb7e9a805dec9fef7bf07e74ae4144d Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8173fa60ddb7e9a805dec9fef7bf07e74ae4144d commit 8173fa60ddb7e9a805dec9fef7bf07e74ae4144d Author: John Baldwin AuthorDate: 2023-08-25 19:33:00 +0000 Commit: John Baldwin CommitDate: 2023-08-25 19:33:00 +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 --- 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) {