Commit Graph

3678 Commits

Author SHA1 Message Date
Michael Scire
596f5c3f52 fusee_cpp: various fixes, unpatched erista boots now 2021-09-06 16:26:50 -07:00
Michael Scire
e5106ffa2c fusee_cpp: implement package2 rebuild/kip patching 2021-09-06 16:26:50 -07:00
Michael Scire
968ced677e fusee_cpp: fix mariko mtc (mariko now gets as far as erista) 2021-09-06 16:26:50 -07:00
Michael Scire
5950ff5b5e fusee_cpp: validate mtc overlay before jumping to it.
mtc will jump back to us, so we need a compatible binary.

This also makes some changes to our layout to minimize the likelihood of
an incompatible mtc binary (I made some arbitrary .text/.rodata/.rwdata changes)
and saw identical mtc binaries, so hopefully this all works out.
2021-09-06 16:26:50 -07:00
Michael Scire
b520f5c53b fusee_cpp: emummc implies decompressed text segment 2021-09-06 16:26:50 -07:00
Michael Scire
c5d021c172 fusee_cpp: implement ips patching of kips 2021-09-06 16:26:50 -07:00
Michael Scire
07779b787a fusee_cpp: implement nogc patches 2021-09-06 16:26:50 -07:00
Michael Scire
cefdda77e5 fusee_cpp: implement KIP selection 2021-09-06 16:26:50 -07:00
Michael Scire
622650623c fusee_cpp: we're over the size limit with mtc in nv-text 2021-09-06 16:26:50 -07:00
Michael Scire
7ea9b533d9 fusee_cpp: only check pk11 header2 on mariko (thanks @slp32) 2021-09-06 16:26:50 -07:00
Michael Scire
c2a930965a fusee_cpp: import mariko mtc 2021-09-06 16:26:50 -07:00
Michael Scire
c4fee796ea fusee_cpp: begin mariko mtc work 2021-09-06 16:26:50 -07:00
Michael Scire
598edc0a46 fusee_cpp: move mtc code/used-tables to nv memory (needed for mariko downtrain fix) 2021-09-06 16:26:50 -07:00
Michael Scire
40e2d4bbe6 fusee_cpp: implement cpu startup 2021-09-06 16:26:50 -07:00
Michael Scire
648ad51056 fusee_cpp: fix some careless search/replace mistakes 2021-09-06 16:26:50 -07:00
Michael Scire
e0a41e9d33 fusee_cpp: implement exosphere load/configuration 2021-09-06 16:26:50 -07:00
Michael Scire
1dd0297db3 fusee_cpp: implement warmboot firmware load 2021-09-06 16:26:50 -07:00
Michael Scire
4355a2b036 fusee_cpp: implement read/decryption of package2 2021-09-06 16:26:50 -07:00
Michael Scire
dbad464323 fusee_cpp: list remaining tasks for setup 2021-09-06 16:26:50 -07:00
Michael Scire
565282d06e fusee_cpp: implement target firmware detection 2021-09-06 16:26:50 -07:00
Michael Scire
2f7012cbc6 fusee_cpp: implement emummc/system partition mounting 2021-09-06 16:26:50 -07:00
Michael Scire
8560713a60 fusee: implement parsing for emummc.ini 2021-09-06 16:26:50 -07:00
Michael Scire
6c5f2804ab fusee_cpp: implement all required key derivation 2021-09-06 16:26:50 -07:00
Michael Scire
51cf28339b fusee_cpp: implement tsec_keygen firmware execution 2021-09-06 16:26:50 -07:00
Michael Scire
80999988d4 fusee_cpp: skeleton the remaining code flow 2021-09-06 16:26:50 -07:00
Michael Scire
ecbf13e45d fusee_cpp: import full erista mtc logic 2021-09-06 16:26:50 -07:00
Michael Scire
237b11892e fusee_cpp: implement mtc erista patram writes 2021-09-06 16:26:50 -07:00
Michael Scire
d7192343d8 fusee_cpp: implement erista pll selection logic for mtc 2021-09-06 16:26:50 -07:00
Michael Scire
d2f3b806d6 fusee_cpp: implement inline storage of EmcDvfsTimingTables 2021-09-06 16:26:50 -07:00
Michael Scire
3bcdd0c3c8 fusee_cpp: add logic for loading mtc overlays 2021-09-06 16:26:50 -07:00
Michael Scire
4480e7a8a5 fusee_cpp: implement bpmp overclock 2021-09-06 16:26:50 -07:00
Michael Scire
1a8f886a6e fusee_cpp: Implement fatal display, reading of fusee-secondary 2021-09-06 16:26:50 -07:00
Michael Scire
ee1d1ea527 fusee_cpp: Add display init/fatal error display logic 2021-09-06 16:26:50 -07:00
Michael Scire
e7d7d8adfb fusee_cpp: cache cleanup, confirmed working on hardware 2021-09-06 16:26:50 -07:00
Michael Scire
5cff5e629b fusee_cpp: implement bpmp cache driver 2021-09-06 16:26:50 -07:00
Michael Scire
49d0a51d6b fusee_cpp: implement sd card init 2021-09-06 16:26:50 -07:00
Michael Scire
25cd3d17de fusee_cpp: implement sdram lp0 scratch param save 2021-09-06 16:26:50 -07:00
Michael Scire
3b460e94d4 fusee-cpp: minor fixes (thanks @hexkyz) 2021-09-06 16:26:50 -07:00
Michael Scire
349a16ce39 fusee_cpp: implement SDRAM initialization 2021-09-06 16:26:50 -07:00
Michael Scire
f2a1c60218 fusee_cpp: tweaks, now completes SecureInitialize on hardware 2021-09-06 16:26:50 -07:00
Michael Scire
c91f95e8f6 fusee-cpp: a little more init in SecureInitialize 2021-09-06 16:26:50 -07:00
Michael Scire
53ede217a5 fusee-cpp: finish SecureInitialize 2021-09-06 16:26:50 -07:00
Michael Scire
669564b022 fusee-cpp: implement SecureInitialize besides InitializeClock() 2021-09-06 16:26:50 -07:00
Michael Scire
c9bd97192f fusee-cpp: sketch out remainder of secure initialize 2021-09-06 16:26:50 -07:00
Michael Scire
c333a84b6b fusee-cpp: Implement mbist workaround 2021-09-06 16:26:50 -07:00
Michael Scire
3e81796db7 fusee-cpp: setup exception handlers during crt0 2021-09-06 16:26:50 -07:00
Michael Scire
5f60bc7186 fusee-cpp: add basic structural stubs 2021-09-06 16:26:50 -07:00
Michael Scire
165c926135 ams: bump version to 0.20.1 2021-08-30 07:32:35 -07:00
Michael Scire
d43bc68d0b fusee: fix MSELECT clkrst values 2021-08-30 07:24:36 -07:00
Michael Scire
c5edb031fa fusee: restore DRAM to 204MHz before starting main cpu on Mariko (closes #1600).
Nintendo's Mariko tables result in trained frequency of 1599999 instead of 1600000.

PCV checks for rate == 1600000 exactly, when doing EMC init.

Thus EMC init does not succeed if we are trained to 1600000.

PCV has a fudge factor of 1000 used in SetEmcDvfsFreq, but this is not used in InitEmcDvfs.

This failure means that PCV cannot change rate back to 204MHz before sleep, and then after
wake extremely degraded performance is observed.

Restoring DRAM to 204MHz before boot causes EMC init to succeed/fixes performance degradation.
2021-08-30 07:19:28 -07:00