All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Jon Masters <jcm@redhat.com>, Mark Rutland <mark.rutland@arm.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"leif.lindholm@linaro.org" <leif.lindholm@linaro.org>,
	"grant.likely@linaro.org" <grant.likely@linaro.org>,
	Andre Przywara <Andre.Przywara@arm.com>,
	Torez Smith <torez@redhat.com>
Subject: Re: inverse mapping from a struct console to device
Date: Wed, 28 Jan 2015 17:48:29 -0500	[thread overview]
Message-ID: <54C9673D.5090902@hurleysoftware.com> (raw)
In-Reply-To: <54C7F821.1020609@redhat.com>

Hi Jon,

On 01/27/2015 03:42 PM, Jon Masters wrote:
> On 01/27/2015 07:30 AM, Mark Rutland wrote:
>> On Tue, Jan 27, 2015 at 11:54:18AM +0000, Jon Masters wrote:
> 
>>> Here's an example of the data we get in the SPCR for reference:
>>>
>>> [0012]               Serial Port Register : [Generic Address Structure]
>>> [0001]                           Space ID : 00 [SystemMemory]
>>> [0001]                          Bit Width : 08
>>> [0001]                         Bit Offset : 00
>>> [0001]               Encoded Access Width : 01 [Byte Access:8]
>>> [0008]                            Address : 000000001c020000
>>>
>>> [0001]                     Interrupt Type : 08
>>> [0001]                PCAT-compatible IRQ : 00
>>> [0004]                          Interrupt : 0000006C
>>> [0001]                          Baud Rate : 07
>>> [0001]                             Parity : 00
>>> [0001]                          Stop Bits : 01
>>> [0001]                       Flow Control : 00
>>> [0001]                      Terminal Type : 00
>>> [0001]                           Reserved : 00
>>>
>>> The actual structure is longer, but you get the idea. I first map this
>>> to the correct Device in the DSDT with a device_initcall that will find
>>> the table then walk the ACPI namespace to find the corresponding device.
>>> This is stashed so that later we can perform the same kind of comparison
>>> that you do with DT today. I also populate options, though so far have
>>> only bothered to implement baud rate.
>>
>> I would recommend that you set up as many of these ASAP. Otherwise
>> someone's certain to mess up a table and we can never add them later.
> 
> So this is why I'm doing this (and other annoying things) right now - to
> make sure that vendors shipping platforms have valid data we can also
> use. If we wait until later, we'll have systems that potentially do the
> wrong thing. The table above is an example of one for the Mustang. I had
> the revision bumped to 2 and the IRQ information added to the reference
> one, and I've also verified the tables for Seattle, as well as "other"
> hardware that is in the pipeline from other vendors.
> 
>> Otherwise, sounds good!
> 
> So I'm handing this to Torez Smith to followup on (please keep her
> copied on replies to this thread). I'm attaching a *hack* patch I put
> together to proof of concept and then Torez will make this into
> something actually useable/upstreamable (without hard coded static baud
> strings and the like that I used to hack it up).

The Serial Port Console Redirection (SPCR) Table is patented by
Microsoft (spec and patent notice downloadable here
https://msdn.microsoft.com/en-us/library/windows/hardware/dn639132(v=vs.85).aspx )
and covered under the Microsoft Community Promise here
http://www.microsoft.com/openspecifications/en/us/programs/community-promise/default.aspx

The Micosoft Community Promise does not look compatible with GPL 2;
or more specifically, whomever eventually submitted the patch would likely not
be able to meet the criteria set forth by the Developer's Certificate of Origin 1.1
in Documentation/SubmittingPatches

Regards,
Peter Hurley

      reply	other threads:[~2015-01-29  1:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26 19:40 inverse mapping from a struct console to device Jon Masters
2015-01-26 20:20 ` Greg KH
2015-01-27  3:16   ` Jon Masters
2015-01-26 20:50 ` Mark Rutland
2015-01-27  3:06   ` Jon Masters
2015-01-27 10:14     ` Mark Rutland
2015-01-27 11:54       ` Jon Masters
2015-01-27 12:30         ` Mark Rutland
2015-01-27 20:42           ` Jon Masters
2015-01-28 22:48             ` Peter Hurley [this message]

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=54C9673D.5090902@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=Andre.Przywara@arm.com \
    --cc=grant.likely@linaro.org \
    --cc=jcm@redhat.com \
    --cc=leif.lindholm@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=torez@redhat.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.