From nobody Thu Oct 24 02:41:41 2024 X-Original-To: dev-commits-src-main@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 4XYqtY6N0qz5Zy3F; Thu, 24 Oct 2024 02:41:41 +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 4XYqtY5n1dz452t; Thu, 24 Oct 2024 02:41:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729737701; 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=Nnr0VrALk2dJpb/X1RhD/IzezB3P49YA83796bOtVhE=; b=WjcnqbcoCWgd4l8Q2Bqy7TmYJf5qDKuE0BDryOIBV0BpzU3pYS5TwkoD0XI9gABImR+Mnb xTQQh+2mvWWI3riqNeEs24nucNSJha1EzAP+2KnUYcF1Xun7hJypSjNikf6dMj8+KX6Rla 6AqkeYpZWjqKl4M3Sim3yIXaj6Nv/I2+fMu9sxwHytAB4gZqmkePxBEk6ooxa++56cyF08 86KGxlwgHyOIxx2o70XG1Vvf1K6SKBd5XpzfAye6WloZ3E1r5TVnQZ53lJQwIsel8zGurP KW5cqVPjdz538uIx3ToSXVJ3zogK+AXmuqp4qulN6tDxmcYKQUweFDuAuN4KgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729737701; 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=Nnr0VrALk2dJpb/X1RhD/IzezB3P49YA83796bOtVhE=; b=g05qSiWS+5rvmOk9rzHVUt0SN2OHYAVphCedP+T0PCPA5C8r4eN3PP/CZU2MyWvfz/OXye +7KiZN3D1Pe9Hp66BQOsRwVIgrtvlRiRJmo8MqkJb0c5U2rnuYyQnPXe8A/GVdJXHkXJN8 4a076EX77QSMjS4tFlL3Cznf1EaYA3U2HV3vcozgIgzSP/+tYJ4oVlLLaCxswZCF5dsHmg CjnZE8oPHG/e2FdNsvyRzJcxiqjzU/SbwfO0JPCXaBEdSIbD4/2HhR69ynUOeqVkw8XroV x1D9/a106bS2SRSFKoeMn09AqBldVgCO5pTywIQsCKJTAXHyEe9Vz9sWNjzHOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729737701; a=rsa-sha256; cv=none; b=KO8iXUrE6ps91UgjPMJivIt8NIlEvOejFQh89BFdarYvHpuq6CtCxxWg13V95Deon0k3PB nS/KpDI+F/gsD7UtzSOeKz+iM4F7LLE8wmgvPlG3TKDoznR+AE8qWfEYRNXnCZAH+b6NoF yTJjfV4f8mA6pfADA0VWnTvboPguLgHEXAVm7/siBRRAGOpTXFk0+CbJ9VJk5wiJ0sd3MS 9cTug0zv11wRQqjCrrkFhHXTNeKggu2x0pyIMaNnx49cYYsszti03vCu0hRyGL6vZmxqNt n243r+FWX1Zu1QIcH+J6/fNX6U5V1KnAQiMPUTZ1Zy51eCLr4bIY9LO1QHvgBA== 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 4XYqtY5NgbzPCy; Thu, 24 Oct 2024 02:41:41 +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 49O2ff2r078511; Thu, 24 Oct 2024 02:41:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49O2ffYf078509; Thu, 24 Oct 2024 02:41:41 GMT (envelope-from git) Date: Thu, 24 Oct 2024 02:41:41 GMT Message-Id: <202410240241.49O2ffYf078509@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: 2ac21f2c98ed - main - x86 specialreg.h: visually align %cr4 and MSR_EFER bit mask definitions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 2ac21f2c98edf50e22f06a63f3528a99f4f963a0 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2ac21f2c98edf50e22f06a63f3528a99f4f963a0 commit 2ac21f2c98edf50e22f06a63f3528a99f4f963a0 Author: Konstantin Belousov AuthorDate: 2024-10-23 23:02:22 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-24 02:41:10 +0000 x86 specialreg.h: visually align %cr4 and MSR_EFER bit mask definitions Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/x86/include/specialreg.h | 64 ++++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/specialreg.h index 3115056ce14c..b88c3e46000a 100644 --- a/sys/x86/include/specialreg.h +++ b/sys/x86/include/specialreg.h @@ -57,39 +57,45 @@ /* * Bits in PPro special registers */ -#define CR4_VME 0x00000001 /* Virtual 8086 mode extensions */ -#define CR4_PVI 0x00000002 /* Protected-mode virtual interrupts */ -#define CR4_TSD 0x00000004 /* Time stamp disable */ -#define CR4_DE 0x00000008 /* Debugging extensions */ -#define CR4_PSE 0x00000010 /* Page size extensions */ -#define CR4_PAE 0x00000020 /* Physical address extension */ -#define CR4_MCE 0x00000040 /* Machine check enable */ -#define CR4_PGE 0x00000080 /* Page global enable */ -#define CR4_PCE 0x00000100 /* Performance monitoring counter enable */ -#define CR4_FXSR 0x00000200 /* Fast FPU save/restore used by OS */ -#define CR4_XMM 0x00000400 /* enable SIMD/MMX2 to use except 16 */ -#define CR4_UMIP 0x00000800 /* User Mode Instruction Prevention */ -#define CR4_LA57 0x00001000 /* Enable 5-level paging */ -#define CR4_VMXE 0x00002000 /* enable VMX operation (Intel-specific) */ -#define CR4_FSGSBASE 0x00010000 /* Enable FS/GS BASE accessing instructions */ -#define CR4_PCIDE 0x00020000 /* Enable Context ID */ -#define CR4_XSAVE 0x00040000 /* XSETBV/XGETBV */ -#define CR4_SMEP 0x00100000 /* Supervisor-Mode Execution Prevention */ -#define CR4_SMAP 0x00200000 /* Supervisor-Mode Access Prevention */ -#define CR4_PKE 0x00400000 /* Protection Keys Enable */ +#define CR4_VME 0x00000001 /* Virtual 8086 mode extensions */ +#define CR4_PVI 0x00000002 /* Protected-mode virtual interrupts */ +#define CR4_TSD 0x00000004 /* Time stamp disable */ +#define CR4_DE 0x00000008 /* Debugging extensions */ +#define CR4_PSE 0x00000010 /* Page size extensions */ +#define CR4_PAE 0x00000020 /* Physical address extension */ +#define CR4_MCE 0x00000040 /* Machine check enable */ +#define CR4_PGE 0x00000080 /* Page global enable */ +#define CR4_PCE 0x00000100 /* Performance monitoring counter + enable */ +#define CR4_FXSR 0x00000200 /* Fast FPU save/restore used by OS */ +#define CR4_XMM 0x00000400 /* enable SIMD/MMX2 to use except 16 */ +#define CR4_UMIP 0x00000800 /* User Mode Instruction Prevention */ +#define CR4_LA57 0x00001000 /* Enable 5-level paging */ +#define CR4_VMXE 0x00002000 /* enable VMX operation + (Intel-specific) */ +#define CR4_FSGSBASE 0x00010000 /* Enable FS/GS BASE access + instructions */ +#define CR4_PCIDE 0x00020000 /* Enable Context ID */ +#define CR4_XSAVE 0x00040000 /* XSETBV/XGETBV */ +#define CR4_SMEP 0x00100000 /* Supervisor-Mode Execution + Prevention */ +#define CR4_SMAP 0x00200000 /* Supervisor-Mode Access + Prevention */ +#define CR4_PKE 0x00400000 /* Protection Keys Enable */ /* * Bits in AMD64 special registers. EFER is 64 bits wide. */ -#define EFER_SCE 0x000000001 /* System Call Extensions (R/W) */ -#define EFER_LME 0x000000100 /* Long mode enable (R/W) */ -#define EFER_LMA 0x000000400 /* Long mode active (R) */ -#define EFER_NXE 0x000000800 /* PTE No-Execute bit enable (R/W) */ -#define EFER_SVM 0x000001000 /* SVM enable bit for AMD, reserved for Intel */ -#define EFER_LMSLE 0x000002000 /* Long Mode Segment Limit Enable */ -#define EFER_FFXSR 0x000004000 /* Fast FXSAVE/FSRSTOR */ -#define EFER_TCE 0x000008000 /* Translation Cache Extension */ -#define EFER_MCOMMIT 0x00020000 /* Enable MCOMMIT (AMD) */ +#define EFER_SCE 0x000000001 /* System Call Extensions (R/W) */ +#define EFER_LME 0x000000100 /* Long mode enable (R/W) */ +#define EFER_LMA 0x000000400 /* Long mode active (R) */ +#define EFER_NXE 0x000000800 /* PTE No-Execute bit enable (R/W) */ +#define EFER_SVM 0x000001000 /* SVM enable bit for AMD, reserved + for Intel */ +#define EFER_LMSLE 0x000002000 /* Long Mode Segment Limit Enable */ +#define EFER_FFXSR 0x000004000 /* Fast FXSAVE/FSRSTOR */ +#define EFER_TCE 0x000008000 /* Translation Cache Extension */ +#define EFER_MCOMMIT 0x000020000 /* Enable MCOMMIT (AMD) */ /* * Intel Extended Features registers