Commit graph

540 commits

Author SHA1 Message Date
Michael Scire
901723621c fusee: hide non-error logs behind splash screen (closes #328) 2019-01-26 00:50:38 -08:00
Michael Scire
3f6325c358 fusee-secondary: reboot to fusee-primary, instead of rcm 2019-01-26 00:21:34 -08:00
Michael Scire
ea02f389ac fusee-primary: reboot to self, instead of to RCM 2019-01-25 23:51:28 -08:00
Michael Scire
d349bdb1f8 fusee/exo: build warmboot, use instead of Nintendo's. 2019-01-22 05:38:27 -08:00
TuxSH
d0505d3c11 Revert "Merge pull request #313 from jul2003/master"
This reverts commit dad67de8af, reversing
changes made to af55d5872c.
2019-01-22 05:38:27 -08:00
jul2003
d1abc53d33 devkitARM r50-3 buildfix 2019-01-22 05:38:27 -08:00
The Dax
3ce32d2014 DevkitARM r50-2 buildfix. 2019-01-22 05:38:27 -08:00
Michael Scire
e0f1e637f7 Add single source of truth for target firmwares. 2018-12-17 12:40:06 -08:00
Michael Scire
0ef3368893 fusee: retry tsec key generation on failure. 2018-12-07 14:54:06 -08:00
Michael Scire
4827fd71b4 fusee: Fix race condition involving volatile reads 2018-12-07 14:27:46 -08:00
hexkyz
00aa283a54
fusee: Fix KFUSE clock. 2018-12-07 22:18:01 +00:00
hexkyz
ef373d954f
fusee: Fix KFUSE clock. 2018-12-07 22:17:06 +00:00
Michael Scire
903789cf6e fusee: fix error printing pre-SD card init (closes #289). 2018-12-04 04:01:22 -08:00
Michael Scire
49ba3a86e2 fusee: move BCT.ini/secondary into atmosphere/ 2018-12-04 03:55:01 -08:00
Michael Scire
021d84ff04 fusee: remove duplicate hook 2018-12-01 21:39:29 -08:00
Michael Scire
8ecf68cb65 fusee: Add support for 1.0.0-7. 2018-12-01 21:38:28 -08:00
Michael Scire
bd76e73b25 fusee: fix configuration typo 2018-12-01 13:58:09 -08:00
Michael Scire
33b7e227d4 fusee: do PMC reboots, not CAR reboots. 2018-11-30 06:34:20 -08:00
Michael Scire
5201803685 fusee: auto-apply nogc if fuses say we should. 2018-11-30 04:36:29 -08:00
Michael Scire
72f028efae fusee: Implement built-in support for togglable nogc patches 2018-11-30 04:10:23 -08:00
Michael Scire
72a2c10896 exosphere: Add support for enabling debugmode via BCT.ini 2018-11-30 03:10:27 -08:00
hexkyz
ed37706915 fusee: Add full 6.2.0 support via SMMU virtualization. 2018-11-29 23:32:31 +00:00
SciresM
ab33329129
Merge pull request #266 from Atmosphere-NX/fatal
Implement custom fatal sysmodule.
2018-11-29 12:04:40 -08:00
Michael Scire
767a4b3606 fusee/exo: BYOK support for 6.2.0. Proper support TODO. 2018-11-25 22:37:24 -08:00
Michael Scire
c3569ec5e2 fusee: support getting old tsec key from new tsec fw. 2018-11-25 16:22:47 -08:00
hexkyz
982797df31
fusee: Fix custom splash screen loading. 2018-11-19 20:05:47 +00:00
hexkyz
6e7eb47d33 fusee: Minor hardware configuration fixes. 2018-11-17 21:50:31 +00:00
SciresM
c530bb8910
Merge branch 'master' into fatal 2018-11-14 14:15:01 -08:00
hexkyz
e5e9968d22 fusee: Remove obsolete MC carveout configuration.
exosphere: Fix client access for MC carveout 2.
2018-11-14 20:14:41 +00:00
Michael Scire
2838e41819 Add defines for atmosphere git revision. 2018-11-13 12:42:35 -08:00
hexkyz
b19e50e720 fusee: Implement DRAM training:
- Based on reverse engineered code and Peter De Schrijver's patches;
- Complemented with CTCaer's minerva_tc project.
2018-11-12 01:55:16 +00:00
Michael Scire
ce1a6a68bf fs.mitm/loader: Fix crashes when launching too many processes. 2018-11-08 16:02:04 -08:00
Michael Scire
6711cd93a8 atmosphere: extract API version management to common folder 2018-10-16 17:54:50 -07:00
Michael Scire
2f29bcef3a fusee: Fix IPS patching for KIPs. (closes #3). 2018-10-16 17:21:08 -07:00
Michael Scire
472059134a fusee: Hook up kip/kernel patch support (needs testing). 2018-10-16 16:17:30 -07:00
Michael Scire
b78a3f7065 fusee: Add support for loading kernel from SD 2018-10-16 16:03:23 -07:00
Michael Scire
d4d197a26a fusee: add untested, not hooked up ips code 2018-10-16 15:54:42 -07:00
Michael Scire
bfa5847e48 fusee: Greatly simplify and improve KIP loading 2018-10-16 15:08:06 -07:00
Michael Scire
49f627bb28 fusee: Load fs.mitm by default. 2018-10-16 14:19:55 -07:00
hexkyz
ca0e41e8a0 fusee: Improve integration with the new logging system
fusee: Implement log level configuration from BCT.ini
2018-09-28 21:12:59 +01:00
hexkyz
2e6983d214
Merge pull request #209 from Resaec/new_print
Silenced boot from stage 2
2018-09-28 16:26:42 +01:00
hexkyz
b2b7bf2bb3
fusee: Fix support for firmware 6.0.0 2018-09-26 21:31:18 +01:00
hexkyz
7b0ed094a7
fusee: Fix support for firmware 6.0.0 2018-09-26 21:30:53 +01:00
Resaec
1d22bb7b81
we need to strip the NO_PREFIX flag so your log_level is corrected for checking against the global 2018-09-26 02:47:24 +02:00
Resaec
81355415d0
port log.c log.h for fusee-primary
refactor printing
remove lib/printk as it is replaced with log
remove lib/driver_utils.h
added log levels as they seem right, might need adjustments
2018-09-26 02:18:50 +02:00
Resaec
d67a7c0a87
moving log.c and log.h to lib/
removing lib/driver_utils.h as it have no purpose anymore now
2018-09-26 02:13:20 +02:00
Resaec
762383f0d2
fix stray [DEBUG] at the end of sdmmc log 2018-09-26 00:25:01 +02:00
Resaec
d2355cdc9b
add the ability to print without adding a prefix for multi part/line prints 2018-09-25 23:43:52 +02:00
Resaec
1eb3d7969e
changes to fit the codestyle
improved a comment
removed unused code and imports
2018-09-24 00:02:58 +02:00
Resaec
8cc266174d
change all print* calls to use the new print with a log_level 2018-09-23 23:22:25 +02:00
Resaec
7548c8ecfa
rather call the files log.c and log.h
changed LOG_LEVEL order
export only externaly used functions
add todos
2018-09-23 23:18:41 +02:00
Resaec
840242b68e started on centralized printing/logging
some character problems with "atmosphère" and such strings
2018-09-22 05:14:43 +02:00
hexkyz
f622eac36e fusee: Finish implementing support for 6.0.0 2018-09-20 20:02:10 +01:00
hexkyz
99d36c423e
fusee: Add missing const qualifiers (thanks @aveao) 2018-09-18 16:39:18 +00:00
hexkyz
f864b0835d fusee: Add support for firmware version 6.0.0.
fusee: Implement splash screen rendering.
fusee: Add minor notes and update lz library.
2018-09-17 21:03:03 +01:00
hexkyz
39d812f434 fusee: Move nxboot hand-off to IRAM.
fusee/exosphere: Minor cleanup.
2018-09-15 21:08:58 +01:00
Michael Scire
d61ec20679 fusee: add fs.mitm kernel patches for 6.0.0 2018-09-10 15:54:14 -07:00
hexkyz
28e4d4411d Add and fix copyright notices for better GPL compliance (thanks @naehrwert and @CTCaer). 2018-09-07 16:00:13 +01:00
hexkyz
2f8edfa8e2 fusee: Minor bugfixes. 2018-09-05 20:51:03 +01:00
hexkyz
ad4605abde
fusee: Fix a bug in cluster boot code. 2018-09-04 19:16:03 +01:00
hexkyz
5542352239
fusee: Fix CAR registers' definition. 2018-09-04 19:14:29 +01:00
hexkyz
e02bfe036c
fusee: Fix CAR registers' definition. 2018-09-04 19:13:36 +01:00
hexkyz
8007480a15
fusee: Re-enable built-in PM system module. 2018-09-03 18:48:01 +01:00
hexkyz
abf57d2e43
fusee: Unmount *after* reading the splash screen. 2018-08-31 22:52:31 +00:00
hexkyz
58a42be38f
fusee: Comment out splash screen delay. 2018-08-31 22:46:08 +00:00
hexkyz
70c4e64d20
fusee: SYSCTR0 was still wrong... 2018-08-31 22:36:26 +00:00
hexkyz
97d1ca3cc9
fusee: Disable built-in PM system module. 2018-08-31 20:10:06 +00:00
hexkyz
3cf37330ca fusee: Disable AHB redirection when necessary.
fusee: Add 3.0.0/3.0.1/3.0.2 warmboot fix.
2018-08-30 19:49:33 +01:00
hexkyz
611e85e6ee fusee: Implement BootConfig and Boot Reason handling. 2018-08-29 18:28:21 +01:00
Lioncash
a400b10921 fusee-primary: Fix always false conditional in xmemmove
This was corrected in 4b8455baf9 for
fusee-secondary, but I neglected to also fix it in fusee-primary (my
bad!)
2018-08-24 22:30:36 -04:00
hexkyz
43bde3fcc9
fusee: Fix register definition. 2018-08-24 17:03:53 +01:00
hexkyz
8edec43be2 fusee: Add automatic firmware version detection. 2018-08-23 19:57:01 +01:00
hexkyz
e5bfb95c22 fusee: Add warmboot support. 2018-08-19 17:09:30 +01:00
hexkyz
320ec38be1 fusee: Complete re-write of the hardware initialization code:
- Updated code to match hekate's;
- Improved nxboot (now boots firmwares 2.x successfully);
- Temporarily disabled built-in boot system module support;
- Fixed multiple bugs.
2018-08-18 17:59:33 +01:00
hexkyz
6eac78595e
fusee-secondary: Remove restriction for loading from eMMC 2018-08-01 21:15:16 +01:00
Lioncash
4b8455baf9 fusee-secondary: Correct else-if condition in xmemmove()
Previously both the if and else conditions were the same.
2018-07-29 20:53:01 -07:00
Lioncash
bbdf2868c9 fusee-secondary/fs_dev: Correct uninitialized cast within fsdev_seek()
Previously this was casting the same unassigned variable that was being
assigned to.
2018-07-29 20:15:44 -07:00
Luke Street
a3d53fbb2c Define wait() in fusee-primary/secondary 2018-07-29 10:53:06 -07:00
hexkyz
054c65dffb
Revert unnecessary change (thanks @rajkosto) 2018-07-26 19:26:43 +01:00
hexkyz
7836609839 Fix multiple issues reported by Coverity Scan 2018-07-26 18:45:18 +01:00
hexkyz
fd88bd1d2c
fusee: Disable the SDCLK when switching to low voltage. 2018-07-24 19:06:41 +01:00
hexkyz
a2104b85ce
fusee: Disable the SDCLK when switching to low voltage. 2018-07-24 19:05:27 +01:00
hexkyz
e58927a8ab fusee: Fix SDMMC high speed support and other bugs. 2018-07-23 20:14:53 +01:00
hexkyz
3db9ce32fa Fusee: Deployed new SDMMC driver in fusee-secondary. All stages boot now.
Fusee: Fixed wrong argument in se.c function.
Fusee: Improved timers.
2018-07-19 21:07:53 +01:00
hexkyz
22ae5b861c
fusee: Correct wrong comment (thanks @desowin) 2018-07-05 16:05:38 +01:00
hexkyz
3394f0cf0d
Merge pull request #161 from TheDgtl/fix_4xx_kernel
Fix issue with fusee-secondary 4.x kernel patches
2018-07-04 22:06:11 +01:00
hexkyz
c5e9aec013 fusee: Temporarily disable anything that prevents the fusee-primary to fusee-secondary transition. 2018-07-04 22:04:41 +01:00
hexkyz
ddbbb0b758 fusee: SDMMC driver re-design:
- Based on hekate's, linux's and u-boot's source code;
- Full support for SD and MMC;
- Fixes multiple issues;
- Deployed first in fusee-primary.

fusee: Code cleanup and style fixes.
2018-07-04 21:55:27 +01:00
Drakia
6ab81e1780 Fix issue with fusee-secondary 4.x kernel patches 2018-07-01 17:50:02 -07:00
Benoit7413
0f6d4baa8e
Replace NAND by eMMC
Using NAND doens't really make sense
2018-06-26 08:49:50 +02:00
Michael Scire
9687218fbc Fusee: lfs kernel patches for 3.0.0/3.0.2 2018-06-24 16:24:22 -06:00
Michael Scire
1252c4d5e1 Fusee: Complete hashes (Thanks @Thog), lfs patches for 2.0.0 2018-06-24 15:51:29 -06:00
Michael Scire
040cfa90d3 Fusee: Add kernel patches for 1.0.0. 2018-06-24 15:20:16 -06:00
Drakia
a446aca2c4 Fix a few issues in the secondary kernel_patches.c file 2018-06-17 19:28:19 -07:00
hexkyz
fca9ed2a15
Merge pull request #145 from Traiver/master
fusee: Add 4.1.0 kernel patch definitions
2018-06-17 16:56:36 +01:00
Traiver
33af704ee2
Update kernel_patches.c 2018-06-17 15:54:06 +02:00
Traiver
57819fa345
Update kernel_patches.c 2018-06-17 14:02:08 +02:00
Traiver
0295c8a51d
Update kernel_patches.c 2018-06-17 12:38:57 +02:00
Traiver
b211a7cf05
add kernel patches for 4.1.0 2018-06-17 11:00:42 +02:00
DavidBuchanan314
20a721a4a6 fusee: correct 4.x free_code_space_offset value 2018-06-13 22:26:00 +01:00
DavidBuchanan314
58d2f8f0a5 fusee: Add 3.0.0-3.0.1 kernel hash (and free_code_space_offset) 2018-06-13 22:08:18 +01: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
hexkyz
ceb93867b4
Merge pull request #132 from tslater2006/master
Add sdmmc_dump_regs function
2018-06-10 16:21:18 +01: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
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
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
TuxSH
b2139ed182 Pass screen status and mmc struct from stage1 to 2 2018-06-04 19:17:23 +02: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
langerhans
41429e9120 fusee: Add kernel hash for 4.x 2018-06-03 16:59:21 +02:00
Michael Scire
968c86578a Fusee: Add 5.x kernel patches to allow for IPC PID mitm. 2018-06-02 20:01:44 -06:00
Michael Scire
cc69079d73 Fusee: Add mechanism for branching back at end of hook. 2018-06-02 19:11:50 -06:00
Max K
8ec3a53d73 Fix CCPLEX bringup and halt the BPMP once it's done booting. (#118) 2018-06-02 17:24:02 -07:00
Michael Scire
b3a7086b7e Fusee: Add infrastructure for applying kernel patches (needed for mitm) 2018-06-02 16:06:31 -06:00
Michael Scire
1ba8a92030 Fusee: Separate kernel patching into its own file. 2018-06-02 16:06:31 -06:00
Tomasz Moń
0534e36cf8 Set SDMMC controller to SDR104 as a workaround
According to Tegra X1 Series Processors Silicon Errata there is possible
misalignment of received data which results in a CRC error. The issue is
present only in SDR50 mode.
2018-05-27 17:43:25 +02:00
TuxSH
c9723d7b68 Refactor fusee's makefile 2018-05-27 00:59:02 +02:00
TuxSH
d57f4c54a9 Fix mmc->allow_voltage_switching assignment in sdmmc_init 2018-05-24 17:39:36 +02:00
TuxSH
4d43a86b60 Copy latest sdmmc driver to stage2 2018-05-24 01:17:13 +02:00
TuxSH
fd77e5543e Add debug comment for exosphère 2018-05-23 18:46:39 +02:00
TuxSH
16ad355f45 Unstub "Validate section hashes." 2018-05-23 18:45:53 +02:00
Kate J. Temkin
eaf8e559d6 fusee: work around some dual-init SDMMC issues 2018-05-23 07:47:02 -06:00
TuxSH
a4b1cf8b50 Stage1: fix SE issue too 2018-05-21 21:18:30 +02:00
Michael Scire
c64d7904b4 Fusee: Fix se_calculate_sha256 2018-05-21 13:07:46 -06:00
TuxSH
561fa90669 Use uintX_t for the SE & copy bugfixed SE struct definition 2018-05-21 19:05:00 +02:00
TuxSH
f39622c421 Stage2: Fix bug, add more debug printfs to nxboot. The CCPLEX doesn't turn on 2018-05-21 18:42:42 +02:00
TuxSH
5920f5a4b0 Stage2: fix various bugs in package2.c 2018-05-21 18:18:12 +02:00
TuxSH
ffd0b5df6a Fix bug in stratosphere_get_ini1, etc. 2018-05-21 17:45:05 +02:00
TuxSH
0e9a304533 stage2: package2: bypass hash checks for now 2018-05-21 17:42:10 +02:00
TuxSH
ecb83903c0 Stage1: fix potential alignment issue 2018-05-21 14:18:03 +02:00
Kate J. Temkin
ac7ee45493 fusee: improve SDR104 frequency and support AUTOCMD23 2018-05-21 04:24:50 -06:00
TuxSH
bf2c6dff25 Stage2: Add exception handlers 2018-05-21 03:50:53 +02:00
TuxSH
c1687905a3 Fix stack overflow when chainloading stage2 2018-05-21 03:42:05 +02:00
TuxSH
ea2693dd2d Fix exception handlers (thanks @fincs) 2018-05-21 03:39:18 +02:00
TuxSH
43d1816ac2 [stage1] Add exception handlers... which somehow don't work? 2018-05-21 02:24:41 +02:00
TuxSH
83d9d874e6 Fusee use CAR reboot for fatal errors 2018-05-20 23:52:09 +02:00
TuxSH
4ec7d0fc82 Remove packed when not needed 2018-05-20 22:57:25 +02:00
TuxSH
57ff5e694a Don't check for panics in stage2 2018-05-20 22:00:11 +02:00
TuxSH
3dd6ec5f6c wtf pmc reboot doesn't fully work -- display doesn't reinitialize 2018-05-20 16:56:15 +02:00
TuxSH
f45bc83bc4 Introduce fatal_error 2018-05-20 16:18:48 +02:00
Kate J. Temkin
add03d5774 fusee: correct computation of tuning block size 2018-05-20 07:21:49 -06:00
Kate J. Temkin
d5411b5b1f fusee: begin adding support for MMC HS modes 2018-05-20 07:05:35 -06:00
Kate J. Temkin
5f3fc8156c fusee: SD: implement tuning, allowing for all SD UHS-I speed 2018-05-20 07:05:35 -06:00
Kate J. Temkin
38350e769c fusee: SD driver: implement everything necessary for UHS except tuning 2018-05-20 07:05:35 -06:00
Kate J. Temkin
633c5e95ed fusee: correct constants in CAR 2018-05-20 07:05:35 -06:00
Kate J. Temkin
817c42efc2 fusee: handle SDMMC speeds sanely 2018-05-20 07:05:35 -06:00
TuxSH
ec7e0d923d Add custom panic driver 2018-05-20 14:11:46 +02:00
TuxSH
c820375a86 Make struct tegra_pmc not packed 2018-05-20 01:40:23 +02:00
TuxSH
64cdd2e63f Actually don't use memcpy in sdmmc 2018-05-19 03:10:06 +02:00
TuxSH
2a98e2e3b8 Sync sdmmc changes between stage1 and 2 2018-05-19 02:50:50 +02:00
TuxSH
2bc2fe1452 Use memcpy instead of raw casts in sdmmc.c 2018-05-19 01:33:07 +02:00
TuxSH
b4eeddd7e1 Revamp all the Makefiles (thanks @fincs @WinterMute)
... dependencies are now properly handled (e.g. header changes, etc.)
2018-05-19 01:07:27 +02:00
Kate J. Temkin
7bfdf63a71 fusee sdmmc: don't time out on long reads 2018-05-18 07:43:09 -06:00
TuxSH
e0a5acd0ba [stage2] Add more debugging printfs to package2.c, etc. 2018-05-18 00:24:06 +02:00
TuxSH
993db7ee95 Fix nxboot mkey rev misconception 2018-05-18 00:11:44 +02:00
TuxSH
ec6d05892c Refactor nxboot package2 reading, work around sdmmc issue, other changes 2018-05-17 23:18:33 +02:00
TuxSH
9ed2f92cdc [stage2] Fix some FS bugs 2018-05-17 19:53:42 +02:00
TuxSH
3dac6c9268 Fix bug in fusee: package2.c, etc. 2018-05-17 16:11:10 +02:00
TuxSH
1b07a07353 Fusee: Change package2 loading logic (untested) 2018-05-17 15:56:02 +02:00
Michael Scire
5088851de4 Fusee: fix unused var 2018-05-17 07:15:55 -06:00
Michael Scire
bb1dcb2655 Fusee: Implement BIS crypto functions. 2018-05-17 07:15:29 -06:00
TuxSH
5631b27449 Fix out-of-bounds partition r/w bugs in raw_dev.c 2018-05-17 14:39:16 +02:00
TuxSH
858b40e5fb GPT entry LBA range is inclusive 2018-05-17 14:38:19 +02:00
TuxSH
85bfbeccc3 Fix latest commit 2018-05-17 02:07:11 +02:00
TuxSH
52d2af86b6 Fix BCT version parsing 2018-05-17 01:54:19 +02:00
TuxSH
9309b0bed5 Don't overflow devoptabs, etc. 2018-05-17 01:53:32 +02:00
TuxSH
468a063c03 Load the appropriate package1 key. The warmboot fw is now properly read. 2018-05-16 23:19:55 +02:00
TuxSH
348b2457e0 Fix key derivation regression 2018-05-16 23:04:54 +02:00
TuxSH
c71e7c8c2e [stage2] Add "hexdump" 2018-05-16 19:59:14 +02:00
TuxSH
0d5796fa0b Align crypto buffers to 16 bytes in key_derivation.c 2018-05-16 19:57:36 +02:00
TuxSH
ab4518b9c1 Simplify some logic in derive_nx_keydata 2018-05-16 18:41:16 +02:00
TuxSH
c0617982b8 Fix typo in decrypting all keyblobs (thanks @tslater2006 !) 2018-05-16 16:45:44 +02:00
Michael Scire
1182ea23a5 Fusee: Fix typo when decrypting keyblobs. 2018-05-16 02:39:13 -06:00
Michael Scire
fa71e9cb15 Fusee: Decrypt all keyblobs during key derivation. 2018-05-16 02:06:59 -06:00
TuxSH
f84645e91f Simplify package1_get_encrypted_package1 2018-05-16 02:55:48 +02:00
TuxSH
34a658ce4c Fix package1_read_and_parse_boot0
Key derivation is now working
2018-05-16 01:46:08 +02:00
TuxSH
db929925f3 Fix TSEC key fetching, thanks to @rajkosto 2018-05-16 00:37:07 +02:00
TuxSH
6c50723209 Fix tsec.c (thanks @rajkosto @tslater2006), fixes #106 2018-05-15 23:59:20 +02:00
TuxSH
9a86ffec68 Fix diskio.c, etc. 2018-05-15 23:54:33 +02:00
TuxSH
42fd4f73cf Remove stray debug printf in gpt.c 2018-05-15 22:10:45 +02:00
TuxSH
60dbc7c9d7 ┬┴┬┴┤( ͡° ͜ʖ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌├┬┴┬┴ 2018-05-15 21:08:57 +02:00
Luke Street
f5ab896343 [stage2] Invert a few checks 2018-05-15 14:40:18 -04:00
TuxSH
62ebf20e25 Fix typo in nxboot.c 2018-05-15 20:24:37 +02:00
TuxSH
1288f54965 Finish writing stratosphere_get_ini1 2018-05-15 19:50:20 +02:00
TuxSH
3c0436b98f Write more code for stratosphere_get_ini1, make it and its caller take target_firmware 2018-05-15 16:09:06 +02:00
TuxSH
4e1a368b43 Write more of stratosphere_get_ini1 2018-05-15 12:38:07 +02:00
TuxSH
af2de57fdc Embed exosphere, thermosphere, loader, pm, sm into fusee-secondary
Still needs boot and boot2 to be built as proper KIPs
2018-05-15 02:45:31 +02:00
TuxSH
d9c2a54464 Make a top-level make build everything in order 2018-05-15 01:30:56 +02:00
TuxSH
172a2b679c Fix strncpy bugs in fusée, etc. 2018-05-15 01:18:05 +02:00
TuxSH
15bba0ba0c Make loadlist empty when booting Horizon, more nxboot.c code 2018-05-14 21:17:06 +02:00
TuxSH
c2b22a6bf2 Write all the needed pk1 code and a large part of the nxboot function 2018-05-14 02:40:35 +02:00
TuxSH
17f4a17d17 [stage2] Add debug printf in main.c 2018-05-14 00:06:48 +02:00
TuxSH
bc7369b5d1 [stage2] Add dump_to_file 2018-05-14 00:03:05 +02:00
TuxSH
8df624a10d Rename sd_utils to fs_utils, etc 2018-05-13 23:49:50 +02:00
TuxSH
a3792d94dc [stage2] Support sector sizes up to 4K in FatFs.
Note: SD cards always have a sector size of 512 bytes.
2018-05-13 20:51:57 +02:00
TuxSH
9f53aa13d1 [stage2] Implement disk_status 2018-05-13 20:32:38 +02:00
TuxSH
4f50d412f5 Redesign fs_dev, raw_dev, introducing device_partition and switch_fs.
In theory, one could mount an encrypted FAT partition itself coming from a disk image, etc.
2018-05-13 19:53:55 +02:00
TuxSH
396a646fa3 [stage2] Add console_get_framebuffer 2018-05-12 21:39:29 +02:00
TuxSH
9dce3b05ba [stage1] refactor diskio.c 2018-05-12 12:37:41 +02:00
TuxSH
00f08321c7 [stage2] Accomodate raw_mmc_dev to latest sdmmc driver changes 2018-05-12 12:23:07 +02:00
TuxSH
75169790ff stage1 -> stage2 again 2018-05-12 11:00:36 +02:00
TuxSH
50047dffaa [stage1] unstub multiple sector-r/w code 2018-05-12 10:52:04 +02:00
Kate J. Temkin
9f86c75ea4 fusee: undo a silly mistake in longer-than-8K operations 2018-05-11 21:36:46 -07:00
TuxSH
f6f8065417 We actually need the pk1 key 2018-05-11 23:57:48 +02:00
TuxSH
4ada3b6195
Merge pull request #93 from encounter/fix/stage2-args
Fix stage2_args_t mismatch
2018-05-11 23:38:25 +02:00
TuxSH
6e43a71b5b Fix misconception in latest commit 2018-05-11 23:12:22 +02:00
TuxSH
3ac3183c85 [stage2] Refactor key_derivation type and function declarations 2018-05-11 23:01:13 +02:00
TuxSH
eb8573093d Move sd init into diskio.c, write code for latest commit 2018-05-11 22:24:40 +02:00
Kate J. Temkin
2b871397c2 fusee: allow sdmmc_read / sdmmc_write of more data than fits in the bounce buffer 2018-05-11 11:28:13 -07:00
TuxSH
f8cf7adad7 Add code to register rawnand, boot0, and bcpkg2 2018-05-10 23:48:41 +02:00
TuxSH
a790760de3 raw_mmc_dev: fields should be u64 2018-05-10 23:23:14 +02:00
TuxSH
4168a33dd1 [stage2] Implement package1_parse_boot0 2018-05-10 22:53:46 +02:00
TuxSH
1dd073d8d2 [stage2] Add bct.h 2018-05-10 21:54:58 +02:00
TuxSH
ac9939b7a1 Apply sdmmc stage1 changes to stage2 2018-05-10 21:36:26 +02:00
Kate J. Temkin
402b69c549 fusee: actually obey the SD spec when switching voltage 2018-05-10 07:10:37 -07:00
TuxSH
5b5aa38486 [stage2] Add GPT parsing code (tested on PC) 2018-05-10 15:16:44 +02:00
Kate J. Temkin
437344fd25 fusee: support low-voltage SDMMC mode 2018-05-10 06:05:28 -07:00
Kate J. Temkin
b20a04ede5 fusee: use full bus width and faster initial clock speed 2018-05-10 06:05:28 -07:00
TuxSH
20c225c829 [stage2] raw_mmc_dev.c: fix various bugs 2018-05-10 00:36:13 +02:00
TuxSH
3e68441040 [stage2] Make console.c manage the display, enable it only when needed 2018-05-09 22:20:14 +02:00
TuxSH
4217d7feef [stage2] Unstub rawmmcdev_write 2018-05-09 20:52:21 +02:00
TuxSH
ff2472385f [sdmmc] sdmmc_handle_cpu_transfer: handle unaligned buffers 2018-05-09 20:46:16 +02:00
TuxSH
b9b13e215f Fix struct tegra_sdmmc definition
Definition errors were cancelling each other (for the most part)
2018-05-09 19:33:54 +02:00
TuxSH
3206583db3 [sdmmc] Fix const-correctness issue 2018-05-09 19:11:16 +02:00
TuxSH
7ad818ed93 Use latest sdmmc driver in stage2 2018-05-09 18:01:51 +02:00
TuxSH
694289de0b Add raw_mmc_dev (untested!) 2018-05-09 17:51:13 +02:00
TuxSH
04f9920cc3 Rename g_devices to g_fsdev_devices 2018-05-09 17:26:30 +02:00
TuxSH
3fae01b08f Rewrite condition in fsdev_seek 2018-05-09 17:10:35 +02:00
TuxSH
bf94bf48d2 Refine error in fsdev_mount_device 2018-05-09 14:16:33 +02:00
TuxSH
b2c82c75d0 Make stdout line-buffered 2018-05-09 11:49:10 +02:00
TuxSH
7560abbfbd Fix FindDevice and RemoveDevice calls in fs_dev.c 2018-05-09 11:36:49 +02:00
Luke Street
290fb356a1 stage2: fix init malloc size for stage2_args_t 2018-05-08 23:24:27 -04:00
Luke Street
6dbd8d0aae Fix stage2_args_t mismatch 2018-05-08 23:08:54 -04:00
TuxSH
3682a56062 O_RDONLY is 0 2018-05-09 00:53:13 +02:00
TuxSH
77faa00a57 Rewrite package2.c 2018-05-09 00:19:51 +02:00
TuxSH
7df879d346 Change the allocation logic in stratosphere.c 2018-05-08 18:46:54 +02:00
TuxSH
70bb496388 Refactor stage1's and stage2's main.c files 2018-05-08 16:51:43 +02:00
TuxSH
50498e3b20 Don't deinit the display yet, for now 2018-05-08 15:44:48 +02:00
TuxSH
d43255d484 Fix bug in crt0 2018-05-08 14:56:17 +02:00
TuxSH
461e886244 Make di.c accept arbitrary FB addresses, fix flickering issues 2018-05-08 13:45:37 +02:00
TuxSH
170cd2d8c4 [stage2] Forgot to change that, too 2018-05-08 13:45:37 +02:00
TuxSH
d390ead56f Fix faulty IRAM check in check_32bit_address_range_in_program 2018-05-08 13:45:37 +02:00
TuxSH
880f49cfa5 Fix inverted condition issue in check_32bit_address_range_loadable 2018-05-08 13:45:37 +02:00
TuxSH
1fd098e074 [stage1] Fix DEFAULT_BCT0_FOR_DEBUG 2018-05-08 13:45:37 +02:00
TuxSH
e8306361f0 Rewrote crt0, init, and chainloading code
start.s, init.c, linker.ld and linker.specs are meant
to be re-used by user applications, should they remove the defines
from init.c and the .chainloader* sections from the linker script
2018-05-08 13:45:37 +02:00
TuxSH
699ddfc043 Simplify fsdev_set_default_device 2018-05-08 13:44:47 +02:00