public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Hannes Reinecke <hare@suse.de>,
	LKML <linux-kernel@vger.kernel.org>,
	"H. Peter Anvin" <hpa@linux.intel.com>
Subject: Re: [PATCH] EDD: Check for correct EDD 3.0 length
Date: Tue, 15 May 2012 18:46:41 +0300	[thread overview]
Message-ID: <20120515154641.GI6948@redhat.com> (raw)
In-Reply-To: <20120515161439.00e2de3c@pyramind.ukuu.org.uk>

On Tue, May 15, 2012 at 04:14:39PM +0100, Alan Cox wrote:
> > Phoenix BIOS (linked at the first mail of the thread) and it does not have
> > enough info even for ATA.
> 
> <History lecture mode on>
> 
> In the beginning was the CMOS, and the CMOS was good.
> 
> Then people started adding extra drives and screwing around with mappings.
> 
> For this period there are a set of rituals (and I use the word
> intentionally) for finding the geometry data and configuration mappings
> which depend on which of the major religions your BIOS belonged to.
> 
> The entire thing got out of hand and so EDD was born
> 
> The base Phoenix spec is 1.1 not 3.0 and was published in 1995. It
> assumes legacy mappings. It does have enough information for
> compatibility mode ATA, which is all there was in the BIOS at the time.
> Closely related to all this is the emergency of the Compaq/Phoenix/Intel
> BIOS Boot Specification v1.01 (1996).
> 
> The follow on Phoenix spec is 3.0 (rev 0.8) and was published in
> 1998. That one addresses IEEE 1394 and some other bits. It does support
> PCI bus device paths and lun identification to some extent but isn't
> adequate for all complex topologies but is for most.
> 
> The T13 draft D3186 was published in 2000 and leads on to the EDD 4.0
> proposal of 2008 which generally is what people consider EDD 3.0
> 
> So I think you have your specifications confused too.
> 
There is Phoenix spec 3.0 and there are T13 EDD3.0/4.0. They are
incompatible and you can't tell which one specific BIOS actually use.
Everything is correct till now?

> I would suggest you read and compare the documents. In particular please
I have them both open right now.

> read Phoenix EDD 3.0 and pay attention to the sections 5.8-5.8.3 which
> cover the device path and explain how EDD3.0 describes the actual device
> to BIOS mapping. In particular the DPT interface path identifies the PCI
> bus/devfn and the DPT device path identifiers if the unit is master or
> slave.
> 
Those sections is what I am looking at. I skipped DPTE part probably
because I didn't see Linux actually using it and I agree that you can use
I/O port to figure master/slave. It does not help much since the
information is not exposed to userspace (because code support different
spec where this is not needed) and because Phonix spec does not support
many other modern interfaces. The spec even specifies USB as TBD :) SATA
is missing completely.

> In the absence of the device/interface path being entirely unique (or
> indeed present at all) you use the DPTE words 0-3 to identify the mapping
> for any SFF style ATA interface. This is sufficient to identify all non
> MMIO configurations. The DPTE in 3.0 doesn't allow for pure MMIO
> controllers. You just walk the address back to a device mapping and to
> the controller/port in question.
> 
> </>
> 
> 
> 
> Alan

--
			Gleb.

  parent reply	other threads:[~2012-05-15 15:46 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-15 11:04 [PATCH] EDD: Check for correct EDD 3.0 length Hannes Reinecke
2012-05-15 11:12 ` Gleb Natapov
2012-05-15 11:20   ` Hannes Reinecke
2012-05-15 11:59     ` Gleb Natapov
2012-05-15 12:53       ` Gleb Natapov
2012-05-15 13:49       ` Alan Cox
2012-05-15 14:12         ` Gleb Natapov
2012-05-15 14:18           ` Alan Cox
2012-05-15 14:21             ` Gleb Natapov
2012-05-15 14:36               ` Alan Cox
2012-05-15 14:48                 ` Gleb Natapov
2012-05-15 14:54                   ` Alan Cox
2012-05-15 15:00                     ` Gleb Natapov
2012-05-15 14:00       ` Alan Cox
2012-05-15 14:36         ` Gleb Natapov
2012-05-15 14:52           ` Alan Cox
2012-05-15 14:53             ` Gleb Natapov
2012-05-15 15:22               ` Alan Cox
2012-05-15 15:29                 ` Gleb Natapov
2012-05-15 15:41                   ` Alan Cox
2012-05-15 15:53                     ` Gleb Natapov
2012-05-15 15:14           ` Alan Cox
2012-05-15 15:31             ` Alan Cox
2012-05-15 15:46             ` Gleb Natapov [this message]
2012-05-15 17:17               ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2012-05-16  6:51 Hannes Reinecke
2012-05-16  8:28 ` Gleb Natapov

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=20120515154641.GI6948@redhat.com \
    --to=gleb@redhat.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=hare@suse.de \
    --cc=hpa@linux.intel.com \
    --cc=linux-kernel@vger.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