From mboxrd@z Thu Jan 1 00:00:00 1970 From: Davide Guerri Subject: Re: Intel NUC and fTPM issue on 4.9.2 Date: Thu, 16 Feb 2017 18:40:02 +0000 Message-ID: References: <20170216180116.GA7145@obsidianresearch.com> <20170216181905.GA7257@obsidianresearch.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7543636522017762814==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Jason Gunthorpe Cc: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: tpmdd-devel@lists.sourceforge.net --===============7543636522017762814== Content-Type: multipart/alternative; boundary=001a1143703a0724e10548aa20af --001a1143703a0724e10548aa20af Content-Type: text/plain; charset=UTF-8 Sorry I missed 1 line: [20417.678952] ACPI resource is [mem 0xfed40000-0xfed4087f flags 0x200] [20417.678975] map request is is [mem 0xfed40040-0xfed4006f flags 0x200] [20417.678990] map request is is [mem 0xfed40080-0xfed40fff flags 0x200] [20417.678996] tpm_crb MSFT0101:00: can't request region for resource [mem 0xfed40080-0xfed40fff] [20417.688797] tpm_crb: probe of MSFT0101:00 failed with error -16 On 16 February 2017 at 18:39, Davide Guerri wrote: > [20417.678975] map request is is [mem 0xfed40040-0xfed4006f flags 0x200] > > [20417.678990] map request is is [mem 0xfed40080-0xfed40fff flags 0x200] > > [20417.678996] tpm_crb MSFT0101:00: can't request region for resource [mem > 0xfed40080-0xfed40fff] > > [20417.688797] tpm_crb: probe of MSFT0101:00 failed with error -16 > > > > On 16 February 2017 at 18:26, Davide Guerri > wrote: > >> No lines including the requested range: >> >> fed10000-fed17fff : pnp 00:06 >> >> fed18000-fed18fff : pnp 00:06 >> >> fed19000-fed19fff : pnp 00:06 >> >> fed20000-fed3ffff : pnp 00:06 >> >> fed40000-fed4087f : MSFT0101:00 >> >> fed45000-fed8ffff : pnp 00:06 >> >> fed90000-fed93fff : pnp 00:06 >> >> fee00000-fee00fff : Local APIC >> >> This is the NUC I am using, if that can be useful. >> >> root@vhsv1:~# cat /sys/class/dmi/id/board_name >> /sys/class/dmi/id/board_version >> >> NUC6i7KYB >> >> H90766-404 >> >> I am compiling the module right as we speak, I will get back to you soon. >> >> On 16 February 2017 at 18:19, Jason Gunthorpe < >> jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> wrote: >> >>> On Thu, Feb 16, 2017 at 06:10:43PM +0000, Davide Guerri wrote: >>> > Hey thanks for the prompt reply. >>> > I think you are interested in this: >>> > fed40000-fed4087f : MSFT0101:00 >>> >>> Are there more lines below that? >>> >>> Can you apply this patch and report what the results are? >>> >>> diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c >>> index a7c870af916c3d..acc54a03d6025d 100644 >>> --- a/drivers/char/tpm/tpm_crb.c >>> +++ b/drivers/char/tpm/tpm_crb.c >>> @@ -233,6 +233,8 @@ static void __iomem *crb_map_res(struct device *dev, >>> struct crb_priv *priv, >>> .flags = IORESOURCE_MEM, >>> }; >>> >>> + printk("map request is is %pr\n",&new_res); >>> + >>> /* Detect a 64 bit address on a 32 bit system */ >>> if (start != new_res.start) >>> return (void __iomem *) ERR_PTR(-EINVAL); >>> @@ -267,6 +269,8 @@ static int crb_map_io(struct acpi_device *device, >>> struct crb_priv *priv, >>> return -EINVAL; >>> } >>> >>> + printk("ACPI resource is %pr\n",&io_res); >>> + >>> priv->iobase = devm_ioremap_resource(dev, &io_res); >>> if (IS_ERR(priv->iobase)) >>> return PTR_ERR(priv->iobase); >>> >> >> >> >> -- >> >> >> [image: Davide Guerri on about.me] >> >> Davide Guerri >> about.me/davide_guerri >> >> > > > > -- > > > [image: Davide Guerri on about.me] > > Davide Guerri > about.me/davide_guerri > > -- [image: Davide Guerri on about.me] Davide Guerri about.me/davide_guerri --001a1143703a0724e10548aa20af Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Sorry I missed 1 line:

