From nobody Mon Feb 05 23:45:04 2024 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 4TTNKT4Q3Vz59Hq7 for ; Mon, 5 Feb 2024 23:45:17 +0000 (UTC) (envelope-from jo@bruelltuete.com) Received: from email.jo-t.de (seppel.jo-t.de [45.132.244.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4TTNKS4xHjz44y0 for ; Mon, 5 Feb 2024 23:45:16 +0000 (UTC) (envelope-from jo@bruelltuete.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bruelltuete.com header.s=bruelltuete18a header.b=GJm7BsQG; dmarc=pass (policy=none) header.from=bruelltuete.com; spf=pass (mx1.freebsd.org: domain of jo@bruelltuete.com designates 45.132.244.126 as permitted sender) smtp.mailfrom=jo@bruelltuete.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bruelltuete.com; s=bruelltuete18a; t=1707176710; bh=dgIc53h6p0K1kDZuUqZXyQYpcxj1DwHYB1wfGymWgFo=; h=Message-ID:Date:MIME-Version:Subject:To:References:From:From; b=GJm7BsQGx508WMhXiNvrghbA7D6RTZ3w+2RgCtD9F7lfCQXBifTvcJPUfO1dFWdy/ qMU5sWDQZBLpkAsN6CVe6tmf6/On8jff9/VUYh1W3iruBztyUfjUK9R+9Z0y2frjZY Y3yWDnrB5Vf7pm95DYhk6RtnqloFJlB60HMs3nG0ID9J5sxJx/dZzOmv2ksD9IqiPe MAKcyjxd+4cG4e6Rd7RQSks3PY8ALh4xCzdYq1bagOOIvoA+BYwgn1p/R60EqoxAVn lZ+7QOSWjzAJ/rud9wpgj5w/f/2FWAr7T4iZ0G6xC4z7P7KJLfbFMdo9QkIej+EyPK KwIV8EobGWikA== Message-ID: <400978a4-31eb-4cb6-b914-911ffba380aa@bruelltuete.com> Date: Mon, 5 Feb 2024 23:45:04 +0000 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 Subject: Re: TPM2 on AMD Rizen (fTPM) Content-Language: en-GB To: Andrea Cocito , freebsd-hackers@freebsd.org References: <51A26E14-9374-4B1A-9DA1-A9E2A2B4E2EA@cocito.eu> <71AF606D-1685-43E5-9455-E1882EAECE96@cocito.eu> From: Johannes Totz In-Reply-To: <71AF606D-1685-43E5-9455-E1882EAECE96@cocito.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[bruelltuete.com,none]; R_DKIM_ALLOW(-0.20)[bruelltuete.com:s=bruelltuete18a]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; ASN(0.00)[asn:197540, ipnet:45.132.244.0/22, country:DE]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bruelltuete.com:+] X-Rspamd-Queue-Id: 4TTNKS4xHjz44y0 On 04/02/2024 13:43, Andrea Cocito wrote: > Hello again, > > First thing: apologies for my email client messing up with charset encoding, hope is fixed now. > > Second, I add some detail/information. > > The machine is a bare metal on Hetzner, I do not have many details, it’s an AMD Ryzen 9 3900 12-Core/24-Threads toy with some motherboard using American Megatrends firmware; unfortunately I have very limited access to the console (one hour upon request…). > > As said the “fTPM” has been enabled in the firmare, and I also tried all the possible combinations of the settings in the firmware which could seem anyhow pertinent (SCM etc). > > The kernel is a custom-built one, simply stripped down to include statically all used devices/modules and drop the rest, compiled with -march=native as all the userland; no problem in rebooting with the GENERIC kernel, but I cannot imagine how it could help. > > Should any additional information be useful to give me some advice just ask, the machine is there to experiment. > > Thanks for any advice, > > A. I have previously made an attempt but got nowhere: https://lists.freebsd.org/archives/freebsd-hackers/2023-June/002334.html cheers, Johannes >> On 3 Feb 2024, at 18:21, Andrea Cocito wrote: >> >> Hi, >> >> I’m trying to enable TPM support on a box in order to experiment a bit with it, but the driver does not seem to load and/or see the device. >> >> In the firmware the “fTPM” option has been enabled, tried both with SCM enabled and disabled, basically I tried all the possible firmware options combinations with no success. >> >> I have tpm_load=“YES” in /boot/loader.conf and also tried the hints suggested by the man page is /boot/device.hints >> >> No way to have the tpm? device(s) appear, the best I achieved so far on dmesg in a verbose boot is: >> … >> Preloaded elf obj module "/boot/kernel.old/geom_mirror.ko" at 0xffffffff8196d8c0. >> Preloaded elf obj module "/boot/kernel.old/tpm.ko" at 0xffffffff8196dfb0. >> … >> tpm0 failed to probe at iomem 0xfffffffffed40000-0xfffffffffed44fff on isa0 >> tpm1 failed to probe at iomem 0xfffffffffed40000-0xfffffffffed40fff on isa0 >> … >> >> I am all but an expert about TPM architecture (this is why I am willing to play with it), but as far as I understand AMD’s fTPM is a TPM2 built into the CPU, I have no idea on which bus it should be seen and how. >> >> So my questions are: >> - Is AMD’s fTPM supported at all by the driver? >> - Am I missing something very obvious? >> >> I have been digging around for information quite a bit, but there does not seem to be much information around. Hope I am hitting the correct list (accept my apologies if it is not). >> >> Thanks in advance for any advice. > > > >