Hi Jon,

Very intriguing.

What makes you so certain it's a HPA as opposed to just reducing the
disk capacity?  My understanding was that HPA areas were used for
internal drive housekeeping, or perhaps for manufacturer diagnostics,
but since by definition the host can't see it (otherwise it wouldn't be
"host protected") it seems surprising it would make the HPA available to
the system.

One way to confirm this would be to try writing to the boot sector
(e.g. by creating some partitions) and then moving the drive to one of
the PCs where it works normally.  If you can see the partitions on the
PC where the SSD works normally then you will know it is not a HPA,
however if you can create one set of partitions on the working PC and
an entirely different set of partitions on the 130MB BIOS and neither
overwrites the other, well then that may well be some weirdness with
the HPA.

The reason I mention it is because to my knowledge all drives can have
their capacity limited via IDE commands, and it sounds to me like this
is what is happening rather than any trickery with HPAs.

> Since this doesn't occur on a machine with a newer BIOS, I think that the
> adapter is picking up on something the old BIOS is doing and is trying to
> "help" by telling the drive to set a temporary HPA. Once that happens, the
> drive under-reports its size to software that can handle the actual size,
> and refuses reads/writes to LBA values in the HPA.

You should be able to confirm this theory with a procedure like so:

 1. Power up the drive as normal in the 130MB PC.
 2. Without removing the power cable, unplug the data cable and connect
    it to a newer PC where it works normally, ideally one that is
    already on and supports hot-swap so there is no bus reset required.
 3. If the SATA adapter or drive is responsible for returning the 130MB
    capacity after being switched into some compatibility mode, the
    drive should appear as 130MB on the new PC as well as it will
    already be in this mode when connected to the machine.

Of course if you plug it into the newer PC but then have to reboot it to
get it to detect the drive it may reset it and it goes back to normal,
so here's an alternative procedure:

 1. Remove the drive's data cable so the 130MB BIOS can't send it any
    messages, then power on the machine.
 2. Boot Linux but pause it at the bootloader (e.g. GRUB), before the
    kernel starts.
 3. Plug in the disk's data cable.
 4. Resume booting the Linux kernel.  It should reset the IDE bus and
    detect the drive, without the BIOS having interfered.  Without
    hdparm you could use use "fdisk -l /dev/hda" or "dmesg | less" or
    similar just to check what capacity came up.

The first procedure should confirm or rule out the drive or adapter
being switched into a 130MB mode by something, while the second should
confirm or rule out whether the BIOS is the one causing this to happen.

If it still shows up as 130MB after the second procedure then the BIOS
isn't to blame as it wasn't involved in that test, and if it shows up as
full capacity in the newer machine after the first procedure then the
SSD and adapter would seem to be playing no part in this.  This would
leave only the IDE chipset in question, which although unlikely, the PCI
SATA card would help answer that.

> I have various such drives. The BIOS *is* a problem, but there's something
> going on beyond *just* the BIOS being a problem:

Very interesting - one list of hard drive limits doesn't even list
130MB or 1.3 GB as a problem!

  https://tldp.org/HOWTO/Large-Disk-HOWTO-4.html

> I think the next thing I'll try for the older machine is Liam's 
> suggestion of
> a PCI SATA card. If that works, I'll probably just use the IDE/SATA adapter
> I already have on the newer machine where I know that it works without 
> issue.

Let us know how you go, I'd be interested to hear the results.

Cheers,
Adam.


_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to