Extended CHS Question

Extended CHS Question

I've read many conflicting views on exaclty how extended CHS works. All
agree that
in essence, you divide the cylinders by factors of 2 and multiply the heads
by the same number keeping cylinders <=1024. My confusion is in the
detail...

There doesn't seem to be agreement on whether the "test" in the above
algorithm is c<1024 or c<=1024? Taking the former would explain the "famous"
8191 limit on cylinders for DOS and Win95. It would, however, only allow a
maximum translated number of cylinders of 1023 (0 to 1022), not 1024 (0 to
1023), which contradicts what most people say is the 4GB limit (i.e. 1024 x
128 x 63 sectors instead of 1023 x 128 x 63). Taking the latter instead
(c<=1024) explains the 4GB limit because it _does_ allow the cylinders to be
1024. However, if you apply the assembler bit-shift to divide numbers by 2,
you end up concluding that
the maximum number of cylinders is not 8191 (or even 8192 as some punters
have stated) but 8199! I.e., 8199 -> 4099 -> 2049 -> 1024.

Any ideas / opinions?

Cheers
Mark

Extended CHS Question

Quote:> I've read many conflicting views on exaclty how extended CHS works. All
> agree that
> in essence, you divide the cylinders by factors of 2 and multiply the
> heads by the same number keeping cylinders <=1024. My confusion is in
> the detail...

> There doesn't seem to be agreement on whether the "test" in the above
> algorithm is c<1024 or c<=1024? Taking the former would explain the
> "famous" 8191 limit on cylinders for DOS and Win95. It would, however,
> only allow a maximum translated number of cylinders of 1023 (0 to
> 1022), not 1024 (0 to 1023), which contradicts what most people say is
> the 4GB limit (i.e. 1024 x 128 x 63 sectors instead of 1023 x 128 x
> 63). Taking the latter instead (c<=1024) explains the 4GB limit because
> it _does_ allow the cylinders to be 1024. However, if you apply the
> assembler bit-shift to divide numbers by 2, you end up concluding that
> the maximum number of cylinders is not 8191 (or even 8192 as some
> punters have stated) but 8199! I.e., 8199 -> 4099 -> 2049 -> 1024.

> Any ideas / opinions?

How is this germane? Don't all OS's use LBA now? With 28-bits for logical
block addresses we get 2^28 * 512 bytes which equals ~137 GB. The best we
can do with CHS is to set the number of cyls. to 16383, heads to 16, and
sectors per track to 63, this yields 16383 x 16 x 63 x 512 bytes = ~8.4 GB.
To be honest, I've never even heard of extended CHS and I've read a good
deal of the ATA-5 spec.

- Regards.

--
- Mark

Extended CHS Question

:
: > I've read many conflicting views on exaclty how extended CHS works. All
: > agree that
: > in essence, you divide the cylinders by factors of 2 and multiply the
: > heads by the same number keeping cylinders <=1024. My confusion is in
: > the detail...
: >
: > There doesn't seem to be agreement on whether the "test" in the above
: > algorithm is c<1024 or c<=1024? Taking the former would explain the
: > "famous" 8191 limit on cylinders for DOS and Win95. It would, however,
: > only allow a maximum translated number of cylinders of 1023 (0 to
: > 1022), not 1024 (0 to 1023), which contradicts what most people say is
: > the 4GB limit (i.e. 1024 x 128 x 63 sectors instead of 1023 x 128 x
: > 63). Taking the latter instead (c<=1024) explains the 4GB limit because
: > it _does_ allow the cylinders to be 1024. However, if you apply the
: > assembler bit-shift to divide numbers by 2, you end up concluding that
: > the maximum number of cylinders is not 8191 (or even 8192 as some
: > punters have stated) but 8199! I.e., 8199 -> 4099 -> 2049 -> 1024.
: >
: > Any ideas / opinions?
:
: How is this germane? Don't all OS's use LBA now? With 28-bits for logical
: block addresses we get 2^28 * 512 bytes which equals ~137 GB. The best we
: can do with CHS is to set the number of cyls. to 16383, heads to 16, and
: sectors per track to 63, this yields 16383 x 16 x 63 x 512 bytes = ~8.4 GB.

Nope, that is extended CHS or translation CHS.
The original CHS is limited to 1024 cylinders and 528MB.

: To be honest, I've never even heard of extended CHS and I've read a good
: deal of the ATA-5 spec.

Then read again but this time look for 'LBA assist', 'bit shift' and 'CHS translation'. It's in annex B (annex C in ATA-6).

:
: - Regards.
:
: --
: - Mark

Extended CHS Question

Quote:>: How is this germane? Don't all OS's use LBA now? With 28-bits for
>: logical block addresses we get 2^28 * 512 bytes which equals ~137 GB.
>: The best we can do with CHS is to set the number of cyls. to 16383,
>: heads to 16, and sectors per track to 63, this yields 16383 x 16 x 63
>: x 512 bytes = ~8.4 GB.

> Nope, that is extended CHS or translation CHS.
> The original CHS is limited to 1024 cylinders and 528MB.

Really, I did not know that. I do remember the 512MB limit however.

Quote:

>: To be honest, I've never even heard of extended CHS and I've read a
>: good deal of the ATA-5 spec.

> Then read again but this time look for 'LBA assist', 'bit shift' and
> 'CHS translation'. It's in annex B (annex C in ATA-6).

Will do, thanks.

--
- Mark A. Odell
- Embedded Firmware Design, Inc.
- http://www.embeddedfw.com

Hi, another Linux newee here. Here are my queries

1. How fast is linux changing?
should I get 0.95c+ (or as I read I see that 0.96 is just out, see
what I mean). Is is worth me waiting for an imminent major release
(0.96 seems close to 1.00). I am in no rush to install it, and I
don't want to find myself reinstalling every week or so. What do you

2. Say I grabbed everything from
/pub/linux/mirrors/mcc-interim/0.95c+/images/
/pub/linux/mirrors/GCCv2/
Would that be any easy way to get linux, gcc, make, an editor,
fileutils, shellutils, binutils, (all with their sources) ?
If so how much space would it all take, roughly (I can't see 'cos the
What does the mcc stand for ? Surely not the Middlesex Cricket
Club!

4. I am interested to know if there is a GNU Prolog, or any Prolog
for that matter, with source that I can use.