-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support aligned partition allocation (APA) #39
Comments
PFS and APA partitions can be managed from userspace using PFS Shell. https://github.com/ps2homebrew/pfsshell The linux partition types EXT2, ReiserFS, and swap are all the partition types implemented in the HDD driver. This would require support in partitioning tools e.g. |
For reference, here is the APA partition driver as implemented by SCE: https://github.com/rickgaiser/linux-2.4.17-ps2/blob/69d1691010e92b14133758864c1433042de028cf/fs/partitions/ps2.c |
Thanks, @uyjulian! I found fs/partitions/ps2.c on the
|
To remember i started to port https://gitlab.com/ps2max/linux/linux/-/blob/ps2-v3.8/block/partitions/ps2.c to latest kernel, i should be able to back to that soon. |
A problem with implementing APA in the kernel is that it may be non trivial to implement. So it may be better to have a userspace program like apascan do the mapping instead. On PS2 Linux beta kernel 2.2.1, the offset before the main partition filesystem data start is 4096 (drivers/block/genhd.c, PAGE_SIZE=4096) bytes. On both systems, the offset before the sub partition filesystem data start is 4096 (2.2.1: drivers/block/genhd.c, PAGE_SIZE=4096; 2.4.17: fs/partitions/ps2.h, PS2_PART_RESV_SUB=4 * 1024) On both systems, the data between 0 and 4096 is the APA partition header. Partitions may be fragmented. Even if the sub-partitions are together, there is still the APA header between them. |
Thanks, @mirh! @uyjulian, this repo has both
The entire block device would be available, so user space programs would work nicely regardless of APA in the kernel. The only issue is that as per #18 (comment) the ATA driver isn’t quite stable yet. :-)
Yeah, @jur mentioned in the comment mentioned above that fragments aren’t entirely supported, but that they apparently can be merged using |
Aligned partition allocation (APA) is a proprietary disk partition scheme used on the PlayStation 2. There are two kinds of partitions: main and sub partitions. A main partition can have up to 64 sub partitions. Partition sizes are restricted to powers of 2, from 128 MiB to 32 GiB. There is tooling for Linux 2.x to have game data coexist with Linux on the same disk. It needs to be reviewed for Linux 5.x.
See also #18 (comment) and ideas for a hybrid APA and GPT partition scheme.
The text was updated successfully, but these errors were encountered: