Do we still need ATA disk CHS addressing?

View: New views
16 Messages — Rating Filter:   Alert me  

Do we still need ATA disk CHS addressing?

by Alexander Motin-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

While preparing wrapping ATA(4) low-level drivers code into CAM SIM, I
would like to remove CHS addressing support to make code cleaner. CHS
addressing is officially declared obsoleted and replaced by LBA. Since
ATA/ATAPI-6 specification (October 2001) it is even no longer documented.

Have anybody seen ATA drive without LBA support in last years?
Any other objections against removing it?

--
Alexander Motin
_______________________________________________
freebsd-hardware@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "freebsd-hardware-unsubscribe@..."

Re: Do we still need ATA disk CHS addressing?

by Takahashi Yoshihiro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In article <4A7DF076.4070203@...>
Alexander Motin <mav@...> writes:

> While preparing wrapping ATA(4) low-level drivers code into CAM SIM, I
> would like to remove CHS addressing support to make code cleaner. CHS
> addressing is officially declared obsoleted and replaced by LBA. Since
> ATA/ATAPI-6 specification (October 2001) it is even no longer
> documented.
>
> Have anybody seen ATA drive without LBA support in last years?
> Any other objections against removing it?

PC98 uses CHS addressing because the internal interface works for very
old HDD only, so I hope it remains if possible.  But if you need a lot
of works for CHS support, I agree to remove it.

---
TAKAHASHI Yoshihiro <nyan@...>
_______________________________________________
freebsd-hardware@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "freebsd-hardware-unsubscribe@..."

Re: Do we still need ATA disk CHS addressing?

by Ed Schouten-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Takahashi Yoshihiro <nyan@...> wrote:

> In article <4A7DF076.4070203@...>
> Alexander Motin <mav@...> writes:
>
> > While preparing wrapping ATA(4) low-level drivers code into CAM SIM, I
> > would like to remove CHS addressing support to make code cleaner. CHS
> > addressing is officially declared obsoleted and replaced by LBA. Since
> > ATA/ATAPI-6 specification (October 2001) it is even no longer
> > documented.
> >
> > Have anybody seen ATA drive without LBA support in last years?
> > Any other objections against removing it?
>
> PC98 uses CHS addressing because the internal interface works for very
> old HDD only, so I hope it remains if possible.  But if you need a lot
> of works for CHS support, I agree to remove it.
Wouldn't it be possible to keep the old ATA code in the tree for users
who want to use stuff like this?

--
 Ed Schouten <ed@...>
 WWW: http://80386.nl/


attachment0 (202 bytes) Download Attachment

Re: Do we still need ATA disk CHS addressing?

by Alexander Motin-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ed Schouten wrote:

> * Takahashi Yoshihiro <nyan@...> wrote:
>> In article <4A7DF076.4070203@...>
>> Alexander Motin <mav@...> writes:
>>> While preparing wrapping ATA(4) low-level drivers code into CAM SIM, I
>>> would like to remove CHS addressing support to make code cleaner. CHS
>>> addressing is officially declared obsoleted and replaced by LBA. Since
>>> ATA/ATAPI-6 specification (October 2001) it is even no longer
>>> documented.
>>>
>>> Have anybody seen ATA drive without LBA support in last years?
>>> Any other objections against removing it?
>> PC98 uses CHS addressing because the internal interface works for very
>> old HDD only, so I hope it remains if possible.  But if you need a lot
>> of works for CHS support, I agree to remove it.
>
> Wouldn't it be possible to keep the old ATA code in the tree for users
> who want to use stuff like this?

I am going to make it switchable via kernel option, until new code
completely settle. It should be possible to keep CHS support in this
legacy mode.

--
Alexander Motin
_______________________________________________
freebsd-hardware@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "freebsd-hardware-unsubscribe@..."

Re: Do we still need ATA disk CHS addressing?

by Julian H. Stacey-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Have anybody seen ATA drive without LBA support in last years?
Yes

> Any other objections against removing it?
Yes object sorry.

Cheers,
Julian
--
Julian Stacey: BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
  Mail ASCII plain text not HTML & Base64.      http://asciiribbon.org
  Virused Microsoft PCs cause spam.             http://berklix.com/free/
