Commit graph

279 commits

Author SHA1 Message Date
CTCaer 51985ed2ca sdmmc v2: Bus/IO clock refactoring and fixes
Use the exact same clocks with HOS and utilize low jitter clock parents.

Add back our compatibility mode and the missing timeout clock parent.

Hekate main will continue to use PLLP clock parent for all.
2020-04-30 01:26:55 +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 5442547a59 sdmmc v2: Name eMMC physical partitions 2020-04-29 22:06:33 +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 0462f3b252 Add simple exception handling
This adds support for exception handling.
It should provide simple and fast reporting of crucial info and full restoration without powering off.
2020-04-27 09:56:19 +03:00
CTCaer 9a5cfdff4c gpio: Upgrade GPIO driver
Use macros to get bank addresses and add full configuration support.
2020-04-27 09:51:25 +03:00
CTCaer cb3b1bf6e1 irq: Add Legacy Interrupt Controller driver 2020-04-27 09:49:00 +03:00
CTCaer b4d2df8111 Name various t210 registers 2020-04-27 09:47:47 +03:00
CTCaer cadb95e3ce hos: Add emummcforce key
This disallows booting if emummc.ini is missing or emuMMC is disabled. Useful when sysmmc must be avoided at all cases.
2020-04-27 09:44:06 +03:00
CTCaer f148757110 hos: Disallow booting CFW if normal FS and exFAT sd
This will stop black screens when user boots CFW with an exFAT sd card and without having the exFAT microupdate.
2020-04-27 09:41:13 +03:00
CTCaer 6e538cd291 hos: Improve kip patching
Allows more kip names to be added. To use it on them you will need to dump the kips via the Dump pkg1/2 function and then sha256 to get the hash.
The name must be used as is, otherwise the name compare will fail.

Because of that, also allow unordered parsing and gluing.
2020-04-27 09:38:09 +03:00
CTCaer 62a73ee612 ini: Always clear the section allocations 2020-04-27 09:33:21 +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 a4c90aeff3 Bump hekate to v5.1.4 and Nyx to v0.8.7 2020-04-14 21:34:59 +03:00
CTCaer bfe13981bc Disable some options from TUI to lessen codesize v2 2020-04-14 18:11:34 +03:00
CTCaer ef11dd883a Allow bypassing empty battery charging 2020-04-14 17:55:31 +03:00
CTCaer 9af4c717a8 util: Add btn_read_vol 2020-04-14 17:51:42 +03:00
CTCaer 281e5a138e sept: Create sept folder if missing 2020-04-14 17:45:34 +03:00
CTCaer e7f8b2c6c2 hos: Add HOS 10.0.0 support 2020-04-14 17:43:43 +03:00
CTCaer 3d9c64d548 hos: Use a new method to get kernel/ini1 offsets 2020-04-14 17:40:41 +03:00
CTCaer 5f142b4c86 main: Add empty battery screen
This disables low battery monitor shutdown (LBM shutdown) on boot and checks if battery is enough.

The logic is as follows:

If battery is not enough:
- If not charging and 15s pass, it will re enable LBM shutdown and power off.
- If charging, it will wait until it is charged above the limit.
 Screen will auto turn off to save power. A press on Power button or a change on charger, will enable it for another 15s.

If battery is enough:
- Enables LBM shutdown and continues with the boot process.
2020-04-06 05:54:45 +03:00
CTCaer 52c506af9a tools: Force sparse verification on TUI
Additionally, because the tool relies 100% on sd card, it will become a Nyx only. Remove the config also, as it will be moved to nyx configuration.
2020-04-06 05:36:09 +03:00
CTCaer 9c2202fa39 Bump hekate to v5.1.3 and Nyx to v0.8.6 2020-03-21 22:30:39 +02: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 d50af46b03 chnldr: Support variable sizes of coreboot.rom 2020-03-21 22:18:40 +02:00
CTCaer 3405910f4c hwinit: Disable SD Card power on boot
Fixes issues with warmboot based reboots.
2020-03-21 22:13:18 +02:00
CTCaer 52874f9113 minerva: More protections 2020-03-21 22:10:06 +02:00
CTCaer a8db070755 fss: Fix launching CFW on sys for < 7.0.0 2020-03-21 13:15:24 +02:00
CTCaer f5040f1e41 Update and add missing copyrights
Probably more need to change.
2020-03-14 09:24:24 +02:00
CTCaer 144d6fd3f6 i2c: Update drivers
Adds support for 8 byte transfers needed by touch driver changes.
2020-03-13 10:25:27 +02:00
CTCaer 8b74c487eb exo: Add support for fatal version AFE2 2020-03-09 09:09:25 +02:00
CTCaer 8abda7f259 fss0: Support experimental content
Use key `fss0experimental=1` in a boot entry with `fss0=` defined to enable experimental content.

(Older versions of hekate will just skip any experimental content.)
2020-03-09 08:58:12 +02:00
CTCaer 3f10cc774b Bump hekate to v5.1.2 and Nyx to v0.8.5
Additionally disable archive bit fix tool in hekate main to shave binary size.
The archive bit fix in Nyx is the only maintained one and so the only one that should be used.
2020-03-03 04:42:01 +02:00
CTCaer f3802ec464 lists: Fix list member iteration with no entries 2020-03-03 04:24:38 +02:00
CTCaer 6a52d44da6 heap: Fix edge case of reusing first node
There is an edge case fixed where the whole would be freed and this would make use of a nullptr.

Additionally, remove usage of reserved names for vars and add comments on how it works.
2020-03-03 04:16:20 +02:00
CTCaer 03a8a11933 Small fixes and changes
- Allow printing of more log on HOS boot when LOGS are OFF.
- A small name refactoring
- Add battery warning symbol when battery < 3200mV
2020-03-03 04:11:13 +02:00
CTCaer c474e35732 hos: 9.2.0 support 2020-03-03 03:32:45 +02:00
CTCaer 4c1f67d022 Fix build errors 2020-01-19 15:22:59 +02:00
CTCaer 91759aba95 r2p/update: Fix check for the 'if not forced' case
This fixes the following case:
When force is 0 and the payload is not hekate, the function jumps to the 'is old' check.

This skips the is magic value check and only does the version check.

In case the foreign payload has a low value on that offset, it causes an overwrite which is unneeded.
2020-01-17 09:35:16 +02:00
CTCaer 5a9bbaf900 fss0: Fix parsing Sept from fusee-secondary 2020-01-17 09:27:53 +02:00