Commit graph

58 commits

Author SHA1 Message Date
CTCaer
5392971c2c hekate/nyx: utilize emmc_end 2022-10-11 04:19:29 +03:00
CTCaer
28167b7304 hekate/nyx: move emmc ops to bdk and adhere to changes 2022-01-20 13:15:04 +02:00
CTCaer
943f675046 hekate/main: move sd ops into bdk 2022-01-20 12:49:18 +02:00
CTCaer
5894062b93 hekate/nyx: utilize bdk global header 2022-01-16 00:04:34 +02:00
CTCaer
05ce867064 hekate: move emummc config load inside relevant functions
This ensures that hekate can re-read it in case of sd card swap while in TUI and also doesn't read it if not needed.
2021-09-26 12:23:54 +03:00
CTCaer
05c989a1ce emummc: correct id size and also set id if emupath is used
This corrects a truncation that was happening and also if `emupath` key is used to change emuMMC on the fly, it now uses the path as id instead of 0.
2021-09-20 11:41:48 +03:00
CTCaer
833dda7e7c nyx: bpmp: automatically find best clock for t210
There were 4 reports of Nyx hanging or UMS and backup verification failing because of low binned Erista SoC.

This change reduces clock for hekate main and Nyx will now automatically try and find a working one.
In case Nyx hangs it will reduce it on next inject.

If Nyx works and user still has issues with UMS/Verification, manually editing nyx.ini and setting `bpmpclock=2` will fix that.
2021-05-11 09:32:38 +03:00
CTCaer
6981c59de3 gpt: properly check that GPT is valid 2021-03-17 09:14:50 +02:00
CTCaer
c6ec175045 Bump hekate to v5.5.4 and Nyx to v1.0.0 2021-02-06 17:32:07 +02:00
CTCaer
8cd438146d sdmmc: Use global emmc storage in various places 2021-02-06 03:19:42 +02:00
CTCaer
15a7e49dde fatfs: Add simple GPT support
This allows for a simple GPT parsing and checking first partition to see if it's FAT based.

This allows hekate booting GPT with tiny size cost.
2021-02-05 23:27:52 +02:00
CTCaer
a85891ae00 Refactor AutoRCM tools 2020-12-26 16:38:21 +02:00
CTCaer
638a3909c5 Refactor various variables and names 2020-07-17 18:00:32 +03:00
CTCaer
6e256d29c7 Utilize hekate's BDK for hekate main and Nyx 2020-06-14 16:45:45 +03:00
CTCaer
185526d134 Introducing Bootloader Development Kit (BDK)
BDK will allow developers to use the full collection of drivers,
with limited editing, if any, for making payloads for Nintendo Switch.

Using a single source for everything will also help decoupling
Switch specific code and easily port it to other Tegra X1/X1+ platforms.
And maybe even to lower targets.

Everything is now centrilized into bdk folder.
Every module or project can utilize it by simply including it.

This is just the start and it will continue to improve.
2020-06-14 15:25:21 +03:00
CTCaer
28f2fb1468 emummc: Fix issue with emu_path corrupting bss 2020-06-14 13:32:04 +03:00
CTCaer
ad5a50ecd9 emummc: Bail if emummc is not enabled 2020-06-14 13:31:16 +03:00
CTCaer
21548545fc Equalize hekate main and Nyx sd based functions 2020-06-13 18:32:40 +03:00
CTCaer
7dd3178d48 Equalize hekate main and Nyx common functions 2020-06-13 18:16:29 +03:00
Dave Murphy
cc54df87d7 fixes for compiling with gcc 10
gcc 10 no longer lets you get away with not externing global variables in header files. This adds the necessary extern and adds defines in appropriate c files
2020-05-08 23:32:44 +01:00
CTCaer
7543234401 emummc: Fix emupath folder and add more checks
The checks are checking if the emuMMC was found. If it didn't  and error will be show.
2020-05-05 19:23:31 +03:00
CTCaer
822e0dcd98 Various small fixes 2020-05-05 19:11:39 +03:00
CTCaer
ec53aa86dd emmc: Use gpt struct and only add valid entries
Additionally keep track of partition index
2020-04-30 01:29:58 +03:00
CTCaer
96654d9620 nyx: Throw a warning if SD Card in 1 bit mode 2020-04-30 01:05:22 +03:00
CTCaer
ce97b97c8d sdmmc v2: Add full SD card fallback initialization
hekate main always runs in compatibility mode (SDR82).
This ensures speed on boot process.

