Skip to content
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

[RFC] Basic GPT support #192

Merged
merged 11 commits into from Feb 5, 2016
Merged

[RFC] Basic GPT support #192

merged 11 commits into from Feb 5, 2016

Conversation

GerbilSoft
Copy link
Contributor

During the discussion of NTFS support in Issue #38, @hito16 suggested adding support for GPT. After a few hours of work, I came up with this batch of commits that adds basic GPT support to both the loader and kernel.

Limitations:

  • Only the first four partitions are checked.
  • Sector count is still limited to 32-bit, so there's still a limit of 2 TB for 512-byte sector drives and 8 16 TB for 4096-byte sector drives. I'll look into fixing this limit later.

I tested this with a 4 GB SDHC card partitioned using GPT with a single FAT32 partition. Animal Crossing loaded and ran as expected, and Nintendont saved a virtual memory card in the right place.

I also rebased libcustomfat to 1.0.14. There's a few LFN fixes and small optimizations.

Nintendont customizations have been retained.
This is currently limited, as it only checks up to the first four
partitions in the GPT. In addition, partitions that have LBAs
over the 32-bit limit will be skipped due to limitations elsewhere
in libcustomfat and the USB/SD storage modules.

bit_ops.h: Added a 64-bit byteswapped read, which is necessary due
to the use of 64-bit values in GPT.
Basically the same code as in libcustomfat, so the same limitations.
32-bit sector count; only the first four partitions are checked.

integer.h: Added 64-bit types.

ff.h: Added 64-bit integer load/store macros.
Compiled with devkitPPC r27 and devkitARM r45.
Similar to kernel/ff.c. Makes it slightly easier to maintain the
GPT-specific code.
Compiled with devkitPPC r27 and devkitARM r45.
@GerbilSoft
Copy link
Contributor Author

Merged in latest changes from FIX94/Nintendont and recompiled loader.dol. (upstream commit 3228848)

FIX94 added a commit that referenced this pull request Feb 5, 2016
@FIX94 FIX94 merged commit 779ea8b into FIX94:master Feb 5, 2016
@FIX94
Copy link
Owner

FIX94 commented Feb 5, 2016

great stuff, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants