Compare commits

...

2 Commits

Author SHA1 Message Date
e00345c6ce Update README 2025-11-16 15:30:17 +13:00
a8452cff26 Fixup info print for LBAs > 2T 2025-11-16 02:23:03 +00:00
2 changed files with 15 additions and 7 deletions

View File

@ -19,7 +19,7 @@
## Features
* Autoboot
* Works with Kickstart 1.3 and up
* [Supports up to 2TB drives*](#large-drive-4gb-support)
* [Supports 2TB+ drives*](#large-drive-4gb-support)
* Supports ATAPI Devices (CD/DVD-ROM, Zip disk etc)
* Boot from ZIP/LS-120 etc
* [Boot from CD-ROM*](#boot-from-cd-rom)
@ -93,6 +93,8 @@ This can be achieved on RIPPLE and 68EC020-TK boards using `lideflash` i.e
For drives larger than 4GB it is required to use a Filesystem that supports TD64, NSD or SCSI-Direct
The default FFS in OS 3.1 does **not** support these, and use of this above the 4GB boundary will result in data corruption!
**For drives larger than 2TB do not place partitions past the 2TB boundary! this will lead to filesystem corruption**
There are several options for larger drive support
* [PFS3](https://aminet.net/package/disk/misc/pfs3aio)
* SFS

18
ata.c
View File

@ -425,17 +425,18 @@ bool ata_init_unit(struct IDEUnit *unit, void *base) {
} else if (unit->flags.lba == true) {
// LBA-28 up to 127GB
unit->write_taskfile = &write_taskfile_lba;
} else {
// CHS Mode
Warn("INIT: Drive doesn't support LBA mode\n");
unit->write_taskfile = &write_taskfile_chs;
unit->logicalSectors = (unit->cylinders * unit->heads * unit->sectorsPerTrack);
}
Info("INIT: Logical sectors: %ld\n",unit->logicalSectors);
if (unit->logicalSectors == 0 || unit->heads == 0 || unit->cylinders == 0) goto ident_failed;
if (unit->flags.lba48) {
Info("INIT: Logical sectors: 0x%lx%08lx\n",(uint64_t)unit->logicalSectors);
} else {
Info("INIT: Logical sectors: %ld\n",(ULONG)unit->logicalSectors);
}
if (unit->logicalSectors >= 267382800) {
// For drives larger than 127GB fudge the geometry
@ -451,6 +452,7 @@ bool ata_init_unit(struct IDEUnit *unit, void *base) {
Info("INIT: Adjusting geometry, new geometry; 16/255/%ld\n",unit->cylinders);
}
if (unit->logicalSectors == 0 || unit->heads == 0 || unit->cylinders == 0) goto ident_failed;
while ((unit->blockSize >> unit->blockShift) > 1) {
unit->blockShift++;
@ -481,7 +483,11 @@ ident_failed:
Info("INIT: Blockshift: %ld\n",unit->blockShift);
unit->flags.present = true;
Info("INIT: LBAs %lld Blocksize: %ld\n",unit->logicalSectors,unit->blockSize);
if (unit->flags.lba48) {
Info("INIT: LBAs 0x%lx%08lx Blocksize: %ld\n",(uint64_t)unit->logicalSectors,unit->blockSize);
} else{
Info("INIT: LBAs %ld Blocksize: %ld\n",(ULONG)unit->logicalSectors,unit->blockSize);
}
if (buf) FreeMem(buf,512);
return true;