Nyx will first try SDR104.
If the sd card is a sandisk U1 and fails, it will try the compatibility mode.
After that it fallbacks to lower bus speeds.

Both support 1bit mode for broken sd card readers.

Having the new error checking in the sdmmc driver, allows for all that to work.
It can now fail instead of continuing, like how HOS reacts.
2020-04-30 00:00:00 +03:00
CTCaer
034f680a8e sd fs: Move sd init/mount/helpers to their own object 2020-04-29 23:20:18 +03:00
CTCaer
7d17e34dee sdmmc v2: Add eMMC overclocking 2020-04-29 22:11:23 +03:00
CTCaer
d0a16a49b6 sdmmc v2: Add error checking for all cases 2020-04-29 22:09:36 +03:00
CTCaer
10e7e06048 sdmmc v2: Move address alignment check in driver 2020-04-29 21:46:25 +03:00
CTCaer
eac6426125 sdmmc v2: Driver fixes 2020-04-29 21:43:07 +03:00
CTCaer
88b01994bd sdmmc v2: HW driver fixes 2020-04-29 21:39:03 +03:00
CTCaer
66780bb4c2 sdmmc v2: Refactor and fix registers 2020-04-29 21:23:28 +03:00
CTCaer
7f26981fa1 sdmmc v2: Refactor function names and vars 2020-04-29 21:16:44 +03:00
CTCaer
5b0a0070c7 sdmmc v2: Refactor everything 2020-04-29 18:53:29 +03:00
CTCaer
4160037c81 emummc: Add boot entry emuMMC selection
Using the key `emupath` on a boot entry will load the selected emuMMC.
This can also be forced by using the correct boot cfg storage bit and writing the path at the emummc path offset. Check readme for these.

This can only be used if the emuMMC was created via Nyx. because of the raw_based and file_based files that have emuMMC info.
(emupath=emuMMC/RAW1, emupath=emuMMC/SD00, etc)
2020-04-27 09:30:53 +03:00
CTCaer
ae656a0f81 types: User a proper struct for MBR partition table 2020-04-27 08:58:37 +03:00
CTCaer
9c6931a17c Bugfixes
The fan driver change ensures power off in any situation where a chainload software re-enables the 5V regulator.
2020-03-21 22:28:50 +02:00
CTCaer
f256bd5909 Move all I/DRAM addresses into a memory map
Many addresses were moved around to pack the memory usage!
2019-12-08 02:23:03 +02:00
Kostas Missos
bc7dec2e61 bpmp: Add forcable maintenance
+ Fix build issues
2019-12-07 01:47:44 +02:00
CTCaer
0b1eebefe1 Small refactor and bugfixes 2019-12-04 21:31:39 +02:00
CTCaer
9a082c1b18 hos: Improve errors more for HOS launch 2019-12-04 17:46:12 +02:00
Kostas Missos
7c42f72b8a refactor: Remove all unwanted whitespace 2019-10-18 18:02:06 +03:00
CTCaer
23e246f224 i2c: Add missing clocks + more refactoring 2019-09-12 23:11:17 +03:00
CTCaer
a8d529cf6a Refactoring and comment adding 2019-09-12 23:08:38 +03:00
Kostas Missos
718e502983 Add more register names + refactoring 2019-09-09 16:56:37 +03:00
CTCaer
02826dd9a6 sdmmc: Streamline power cycle wait for Sandisks U1 2019-08-28 02:39:43 +03:00
ctcaer@gmail.com
bd7f572989 [emuMMC] Add support 2019-06-30 03:24:58 +03:00
ctcaer@gmail.com
8101fd3f7f Various bugfixes 2019-06-30 03:15:46 +03:00
ctcaer@gmail.com
03268c4655 Bump version to v4.10.1 2019-04-23 18:23:17 +03:00
ctcaer@gmail.com
25f6e91677 [sdmmc] Fix Sandisk U1 fast power cycle
Some Sandisk U1 sd cards do not behave nicely if they power cycle too fast. A min 100ms wait, is enough to mitigate that.

Fortunately, because of how the code paths are structured, this was never hit.
2019-04-23 03:31:16 +03:00