_______________________________________________
freebsd-hardware@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "freebsd-hardware-unsubscribe@..."

Re: Do we still need ATA disk CHS addressing?

by Alexander Motin-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Julian H. Stacey wrote:
>> Have anybody seen ATA drive without LBA support in last years?
> Yes

What it is? Some ancient HDD or flash card?

--
Alexander Motin
_______________________________________________
freebsd-hardware@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "freebsd-hardware-unsubscribe@..."

Re: Do we still need ATA disk CHS addressing?

by Julian H. Stacey-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Alexander,
> Julian H. Stacey wrote:
> >> Have anybody seen ATA drive without LBA support in last years?
> > Yes
> What it is? Some ancient HDD or flash card?

Sorry my first reply was short, a holding reply,
        ( A server died, & 2nd reserve needed time, still does )

I run 20+ assorted hosts from 4.11 to 7.2 Uni & Dual proc, i386 (real 386!)
to 686 & amd64, so I guess I'm
  A) Pretty vulnerable to legacy scare.
  B) A litmus tesst for a wider community of others, some  with older kit,
     not on lists or with bleeding edge latest hardware, but will
     get hit when stuff eg HCS gets declared legacy=dumped.
        (hardware@ & arch@ are more likely mostly high enders,
        lower percentage of legacy hardware users I guess)

If I have to pull the lid on 20/25 hosts, to check disk sticky
labels, I will if I must, but could you please reccomend people
syntax to run on 4 5 6 7 RELEASES to check if a host is susceptible ?
        (Yes I know 4 is declares dead, but I still have lots of
        hosts with it &         I suspect quite a lot of others do,
        be nice to know if any of those boxes are doomed to only
        upgarde to 7 not 8 )

BTW My configs & dmesg extract:
 http://berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/jhs/sys/i386/conf/HOLZ

The genuine 386 host uses config name MINI.

The config name SCAN represents a class of scanners with embedded
FreeBSD inside that a bunch of people have
        http://berklix.com/scanjet/
I will turn on more verbose boot to increase
        http://berklix.com/scanjet/dmesg/4.11/
from its too minimal current
        ata0 at port 0x1f0-0x1f7,0x3f6 irq 14 on isa0

Cheers,
Julian
--
Julian Stacey: BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
  Mail ASCII plain text not HTML & Base64.      http://asciiribbon.org
  Virused Microsoft PCs cause spam.             http://berklix.com/free/
_______________________________________________
freebsd-hardware@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "freebsd-hardware-unsubscribe@..."

Re: Do we still need ATA disk CHS addressing?

by Alexander Motin-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Julian H. Stacey wrote:

>> Julian H. Stacey wrote:
>>>> Have anybody seen ATA drive without LBA support in last years?
>>> Yes
>> What it is? Some ancient HDD or flash card?
>
> I run 20+ assorted hosts from 4.11 to 7.2 Uni & Dual proc, i386 (real 386!)
> to 686 & amd64, so I guess I'm
>   A) Pretty vulnerable to legacy scare.
>   B) A litmus tesst for a wider community of others, some  with older kit,
>      not on lists or with bleeding edge latest hardware, but will
>      get hit when stuff eg HCS gets declared legacy=dumped.
> (hardware@ & arch@ are more likely mostly high enders,
> lower percentage of legacy hardware users I guess)

Are you administering computer hardware museum? ;)

I have tested all drives I have and found none requiring CHS support.
Even most ancient 850MB HDD and 16MB CompactFlash card I have support
LBA. I have doubts that something even older that this is still working
in production and require system there to be upgraded to 8.x.

> If I have to pull the lid on 20/25 hosts, to check disk sticky
> labels, I will if I must, but could you please reccomend people
> syntax to run on 4 5 6 7 RELEASES to check if a host is susceptible ?
> (Yes I know 4 is declares dead, but I still have lots of
> hosts with it &         I suspect quite a lot of others do,
> be nice to know if any of those boxes are doomed to only
> upgarde to 7 not 8 )

`atacontrol cap adX` can show you if LBA is supported.

--
Alexander Motin

