From nobody Tue May 14 00:18:18 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 4VdcQL4Scgz5JyQF; Tue, 14 May 2024 00:18:18 +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 4VdcQL3V10z4CWC; Tue, 14 May 2024 00:18:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715645898; 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=TsZKZJ1duY3WHpKvYK3dRA0L1FETbVo15lkZ/Pab0n4=; b=mZ5a0BnzZLRn+eq6ThPEkJNOaogGkm9sFe1Ma6X8NrwaCh0jsMYxS6gYbmvqrlp3ROhpGX oJbZJN6EDj9iAI2/b5tNZtRx7Sxjlcvq7ke1OVh2Mp8efUTINp6XbRmSk8mYHddbsaxUTu X+zqYo12tPgqU+d8l+8akdgXJvUVOl6t0jCgDdB4Z90CDGki4o2qgrnqUfnH+FJfVCeEo8 jHgPlZ8WJkMVPwr08JpEevavCm0dCIfiCoxmDGogS3DvHnYzxCGlvW8yXHg4dkUOpFmWIl Twym2TXn4w56PFsx6TDoSkrKqrEqlmVnK9ZIAiJRMdELkSA5UISz7FR7g+gZyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715645898; a=rsa-sha256; cv=none; b=LCV2EXoOFB3DkJ5yL1VtklJ08rAOvgaMk2UYN3jwCCFMTvu32MOhXTF0Ba6olVEAJiP42r dp+pXgHanNXO0VCZO8YNXCOqeOKC+/VNk+IZGBOlH5tQViJAHKHK6RKS/WwMqk7KQRaGc/ 5qXosrV6HibxYxoXbfwYbC8f7XQERRWJzB/eNgRmy7trDKm8zpLaDAu+Wy04EP+JFN7QEz TEYVrKbAXGvrRurGKSvB/yFYbuuUw3U6kPvDrKfo/tV+jXY6JWiMIeVoh+lZNoa9fh9j23 oeBwcRox1cYEcqkdAqByPyS+xdeBsCYd+iTIxTe5+MxSife63WGG6iecmGKFjA== 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=1715645898; 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=TsZKZJ1duY3WHpKvYK3dRA0L1FETbVo15lkZ/Pab0n4=; b=AyBAe0rj0gI2i20CxwQxmudtnGucBEgQZs5iooA6MmhMsuVuAJcG/3oTRvr9QX0lU+rim/ /d5RMXXb2t7S/af4Q0b6Mx0gS6BToOd1TWJQ9gGBPgDjph52HtVqxAth5We3PczO/hMCNf tEant1PglEqtVr35hhtQWAIoNunxBzUEw2LTSa67kVOpSAJpJ8Gq4wAX/pJHRB1TneJi8n OSGAPhsw0hODAcYavTpnd5qFZEnSdnArpd2NUXtTrLIY0jwrb6IHLUz/QEXCusvRFOvhak VSUuQP6553fslaX3CmRsQXcvISzQFp0SdDGKIcPxm5h2OckbhudsdZD88qB0TQ== 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 4VdcQL32Qhz187d; Tue, 14 May 2024 00:18:18 +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 44E0IIMI027439; Tue, 14 May 2024 00:18:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44E0IItc027436; Tue, 14 May 2024 00:18:18 GMT (envelope-from git) Date: Tue, 14 May 2024 00:18:18 GMT Message-Id: <202405140018.44E0IItc027436@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: 338d53965d9f - main - x86: Add Intel TD/HFI related MSR/CPUID defines to specialregs.h 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: 338d53965d9f4bfb1a83c1bcff3ff78944ce3a9f Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=338d53965d9f4bfb1a83c1bcff3ff78944ce3a9f commit 338d53965d9f4bfb1a83c1bcff3ff78944ce3a9f Author: Koine Yuusuke AuthorDate: 2024-05-06 02:17:29 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-14 00:10:52 +0000 x86: Add Intel TD/HFI related MSR/CPUID defines to specialregs.h for the coredirector driver. MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44453 --- sys/x86/include/specialreg.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/specialreg.h index 3ea8c988aa07..b4b95670e367 100644 --- a/sys/x86/include/specialreg.h +++ b/sys/x86/include/specialreg.h @@ -345,6 +345,13 @@ /* Ecx. */ #define CPUID_PERF_STAT 0x00000001 #define CPUID_PERF_BIAS 0x00000008 +#define CPUID_PERF_TD_CLASSES 0x0000ff00 + +/* Edx. */ +#define CPUID_HF_PERFORMANCE 0x00000001 +#define CPUID_HF_EFFICIENCY 0x00000002 +#define CPUID_TD_CAPABLITIES 0x0000000f +#define CPUID_TD_TBLPAGES 0x00000f00 /* * CPUID instruction 0xb ebx info. @@ -583,6 +590,8 @@ #define MSR_TURBO_RATIO_LIMIT 0x1ad #define MSR_TURBO_RATIO_LIMIT1 0x1ae #define MSR_IA32_ENERGY_PERF_BIAS 0x1b0 +#define MSR_IA32_PKG_THERM_STATUS 0x1b1 +#define MSR_IA32_PKG_THERM_INTERRUPT 0x1b2 #define MSR_DEBUGCTLMSR 0x1d9 #define MSR_LASTBRANCHFROMIP 0x1db #define MSR_LASTBRANCHTOIP 0x1dc @@ -766,6 +775,14 @@ #define TOPA_INT (1 << 2) #define TOPA_END (1 << 0) +/* + * Intel Hardware Feedback Interface / Thread Director MSRs + */ +#define MSR_IA32_HW_FEEDBACK_PTR 0x17d0 +#define MSR_IA32_HW_FEEDBACK_CONFIG 0x17d1 +#define MSR_IA32_THREAD_FEEDBACK_CHAR 0x17d2 +#define MSR_IA32_HW_FEEDBACK_THREAD_CONFIG 0x17d4 + /* * Constants related to MSR's. */ @@ -836,6 +853,19 @@ /* MSR IA32_ENERGY_PERF_BIAS */ #define IA32_ENERGY_PERF_BIAS_POLICY_HINT_MASK (0xfULL << 0) +/* MSR IA32_HW_FEEDBACK_PTR */ +#define IA32_HW_FEEDBACK_PTR_ENABLE (0x1ULL << 0) + +/* MSR IA32_HW_FEEDBACK_CONFIG */ +#define IA32_HW_FEEDBACK_CONFIG_EN_HFI (0x1ULL << 0) +#define IA32_HW_FEEDBACK_CONFIG_EN_THDIR (0x1ULL << 1) + +/* MSR IA32_PKG_THERM_STATUS */ +#define IA32_PKG_THERM_STATUS_HFI_UPDATED (0x1ULL << 26) + +/* MSR IA32_PKG_THERM_INTERRUPT */ +#define IA32_PKG_THERM_INTERRUPT_HFI_ENABLE (0x1ULL << 25) + /* * PAT modes. */