All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@suse.de>
To: Jiri Olsa <jolsa@redhat.com>, Bjorn Helgaas <bhelgaas@google.com>
Cc: Stephane Eranian <eranian@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Andi Kleen <ak@linux.intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	"mingo@elte.hu" <mingo@elte.hu>, Zhang Rui <rui.zhang@intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: Re: [bug] mapping multiple BARs
Date: Tue, 5 Apr 2016 08:09:28 +0200	[thread overview]
Message-ID: <20160405060928.GA10109@pd.tnic> (raw)
In-Reply-To: <20160324133656.GB22759@krava.brq.redhat.com>

On Thu, Mar 24, 2016 at 02:36:56PM +0100, Jiri Olsa wrote:
> On Thu, Mar 24, 2016 at 11:15:06AM +0100, Borislav Petkov wrote:
> > On Thu, Mar 24, 2016 at 10:44:41AM +0100, Jiri Olsa wrote:
> > > hi,
> > > I'm hitting following lines in dmesg:
> > >   resource sanity check: requesting [mem 0xfed10000-0xfed15fff], which spans more than reserved [mem 0xfed10000-0xfed13fff]
> > >   caller snb_uncore_imc_init_box+0x7c/0xa0 mapping multiple BARs
> > > 
> > > I'm on IvyBridge model 58
> > >   vendor_id       : GenuineIntel
> > >   cpu family      : 6
> > >   model           : 58
> > >   model name      : Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz
> > >   stepping        : 9
> > >   microcode       : 0x1c
> > > 
> > > I've read following threads:
> > >   http://marc.info/?w=2&r=1&s=mapping+multiple+BARs&q=t
> > > 
> > > and it seems this is supposed to be already fixed by:
> > >   cb171f7abb9a PNP: Work around BIOS defects in Intel MCH area reporting
> > 
> > And as we talked on IRC, it looked like the quirk gets applied on my
> > machine and not on yours. I.e., I see:
> > 
> > [    0.669351] pnp 00:01: [Firmware Bug]: PNP resource [mem 0xfed10000-0xfed13fff] covers only part of 0000:00:00.0 Intel MCH; extending to [mem 0xfed10000-0xfed17fff]
> > 
> > and you don't.
> > 
> > Can you add some debug printks to quirk_intel_mch() to find out why?
> 
> seems like this function did not find any quirk
> (patch for the output attached)
> 
> [root@intel-chiefriver-04 ~]# dmesg | grep quirk_intel_mch
> quirk_intel_mch dev WDT0
> quirk_intel_mch   region start ffff880244617778, end fed10000
> quirk_intel_mch   mch    start fed10000, end fed17fff
> quirk_intel_mch   res    start 6a4, end 6a4
> quirk_intel_mch   res    start 6a0, end 6a0
> quirk_intel_mch dev LDRC
> quirk_intel_mch   region start ffff880244617378, end fed10000
> quirk_intel_mch   mch    start fed10000, end fed17fff
> quirk_intel_mch   res    start 2e, end 2f
> quirk_intel_mch   res    start 4e, end 4f
> quirk_intel_mch   res    start 61, end 61
> quirk_intel_mch   res    start 63, end 63
> quirk_intel_mch   res    start 65, end 65
> quirk_intel_mch   res    start 67, end 67
> quirk_intel_mch   res    start 70, end 70
> quirk_intel_mch   res    start 80, end 80
> quirk_intel_mch   res    start 92, end 92
> quirk_intel_mch   res    start b2, end b3
> quirk_intel_mch   res    start 680, end 69f
> quirk_intel_mch   res    start 1004, end 1013
> quirk_intel_mch   res    start ffff, end ffff
> quirk_intel_mch   res    start ffff, end ffff
> quirk_intel_mch   res    start 400, end 453
> quirk_intel_mch   res    start 458, end 47f
> quirk_intel_mch   res    start 500, end 57f
> quirk_intel_mch   res    start 164e, end 164f
> quirk_intel_mch dev CWDT
> quirk_intel_mch   region start ffff8802446b8b78, end fed10000
> quirk_intel_mch   mch    start fed10000, end fed17fff
> quirk_intel_mch   res    start 454, end 457
> quirk_intel_mch dev PDRC
> quirk_intel_mch   region start ffff8802446bcb78, end fed10000
> quirk_intel_mch   mch    start fed10000, end fed17fff
> quirk_intel_mch   res    start fed1c000, end fed1ffff
> quirk_intel_mch   res    start fed10000, end fed17fff

Here's an exact match.

> quirk_intel_mch   res    start fed18000, end fed18fff
> quirk_intel_mch   res    start fed19000, end fed19fff
> quirk_intel_mch   res    start f8000000, end fbffffff
> quirk_intel_mch   res    start fed20000, end fed3ffff
> quirk_intel_mch   res    start fed90000, end fed93fff
> quirk_intel_mch   res    start fed45000, end fed8ffff
> quirk_intel_mch   res    start ff000000, end ffffffff
> quirk_intel_mch   res    start fee00000, end feefffff
> quirk_intel_mch   res    start b15b0000, end b15b0fff
> 
> 
> but AFAICS the following dmesg output:
> 
>   resource sanity check: requesting [mem 0xfed10000-0xfed15fff], which spans more than reserved [mem 0xfed10000-0xfed13fff]
>   caller snb_uncore_imc_init_box+0x7c/0xa0 mapping multiple BARs
> 
> is related to checking of iomem_resource, which I haven't
> found connected to the pnp_dev resources from the quirk code

Hmm, so mine says:

[    0.643771] pnp 00:01: [Firmware Bug]: PNP resource [mem 0xfed10000-0xfed13fff] covers only part of 0000:00:00.0 Intel MCH; extending to [mem 0xfed10000-0xfed17fff]

which, AFAIR, means, the PNP resource needs to be extended. And which
the quirk does.

In your case, snb_uncore_imc_init_box() requests bigger resource than
what is reserved, AFAICT.

And your e820 map has those ranges too:

BIOS-e820: [mem 0x00000000fed10000-0x00000000fed13fff] reserved
BIOS-e820: [mem 0x00000000fed18000-0x00000000fed19fff] reserved

There's also

system 00:07: [mem 0xfed10000-0xfed17fff] could not be reserved

in your dmesg.

This all looks like a funny BIOS to me. And pretty old at that:

DMI: Intel Corporation 2012 Client Platform/Emerald Lake 2, BIOS ACRVMBY1.86C.0078.P00.1201161002 01/16/2012

Can you get an update or so?

Bjorn, can you make any sense of this?

Thanks.

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

  parent reply	other threads:[~2016-04-05  6:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24  9:44 [bug] mapping multiple BARs Jiri Olsa
2016-03-24 10:15 ` Borislav Petkov
2016-03-24 13:36   ` Jiri Olsa
2016-04-02  0:19     ` Jiri Olsa
2016-04-05  6:09     ` Borislav Petkov [this message]
2016-04-13 19:40 ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160405060928.GA10109@pd.tnic \
    --to=bp@suse.de \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.