_______________________________________________
freebsd-hardware@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "freebsd-hardware-unsubscribe@..."

Re: Do we still need ATA disk CHS addressing?

by Dag-Erling Smørgrav :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

"Julian H. Stacey" <jhs@...> writes:
> Alexander Motin <mav@...> writes:
> > Have anybody seen ATA drive without LBA support in last years?
> Yes

Have you really, or did you just assume that "old" means "no LBA"?

> I run 20+ assorted hosts from 4.11 to 7.2 Uni & Dual proc, i386 (real 386!)
> to 686 & amd64 so I guess I'm
>   A) Pretty vulnerable to legacy scare.
>   B) A litmus tesst for a wider community of others, some  with older kit,
>      not on lists or with bleeding edge latest hardware, but will
>      get hit when stuff eg HCS gets declared legacy=dumped.

Do you seriously intend to run FreeBSD 9 on kit that is too old to
support LBA?  We're talking early nineties here.  CHS doesn't scale past
504 MB, so any ATA disk larger than that must peforce support LBA.  I
bought my first 1 GB drive (Connor CFP1080) in 1995.

DES
--
Dag-Erling Smørgrav - des@...
_______________________________________________
freebsd-hardware@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "freebsd-hardware-unsubscribe@..."

Re: Do we still need ATA disk CHS addressing?

by M. Warner Losh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

From: Dag-Erling Smørgrav <des@...>
Subject: Re: Do we still need ATA disk CHS addressing?
Date: Mon, 10 Aug 2009 20:38:16 +0200

> "Julian H. Stacey" <jhs@...> writes:
> > Alexander Motin <mav@...> writes:
> > > Have anybody seen ATA drive without LBA support in last years?
> > Yes
>
> Have you really, or did you just assume that "old" means "no LBA"?
>
> > I run 20+ assorted hosts from 4.11 to 7.2 Uni & Dual proc, i386 (real 386!)
> > to 686 & amd64 so I guess I'm
> >   A) Pretty vulnerable to legacy scare.
> >   B) A litmus tesst for a wider community of others, some  with older kit,
> >      not on lists or with bleeding edge latest hardware, but will
> >      get hit when stuff eg HCS gets declared legacy=dumped.
>
> Do you seriously intend to run FreeBSD 9 on kit that is too old to
> support LBA?  We're talking early nineties here.  CHS doesn't scale past
> 504 MB, so any ATA disk larger than that must peforce support LBA.  I
> bought my first 1 GB drive (Connor CFP1080) in 1995.

Is that also true in the pc98 realm?  There's a number of weird
combinations there which use CHS addressing, but that's kinda forced
onto it by weird pc98 disk label format.  I don't know if this is
required, and older stuff just won't work or not, but I do know that
there be dragons there.  I know, at the very least, that the system
requires that the CHS geometry reported by the drive be faithfully
preserved.  It is something we should ask nyan-san about at the very
least...

As for the 'are you seriously going to run FreeBSD 9 on them'
argument, there's a rather large number of systems that people said
would be too slow to run FreeBSD 7 or 8, yet they are running them
better than anticipated.  They said that about many of the same
systems that Julian is running today.

My question, and maybe I missed this earlier in the thread, is what's
the benefit to removing this support?  How much code is saved?

Having said all that, I think it is OK, but I'd definitely poll the
pc98 guys first...  Just to make sure they don't need it and re-fork
the ata driver to get it :)

Warner
_______________________________________________
freebsd-hardware@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "freebsd-hardware-unsubscribe@..."

Re: Do we still need ATA disk CHS addressing?

by Julian H. Stacey-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@...>
=?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= wrote:
> "Julian H. Stacey" <jhs@...> writes:
> > Alexander Motin <mav@...> writes:
> > > Have anybody seen ATA drive without LBA support in last years?
> > Yes
>
> Have you really, or did you just assume that "old" means "no LBA"?

Yes, I just assumed.

> CHS doesn't scale past
> 504 MB, so any ATA disk larger than that must peforce support LBA.  

Ah! If so, then no problem here, Thanks Dag-Erling :-)


Alexander Motin wrote:

> `atacontrol cap adX` can show you if LBA is supported.

