Comments (7)
Hm, I do have quite a collection of old hardware, but I don't seem to have any HDDs old enough to only support CHS, not LBA.
Not sure, how CHS is handled in the Linux kernel (if at all?), but the 3 registers LBAH, LBAM, LBAL are used for Cylinder, Heads and Sectors instead. The kernel can specify these registers directly, so if it wanted, my driver should (?!) be able to handle CHS.
Please feel free to test this yourself, you don't need the fancy PCB, just plug some wires (and ideally the resistors, not 100% strictly required though) into the GPIOs and you should be good to go.
I'd be happy to accept PRs fixing issues regarding CHS.
from pata-gpio.
I have a Conner CP30254 (252 MB, ca. 1992) that I'd really like to access. This project would be perfect for this.
AFAICT, the Linux kernel is (still) fully aware of CHS, see these source files of the 5.10 LTS branch (search for CHS
):
libata:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/driver-api/libata.rst?h=v5.10
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/include/linux/libata.h?h=v5.10
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/ata/libata-core.c?h=v5.10
ide (legacy, deprecated, removed in 5.13+):
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/ide/ide.rst?h=v5.10
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/ide/ide-disk.c?h=v5.10
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/ide/ide.c?h=v5.10
Your pata-gpio
hooks into libata
, right? So CHS drives would probably just work out of the box? What do you think?
from pata-gpio.
The only thing I'm unsure of is how one would specify the drive geometry for libata
. The legacy driver offers ide_core.chs=[interface_number.device_number]:cyls,heads,sects
, but I was unable to find similar parameters for libata
.
Old drives like mine do not support any auto-detection - I clearly remember having to enter (or select) the correct CHS values for the drive within the BIOS.
from pata-gpio.
Not sure if something still might be parsing the ide_core parameters… I‘d give it a try.
My driver is very low level and only handles the raw communication and setting of registers, everything else is done by libata.
Not sure if anyone has ever used libata with a CHS drive…
I have been looking for some very old pre-LBA drives in my collection over Christmas, but I wasn‘t able to find one that doesn‘t support autodetection.
from pata-gpio.
Not sure if something still might be parsing the ide_core parameters… I‘d give it a try.
I've studied the kernel sources for quite a bit - the ide_core
parameters are only parsed by the legacy driver (i.e. the one activated by configuration item Device Drivers -> ATA/ATAPI/MFM/RLL support (DEPRECATED)).
libata
has its own set of parameters, defined here. Manually setting CHS drive geometry is not supported, libata
relies solely on information sent by the drive itself (i.e. in reply to a ATA_CMD_ID_ATA
request), which early drives likely won't provide (see FIXME in this comment block).
Thus, I'd presume that drives made before ATA-1 (first standard, started 1986, finalized 1994) won't work with libata
and thus won't work with pata-gpio
.
The way I see it, the best bet to access a CHS-only drive in 2022 is a mainboard with an IDE interface that's supported by the legacy 'ide' driver + Linux distribution with 5.10 LTS kernel (as 'ide' was removed from the Linux kernel starting with 5.13).
from pata-gpio.
Related Issues (3)
- Add license information HOT 2
- Feature Request - IDE Host HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pata-gpio.