[20417.678952] ACPI resource is [mem 0xfed40000-0xfed= 4087f flags 0x200]

[20417.678975] map request is is [mem= 0xfed40040-0xfed4006f flags 0x200]

[20417.678990] map request is is [mem= 0xfed40080-0xfed40fff flags 0x200]

[20417.678996] tpm_crb MSFT0101:00: c= an't request region for resource [mem 0xfed40080-0xfed40fff]

[20417.688797] tpm_crb: probe of MSFT= 0101:00 failed with error -16



On 16 February 2017 at 18:39, Davi= de Guerri <davide.guerri-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

[20417.678975] map request is is [mem 0xfed40040-0xfed4006f flags 0x200]=

[20417.678990] map request is is [mem= 0xfed40080-0xfed40fff flags 0x200]

[20417.678996] tpm_crb MSFT0101:00: c= an't request region for resource [mem 0xfed40080-0xfed40fff]

[20417.688797] tpm_crb: probe of MSFT= 0101:00 failed with error -16




On 16 February 2017 at 18:26, Davide Guerri <davide.guerri@gma= il.com> wrote:
No lines including the requested range:

fed10000-fed17fff : pnp 00:06

fed18000-fed18fff : pnp 00:06

fed19000-fed19fff : pnp 00:06

fed20000-fed3ffff : pnp 00:06

fed40000-fed4087f : MSFT0101:00

fed45000-fed8ffff : pnp 00:06

fed90000-fed93fff : pnp 00:= 06

fee00000-fee00fff : Loca= l APIC


This is the NUC I am using, if th= at can be useful.

root@vhsv1:~# cat /sys/class/dmi/id/board_name /sys/class/dmi/id/boar= d_version

NUC6i7KYB

H90766-404

=

I am compiling the module right as we speak= , I will get back to you soon.
<= div class=3D"m_2268449455654255963h5">
On 16 = February 2017 at 18:19, Jason Gunthorpe <jgunthorpe@obsidian= research.com> wrote:
<= span>On Thu, Feb 16, 2017 at 06:10:43PM +0000, Davide Guerri wrote:
>=C2=A0 =C2=A0 Hey thanks for the prompt reply.
>=C2=A0 =C2=A0 I think you are interested in this:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0fed40000-fed4087f : MSFT0101:00

Are there more lines below that?

Can you apply this patch and report what the results are?

diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
index a7c870af916c3d..acc54a03d6025d 100644
--- a/drivers/char/tpm/tpm_crb.c
+++ b/drivers/char/tpm/tpm_crb.c
@@ -233,6 +233,8 @@ static void __iomem *crb_map_res(struct device *dev, st= ruct crb_priv *priv,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .flags=C2=A0 =3D IO= RESOURCE_MEM,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 };

+=C2=A0 =C2=A0 =C2=A0 =C2=A0printk("map request is is %pr\n",&= ;new_res);
+
=C2=A0 =C2=A0 =C2=A0 =C2=A0 /* Detect a 64 bit address on a 32 bit system *= /
=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (start !=3D new_res.start)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return (void __iome= m *) ERR_PTR(-EINVAL);
@@ -267,6 +269,8 @@ static int crb_map_io(struct acpi_device *device, struc= t crb_priv *priv,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return -EINVAL;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }

+=C2=A0 =C2=A0 =C2=A0 =C2=A0printk("ACPI resource is %pr\n",&= io_res);
+
=C2=A0 =C2=A0 =C2=A0 =C2=A0 priv->iobase =3D devm_ioremap_resource(dev, = &io_res);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (IS_ERR(priv->iobase))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return PTR_ERR(priv= ->iobase);



-= -



--



--
= --001a1143703a0724e10548aa20af-- --===============7543636522017762814== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot --===============7543636522017762814== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ tpmdd-devel mailing list tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/tpmdd-devel --===============7543636522017762814==--