Thanks Alexander,  I will check that tomorrow on every host I have.

Cheers,
Julian
--
Julian Stacey: BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
  Mail ASCII plain text not HTML & Base64.      http://asciiribbon.org
  Virused Microsoft PCs cause spam.             http://berklix.com/free/
_______________________________________________
freebsd-hardware@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "freebsd-hardware-unsubscribe@..."

Re: Do we still need ATA disk CHS addressing?

by Erik Trulsson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Aug 10, 2009 at 08:38:16PM +0200, Dag-Erling Smørgrav wrote:

> "Julian H. Stacey" <jhs@...> writes:
> > Alexander Motin <mav@...> writes:
> > > Have anybody seen ATA drive without LBA support in last years?
> > Yes
>
> Have you really, or did you just assume that "old" means "no LBA"?
>
> > I run 20+ assorted hosts from 4.11 to 7.2 Uni & Dual proc, i386 (real 386!)
> > to 686 & amd64 so I guess I'm
> >   A) Pretty vulnerable to legacy scare.
> >   B) A litmus tesst for a wider community of others, some  with older kit,
> >      not on lists or with bleeding edge latest hardware, but will
> >      get hit when stuff eg HCS gets declared legacy=dumped.
>
> Do you seriously intend to run FreeBSD 9 on kit that is too old to
> support LBA?  We're talking early nineties here.  CHS doesn't scale past
> 504 MB, so any ATA disk larger than that must peforce support LBA.  I
> bought my first 1 GB drive (Connor CFP1080) in 1995.

Actually I believe even the very first version of the ATA standard (long
before support for LBA or any other modern features was added) could handle
larger disks than 504MiB.  I think the original limit of ATA was 2.1 GB.
The 504MiB limit was actually the intersection between the limits of the PC
BIOS and the limits of the ATA standard.  (ATA and the BIOS had different
number of bits used to indicate each of cylinder, head and sector.  When you
took the lower number of bits for each you ended up with the 504MiB limit.)




--
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@...
_______________________________________________
freebsd-hardware@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "freebsd-hardware-unsubscribe@..."

Re: Do we still need ATA disk CHS addressing?

by Alexander Motin-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Warner Losh wrote:
> My question, and maybe I missed this earlier in the thread, is what's
> the benefit to removing this support?  How much code is saved?

It is not about code size, but about code structurization. ATA(4) has
too much cross-level relations, making it cryptic. I am trying to unroll
some of them to simplify code.

> Having said all that, I think it is OK, but I'd definitely poll the
> pc98 guys first...  Just to make sure they don't need it and re-fork
> the ata driver to get it :)

GEOM has no terms of cylinders/heads/sectors, in fact it works only with
LBA. CHS translation is only needed for drives, that have no native LBA
support. It is not about disk partitioning or label format. It is just a
method to linearize nonlinear address space of ancient drives. For last
10 years, since drives lost their classic geometry, drives are doing
this translation on firmware level.

--
Alexander Motin
_______________________________________________
freebsd-hardware@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "freebsd-hardware-unsubscribe@..."

Re: Do we still need ATA disk CHS addressing?

by M. Warner Losh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In message: <4A807BDD.6040709@...>
            Alexander Motin <mav@...> writes:
: Warner Losh wrote:
: > My question, and maybe I missed this earlier in the thread, is what's
: > the benefit to removing this support?  How much code is saved?
:
: It is not about code size, but about code structurization. ATA(4) has
: too much cross-level relations, making it cryptic. I am trying to unroll
: some of them to simplify code.

Can you explain a bit more here...  How pervasive is it, etc...  I'm
not saying this is a bad change, but I think people wishing to remove
stuff should at least have a good result that's expected...

: > Having said all that, I think it is OK, but I'd definitely poll the
: > pc98 guys first...  Just to make sure they don't need it and re-fork
: > the ata driver to get it :)
:
: GEOM has no terms of cylinders/heads/sectors, in fact it works only with
: LBA. CHS translation is only needed for drives, that have no native LBA
: support. It is not about disk partitioning or label format. It is just a
: method to linearize nonlinear address space of ancient drives. For last
: 10 years, since drives lost their classic geometry, drives are doing
: this translation on firmware level.

