Tony Wasserka
1915b8b02e
Stratosphere: Prefer move-construction over copy-construction when moving sink parameters around
2018-06-16 20:43:34 +02:00
Tony Wasserka
5734c54188
fs.mitm: Replace more raw loops with algorithms
2018-06-16 20:43:28 +02:00
Tony Wasserka
c950998c91
Stratosphere: Use unique_ptr
2018-06-16 20:42:41 +02:00
Tony Wasserka
05f908da1f
Stratosphere: Replace more raw loops with algorithms
2018-06-16 20:42:26 +02:00
Tony Wasserka
c66b30a31d
fs.mitm: Use vector::emplace_back rather than push_back
...
emplace_back constructs elements in-place, hence avoiding a redundant element copy.
2018-06-16 20:41:42 +02:00
Tony Wasserka
a69a054809
fs.mitm: Use unique_ptr (fix memory leak along the way)
...
The previous code was using "delete" rather than "delete[]"
2018-06-16 20:41:42 +02:00
Tony Wasserka
e78bd11a05
Stratosphere: Simplify initialization
2018-06-16 20:41:42 +02:00
Tony Wasserka
98ea14e880
fs.mitm: Simplify initialization
2018-06-16 20:41:42 +02:00
Tony Wasserka
1fdb9696b5
fs.mitm: Use unique_ptr
2018-06-16 20:41:42 +02:00
Tony Wasserka
0b41d57b0c
fs.mitm: Use enum class some more
2018-06-16 20:38:00 +02:00
Tony Wasserka
4d2096d685
fs.mitm: Turn RomFSSourceInfo::Cleanup into a destructor
...
This obsoletes the need for a custom deleter in other places
2018-06-16 20:37:33 +02:00
Tony Wasserka
bb890efc40
fs.mitm: Use enum class
2018-06-16 20:37:33 +02:00
Tony Wasserka
e71758a1f3
fs.mitm: Use variant
2018-06-16 20:37:33 +02:00
Tony Wasserka
f65983c5a7
Stratosphere: Add a utility predicate function to test for equality with a reference element
...
This can be used to rewrite some common raw loops using algorithms instead
2018-06-16 20:37:33 +02:00
Tony Wasserka
0de99b0006
Stratosphere: Replace more raw loops with algorithms
2018-06-16 20:32:38 +02:00
Tony Wasserka
c10dca48fe
Stratosphere: Use modern C++ idioms in some places
...
* algorithms like std::for_each are used instead of raw loops
2018-06-16 20:23:40 +02:00
Michael Scire
f41b780c0a
PM: Fix remaining issues, now works properly again.
2018-06-15 00:47:07 -06:00
Michael Scire
4d36697080
Make PM Compile. Note: Currently broken.
2018-06-14 23:32:01 -06:00
Michael Scire
c2d9ac8f5c
fs.mitm: WIP LayeredFS impl (NOTE: UNUSABLE ATM)
...
Also greatly refactors libstratosphere, and does a lot of other things.
There is a lot of code in this one.
2018-06-14 17:51:18 -06:00
TuxSH
82b248aeac
Merge pull request #138 from desowin/sdmmc-frequency
...
Rework sdmmc clocking configuration
2018-06-13 17:31:19 +02:00
Michael Scire
237ff0d1e7
libstratosphere/fs.mitm: Push WIP support for Domains. Not yet fully working.
2018-06-12 16:01:04 -06:00
Tomasz Moń
206c10f333
Rework sdmmc clocking configuration
...
Use 204 MHz as host clock in SDR104 mode instead of 136 MHz.
Due to this, also change the frequency init divider so the
initialization frequency is below 400 kHz.
This makes the clocks for SDMMC1 in all modes to match the TRM table.
Make it clear in the code that HS200/HS400 modes in fact use PLLP_OUT0
and not PLLC4_OUT2_LJ like the comment suggest. In fact selecting the
PLLC4_OUT2_LJ as clock source results in freeze after switching to
HS200/HS400 mode. This is most likely related to the PLLC4 not being
enabled, but it should be checked later.
Set the HS200/HS400 divider to 3, as this is what the code really did
set prior to this change - so this commit does not change that.
Configure Legacy 12 MHz clock to run at 12 MHz using the SW default
configuration (as per TRM) for the SDMMC legacy timer.
Introduce initial version of sdmmc_host_clock_delay() in order to use it
in places where the wait is host clock dependent. The way it is
implemented now does not change the sleep that was used instead.
2018-06-12 17:20:15 +02:00
Max K
d8c9399cff
fusee: Run periodic autocal only on the uSD controller ( #137 )
2018-06-10 21:09:48 -07:00
Michael Scire
5c80016c81
fs.mitm: Add HANS-style redirection for System Data Archives.
2018-06-10 11:11:23 -06:00
hexkyz
ceb93867b4
Merge pull request #132 from tslater2006/master
...
Add sdmmc_dump_regs function
2018-06-10 16:21:18 +01:00
hexkyz
80be253c1e
Merge pull request #134 from desowin/sdmmc-stage2
...
Fix race conditions and misconfiguration in sdmmc
2018-06-10 16:19:20 +01:00
Michael Scire
931e38742b
fs.mitm: Fix sm^H^Hfshax
2018-06-10 03:12:34 -06:00
Michael Scire
3cbdf0b2b9
fs.mitm: Get Title ID on fsp-srv init, Add worker to handle subinterfaces.
2018-06-10 03:07:15 -06:00
misson20000
ec78fa5977
sm: add compile-time option to put a lower bound on session limits, which lets us do things like accessing fsp-ldr without killing ldr. ( #136 )
...
This time with style fixes.
2018-06-10 00:29:42 -07:00
Michael Scire
548903e3fb
fs.mitm: Remove debugging test, fix postprocessing.
2018-06-10 01:19:29 -06:00
Michael Scire
ff9412feef
fs.mitm: Add hook for postprocessing mitm messages.
2018-06-10 01:17:00 -06:00
Michael Scire
40a6b7bb54
fs.mitm: Fix pointer buffer size passed to mitm'd commands
2018-06-09 19:36:01 -06:00
Michael Scire
6a58307d83
fs.mitm: Remove unnecessary permissions from json.
2018-06-09 19:34:25 -06:00
Michael Scire
c1c211f542
fs.mitm: Implement basic passthrough framework for input commands.
2018-06-09 19:33:22 -06:00
Tomasz Moń
804a40830e
Fix race conditions and misconfiguration in sdmmc
...
Properly configure pull up and pull down offsets for autocal.
Run autocal prior to every transfer.
Prevent race conditions in sdmmc_wait_for_event() - make sure the fault
handler has highest priority, then the target irq, state conditions and
finally the error mask.
Do not clear all bits (|=) when acknowledging fault conditions,
only acknowledge the fault conditions itself.
Enable interrupts before preparing command registers - if sdmmc is fast
enough it can actually finish transfer before we enabled the interrupts.
Enabling interrupts clears the COMMAND COMPLETE status bit.
Temporarily print all the sdmmc messages in stage2 - for yet unknown
reason respecting the log level results in some failures.
This results in working microsd card in stage2 on my switch with Samsung
EVO+ 256GB microsd card.
2018-06-09 17:37:53 +02:00
Timothy Slater
a79d3454d8
Switched to mmc_debug, and use inttypes
2018-06-08 07:50:36 -05:00
misson20000
28d630a23e
pm: add Atmosphere GetProcessHandle command to pm:dmnt ( #133 )
2018-06-07 23:32:45 -07:00
SciresM
e964bcf872
Remove credit by request.
2018-06-07 20:55:57 -06:00
Tony Wasserka
d55245a50d
Add component overview to the readme ( #131 )
2018-06-07 15:57:09 -07:00
Timothy Slater
7df8ca7c4b
use printf instead of printk for secondary
2018-06-07 13:05:41 -05:00
Timothy Slater
ca907077af
Add sdmmc_dump_regs function
2018-06-07 12:55:29 -05:00
TuxSH
f5163fa35d
Merge pull request #126 from desowin/sdmmc-autocal
...
Make sdmmc autocalibration follow TRM procedure
2018-06-06 18:09:00 +02:00
Tomasz Moń
7b9dcd2f1a
Make sdmmc autocalibration follow TRM procedure
...
Sleep for 1 us, not 1 ms.
Timeout after 10 ms, set driver strength code values according to TRM.
Fix typo (mS) - time is in milliseconds, not milliSiemens.
2018-06-05 19:07:14 +02:00
TuxSH
0491a21a99
Fix logic bug in stage2's main function
2018-06-05 16:18:02 +02:00
Max K
6b7da2887f
package2 verification and ini1 merging fixes ( #125 )
...
* fusee: Incremet offset while reading kip1s
* fusee: Pass package2 section data along with the decrypted metadata
2018-06-04 14:04:44 -07:00
hexkyz
ec164b8606
Fix credits
2018-06-04 19:31:08 +01:00
TuxSH
b2139ed182
Pass screen status and mmc struct from stage1 to 2
2018-06-04 19:17:23 +02:00
hexkyz
116eb6c67c
Merge pull request #73 from Resaec/uart
...
Add UART register enumerators
2018-06-04 16:33:43 +01:00
hexkyz
7e5fda86b2
Merge pull request #114 from desowin/sdmmc-errata
...
Set SDMMC controller to SDR104 as a workaround
2018-06-04 16:20:19 +01:00
hexkyz
bfaa618749
Merge pull request #121 from langerhans/lh/kernel-hash-4x
...
fusee: Add kernel hash for 4.x
2018-06-04 16:17:22 +01:00