From nobody Tue Jul 22 19:14:09 2025 X-Original-To: freebsd-hackers@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 4bmn522KW5z5q3Mp for ; Tue, 22 Jul 2025 19:14:30 +0000 (UTC) (envelope-from george+freebsd@m5p.com) Received: from mailhost.m5p.com (mailhost.m5p.com [74.104.188.4]) (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 (2048 bits) client-digest SHA256) (Client CN "m5p.com", Issuer "R11" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmn504VmSz3HNR for ; Tue, 22 Jul 2025 19:14:28 +0000 (UTC) (envelope-from george+freebsd@m5p.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of george+freebsd@m5p.com designates 74.104.188.4 as permitted sender) smtp.mailfrom=george+freebsd@m5p.com; dmarc=none Received: from [IPV6:2001:470:8ac4::26] (court.m5p.com [IPv6:2001:470:8ac4:0:0:0:0:26]) (authenticated bits=0) by mailhost.m5p.com (8.18.1/8.17.1) with ESMTPSA id 56MJEFcr020472 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Tue, 22 Jul 2025 15:14:20 -0400 (EDT) (envelope-from george+freebsd@m5p.com) Message-ID: <2e8a4672-10b6-4ab5-8150-4224c6c65212@m5p.com> Date: Tue, 22 Jul 2025 15:14:09 -0400 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: FreeBSD Hackers From: George Mitchell Subject: Gmail Autocrypt: addr=george+freebsd@m5p.com; keydata= xjMEZaHDbxYJKwYBBAHaRw8BAQdA2W6oBfS8haXY0/Ft4zS1OTLYfC8EBIADPTgMQdh85C3N KEdlb3JnZSBNaXRjaGVsbCA8Z2VvcmdlK2ZyZWVic2RAbTVwLmNvbT7CmQQTFgoAQRYhBDpv v9n4+UzMLAJ8EZocD3futmd9BQJlocSiAhsDBQkFo5qABQsJCAcCAiICBhUKCQgLAgQWAgMB Ah4HAheAAAoJEJocD3futmd9SxwBAJUi6DNdVhWCZBTv5XGy1g0JgApLWe/3S0M0zz9sn7/L AQCcJcV5k5s2rt9J5C1AUm6XVsuneVvIWXO5j1GKWk0NC844BGWhw28SCisGAQQBl1UBBQEB B0AaFz/6B95RRvjOdLZr5fSdhuIHvwr24H3ePDZSw6wlUwMBCAfCfgQYFgoAJhYhBDpvv9n4 +UzMLAJ8EZocD3futmd9BQJlocNvAhsMBQkFo5qAAAoJEJocD3futmd9RXsBANwRD9RE56F6 /jeZOrujHICLcgPiOt50Y6866v9OUTjUAP9GlC1aopfBpNwuPLJBam7oBaGqvY98VDhzOjoT 7DNbCQ== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------DH40Ij4F2LvVQLxbwemHJjEb" X-Spam-Status: No, score=0.0 required=10.0 tests=HELO_NO_DOMAIN autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on mattapan.m5p.com X-Spamd-Result: default: False [-0.43 / 15.00]; SIGNED_PGP(-2.00)[]; MIME_BASE64_TEXT_BOGUS(1.00)[]; NEURAL_SPAM_LONG(1.00)[1.000]; NEURAL_HAM_SHORT(-1.00)[-0.997]; NEURAL_SPAM_MEDIUM(0.87)[0.872]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain]; R_SPF_ALLOW(-0.20)[+a]; MIME_BASE64_TEXT(0.10)[]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[m5p.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_FROM(0.00)[freebsd]; MLMMJ_DEST(0.00)[freebsd-hackers@FreeBSD.org]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; HAS_ATTACHMENT(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:701, ipnet:74.104.0.0/16, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:~]; FROM_HAS_DN(0.00)[] X-Rspamd-Queue-Id: 4bmn504VmSz3HNR X-Spamd-Bar: / This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------DH40Ij4F2LvVQLxbwemHJjEb Content-Type: multipart/mixed; boundary="------------CgS77CB08b4B1vMIVSnf1jqC"; protected-headers="v1" From: George Mitchell To: FreeBSD Hackers Message-ID: <2e8a4672-10b6-4ab5-8150-4224c6c65212@m5p.com> Subject: Gmail --------------CgS77CB08b4B1vMIVSnf1jqC Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 UGVyaGFwcyBpdCdzIGp1c3QgbWUsIGJ1dCB0aGVyZSBoYXMgYmVlbiBhbiBvcmRlciBvZiBt YWduaXR1ZGUgbW9yZQ0Kc3BhbSB0b2RheSB0aGFuIHVzdWFsIGZyb20gMjA5Ljg1LjEyOC8x Ny4gIEFueW9uZSBlbHNlIHNlZWluZyB0aGlzPw0KLS0gR2VvcmdlDQo= --------------CgS77CB08b4B1vMIVSnf1jqC-- --------------DH40Ij4F2LvVQLxbwemHJjEb Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wnsEABYIACMWIQQ6b7/Z+PlMzCwCfBGaHA937rZnfQUCaH/jBgUDAAAAAAAKCRCaHA937rZnfRlQ AQC606TGBRsOvnCwU5f2yYOhroSaCXoy2Hv2u0DItR2bkQD/UpsWrUsVODkdkjEbhgeHexneGKJt +nBADGC94o3sywI= =XO1V -----END PGP SIGNATURE----- --------------DH40Ij4F2LvVQLxbwemHJjEb-- From nobody Thu Jul 24 22:06:48 2025 X-Original-To: freebsd-hackers@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 4bp4qC0twgz63D2T for ; Thu, 24 Jul 2025 22:07:03 +0000 (UTC) (envelope-from obiwac@gmail.com) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp4qB0Bsfz3bpV; Thu, 24 Jul 2025 22:07:02 +0000 (UTC) (envelope-from obiwac@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of obiwac@gmail.com designates 209.85.208.41 as permitted sender) smtp.mailfrom=obiwac@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none) Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-607cc1a2bd8so2425557a12.2; Thu, 24 Jul 2025 15:07:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753394820; x=1753999620; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=b94z1cmMPxhXOni46OG/hN5KsYVPkmVlBD6MmeOyW4Y=; b=ntxzoIMQa6sJelWGr4biXMSU9H2J0jKtSjMB1XgejEIAFPLs/m93YJz8b0rgo6BUlH 2lVMNpwQHHAgmz56/IWQm7mNQwmLHWNo21ZDNFjipQDKz/SMHCBIWvM6IdlpRPgYVLuD fi2LswPGtRqk4d+7IRluq6BCG1dJM1ixItYv2ZYNCohb4OLy8Par6TiULJsugPmmO14D B4Pa5F7CxDy9lyzBBORK0q2OxKcePEn/oxNPFEmg4Beeb46VVSZLPlH3OGT2GwbWxz3d 7xi7g8gHXlE0jz+pmN2lxf+uT1YFEuT12PNsy/KWtdtEs+/Bl591B5qnGkei0oM0q+N/ NY9w== X-Forwarded-Encrypted: i=1; AJvYcCVY9GpHhaJUik+ahk5buG23FjsM2dMI2OpCswoODMyZg/SaMYjcPZU9zP4nQnIH3flC4DY=@freebsd.org, AJvYcCWwo4ehzEa6ckQJFJyU6uvxMTZgvLrawCwaxJix5RDdlML/oSyBBgm2g2vGQvvhYduE2IfL@freebsd.org, AJvYcCXlWOIoYSbe2I0PanpYKpnPArd5rgvxKptStVCJbOBRJ7Te5xIUDhn0zpi5LaFS4qMjAx1RUA==@freebsd.org X-Gm-Message-State: AOJu0YwlPyR3Ojge97/yBIaldFqXhP4DF0xP3xREol9LJ3cKUCdmbxfH WlawwOjlWACElyN4CQKVEHxJ7V4LRwNNWpPvQ7oOplTuLZwFyfyQgjBebWLSWj0lCOxqWA== X-Gm-Gg: ASbGncuLGqikBOzNjyI2fdXv6YhJhDDfsL6wSij3Tr5/xgk3O5BweiNZp0mlqYC69F/ MwB6F/zM+l60b4tK8stCAYOB9xgVdj7U7CDGyjmVFF5h9CzXeWBNN6wWfw5MR2AKrXeRsIVnRoG VSJHW1CBtK52uGLx0OmACHYxMKpoGKj9ai3Vp7EAvvIBgPwUXyTq5NBkkIJG85GN0lk1soh2fvc CHwPzBOsMG2fPSRRov6lxfYU+Si8etmtVLrPd+eFzSOGJBxdRwTRBVxO9MgOAWnq6RpjDth8Tyf eCfEmxVWW/1aDhZ+PCgV967J7V58CKD/S02RChvEvvsQuawOjaqVEBevFPh7y33qE9ipiHKDEB9 DBOBInA/CxONOcTXs4Gq5+ztFEr9Lf7G1Z3m2npw4RjKSlx72tsYybY+Q8bbyz1avOlLC X-Google-Smtp-Source: AGHT+IHFvIYeAnAom8g/DaTSQp3FqsuHXdaTAvPPBUuKUVQtVeHUMaPjdpxmjmn9zExhq6vnCwUtRw== X-Received: by 2002:a17:906:fe44:b0:ae0:dd95:1991 with SMTP id a640c23a62f3a-af2f9384e0emr893463266b.51.1753394819812; Thu, 24 Jul 2025 15:06:59 -0700 (PDT) Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com. [209.85.208.54]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-af47ff4329fsm167724766b.146.2025.07.24.15.06.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Jul 2025 15:06:59 -0700 (PDT) Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-608acb0a27fso2531736a12.0; Thu, 24 Jul 2025 15:06:59 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCU9TmQqvuBSIzXy86aOunsAa7OLHM5/y0bt0I2p6whpBPZtXwBUnfpPqteXgPDvpsbaC/N/@freebsd.org, AJvYcCVa6A+86jtXbxiPIr7xH21tbQt3IOosYhD6wbNc8WCibIY6cPc/Mh3Rct4aMkJFAOIaD08=@freebsd.org, AJvYcCW2Hl4Z89DzIO28SEE/0KZVc6NoP6qel8VieLmDgqoCjBoF5VHCc7v8gYWnqqzDkv5byyykuA==@freebsd.org X-Received: by 2002:a17:907:980d:b0:ae3:595f:91a0 with SMTP id a640c23a62f3a-af2f6d1c4cemr996601966b.16.1753394819323; Thu, 24 Jul 2025 15:06:59 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 From: obiwac Date: Thu, 24 Jul 2025 23:06:48 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: Ac12FXwbmUXoFKriV66PIAxnmrW2RDlrO4n7zA_yT1prI3YWhXeYFptl0pYgXvM Message-ID: Subject: AMD SMU driver (amdsmu) To: freebsd-hackers , "cem@FreeBSD.org" , Jung-uk Kim , kib@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [1.21 / 15.00]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; NEURAL_SPAM_LONG(1.00)[0.999]; NEURAL_HAM_SHORT(-0.88)[-0.884]; FORGED_SENDER(0.30)[obiwac@freebsd.org,obiwac@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.41:from,209.85.208.54:received]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[obiwac@freebsd.org,obiwac@gmail.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_DKIM_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.41:from]; FREEFALL_USER(0.00)[obiwac]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-Rspamd-Queue-Id: 4bp4qB0Bsfz3bpV X-Spamd-Bar: + Hi! I have added an amdsmu driver for the AMD SMU chip (which is necessary for S0i3 entry as well as diagnostics), and I'm looking for people to review and test these changes out. The three patches I'm interested in at the moment are: - https://reviews.freebsd.org/D48683 amdsmu: Initial work on a driver for the AMD SMU - https://reviews.freebsd.org/D48714 amdsmu: Get and expose sysctls for metrics about last sleep - https://reviews.freebsd.org/D51487 amdsmu: Read and dump idlemask There is one other amdsmu-related patch, but it depends on ACPI changes for s2idle that haven't been committed yet, so it's less of a priority: - https://reviews.freebsd.org/D48721 amdsmu: Sleep entry/exit hints for PMFW This is currently only expected to work on the following CPUs: #define CPUID_AMD_REMBRANDT 0x14B5 #define CPUID_AMD_PHOENIX 0x14E8 #define CPUID_AMD_STRIX_POINT 0x14A4 And of these, I have only had the opportunity to test on Phoenix (specifically the 7040 series). Thanks! Aymeric From nobody Fri Jul 25 11:37:30 2025 X-Original-To: freebsd-hackers@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 4bpQpV133Rz632bX for ; Fri, 25 Jul 2025 11:37:38 +0000 (UTC) (envelope-from cyric@mm.st) Received: from fhigh-b6-smtp.messagingengine.com (fhigh-b6-smtp.messagingengine.com [202.12.124.157]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4bpQpT1GnJz45sR for ; Fri, 25 Jul 2025 11:37:37 +0000 (UTC) (envelope-from cyric@mm.st) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=mm.st header.s=fm2 header.b=e6w9grAT; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=Gzlc8PsQ; spf=pass (mx1.freebsd.org: domain of cyric@mm.st designates 202.12.124.157 as permitted sender) smtp.mailfrom=cyric@mm.st; dmarc=pass (policy=none) header.from=mm.st Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id 10E777A0D3A for ; Fri, 25 Jul 2025 07:37:36 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Fri, 25 Jul 2025 07:37:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mm.st; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1753443455; x=1753529855; bh=t3LUJV2fg9Frnre1ptv/mvla27lz24OB+iWTPrhrnc4=; b= e6w9grATvXNkLruArdG8fNz7wYoyRitqqIkNDdrp44/pI9O4FeKSOEB6RgOTLc64 JJbZ90W/+LuPnWegFAM1yeJCfmX/ZXdG2a8YkK6NYG6WoOQONrqoXnLaAjkKp6R/ 94L88dLV74r5yNIxdU9nolSmgGnlSGujHE13oenT+BmjTlaITe3WJh349X+u31gx ONN9Bg0CKMtURutYThNu+3rzTxC6oV1an6xr1/XUruRpi9wO11C7WFIHt2EtkFNk S6xuofFGOQJ7agEVxzg90oboJxt0XzuiARjJ3LrdFTzaNqsXSKu/7x5NBotLj4VL /P9dbTAfOBxiYo3tBKK1vw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1753443455; x=1753529855; bh=t 3LUJV2fg9Frnre1ptv/mvla27lz24OB+iWTPrhrnc4=; b=Gzlc8PsQ6O0OrewOu HLUBV/ZxqVZ0OX+pPPF2alBx1OV/uaKWbDwyZR4Ca44kRsCRxoI4wqKtD/IOJq17 6K5xec9OJsyNraumu63jcvWUfarTp+iFXfUZvfrSjXg5rEl9VEi+tN0OLFa28Cro OMmQ/IozX3TFzhnSL1A0xC3nlMwFE54rblvGX5pQAbJqdANjkOGKh3MO4JneVbo/ wdg7MqSz6Ewl7xmQ9bqo4ZqzXNbtquV43IJFhy5yg29Q35UcS1f6pkSLWzrxxWQs k9XI1XuEqi9GRlRxQ8fBUIciOt+yhRIjCFEw2mJSjmYYeN1qDihE+svXqxsZcEjp PmVdg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdekfeegfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthejredttd dvjeenucfhrhhomheptgihrhhitgesmhhmrdhsthenucggtffrrghtthgvrhhnpeevveel gffgudffgefghfefteffleduhfekgfevledtheefleeftefghefggfeggeenucffohhmrg hinhepfhhrvggvsghsugdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpegthihrihgtsehmmhdrshhtpdhnsggprhgtphhtthhopedupd hmohguvgepshhmthhpohhuthdprhgtphhtthhopehfrhgvvggsshguqdhhrggtkhgvrhhs sehfrhgvvggsshgurdhorhhg X-ME-Proxy: Feedback-ID: icc3648d4:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 25 Jul 2025 07:37:34 -0400 (EDT) Message-ID: <27d98db1-3d04-4c17-89eb-27cba672d0b4@mm.st> Date: Fri, 25 Jul 2025 18:37:30 +0700 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: AMD SMU driver (amdsmu) To: freebsd-hackers@freebsd.org References: Content-Language: en-US From: cyric@mm.st In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-0.10 / 15.00]; NEURAL_SPAM_MEDIUM(1.00)[0.996]; NEURAL_SPAM_LONG(0.98)[0.983]; NEURAL_HAM_SHORT(-0.98)[-0.979]; DMARC_POLICY_ALLOW(-0.50)[mm.st,none]; R_SPF_ALLOW(-0.20)[+ip4:202.12.124.128/27]; R_DKIM_ALLOW(-0.20)[mm.st:s=fm2,messagingengine.com:s=fm2]; RCVD_IN_DNSWL_LOW(-0.10)[202.12.124.157:from]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[mm.st]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[mm.st]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[mm.st:+,messagingengine.com:+]; ASN(0.00)[asn:151847, ipnet:202.12.124.0/24, country:AU]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; DWL_DNSWL_NONE(0.00)[messagingengine.com:dkim]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NO_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[] X-Rspamd-Queue-Id: 4bpQpT1GnJz45sR X-Spamd-Bar: / obiwac wrote: > Hi! > > I have added an amdsmu driver for the AMD SMU chip (which is necessary > for S0i3 entry as well as diagnostics), and I'm looking for people to > review and test these changes out. > > The three patches I'm interested in at the moment are: > > - https://reviews.freebsd.org/D48683 amdsmu: Initial work on a driver > for the AMD SMU > - https://reviews.freebsd.org/D48714 amdsmu: Get and expose sysctls > for metrics about last sleep > - https://reviews.freebsd.org/D51487 amdsmu: Read and dump idlemask > > There is one other amdsmu-related patch, but it depends on ACPI > changes for s2idle that haven't been committed yet, so it's less of a > priority: > > - https://reviews.freebsd.org/D48721 amdsmu: Sleep entry/exit hints for PMFW > > This is currently only expected to work on the following CPUs: > > #define CPUID_AMD_REMBRANDT 0x14B5 > #define CPUID_AMD_PHOENIX 0x14E8 > #define CPUID_AMD_STRIX_POINT 0x14A4 How does this map to e.g. dmesg cpu information? CPU: AMD Ryzen 9 9900X 12-Core Processor (4391.75-MHz K8-class CPU) Origin="AuthenticAMD" Id=0xb40f40 Family=0x1a Model=0x44 Stepping=0 > And of these, I have only had the opportunity to test on Phoenix > (specifically the 7040 series). From nobody Fri Jul 25 12:33:10 2025 X-Original-To: freebsd-hackers@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 4bpS2r6Gd9z63568 for ; Fri, 25 Jul 2025 12:33:24 +0000 (UTC) (envelope-from obiwac@gmail.com) Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpS2r3wPCz3PWh for ; Fri, 25 Jul 2025 12:33:24 +0000 (UTC) (envelope-from obiwac@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-ae9c2754a00so355575766b.2 for ; Fri, 25 Jul 2025 05:33:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753446803; x=1754051603; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tzrfrf2MlHlYLNLiITgPb+W6hhw1lNvGWpTs9mL5/Pw=; b=p11SPcihjwR80xkB60Ld3z0eSLdAf6nGICckgJ8+q8e73XWy1eqqLKIq0aOIfVLky5 lA3OBZbozMXQ/jxNMQ8QbAA5dnHYkk7rJlni6nV/590z6KD9h0KdO3d7CO0doNq6bPmy up/qO+c2nMG3B+N1mhZlkppMV91E/WqHNnjTpB90c+UTqY40fU9p4cDXqMismYYh8/aB aQs8rBdOh5EoXG5wJt98YC2ym+n1Z8lpaBLlUQJ60e3KhK+jJh9eZsEJSYt4MxJg6hrL iTkUgMs2hHZs4OatqmcLEJf0OCNiHS/sDPnUEITZwtK1k/6X2WTxe2j4HM5R8qMbmesB vFhQ== X-Gm-Message-State: AOJu0YyJVxuUUBVhRmeiD45IPGG5yGLeuxI+e4nZaLrDpPrVDAXs9BrR ixXtAwif3jsJx8z3OzlqBLdN1uaK0MvhrcngEZxnzH+2Z7bgpFAtBGiXowaAPJS5eIWlWw== X-Gm-Gg: ASbGnct7dI9a7aIJB5gb1Vzw4QdQsI+OytRxoRrFZtVmrNdGAlZFDJKxV61maQhuyeZ YnQCHumvy49hXYrFLoznjfdYvLhIlvXCkQMp1DfCb/WewZqj+Mg2Z5n1yBAHi5/CXDfk056YRmO OpuOeUEXzlZbe6cmb2TwzmP+a/OXLxn8+RPciJAOrHJBPfUsTovHfoMJ8sUsvq8FoJaQ7Ys/Ejr IBeyyFhlKiOq87vsOrPOWVHoWGxotFV0mOQfA0gBeQWlFCZ3qiKvCpDzO5beBiUVAnUSHOvxSH7 P0eORh+nszBXX3c3lRvvPYcJyK2YkSNzSxRUOE7rth4rBMXtN3HYmaA3sOrlD72+x1F7u+eqIct ht1AF/wMPFHHuN9voCt5du4UnDcFoWBSLUXC1Ade/Ac8e3TtxaBMFFSUtEitJELJqbC8f X-Google-Smtp-Source: AGHT+IF1GGw1oUkkYQsAPlhje2OskyQT5f4f2D2Z/pFRZb7JkLehZUAoWLzXw9fQCZ9v8cCr2s40DQ== X-Received: by 2002:a17:907:9686:b0:ae9:933d:f0de with SMTP id a640c23a62f3a-af618f02dcdmr173965466b.36.1753446802324; Fri, 25 Jul 2025 05:33:22 -0700 (PDT) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com. [209.85.208.41]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-af47cc6b3e9sm259651566b.34.2025.07.25.05.33.22 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Jul 2025 05:33:22 -0700 (PDT) Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-607ec30df2bso3997095a12.1 for ; Fri, 25 Jul 2025 05:33:22 -0700 (PDT) X-Received: by 2002:a17:906:fe05:b0:ae3:65a7:5621 with SMTP id a640c23a62f3a-af618f04bf4mr183950466b.37.1753446801895; Fri, 25 Jul 2025 05:33:21 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 References: <27d98db1-3d04-4c17-89eb-27cba672d0b4@mm.st> In-Reply-To: <27d98db1-3d04-4c17-89eb-27cba672d0b4@mm.st> From: obiwac Date: Fri, 25 Jul 2025 13:33:10 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: Ac12FXyS8VaAHMWAKlsvJ8_SQN1AoJ2XOY1VV7aBx4i_-qQVQ6I2gnBXTfmSDUI Message-ID: Subject: Re: AMD SMU driver (amdsmu) To: cyric@mm.st Cc: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4bpS2r3wPCz3PWh X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] This is the PCI device ID of the root complex (usually hostb0). You can check this with pciconf -lv in "device", e.g. hostb0@pci0:0:0:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x14e8 subvendor=0xf111 subdevice=0x0006 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Phoenix Root Complex' class = bridge subclass = HOST-PCI On Fri, 25 Jul 2025 at 12:37, wrote: > > obiwac wrote: > > Hi! > > > > I have added an amdsmu driver for the AMD SMU chip (which is necessary > > for S0i3 entry as well as diagnostics), and I'm looking for people to > > review and test these changes out. > > > > The three patches I'm interested in at the moment are: > > > > - https://reviews.freebsd.org/D48683 amdsmu: Initial work on a driver > > for the AMD SMU > > - https://reviews.freebsd.org/D48714 amdsmu: Get and expose sysctls > > for metrics about last sleep > > - https://reviews.freebsd.org/D51487 amdsmu: Read and dump idlemask > > > > There is one other amdsmu-related patch, but it depends on ACPI > > changes for s2idle that haven't been committed yet, so it's less of a > > priority: > > > > - https://reviews.freebsd.org/D48721 amdsmu: Sleep entry/exit hints for PMFW > > > > This is currently only expected to work on the following CPUs: > > > > #define CPUID_AMD_REMBRANDT 0x14B5 > > #define CPUID_AMD_PHOENIX 0x14E8 > > #define CPUID_AMD_STRIX_POINT 0x14A4 > > How does this map to e.g. dmesg cpu information? > > CPU: AMD Ryzen 9 9900X 12-Core Processor (4391.75-MHz > K8-class CPU) > Origin="AuthenticAMD" Id=0xb40f40 Family=0x1a Model=0x44 Stepping=0 > > > And of these, I have only had the opportunity to test on Phoenix > > (specifically the 7040 series). > From nobody Fri Jul 25 12:36:14 2025 X-Original-To: freebsd-hackers@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 4bpS6M5v3Lz63505 for ; Fri, 25 Jul 2025 12:36:27 +0000 (UTC) (envelope-from cyric@mm.st) Received: from fout-a8-smtp.messagingengine.com (fout-a8-smtp.messagingengine.com [103.168.172.151]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4bpS6L65W1z3S3x for ; Fri, 25 Jul 2025 12:36:26 +0000 (UTC) (envelope-from cyric@mm.st) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=mm.st header.s=fm2 header.b=unzUnMeN; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=VBl6NM2P; spf=pass (mx1.freebsd.org: domain of cyric@mm.st designates 103.168.172.151 as permitted sender) smtp.mailfrom=cyric@mm.st; dmarc=pass (policy=none) header.from=mm.st Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id 88F23EC05D5 for ; Fri, 25 Jul 2025 08:36:26 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Fri, 25 Jul 2025 08:36:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mm.st; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1753446986; x=1753533386; bh=JCexIBQ8HomYA/EJWQ8lKxOTHMZ144Mn2yW7nh+AJTI=; b= unzUnMeNi/ADgQmhMyWhdC17KYcLcIjXlCraPmdfbY4UyPVMHH30cE1Q/tcXVkwL lZr8u1vSC/DPEIvjlFtreUlc94Q1ZoUNmMYS1zt4Jg2JU7UfrBkeT5nNtpWQDPU2 aUCaWOTDH9N4d4jtEENDtGMHdRxqi+TtQv6sOWqPk/WFREWwK645Jg+5AHUV+ys/ ZVUhGX+vUexMJgAPLLUMkBwMMo30vjTLQSFSjl1KyRcL/dAFQCiRm7TMacHIMVLp INLBHyGe1H0JuBIiJZmsIueBmskLOa3Q/hDYdGxw5hJ5Q1XlkdshKV1LEzmypxLl hasi1xNZcLZ8YbhLte8/yQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1753446986; x=1753533386; bh=J CexIBQ8HomYA/EJWQ8lKxOTHMZ144Mn2yW7nh+AJTI=; b=VBl6NM2P4rWG0P9eJ MWDhTRsiOwx5vv1u7ge0vB2M4gpXCn+1x2YT0YI1QgMvgz9KLzRsf7cDA/xT6JHH 8ieMAiuLonxt13PA8ov4SQehtJfU35b2nlisB4dg43H6a59hozPy0vZB6s+PP/SP 44cX/ilcstkjgJ7aqlpj/i/SNnDGkNLN3+uhIWTVoZ9t+O84tpMHJQ1zcjpp/ugF 5+UYYJejiEa021++1MF5sEHHLYpC3s8EtwlvcP0Oiu1XvoMcs+mD4yBzoaMm5OI5 9aCGsgMIlTbElLbOn9jt28z6r67JIBRS+mfQSuRAV/USlIoDb0WmAM24x6yFscTz wJ9HQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdekfeehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthejredttd dvjeenucfhrhhomheptgihrhhitgesmhhmrdhsthenucggtffrrghtthgvrhhnpeevveel gffgudffgefghfefteffleduhfekgfevledtheefleeftefghefggfeggeenucffohhmrg hinhepfhhrvggvsghsugdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpegthihrihgtsehmmhdrshhtpdhnsggprhgtphhtthhopedupd hmohguvgepshhmthhpohhuthdprhgtphhtthhopehfrhgvvggsshguqdhhrggtkhgvrhhs sehfrhgvvggsshgurdhorhhg X-ME-Proxy: Feedback-ID: icc3648d4:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 25 Jul 2025 08:36:25 -0400 (EDT) Message-ID: Date: Fri, 25 Jul 2025 19:36:14 +0700 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: AMD SMU driver (amdsmu) To: freebsd-hackers@freebsd.org References: <27d98db1-3d04-4c17-89eb-27cba672d0b4@mm.st> Content-Language: en-US From: cyric@mm.st In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-0.11 / 15.00]; NEURAL_SPAM_MEDIUM(1.00)[0.998]; NEURAL_HAM_SHORT(-0.99)[-0.995]; NEURAL_SPAM_LONG(0.99)[0.985]; DMARC_POLICY_ALLOW(-0.50)[mm.st,none]; R_SPF_ALLOW(-0.20)[+ip4:103.168.172.128/27:c]; R_DKIM_ALLOW(-0.20)[mm.st:s=fm2,messagingengine.com:s=fm2]; RCVD_IN_DNSWL_LOW(-0.10)[103.168.172.151:from]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[mm.st]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[mm.st]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[mm.st:+,messagingengine.com:+]; FROM_NO_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; DWL_DNSWL_NONE(0.00)[messagingengine.com:dkim]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:151847, ipnet:103.168.172.0/24, country:AU]; FROM_EQ_ENVFROM(0.00)[] X-Rspamd-Queue-Id: 4bpS6L65W1z3S3x X-Spamd-Bar: / obiwac wrote: > This is the PCI device ID of the root complex (usually hostb0). You > can check this with pciconf -lv in "device", e.g. > > hostb0@pci0:0:0:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 > device=0x14e8 subvendor=0xf111 subdevice=0x0006 > vendor = 'Advanced Micro Devices, Inc. [AMD]' > device = 'Phoenix Root Complex' > class = bridge > subclass = HOST-PCI Thanks, I was misled by "CPUID" in the constant name. > On Fri, 25 Jul 2025 at 12:37, wrote: >> >> obiwac wrote: >>> Hi! >>> >>> I have added an amdsmu driver for the AMD SMU chip (which is necessary >>> for S0i3 entry as well as diagnostics), and I'm looking for people to >>> review and test these changes out. >>> >>> The three patches I'm interested in at the moment are: >>> >>> - https://reviews.freebsd.org/D48683 amdsmu: Initial work on a driver >>> for the AMD SMU >>> - https://reviews.freebsd.org/D48714 amdsmu: Get and expose sysctls >>> for metrics about last sleep >>> - https://reviews.freebsd.org/D51487 amdsmu: Read and dump idlemask >>> >>> There is one other amdsmu-related patch, but it depends on ACPI >>> changes for s2idle that haven't been committed yet, so it's less of a >>> priority: >>> >>> - https://reviews.freebsd.org/D48721 amdsmu: Sleep entry/exit hints for PMFW >>> >>> This is currently only expected to work on the following CPUs: >>> >>> #define CPUID_AMD_REMBRANDT 0x14B5 >>> #define CPUID_AMD_PHOENIX 0x14E8 >>> #define CPUID_AMD_STRIX_POINT 0x14A4 >> >> How does this map to e.g. dmesg cpu information? >> >> CPU: AMD Ryzen 9 9900X 12-Core Processor (4391.75-MHz >> K8-class CPU) >> Origin="AuthenticAMD" Id=0xb40f40 Family=0x1a Model=0x44 Stepping=0 >> >>> And of these, I have only had the opportunity to test on Phoenix >>> (specifically the 7040 series). >> > From nobody Fri Jul 25 12:37:40 2025 X-Original-To: freebsd-hackers@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 4bpS8264D4z635BJ for ; Fri, 25 Jul 2025 12:37:54 +0000 (UTC) (envelope-from obiwac@gmail.com) Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpS823tRVz3TYP for ; Fri, 25 Jul 2025 12:37:54 +0000 (UTC) (envelope-from obiwac@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-ae708b0e83eso408181066b.2 for ; Fri, 25 Jul 2025 05:37:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753447073; x=1754051873; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UmJjK+TJKpoRBVYTcRCldVkW3jC1BCAWQa5hBinJIUk=; b=kx0f3LrNQC4J8NTJbGR/IvoSzWUmL+J1YN+pztFxdALoMUCpXNYm9lySbM1jxPi4Fp 7vuyckCV4nWEIyRDysMcBSTNaMV8vhfS6W+XOBo7xwRszMDF4MgNijSHrVVIYK9KYDoZ Yg8sK3ZHBCmrbcy2X9E2DIF6VB/WhqljYH4NUHHLhDtEzxcrCSUkjVCRD5faYdtOFcdi sUWYPWZVhebiocF+5L+JUfl4g5lRDqYgbeF3lQDM/+fxOTeIAYzpketm0i+kiNR8Htty 32cnHQRgIqt0yfhdYkhpTbDkmAuQ98sTvsnEWodwnAfyDUKTNVtQO3eozrJk86IlOJZR iiSA== X-Gm-Message-State: AOJu0YxrOSKbS9fhzR8LB0Ka0rR1+yTh82eGLoggpbA97a/LBD5Lbq+S l1XSVw+GwDF3mQ+hdvube0tH/dS8oIZZThkLUezh+FydcjLBiBM5dyCLwRd0SaqFT+gpug== X-Gm-Gg: ASbGncstDDGmdfp5SVU/MFsc+THOyGJWosQOYRkNisBteNBgWfubaWxzLkptH1R+ild M12YBB4wre+0TsTRlcEXPR6CQihPzqIVuaP2nzlEI+hhjPVSkCmBKTWvCLBpZ2pcUQqhuo+r8z0 fBE8dDYjNmfSqupuXC772DnPZ6FXEgQP94t8SRAyrBniboMIH0+4MCmyksyraPVslOI1/SpY+fW 6CeNmQRt8aV+ftyr64iWfepoO4bus2rc0NUYUQjOQ4lNTQ964P+KKGtItUH17vp5jsBYCx2gQzu 1OTnZ5+GwRABhs/uILtiZgR/85kTNl8AUl46yXGsx0hXY/JeOWO17/Uc9vrd8Yn+Wr+C5UV3HYA vXk+UIgNtczPHV8lVqb8wtEEGRaxzwCXeD5ounA57RQrgqMLSDELb680kTyEMV1kDzpVJ X-Google-Smtp-Source: AGHT+IFE7TMYuOz53RhE+G5mgzpXr3I+p9ii7rfgWwhWOs1ollukgitNI0pcySLOpsm7FdS6Nk4Pyg== X-Received: by 2002:a17:907:3fa9:b0:ad8:9a86:cf52 with SMTP id a640c23a62f3a-af616d05720mr215118766b.11.1753447072697; Fri, 25 Jul 2025 05:37:52 -0700 (PDT) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com. [209.85.218.45]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-af47f956e03sm263453566b.124.2025.07.25.05.37.52 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Jul 2025 05:37:52 -0700 (PDT) Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-ae36e88a5daso393582366b.1 for ; Fri, 25 Jul 2025 05:37:52 -0700 (PDT) X-Received: by 2002:a17:907:3f98:b0:ae3:b22c:2ee8 with SMTP id a640c23a62f3a-af618bd84cbmr200712166b.37.1753447072242; Fri, 25 Jul 2025 05:37:52 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 References: <27d98db1-3d04-4c17-89eb-27cba672d0b4@mm.st> In-Reply-To: From: obiwac Date: Fri, 25 Jul 2025 13:37:40 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: Ac12FXy1CaWB-q32F6URBlkQYfeg3UdVZm3MxUQGEfX7Xe3vbCPzf6xb3aRWB6U Message-ID: Subject: Re: AMD SMU driver (amdsmu) To: cyric@mm.st Cc: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4bpS823tRVz3TYP X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] Yeah, maybe I should change this. On Fri, 25 Jul 2025 at 13:36, wrote: > > obiwac wrote: > > This is the PCI device ID of the root complex (usually hostb0). You > > can check this with pciconf -lv in "device", e.g. > > > > hostb0@pci0:0:0:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 > > device=0x14e8 subvendor=0xf111 subdevice=0x0006 > > vendor = 'Advanced Micro Devices, Inc. [AMD]' > > device = 'Phoenix Root Complex' > > class = bridge > > subclass = HOST-PCI > > Thanks, I was misled by "CPUID" in the constant name. > > > On Fri, 25 Jul 2025 at 12:37, wrote: > >> > >> obiwac wrote: > >>> Hi! > >>> > >>> I have added an amdsmu driver for the AMD SMU chip (which is necessary > >>> for S0i3 entry as well as diagnostics), and I'm looking for people to > >>> review and test these changes out. > >>> > >>> The three patches I'm interested in at the moment are: > >>> > >>> - https://reviews.freebsd.org/D48683 amdsmu: Initial work on a driver > >>> for the AMD SMU > >>> - https://reviews.freebsd.org/D48714 amdsmu: Get and expose sysctls > >>> for metrics about last sleep > >>> - https://reviews.freebsd.org/D51487 amdsmu: Read and dump idlemask > >>> > >>> There is one other amdsmu-related patch, but it depends on ACPI > >>> changes for s2idle that haven't been committed yet, so it's less of a > >>> priority: > >>> > >>> - https://reviews.freebsd.org/D48721 amdsmu: Sleep entry/exit hints for PMFW > >>> > >>> This is currently only expected to work on the following CPUs: > >>> > >>> #define CPUID_AMD_REMBRANDT 0x14B5 > >>> #define CPUID_AMD_PHOENIX 0x14E8 > >>> #define CPUID_AMD_STRIX_POINT 0x14A4 > >> > >> How does this map to e.g. dmesg cpu information? > >> > >> CPU: AMD Ryzen 9 9900X 12-Core Processor (4391.75-MHz > >> K8-class CPU) > >> Origin="AuthenticAMD" Id=0xb40f40 Family=0x1a Model=0x44 Stepping=0 > >> > >>> And of these, I have only had the opportunity to test on Phoenix > >>> (specifically the 7040 series). > >> > > > > From nobody Fri Jul 25 21:45:23 2025 X-Original-To: hackers@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 4bphHp1hXrz62P98 for ; Fri, 25 Jul 2025 21:45:26 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bphHp0Syhz3c17 for ; Fri, 25 Jul 2025 21:45:26 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753479926; 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=nmB/ykxAOqTlt1pINjme9V/8xbT3OH9uEVRDvaATAYM=; b=U1pPmA4g71dJqQKyowSFO5Sk7OJDSMdhWxlpqFjWKNETXJlCAj/cxLXHPNkkYlNqdU++Eg t5HGDp7eUC6rEvjy3nQgHisnY1OK+ghPToq51gHKYVav9/kbgL6lPOJbyG34NxFrKHTbdr T66EQTh7IPod827SS0/KnpWHPcC/44JXxkJ0g42f9/QOB/HYO1v3zipDqJoeeWTRmI2shV wtpbDc66mijfrEATe0hbDsKXFwAJuM2P+KOTm0VSqzE6kpBCVuk7uxdNKPqKwwy5qt6bB6 jIZ57tYfPvXnsgkwZ6yaZPR+ZbCfCMj2PQOi0OqR/uK/Fb5S+OPFr+pxGsp7UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753479926; 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=nmB/ykxAOqTlt1pINjme9V/8xbT3OH9uEVRDvaATAYM=; b=x1YFgbxT5NE/BOyUKQ0K6KRRHpVMFtWV8C/V1CiM0j5dH2nfZKZT97nJskEmIbc3B2JS+r emTHdGmI1Xfjlaz4w7lJ0i3eo9q8VdctjP1pO1Eui1b29qUK+DALXXQ43/ubghlJnaZCOk RDjnY36HsifD4zZLZMnyh4XEQHYVTI5CwuyEB9P+X6PJq8hAR25pHZ8cjmvd+2fC3ESgMc tKG3lSgPQVQss4Wscn1uIRmJdWvh+Eq6etK+I1AgTNNmP/6wrPjczdEsLb9tk+P57znx/l F6fDSVe6ZmF9dFKPs4u1ULEbbB2kuXBdd/TPGY3K8XIkgs0kAJvmUYvdrB2xKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753479926; a=rsa-sha256; cv=none; b=c5zCmAZ9yXOVYJbSrlkPvBsPCqih9AOAIr7oF1LtuNPqADFLUx0/8K3gDyP1TGwdyDv6po 2qmTkF0VVNH/rqf1/NJOXCGx4FKnMEvTI2JgDRVOer3sYWedAmtqCzDLe59TyYSlfLXAJ9 2R/MH3bgWKE6CbSwghBjabNol5Uurq6KrGBVNtIcRKKyARMIWjEpDRhUBh62qufRX3j2aF WU4Rou+R05dZlyJJ1VE5MRR6bkmxtTlsv1LIhge7E9/jiNZPSYsIzvaH9iLFWUhk1IrKJD Ny6o2XoD3HBAfcoVRHb1ugvqIFjmMo0Gd8nh6nM7OfLxt//9/uYagKQbzDU9Xg== Received: from ltc.des.dev (unknown [IPv6:2a01:e0a:c54:bed0:922e:16ff:fef1:acef]) (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) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4bphHn6HHlzFxh for ; Fri, 25 Jul 2025 21:45:25 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id EA68C12A02; Fri, 25 Jul 2025 23:45:23 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: hackers@freebsd.org Subject: expand_number(3) User-Agent: Gnus/5.13 (Gnus v5.13) Date: Fri, 25 Jul 2025 23:45:23 +0200 Message-ID: <86ecu47xn0.fsf@ltc.des.dev> List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable The expand_number(3) function was originally written as a counterpart to humanize_number(3). As such, it returned a signed integer and at least nominally tried to support negative numbers. This did not work in practice and in 2010, I =E2=80=9Cfixed=E2=80=9D this by changing it to only= support positive numbers. In hindsight, this was stupid. I am now proposing to fix it to a) accept negative numbers and b) accept only decimal numbers, since that is what humanize_number(3) produces. Can anyone think of anything that will break as a consequence? Is anyone using expand_number(3) in a context where it is natural to pass in numbers in other bases than decimal, or numbers between INT64_MAX and UINT64_MAX (which will no longer be supported)? I'll note in passing that newfs(8) actually expects expand_number(3) to support negative numbers... DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Sat Jul 26 22:59:29 2025 X-Original-To: freebsd-hackers@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 4bqKtp36T8z62qg8 for ; Sat, 26 Jul 2025 22:59:30 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqKtp2JG0z48tj for ; Sat, 26 Jul 2025 22:59:30 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753570770; 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=sPML9SwRub/jx9de3mgdGEhR6jAyQtzmXItMq3TsQzs=; b=gDbBlbQ7KfP6x8oeCLNn8gztQkAD/56IT7tU2wjuhfeaIUyAga3UoSe1Ydzdp+FmW/YpAD 02c+vpR4hDzh2ivq8TF6dPi/fUBMNNzfna/fmVMw3GJjUf8aI61FSvWX/+of1gJTyGFC97 b4+ClwGnqxOi8HfLxnSyIViQMkhLsrHNBhXn+jB/UF+9Y/iUADyzU6GVC3kh0DyZpqQQx4 TlHv8GjKkk2+9xstiqDmOyma3bO1z4mIcdozYXEFambz9Gf8+42LPinbOCoXq5+MBifz55 WGBQlmmeYcmps0wSMSv7/Qwz27JWr/Td78oHwpxR5QNg/dOJ73xVUJfBP4zPyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753570770; 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=sPML9SwRub/jx9de3mgdGEhR6jAyQtzmXItMq3TsQzs=; b=ZokNrSwIDb2/0Wug+oNGWSevS7iG2lsiC9P+exHjgEFAlOAkuM8mJBxb6IOUuAW38cE+du 7O7Oq9ewUnOGts0V0eVxovrsezFq8pAyym/sWS1lcu74ogn7STV+4wb/pqkJf6Rr9k5CyQ kY4o9TmDoneChRsBkgDLsofOzspifywMBQJAt0LiMzmgL+c+3Czkyf37VJpj7H2l2OPIx3 0DQBCYUNiDA5FF86yqF/xFj+NEB26fMPzwvom2GC+ICtI+IQpv5a2nAlezl1BXO6SrtecW arRDPpEw4B1tXukDer9pamj+FcIOlTCVFS/LAbrsOIt71Lg8shyh14cvLTzt5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753570770; a=rsa-sha256; cv=none; b=LNsVTA0mWPaavR6I6YMGe51+L5X1sFdYPqBGpSwPKrQWV839syYPsRY8Bw2+Sm3lRzmU9G Gwn82tAHfJAaNTcv/KUoF0GW7ms1SQHwKd2nAP3Kh0eeErCkczCR0gLiAMVizQ0Xk0WVI/ BAW1UTeMomnXpPbRhQ0aBnbWJLUBX1dE5Dy/XSvqeRznpvu9eoA+3Gva0yoBKpxMKJmwW4 jVxG0iQ0H07Y0nPtcgkh1UERBN8o+QNPy/v3G6293s9lgwMM4S3jLkzmWz8QpoKEyekHia ZQzPN8RBVgrX6mqPdu/rMgIZS3qnKvn/rrbxKxb/roQltLTNLEY11fNgmeCV+A== Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4bqKtp0GX1z13Gp for ; Sat, 26 Jul 2025 22:59:29 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <82d3a7a7-db60-42ca-b76c-a9a2a723cb99@FreeBSD.org> Date: Sat, 26 Jul 2025 17:59:29 -0500 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Kyle Evans Subject: WIP: ucored(8) for user-core handling To: "freebsd-hackers@FreeBSD.org" Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Just today, I've committed some changes[0][1] to allow for kmods to replace the standard 'dump to foo.core' user process coredump mechanism. The first change enables one to dump to something other than a file, and the second change allows replacement of what would historically happen in coredump() after initial limits/policies are checked. Before these changes, we could get a notice via devd that a coredump was generated, but with the following limitations that I wasn't fond of: 1.) devd notifications have < 1k worth of buffer to work with, so it's fairly limited what you can cram into; that's not even PATH_MAX once you take into account the other overhead that eats away at your buffer (subsystem details, key labels), and ideally we'd fit the command path, the path to the coredump, and other metadata inside 2.) the path to the corefile isn't always accurate by necessity; the core= path doesn't take into account jails and probably shouldn't due to aforementioned size constraints 3.) it's just not really flexible, and a core still has to hit the disk for a daemon to add any kind of flexibility My companion project that motivated this is called ucored[2], and I'm hoping to add it to ports in the coming weeks. ucored's purpose is to take user cores and apply some policy to them, based on pattern-matching whatever data we might have available. Today, that means: command (path), domainname, hostname, jail, and path (to the core; not always available). Supported policies being things like: discard the core, execute some command (and pass data about the core to it), move the core somewhere else, pipe the core to a command (via stdin), or pass it over to another lua script to deal with. The default policy (at the moment) is to grab all cores and move them over to /var/ucrash for consolidation. It works on all supported versions, but it will be more capable on FreeBSD 15.x than it is on FreeBSD 13.5 and 14.x. ucored(8) on 13.x and 14.x will use devd (by way of devd invoking ucore-shuttle, which does the devd-specific bits needed like resolving the jail then sending the core over to ucored(8)). On 15.x, I have this WIP kmod that dumps to a shmfd instead of to the disk, and if you want it written out then ucored(8) has to do it. This has some neat properties, such as: discarding a core means it doesn't hit the disk (modulo shmfd swapping) and you can snatch cores out of jails (even short-lived jails) pretty easily and catch jail properties before it's torn down. It would be useful to know if this would be helpful to anyone else. As a developer and sometimes system administrator, I've found myself needing some way to organize cores on a system in a way that kern.corefile can't really offer because I want them all moved out of jails into a central location, rather than having to hunt down whatever cwd of some process may have been at the time. As a default behavior that's not really a good idea, but on a case-by-case basis it's not unreasonable. Ideas for other metadata we could be collecting when a process crashes would be nice, too. In addition to the bits we can pattern-match mentioned above, we also collect: ppid, pid, signal that caused it, whether the process was running setuid/setgid (so we can reset permissions on the coredump, if one was produced), and euid/egid of the process. Thanks, Kyle Evans [0] https://cgit.freebsd.org/src/commit/?id=8eb37cd06b345e7187e4b65484a1194ed7e300f8 [1] https://cgit.freebsd.org/src/commit/?id=ce51f79913aa28a32217a424845a2649019535af [2] https://git.kevans.dev/kevans/ucored