From nobody Sat Feb 03 16:19:06 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 4TRyWw24VMz59fdC for ; Sat, 3 Feb 2024 16:19:24 +0000 (UTC) (envelope-from andrea@cocito.eu) Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TRyWv1rSBz4Sfw for ; Sat, 3 Feb 2024 16:19:23 +0000 (UTC) (envelope-from andrea@cocito.eu) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cocito-eu.20230601.gappssmtp.com header.s=20230601 header.b=Ro6vzjWS; dmarc=none; spf=pass (mx1.freebsd.org: domain of andrea@cocito.eu designates 2a00:1450:4864:20::32e as permitted sender) smtp.mailfrom=andrea@cocito.eu Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40fd446d4cfso1793635e9.3 for ; Sat, 03 Feb 2024 08:19:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cocito-eu.20230601.gappssmtp.com; s=20230601; t=1706977157; x=1707581957; darn=freebsd.org; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=xV3Hn1n2FcJ15RyGtu2C0QN5ysPfSNz/L7cPthzXRGY=; b=Ro6vzjWSNcF6n+2whuHrRF/p4K4gVJW+B/mvdDVrJKerBCJzVqe7aG2ioe0S4xCPi0 S3xLmsPTaNmzVINUYm+cZIZD7oNPrXmxUrpu4mOwSRS9z3RhmrbsuvF8GM2Bl5OKt30T AaGNJF52CBaUh99o2OSVJyy4Z/+r3tGsZArs+HBOq9Ok62lHLg499tlNB4b7A4lwvi6g F+Ac5nfMlwWm/tWHp92F9vRr7qkUZZLwVlnVf89V0NDF0/SXucHQcictSgN5ldWzsynF QY3wMvK/ri7qoKXPcuOh26oNyPnQttjoDWGS4KuxW+pUogMcQc4IXzjCyUxXVXKEu1O3 eXFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706977157; x=1707581957; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xV3Hn1n2FcJ15RyGtu2C0QN5ysPfSNz/L7cPthzXRGY=; b=S7Ryp7lgvlZPtugraiB4hIq0Svv9ETfXoMYEn7xmECApN5Poo0dWONjdBaQyvQDTa4 UcqZ+2zf2Yt2CodlJOHQc5q5sjLBtgiAO8jmjSAc9Kc0APq1GtdL9WqJoxM6GQeuh+eN Ex/u1cNXAAFLoutqT/FllREifvWpT258AiRv9MjVO6TFCEYESwmUOfBeVMIseZdN8HPi 8sXnEm67DD46Bkn4oYpGsFPN4djLkBt4VNZMLnagku1mVJvcMHiJ/LabVq77e5F+Wh2c UGQJkjjorPeJ5ZTV2eOgLLGz4scVvqS3OTjaEOlvL7XUGNf6+2/i93RNuCdM1+zowAOo gc3w== X-Gm-Message-State: AOJu0YzIqhHh/jDQDkP6KWjPfiYRylFK1Jq2fokGAV12AXFRQJZ/PITc Z0lueYCtXXSnUg3dFAmUv2JbNM1D1RWNhfVVqE2lZl+7aQGlyPsuFZMgZBZlcI7W5GoamavtRWf q X-Google-Smtp-Source: AGHT+IFbIU2S+zpGPegvotnYN1Y5uHhaUw0JMQP5kwEvqTAA8E1NKx6NOR76nuZeaEdIbMCiggaNYw== X-Received: by 2002:a05:600c:198a:b0:40e:7232:bdf9 with SMTP id t10-20020a05600c198a00b0040e7232bdf9mr1232391wmq.16.1706977157386; Sat, 03 Feb 2024 08:19:17 -0800 (PST) Received: from smtpclient.apple ([185.8.198.100]) by smtp.gmail.com with ESMTPSA id l10-20020a5d410a000000b0033af5716a7fsm4308101wrp.61.2024.02.03.08.19.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Feb 2024 08:19:17 -0800 (PST) From: Andrea Cocito Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 (Mac OS X Mail 16.0 \(3774.300.61.1.2\)) Subject: TPM2 on AMD Rizen (fTPM) Message-Id: Date: Sat, 3 Feb 2024 17:19:06 +0100 To: freebsd-hackers@freebsd.org X-Mailer: Apple Mail (2.3774.300.61.1.2) X-Spamd-Bar: -- X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[cocito-eu.20230601.gappssmtp.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[cocito.eu]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::32e:from]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[cocito-eu.20230601.gappssmtp.com:+] X-Rspamd-Queue-Id: 4TRyWv1rSBz4Sfw Hi, I=E2=80=99m 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 =E2=80=9CfTPM=E2=80=9D 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=3D=E2=80=9CYES=E2=80=9D 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: =E2=80=A6 Preloaded elf obj module "/boot/kernel.old/geom_mirror.ko" at = 0xffffffff8196d8c0. Preloaded elf obj module "/boot/kernel.old/tpm.ko" at = 0xffffffff8196dfb0. =E2=80=A6 tpm0 failed to probe at iomem 0xfffffffffed40000-0xfffffffffed44fff on = isa0 tpm1 failed to probe at iomem 0xfffffffffed40000-0xfffffffffed40fff on = isa0 =E2=80=A6 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=E2=80=99s 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=E2=80=99s 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.=