linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
To: Darren Hart <dvhart@infradead.org>
Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
	x86@kernel.org, platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] platform/x86: Add Intel Galileo platform specific setup
Date: Fri, 09 Jan 2015 11:17:43 +0000	[thread overview]
Message-ID: <54AFB8D7.6020306@nexus-software.ie> (raw)
In-Reply-To: <20150109044613.GB9311@vmdeb7>

On 09/01/15 04:46, Darren Hart wrote:
>> +	/* Try overlap - IMR_ALIGN */
>> +	base = base + size - IMR_ALIGN;
>> +	if (imr_add(base, size, IMR_NON_SMM, IMR_NON_SMM, true) == 0)
>> +		pr_err(SANITY "overlapped IMR @ (0x%08lx - 0x%08lx)\n",
>> +		       base, base + size);
>> +}
>> +#endif
>
> I'd rather see this as CONFIG_DEBUG_IMR under Kernel Hacking.
>
> What about this sanity test is galileo specific?

Exactly nothing.

I think it's a fair point to make this
* CONFIG_DEBUG_IMR
* Embedded in the IMR init code

>> +	/* BIOS releases 0.7.5 and 0.8.0 do not provide DMI strings */
>> +	if (system_id != NULL) {
>> +		type = (int)system_id->driver_data;
>> +	} else {
>> +		pr_info("Galileo Gen1 BIOS version <= 0.8.0\n");
>> +		type = GALILEO_QRK_GEN1;
>
> So this will load on any Quark device, Galileo or not, that doesn't provide a
> system_id. Is there any reason we need to support 0.8.0 and earlier firmware?

Every Galileo Gen1 device ships with firmware version 0.7.5. You can do 
an EFI capsule update to 0.8.0 which still isn't DMI-enabled - or you 
can go and get a firmware greater than 0.9.0 and get DMI strings.

> I'd prefer not to successfully load a driver on the wrong platform because we
> assume the user knows what they are doing :-) This effective converts this from
> a "platform driver" to a "board file" - the bad kind.

That would be a problem if there were any other X1000 boards that don't 
provide DMI strings but only Galileo Gen1 out of the box is DMI 
deprived, so for that reason I think falling back to assume Gen1 when 
you've identified a Quark X1000 is the right thing to do.

Right now the only Quark X1000 devices that real users in the field have 
are Galileo boards which either identify with DMI strings (Gen2 and 
upgraded Gen1 boards) - or don't identify with DMI strings Gen1 @ 0.7.5 
and 0.8.0

Also consider that any new X1000 based systems running Linux will be 
based on the latest reference firmware from Intel which provides DMI 
identifiers, so Galileo Gen3 if it is in the making will have a DMI 
string to identify itself as a Gen3, same with a Gen2 and upgraded Gen1.

The only X1000 based boards without DMI strings are going to be Galileo 
Gen1 devices @ firmware version 0.7.5 and 0.8.0, so I don't think we 
will end up in a situation of loading the wrong platform code, rather 
we'll accommodate the older firmware this way

All that said - there *is* an alternative for 0.7.5 and 0.8.0 firmware 
but, I know you won't like it.

Prior to 0.9.0 firmware Galileo boards were identified by

1. Mapping a section of SPI flash
2. Finding a specific header at a know location on SPI flash
3. Extracting a unique platform ID field from that header
4. Examining that platform ID field and loading Galileo specific drivers 
if found

So in theory we could go this route if you feel that fallback the 
fallback described above isn't robust enough.

I'm OK to add that code in for V2 and we can decide which is the more 
desirable way to do it - fallback or extract of platform id from SPI 
flash and then finalise at V3

--
BOD

  reply	other threads:[~2015-01-09 11:17 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-29 17:23 [PATCH 0/2] x86: Add IMR support to Quark/Galileo Bryan O'Donoghue
2014-12-29 17:23 ` [PATCH 1/2] x86: Add Isolated Memory Regions for Quark X1000 Bryan O'Donoghue
2014-12-31 15:05   ` Andy Shevchenko
2015-01-01 20:11     ` Bryan O'Donoghue
2015-01-06  7:36   ` Darren Hart
2015-01-06 13:43     ` Bryan O'Donoghue
2015-01-06 16:54       ` Darren Hart
2015-01-07 23:45       ` Ong, Boon Leong
2015-01-08 12:10         ` Bryan O'Donoghue
2015-01-08 14:52           ` Ong, Boon Leong
2015-01-08  0:04   ` Ong, Boon Leong
2015-01-08 13:08     ` Bryan O'Donoghue
2015-01-08 14:45       ` Ong, Boon Leong
2015-01-08 15:11         ` Bryan O'Donoghue
2015-01-09  3:44           ` Darren Hart
2014-12-29 17:23 ` [PATCH 2/2] platform/x86: Add Intel Galileo platform specific setup Bryan O'Donoghue
2014-12-31 15:25   ` Andy Shevchenko
2015-01-09  1:00   ` Ong, Boon Leong
2015-01-09  2:11     ` Bryan O'Donoghue
2015-01-09  4:46   ` Darren Hart
2015-01-09 11:17     ` Bryan O'Donoghue [this message]
2015-01-09 11:29       ` Bryan O'Donoghue
2015-01-09 14:11         ` Ong, Boon Leong
2015-01-10  6:54       ` Darren Hart
2015-01-11  1:53         ` Bryan O'Donoghue
2014-12-31 10:12 ` [PATCH 0/2] x86: Add IMR support to Quark/Galileo Andy Shevchenko
2014-12-31 11:59   ` Bryan O'Donoghue
2015-01-02  2:02   ` Darren Hart
2015-01-02  4:24 ` Darren Hart
2015-01-06  6:00 ` Darren Hart
2015-01-06 13:56   ` Bryan O'Donoghue
2015-01-06 16:48     ` Darren Hart
2015-01-06 17:23       ` Bryan O'Donoghue

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=54AFB8D7.6020306@nexus-software.ie \
    --to=pure.logic@nexus-software.ie \
    --cc=dvhart@infradead.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).