From nobody Mon Sep 16 08:15:05 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 4X6d4p0d8qz5WkPg; Mon, 16 Sep 2024 08:15:06 +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 4X6d4n4zVWz4RrJ; Mon, 16 Sep 2024 08:15:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726474505; 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=vi2Vmeql1DFWKF8Bzb86pKhOsCGMA3/YA+wdgUKyMLI=; b=GoJMFeNZGb39JQ4n/oT4P2TYfXM1Q/ZI4JxHcBDlK5EmybGDnfU0nwDYDd83dONm0dscVd B6pIvOxHGc7okDxXJqh7I9XwSJ4Ibto9ibl0TMrdxkBTmzwlCx3CPeGLlbMBNvA8FqHUSt Gv5hxKLB+KLuymbC0j3X2nWPfiGzeedlhqL5OKMzvPuZnHeVpjfXofK2BGmjk8rothm2fU eM21hsQ259hiqYjJFmQRki8w//JfwYN/80MJmJRu2V38MrHXAvrcPKrUITEhnqc68i5zjc TfVnxgtRQ0wMPgHTzaplZPbb+P8J3Mboo4Weu8lnf+2PiQNkLhRqPvFdNSDRhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726474505; a=rsa-sha256; cv=none; b=U4b4CRr9BMyTezNy/XFK27rCXuXmvzK6VMAoo/N0gbA7rVww0f1pKWyuE64JWMlk2NYLye DoLrmD1FFsY0j7w3gq/JFaVZ1qnd35hmvnub3Ol3PKdGVLZsutdccHyffxcpjIWOqXvISQ ugJCNShb1hOy6oq8Q6U9lTtQ3DS55ufdCQoD2m+0eN6lT45rJPK02qaEe767a8mRkSABqW xJQfJwonOZicI+HSIJViUtagnxygmY2Ab2Z5u1Kniq7Gm6hcv2Q6VQEUJtVhMrE0rFGcrb fn5Au4OLqFXallVlzQwdmffI59X2NoGoNYuj32X6kbmkRIj8+IkO7EMNlCvXCQ== 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=1726474505; 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=vi2Vmeql1DFWKF8Bzb86pKhOsCGMA3/YA+wdgUKyMLI=; b=C0Xgu2EIQgUP9OOwLiEL4mJODTGLnjQ4fUcZ2LoZ4/Ng1BRa4Za6TnZzPC3g2iXB58aSv+ YzdcIGmqLMY6hoPvEH8USwocrNOWI/Aa38eFAnV2RdvZoJ4P6NPUL1EDj9mGpU1cSrIYrS dpsWekiZ17unO61UJNZ85tvfFRsVRP0qbFqg/PO8xEl4laBqFA7BrAhu3a3YnyJ7EmBLyt UilUKh0kXMgkvTYL+KQWSOlX6Yr9nju8GArptgz7H8kLvfp0gfyjE+nddeOIyG/L21RA/Y ZpMQpVLlLXkIoryNYf/0sHsqdcUTskzZtbmm3x7rYZh7Fw3fJwLN+puq+4oDtw== 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 4X6d4n4XlLznQV; Mon, 16 Sep 2024 08:15:05 +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 48G8F53Q027092; Mon, 16 Sep 2024 08:15:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48G8F5Ec027089; Mon, 16 Sep 2024 08:15:05 GMT (envelope-from git) Date: Mon, 16 Sep 2024 08:15:05 GMT Message-Id: <202409160815.48G8F5Ec027089@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 9a49c98bafbe - main - amd64 la57_trampoline: stop using %rdx to remember original %cr0 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/main X-Git-Reftype: branch X-Git-Commit: 9a49c98bafbea2a896f72defe7d9f2b65a474c41 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9a49c98bafbea2a896f72defe7d9f2b65a474c41 commit 9a49c98bafbea2a896f72defe7d9f2b65a474c41 Author: Konstantin Belousov AuthorDate: 2024-09-11 00:35:43 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-16 08:09:20 +0000 amd64 la57_trampoline: stop using %rdx to remember original %cr0 Store %cr0 in %ebp. %rdx is needed for MSR access. Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/amd64/amd64/locore.S | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S index a51e5047fe54..86db0f76b22b 100644 --- a/sys/amd64/amd64/locore.S +++ b/sys/amd64/amd64/locore.S @@ -93,9 +93,10 @@ ENTRY(btext) ENTRY(la57_trampoline) movq %rsp,%r11 movq %rbx,%r10 + movq %rbp,%r9 leaq la57_trampoline_end(%rip),%rsp - movq %cr0,%rdx + movq %cr0,%rbp lgdtq la57_trampoline_gdt_desc(%rip) pushq $(2<<3) @@ -109,7 +110,7 @@ ENTRY(la57_trampoline) l1: movl $(3<<3),%eax movl %eax,%ss - movl %edx,%eax + movl %ebp,%eax andl $~CR0_PG,%eax movl %eax,%cr0 @@ -118,7 +119,7 @@ l1: movl $(3<<3),%eax movl %eax,%cr4 movl %edi,%cr3 - movl %edx,%cr0 + movl %ebp,%cr0 jmp 1f 1: pushl $(1<<3) @@ -128,6 +129,7 @@ l1: movl $(3<<3),%eax l2: movq %r11,%rsp movq %r10,%rbx + movq %r9,%rbp retq .p2align 4,0 ENTRY(la57_trampoline_gdt_desc)