From nobody Mon Sep 23 13:03:45 2024 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 4XC38d70Gpz52FcZ; Mon, 23 Sep 2024 13:03:45 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XC38d3khzz40Lm; Mon, 23 Sep 2024 13:03:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727096625; 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=2zLbkji5V14cWSoteJVvH4wPP7QYewXLWMMEUygqyos=; b=bnSMEeevn/LlOpfcQgxKH/I5RGx7KyQ2KKMwUms4hU1Qu8LkYU/oPQxmWK9XtBvVKuf/1J Fh69ame7LBEpTFdoB8l5SalslaC4NrKREhODq7Y8MjBJ1JJSm/nsYUDpzeDvjx2c8Ip4xX n3y7DSTWJCsWglhVVgByesTtYlAAnX4RxLR+no9iLQdjkyzn0t/Tyr3T95nZZQuVbDpk7Y 98Cxw42iMcIAgLvn17qjkYpalhdsu5WTzCSY6rAE43eDgve6nqhY0ClV+SG/vfw/4nus4M P1C66XPI1KNliQaovvn9fq0V1XgPaCfB5qnn770V+EF+/ehEyz8AHkiOinZCIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727096625; a=rsa-sha256; cv=none; b=UeNvnDktrj7vNcIX6kQ3DUQ4LdiDf1ZE8ZSgHe1h0SG3KcH5LZMoyg1HEq5Y+C4/qjuVB6 XmjrnEbhRFpl0iU+ABhvSbBmEwNfyzMbZwWlaVRNyMioABCjzXHS7Wwv8sEtfempd2BhEQ RHTFrHh4C6DDOhTME1RmB528MtAZRi/VM4niqPpPWybrHTHhho8CocamrIOZep450ggLkH SNYD8Pub18aO8psafRLG0OKFLAxNESnV/r91Bh/R1JhAN5hkioCTKNqzakhJIW2+nRNNvO FTYTKFrMMTFxGB7Rpd868TMNRM2p7VFFoIbkn9sFKyJhpJV9g78obD15JS/T2Q== 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=1727096625; 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=2zLbkji5V14cWSoteJVvH4wPP7QYewXLWMMEUygqyos=; b=n5/3pY0/4pBoAn5FY4lh0GdTUmssh2avZ6m4NWilvrHQW7pERQIXTYanqaSzvBW6S343xy KWi76VOl3MGgirkUdzsE9zDLyicCz5cQte0+8Eazg0pboTL6Tfww+I06d5GL1aYEh5/a9m VDWTFxMb+hLNj+tPOyTLcnMCcMq+uBP3/Gj7h2YmWt0C2swhqZ+EDjMbiSpgxeqM05NoGF KMW8yqL12r73Of5SfFSZvE+iba7dpR9latK3/SbhzDhtLJZRcPjeEaPpAkRkX5BmNzNjLO 72cx3fLdJkd/HI2agHCHvtL0w48GI/sWTGraLa2toVyIpOPCNyfjDDViK1IguA== 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 4XC38d36vNzmCy; Mon, 23 Sep 2024 13:03:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48ND3jrW007116; Mon, 23 Sep 2024 13:03:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48ND3jne007113; Mon, 23 Sep 2024 13:03:45 GMT (envelope-from git) Date: Mon, 23 Sep 2024 13:03:45 GMT Message-Id: <202409231303.48ND3jne007113@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: cdcaf2e07354 - stable/14 - amd64 la57_trampoline: turn off global pages and PCID before turning off paging 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cdcaf2e07354ca74539aecb5f23f0ed35b3c7260 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cdcaf2e07354ca74539aecb5f23f0ed35b3c7260 commit cdcaf2e07354ca74539aecb5f23f0ed35b3c7260 Author: Konstantin Belousov AuthorDate: 2024-09-12 02:42:23 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-23 13:03:06 +0000 amd64 la57_trampoline: turn off global pages and PCID before turning off paging (cherry picked from commit 1be58e67eb24024bc808357771579d396679ecb0) --- sys/amd64/amd64/locore.S | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S index 9a991402cdc2..d05f38dbba05 100644 --- a/sys/amd64/amd64/locore.S +++ b/sys/amd64/amd64/locore.S @@ -94,6 +94,8 @@ ENTRY(la57_trampoline) movq %rsp,%r11 movq %rbx,%r10 movq %rbp,%r9 + movq %cr4,%r8 + orl $CR4_LA57,%r8d leaq la57_trampoline_end(%rip),%rsp movq %cr0,%rbp @@ -110,6 +112,10 @@ ENTRY(la57_trampoline) l1: movl $(3<<3),%eax movl %eax,%ss + movl %cr4,%eax + andl $~(CR4_PGE | CR4_PCIDE),%eax + movl %eax,%cr4 + movl %ebp,%eax andl $~CR0_PG,%eax movl %eax,%cr0 @@ -140,6 +146,7 @@ l1: movl $(3<<3),%eax l2: movq %r11,%rsp movq %r10,%rbx movq %r9,%rbp + movq %r8,%cr4 retq .p2align 4,0 ENTRY(la57_trampoline_gdt_desc)