GEOM does have terms of CHS when it reports the classic geometry of
the device.  That can't be lost, or pc98 partitioning breaks.  And the
geometry reported must be massaged too, but that's a different issue.
The disk requests can be LBA, since the driver is responsible for
changing that anyway...  I don't think that there's any supported
pc98 hardware that would break, but I'm not 100% sure...

There's also some oddities at the lowest levels for pc98 controllers,
but I don't think this change would affect that.  However, like I
said, ask the pc98 guys for sure.

I've cc'd nyan@, since he can answer the question: "What breaks in
pc98 if we lose support for CHS-based disk I/O?"

Warner
_______________________________________________
freebsd-hardware@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "freebsd-hardware-unsubscribe@..."

Re: Do we still need ATA disk CHS addressing?

by Alexander Motin-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

M. Warner Losh wrote:

> In message: <4A807BDD.6040709@...>
>             Alexander Motin <mav@...> writes:
> : Warner Losh wrote:
> : > My question, and maybe I missed this earlier in the thread, is what's
> : > the benefit to removing this support?  How much code is saved?
> :
> : It is not about code size, but about code structurization. ATA(4) has
> : too much cross-level relations, making it cryptic. I am trying to unroll
> : some of them to simplify code.
>
> Can you explain a bit more here...  How pervasive is it, etc...  I'm
> not saying this is a bad change, but I think people wishing to remove
> stuff should at least have a good result that's expected...

Do you really wish to touch it? Fine... CHS translation is now done on
ATA controller drivers level. To work properly it needs data from drive
IDENTIFY structure fetched from drive and stored on higher level. To
wrap legacy ATA into CAM SIM I need to break that dependency either with
dropping this functionality or reimplementing it on higher level. I
would prefer first.

> : > Having said all that, I think it is OK, but I'd definitely poll the
> : > pc98 guys first...  Just to make sure they don't need it and re-fork
> : > the ata driver to get it :)
> :
> : GEOM has no terms of cylinders/heads/sectors, in fact it works only with
> : LBA. CHS translation is only needed for drives, that have no native LBA
> : support. It is not about disk partitioning or label format. It is just a
> : method to linearize nonlinear address space of ancient drives. For last
> : 10 years, since drives lost their classic geometry, drives are doing
> : this translation on firmware level.
>
> GEOM does have terms of CHS when it reports the classic geometry of
> the device.  That can't be lost, or pc98 partitioning breaks.  And the
> geometry reported must be massaged too, but that's a different issue.

That's completely different, and I am not going to touch it.

> The disk requests can be LBA, since the driver is responsible for
> changing that anyway...  I don't think that there's any supported
> pc98 hardware that would break, but I'm not 100% sure...
>
> There's also some oddities at the lowest levels for pc98 controllers,
> but I don't think this change would affect that.  However, like I
> said, ask the pc98 guys for sure.

As you could see reading above thread, I have agreed keep it in legacy
ATA mode. But it looks pointless to support it in new development.

--
Alexander Motin
_______________________________________________
freebsd-hardware@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "freebsd-hardware-unsubscribe@..."

Re: Do we still need ATA disk CHS addressing?

by Takahashi Yoshihiro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In article <20090810.162424.846948847.imp@...>
"M. Warner Losh" <imp@...> writes:

> There's also some oddities at the lowest levels for pc98 controllers,
> but I don't think this change would affect that.  However, like I
> said, ask the pc98 guys for sure.
>
> I've cc'd nyan@, since he can answer the question: "What breaks in
> pc98 if we lose support for CHS-based disk I/O?"

The following document in Japanese says: "PC-98 usually use CHS
addressing.  PC-98 does not use LBA addressing."
http://www.webtech.co.jp/company/doc/undocumented_mem/io_ide.txt

But I could use 400MB HDD with LBA addressing on my pc98, so it seems
that my pc98 supports LBA addressing at least.  I don't know older
pc98 supports it or not.

---
TAKAHASHI Yoshihiro <nyan@...>
_______________________________________________
freebsd-hardware@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "freebsd-hardware-unsubscribe@..."