Compare commits

...

3307 Commits

Author SHA1 Message Date
lsp199308
d8a37b4b71
loader: add usb 3.0 enable patches for 20.1.0 (#2556)
* loader: add usb 3.0 enable patches for 20.1.0
2025-06-03 01:04:52 -07:00
Michael Scire
b11850b3a3 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "0f72b2ceb"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "0f72b2ceb"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2025-05-28 19:34:34 -07:00
Michael Scire
77603bf7e5 docs: add basic changelog for 1.9.1 2025-05-28 19:33:49 -07:00
Marcus Carter
6b01ebca9e Clarify that code type 0xC4 uses a 64-bit value in cheats.md by formatting the key values as such
Changes the formatting of the key values at `Code Type 0xC4: Begin Extended Keypress Conditional Block` in cheats.md so that it is perfectly clear that those values are 64-bit values rather than 32-bit or 28-bit like `Code Type 0x8: Begin Keypress Conditional Block`, and also for the fact that the formatting matches the rest of the document and is thus cleaner.
2025-05-28 14:47:45 -07:00
Michael Scire
17be65b4b9 git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "a8e5f1a18"
upstream:
  origin:   "https://github.com/m4xw/emummc"
  branch:   "develop"
  commit:   "a8e5f1a18"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2025-05-28 12:29:54 -07:00
Michael Scire
409c3cf9e1 emummc: note 20.1.0 support in README 2025-05-28 12:29:17 -07:00
Michael Scire
f4e1d0bf9f kern: move spendsgir static assert 2025-05-28 12:18:51 -07:00
Michael Scire
ae65b5df0c fusee/emummc: add support for FS 20.1.0 2025-05-28 12:02:56 -07:00
Michael Scire
0a299a3d40 erpt: update IDs for 20.1.0 2025-05-28 11:48:04 -07:00
Michael Scire
801438953d kern: save/restore spendsgir in KInterruptController::Save/RestoreCoreLocal 2025-05-28 10:54:52 -07:00
Michael Scire
3fbc59cce1 kern: wait 100us after synchronizing cores before saving interrupt state on sleep 2025-05-28 10:48:42 -07:00
Michael Scire
f646d9c8f9 kern: use KLightLock for KCoreBarrierInterruptHandler 2025-05-28 10:44:31 -07:00
Michael Scire
69cc653e7f Add version enums for 20.1.0 2025-05-28 10:32:26 -07:00
Michael Scire
6da88f8f3e docs: add banner to readme 2025-05-27 22:24:41 -07:00
Michael Scire
1d3f3c6e56 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "9e8cbe3fa"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "9e8cbe3fa"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2025-05-09 12:11:13 -07:00
Michael Scire
4d4f0ba968 svc: bump supported kernel version 2025-05-09 12:05:01 -07:00
Michael Scire
cc4531e3bf git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "7522f1f60"
upstream:
  origin:   "https://github.com/m4xw/emummc"
  branch:   "develop"
  commit:   "7522f1f60"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2025-05-09 12:02:17 -07:00
Michael Scire
0e2ef545f9 fusee: commit mtc table combined bins, to remove need for running py script outside of makefile 2025-05-09 12:00:44 -07:00
Michael Scire
f1ca7db562 boot: use --embed-dir for fusee embed 2025-05-09 11:58:56 -07:00
Michael Scire
d5567b5363 pm: update for fsp-pr RegisterProgram api change 2025-05-09 11:55:21 -07:00
Michael Scire
f9165c472e docs: add gcc15 to changelog 2025-05-09 11:55:21 -07:00
Michael Scire
b2dd3b7dce boot: use #embed for fusee 2025-05-09 11:55:21 -07:00
Michael Scire
66acab02db exo: use #embed for loader stub 2025-05-09 11:55:21 -07:00
Michael Scire
2c50ef717a fusee: use embed in mtc/sdram param scripts 2025-05-09 11:55:21 -07:00
Michael Scire
d305d48a7e ams: basic support for compiling with gcc 15 2025-05-09 11:55:21 -07:00
Michael Scire
cb032006d5 fusee: fix off-by-one in nogc patches for exFAT firm 2025-05-09 11:55:21 -07:00
Michael Scire
8da6bc59a7 docs: add provisional changelog for ams 1.9.0 2025-05-09 11:55:21 -07:00
Michael Scire
b7ec64ea16 fs.mitm: add and use memlet module to temporarily steal applet memory while building romfs images.
Starting in 20.0.0, the browser needs more applet memory to function, so we can't steal as much any more.
Thus, we now steal 14 MB on 20.0.0+ instead of 40MB.

However, since this reduces memory available for custom system modules, we are adjusting to compensate.
ams.mitm's heap size has been reduced from 32MB to 12MB (recovering 20MB).
In addition, fs.mitm now uses a new mechanism for stealing memory from the applet pool while romfs is being built.

On net, we are compromising:
    * Custom sysmodules lose memory available to them.
        On 19.0.0/AMS 1.8.0, there was 30 MB available for custom sysmodules.
        Stealing 14 MB instead of 40 MB, we lose 26 MB of that. Reducing ams.mitm's usage will gain us back 20.
        Nintendo also appears to...use 4 extra MB, in 20.0.0, from my test homebrew.
        So on 20.0.0/AMS 1.9.0, there should be 20 MB available for custom sysmodules.
        On the bright side, on <20.0.0/AMS 1.9.0, I guess there will be 50 MB available for custom sysmodules now?
    * totk mods will lose the ability to...put every file in the romfs on sd card. There will be some unknown maximum filecount for totk mods.
        On the bright side, implementing the transient memory stealing should improve compatibility for some mods which strictly add files?
2025-05-09 11:55:21 -07:00
Michael Scire
bc44ffe70d emummc: fix offsets for 20.0.0-exfat 2025-05-09 11:55:21 -07:00
Michael Scire
a6847ca70e ams: add enum support for 20.0.1/18.0.1 2025-05-09 11:55:21 -07:00
Michael Scire
3af8757c3b erpt: initial support (incomplete) for 20.0.0 2025-05-09 11:55:21 -07:00
Michael Scire
f55cf42433 ldr/pm: update for 20.0.0 abi changes 2025-05-09 11:55:21 -07:00
Michael Scire
07df13e2a0 strat: update for fsp-ldr 20.0.0 changes 2025-05-09 11:55:21 -07:00
Michael Scire
791edf87a0 ncm: update to implement new ContentMetaDatabase function for 20.0.0 2025-05-09 11:55:21 -07:00
Michael Scire
b1ca5b4049 kern: plutoo is an intellectual, I am a fool, fix chicanery 2025-05-09 11:55:21 -07:00
Michael Scire
4580a352c0 kern: use callback to note pte updates in KPageTableImpl 2025-05-09 11:55:21 -07:00
Michael Scire
28296e2aac kern: refactor FindFreeArea region search logic per 20.0.0 changes 2025-05-09 11:55:21 -07:00
Michael Scire
b80f0944ab kern: update instruction cache invalidation logic in KPageTableBase to reflect 20.0.0 changes 2025-05-09 11:55:21 -07:00
Michael Scire
96d4546498 kern: reorder resource manager implementation 2025-05-09 11:55:21 -07:00
Michael Scire
86e4bed056 kern: support null resource limit in KSecureSystemResource 2025-05-09 11:55:21 -07:00
Michael Scire
2e204ccbaf kern: update synchronous exception handlers to assume FAR validity on TLB conflict 2025-05-09 11:55:21 -07:00
Michael Scire
b27999a116 kern: adjust system registers during exception handling on MTE-violation or kernel address fault 2025-05-09 11:55:21 -07:00
Michael Scire
98e5bd4411 kern: update UserspaceAccess functions for 20.0.0 changes 2025-05-09 11:55:21 -07:00
Michael Scire
4c5c5c85e3 kern: update crt0 to reflect 20.0.0 changes 2025-05-09 11:55:21 -07:00
Michael Scire
3e19e4d004 kern: update KAddressSpaceInfo to reflect 20.0.0 changes 2025-05-09 11:55:21 -07:00
Michael Scire
66fcf33a2c kern: invert meaning of KTargetSystem/KSystemControl bools 2025-05-09 11:55:21 -07:00
Michael Scire
d147f6f93b erpt: update ids for 20.0.0 2025-05-09 11:55:21 -07:00
Michael Scire
3dd5c98f52 readme: sept has not been in the project for many years 2025-05-09 11:55:21 -07:00
Michael Scire
b9b01bbbd1 loader: add usb 3.0 enable patches for 20.0.0 2025-05-09 11:55:21 -07:00
Michael Scire
6352397203 emummc: add offsets for 20.0.0 (untested) 2025-05-09 11:55:21 -07:00
Michael Scire
ef5334c3ca fusee/exo/ams: update with new keydata/version enums 2025-05-09 11:55:21 -07:00
Michael Scire
6125f40bdb ams: various fixes to support booting debug configuration 2025-04-08 13:43:29 -07:00
Michael Scire
85fd13f724 kern: update KernelLdr for 19.0.0 (new checks, dummy function call).
Also, fix a few very embarassing mistakes in kernel ldr:
* We have been mapping the page table region RWX for a few years now, accidentally.
* My attempt at making initial page tables not use bit 58 was broken in multiple ways.
2025-04-07 16:49:10 -07:00
tomvita
4e99a5e08d
Add extensions to dmnt cheat virtual machine (#2479)
* dmnt_extension

* update type 8 extension

* clearify that bit 27 does not correspond to a button

* update cheat.md with new code type 0xC4

* implement code type 0xC4

* Add type 1 extension

* remove C0Tcr6Ma aaaaaaaa VVVVVVVV (VVVVVVVV)

* Type 9 extension for floating point math

* updated according to review
2025-01-09 19:38:59 -07:00
Michael Scire
9f8d17b9e6 crypto: implement CmacGenerator 2024-10-30 18:08:29 -07:00
Michael Scire
3a5f70dceb fs: fix uninit warnings on windows localfilesystem 2024-10-29 20:00:08 -07:00
Michael Scire
e51e11a71c libstrat: re-nolto files when compiling for windows-audit 2024-10-29 19:30:30 -07:00
Michael Scire
57e15f3622 strat: ldr::PlatformId -> ncm::ContentMetaPlatform 2024-10-29 19:24:52 -07:00
Michael Scire
c6014b533f docs: add changelog for 1.8.0 2024-10-15 21:55:50 -07:00
Michael Scire
0c3608d1f4 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "989fb7be0"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "989fb7be0"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2024-10-15 21:52:50 -07:00
Michael Scire
be19749841 svc: bump supported kernel version 2024-10-15 21:51:17 -07:00
Michael Scire
7c31b21d4b git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "d248ea6f7"
upstream:
  origin:   "https://github.com/m4xw/emummc"
  branch:   "develop"
  commit:   "d248ea6f7"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2024-10-15 21:50:20 -07:00
Michael Scire
9112461620 loader: add usb 3.0 enable patches for 19.0.0 2024-10-15 21:48:59 -07:00
Michael Scire
3522ac18c1 kern: support reboot to fatal error on mariko 2024-10-15 21:48:59 -07:00
Michael Scire
e63cae5c77 kern: Perform page table validity pass during KPageTableImpl::InitializeForKernel 2024-10-15 21:48:59 -07:00
Michael Scire
c911420d6a kern: fix more page table refactor bugs 2024-10-15 21:48:59 -07:00
Michael Scire
570989384b kern: first round of page table refactor bug fixes 2024-10-15 21:48:59 -07:00
Michael Scire
4c81432e94 kern: update KPageTable::Map for new refactor 2024-10-15 21:48:59 -07:00
Michael Scire
e1e84d4450 kern: update ChangePermissions to use new iteration logic 2024-10-15 21:48:59 -07:00
Michael Scire
d2656e3948 kern: update KPageTable::Finalize for the refactor 2024-10-15 21:48:59 -07:00
Michael Scire
62abb31122 kern: use new merge pages api 2024-10-15 21:48:59 -07:00
Michael Scire
cb970049db kern: implement KPageTableImpl merge 2024-10-15 21:48:59 -07:00
Michael Scire
9610f42dc0 kern: continue page table refactor, implement separate/unmap 2024-10-15 21:48:59 -07:00
Michael Scire
02e837d82e kern: start KPageTable(Impl) refactor, use array-with-levels for KPageTableImpl 2024-10-15 21:48:59 -07:00
Michael Scire
7aa0bed869 ldr: ProgramInfo is 0x410 now, and fix debug flags for hbl 2024-10-15 21:48:59 -07:00
Michael Scire
a80d5b5c86 pm: add new 19.0.0 commands
This is functionally correct, but I have no idea what these are meant to represent.
These functions are completely unused on NX.
2024-10-15 21:48:59 -07:00
Michael Scire
77d239265d ns_mitm: update to support new 19.0.0 command 2024-10-15 21:48:59 -07:00
Michael Scire
624f8d0d8d ro: support NROs with read-only first page 2024-10-15 21:48:59 -07:00
Michael Scire
9cfd535568 kern: invoke supervisor mode thread functions from C++ context with valid stack frame 2024-10-15 21:48:59 -07:00
Michael Scire
23ba31da1f kern: add note that N ifdef'd out calling HandleException() for EL1 faults 2024-10-15 21:48:59 -07:00
Michael Scire
3b03b9603c kern: specify allowable ipc client memory attr via inverted-whitelist, not blacklist 2024-10-15 21:48:59 -07:00
Michael Scire
912b84c4e3 kern: add minimum alignment support to KMemoryManager 2024-10-15 21:48:59 -07:00
Michael Scire
ff38a32a9b kern/ldr: add support for --x executables 2024-10-15 21:48:59 -07:00
Michael Scire
2855b8ee35 kern/strat: update for new DebugFlags capability semantics 2024-10-15 21:48:59 -07:00
Michael Scire
00716576cd kern: simplify KProcess max memory calculation 2024-10-15 21:48:59 -07:00
Michael Scire
743634c3fd kern: move KTargetSystem into .rodata, split init/verify 2024-10-15 21:48:59 -07:00
Michael Scire
3394a88a1a kern: fix debug build 2024-10-15 21:48:59 -07:00
Michael Scire
a72e39d657 kern: allocate all TTBR0 pages during init, use procidx as asid 2024-10-15 21:48:59 -07:00
Michael Scire
c3fa42d958 kern: clear gicd/gicc pointers in KInterruptController::Finalize 2024-10-15 21:48:59 -07:00
Michael Scire
126cb8bbdf kern: fix KMemoryBlock ctor reorder warn 2024-10-15 21:48:59 -07:00
Michael Scire
753cf74bf2 kern: eliminate use of KMemoryInfo, shuffle KMemoryBlock fields 2024-10-15 21:48:59 -07:00
Michael Scire
70bf833070 kern: KAddressSpaceInfo now takes CreateProcessFlags in getters 2024-10-15 21:48:59 -07:00
Michael Scire
a0ad3ef949 kern/svc: update WaitForAddress to support 64-bit WaitIfEqual 2024-10-15 21:48:59 -07:00
Michael Scire
5de551db29 kern: add InfoType_TransferMemoryHint 2024-10-15 21:48:59 -07:00
Michael Scire
77d17dc4ff emummc: update for 19.0.0 2024-10-15 21:48:59 -07:00
Michael Scire
4acfac539c erpt: add new IDs/categories 2024-10-15 21:48:59 -07:00
Michael Scire
c4a5d4db09 fusee/exo/ams: update with new keydata/version enums 2024-10-15 21:48:59 -07:00
Michael Scire
10c7a39528 kern/creport: use mod0 to locate symbol table for all modules 2024-09-24 13:15:21 -07:00
Michael Scire
009f581721 creport: optimize ScopedFile performance 2024-09-23 02:41:57 -07:00
Michael Scire
027e209073 kern/ldr: enable the use of relr for relocations 2024-09-01 22:27:48 -07:00
Michael Scire
423a05a1e9 meso: fix sign-comparison warn on svc/interrupt flag compare 2024-09-01 16:27:01 -07:00
hexkyz
4617fec672 fusee: add missing mtc tables 2024-07-10 21:36:22 +01:00
Michael Scire
e85bc4db0b fusee: add nogc case for 18.1 2024-06-11 10:29:02 -07:00
Michael Scire
39c201e37f git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "bb7678691"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "bb7678691"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2024-06-10 22:19:29 -07:00
Michael Scire
ab5cc75684 git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "f23f943d4"
upstream:
  origin:   "https://github.com/m4xw/emummc"
  branch:   "develop"
  commit:   "f23f943d4"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2024-06-10 22:18:44 -07:00
Michael Scire
1e3349e99a emummc: update readme 2024-06-10 22:18:04 -07:00
Michael Scire
76628e273a ams: bump to 1.7.1 (support for 18.1.0) 2024-06-10 22:17:23 -07:00
Michael Scire
257ac2bd33 emummc: update to support 18.1.0 2024-06-10 22:16:24 -07:00
Michael Scire
9eb92f37db git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "d58ff30a1"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "d58ff30a1"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2024-06-05 11:29:13 -07:00
Michael Scire
5b135d12ca libstrat: fix more gnu++23 errors 2024-06-05 11:28:29 -07:00
Michael Scire
c41a6b80d7 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "087f68257"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "087f68257"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2024-06-05 09:22:53 -07:00
Michael Scire
05fde7b764 ams: may as well test removal of CRTP from Result 2024-06-01 22:36:37 -07:00
Michael Scire
1609f804f2 ams: build with -std=gnu++23 2024-06-01 22:36:37 -07:00
Michael Scire
f35c94810c ams: fix compilation with gcc 14 (closes #2330) 2024-06-01 22:36:37 -07:00
Michael Scire
548b48b2a6 loader: update to reflect latest 18.0.0 changes
well, this sure is late, whoops
2024-05-27 15:43:58 -07:00
Michael Scire
35d93a7c41 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "fadec2981"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "fadec2981"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2024-03-29 03:20:12 -07:00
Michael Scire
410f23035e docs: update changelog for 1.7.0 2024-03-29 03:19:17 -07:00
Michael Scire
29cc13543a kern: fix using memory config for half-of-true-size 2024-03-29 03:18:20 -07:00
Michael Scire
31ad4eec1d git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "832b24426"
upstream:
  origin:   "https://github.com/m4xw/emummc"
  branch:   "develop"
  commit:   "832b24426"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2024-03-29 02:57:53 -07:00
Michael Scire
3ccb0ae02b git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "8b85add71"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "8b85add71"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2024-03-29 02:56:10 -07:00
Michael Scire
4f7db6e60e docs: add changelog for 1.7.0 2024-03-29 02:54:40 -07:00
Michael Scire
a325e18cb5 loader: add usb3 patches for 18.0.0 2024-03-29 02:41:14 -07:00
Michael Scire
af41272591 spl: add support for new spl:es command 33 2024-03-29 02:41:14 -07:00
Michael Scire
551821e7e2 erpt: actually support non-sequential ids, nintendo why 2024-03-29 02:41:14 -07:00
Michael Scire
b081762657 emummc: update for 18.0.0 2024-03-29 02:41:14 -07:00
Michael Scire
d2c2a94c5e erpt: add new IDs/categories 2024-03-29 02:41:14 -07:00
Michael Scire
4ff9278d11 jpegdec: stop bundling (TODO post-prerelease) 2024-03-29 02:41:14 -07:00
Michael Scire
21c85c6a4f exo/fusee: apparently 18.0.0 did not burn a fuse 2024-03-29 02:41:14 -07:00
Michael Scire
05090005b7 svc: advertise support for 18.3.0.0 2024-03-29 02:41:14 -07:00
Michael Scire
c0487ad384 kern: fix whoops in new page table logic 2024-03-29 02:41:14 -07:00
Michael Scire
ecbe5cd406 kern: refactor smc helpers to share more common logic 2024-03-29 02:41:14 -07:00
Michael Scire
4fe139ea52 kern: return ExceptionType_UnalignedData on data abort caused by alignment fault 2024-03-29 02:41:14 -07:00
Michael Scire
6922eae3e7 kern: add KPageGroup::CopyRangeTo 2024-03-29 02:41:14 -07:00
Michael Scire
952188fc73 kern: implement new attr tracking for memory range/traversal context 2024-03-29 02:41:14 -07:00
Michael Scire
c0a4fc30a8 kern: simplify size calculations in KPageTableBase::Read/WriteDebugIoMemory 2024-03-29 02:41:14 -07:00
Michael Scire
0b04c89a84 kern: pass properties directly to KPageTableBase::AllocateAndMapPagesImpl 2024-03-29 02:41:14 -07:00
Michael Scire
217dd1260a kern: take alignment argument in KMemoryManager::AllocateAndOpen 2024-03-29 02:41:14 -07:00
Michael Scire
8aa62a54d8 kern/os: support CreateProcessFlag_EnableAliasRegionExtraSize 2024-03-29 02:41:14 -07:00
Michael Scire
25bae14064 kern: revise KPageTableBase region layout logic to match 18.0.0 changes 2024-03-29 02:41:14 -07:00
Michael Scire
900913fe3b kern: fix longstanding bug in ConvertToKMemoryPermission 2024-03-29 02:41:14 -07:00
Michael Scire
7562f807fd kern: pass kernel base from KernelLdr to Kernel 2024-03-29 02:41:14 -07:00
Michael Scire
cf5895e04f kern: use userspace access instructions to read from tlr 2024-03-29 02:41:14 -07:00
Michael Scire
1f37fbed1d fusee/exo/ams: update with new keydata/version enums 2024-03-29 02:41:14 -07:00
JerryWn
9701d5b2ab readme: fix broken discord icon 2024-03-20 03:04:29 -07:00
Michael Scire
c8c76bf8f8 readme: I suppose we're living in 2024, then 2024-03-04 14:51:44 -07:00
Michael Scire
0220f67085 fssrv: fix dumb assert error 2024-02-23 13:55:51 -07:00
german77
615f8a3ef3 dmnt: Fix debug log for cheats 2024-02-14 10:28:16 -07:00
Liam
000e382c42 dmnt.gen2: avoid data abort when too many breakpoints are created 2024-02-14 10:27:45 -07:00
Liam
3627356d4b dmnt.gen2: enable gdbserver QStartNoAckMode 2024-02-14 10:27:36 -07:00
Michael Scire
72b0fe6c1c strat: fix nx_debug build target 2024-01-20 13:31:12 -07:00
Michael Scire
e919b80fa2 pm: improve resource limit management accuracy
This change was made for #2255, but the issue creator never confirmed if it resolved the issue.

This *does* better reflect what Nintendo's pm does, though, so I'm going to commit it regardless.
2024-01-20 13:09:04 -07:00
Michael Scire
fc16f28d0c settings: support PortugueseBr (closes #2264) 2024-01-08 12:20:53 -07:00
Michael Scire
e09ba765a1 kern: fix various comment/style hygiene issues (thanks @liamwhite) 2023-12-27 23:24:35 -07:00
Michael Scire
3217df147e kern: allow ktrace map capability when ktrace is disabled 2023-12-27 23:17:52 -07:00
Michael Scire
1fa41c3e2a loader/ro: abort if patching would go out of bounds 2023-12-27 23:05:10 -07:00
Michael Scire
db3dc4ebd2 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "bfc558348"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "bfc558348"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2023-11-28 13:02:32 -07:00
Michael Scire
742fd16080 sf: fix ipc serialization bug (out object id offsets) 2023-11-28 12:54:00 -07:00
Michael Scire
812b2aeb4c git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "d7a02b6ca"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "d7a02b6ca"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2023-11-16 16:25:52 -07:00
Michael Scire
46a4357882 fusee: remove ips patch parsing from sd filesystem
Parsing the SD fs is very slow. In addition, the only KIPs are either a) atmosphere modules, or b) FS.

The IPS subsystem was originally designed to make nogc/etc patches work for FS,
but these are now internal, and it appears that the literal only kip patches
that exist are for piracy.

It just doesn't make sense to slow down boot for every normal user for a feature
that has no actual usecase, and especially when fusee is already so minimal.
2023-11-13 12:45:00 -07:00
Michael Scire
872c18c501 kern: fix some comment typos 2023-11-01 10:25:31 -07:00
Michael Scire
afc0e14556 kern/svc: fix query/insecure names 2023-11-01 10:24:13 -07:00
Michael Scire
f7bf379cfe git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "80bf6aeee"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "80bf6aeee"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2023-10-27 16:22:45 -07:00
Michael Scire
9f26419b1a ams: bump version to 1.6.2, add changelog 2023-10-27 16:21:57 -07:00
Michael Scire
1b057d48c6 sm: fix compat with new service macros 2023-10-26 14:44:45 -07:00
Michael Scire
0c3afff4d3 pm: update to reflect 17.0.0 internal design changes 2023-10-26 14:44:32 -07:00
Michael Scire
274f6b63f2 erpt: add remaining SubmitFsInfo helpers 2023-10-25 16:08:12 -07:00
Michael Scire
2ed8450446 erpt: SubmitFileSystemProxyErrorInfo 2023-10-25 14:21:27 -07:00
Michael Scire
60974a5f4e erpt: GetMmcErrorInfo, GetSdCard*Info 2023-10-25 12:41:18 -07:00
Michael Scire
fa384fd920 erpt: begin SubmitFsinfo (SubmitMmcDetailInfo) 2023-10-25 04:45:41 -07:00
Michael Scire
3f19db0d96 jpegdec: fix abort check on output width 2023-10-18 02:33:59 -07:00
Michael Scire
a84f725e21 jpegdec: update to reflect 17.0.0 changes 2023-10-18 02:31:26 -07:00
Michael Scire
7f61dfdb8d pm: since 15.0.0, WaitApplicationMemoryAvailable is more lenient 2023-10-17 11:25:35 -07:00
Michael Scire
c44da84869 pm: adjust resource limit function names 2023-10-17 11:10:09 -07:00
Liam
7f4450f930 haze: pretend to be able to write MTP server code 2023-10-16 17:31:09 -04:00
Michael Scire
edb4e2ea56 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "965e05b3c"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "965e05b3c"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2023-10-16 12:31:15 -07:00
Michael Scire
183f3e0d7e ams: bump version to 1.6.1 2023-10-16 12:30:35 -07:00
Michael Scire
7650c5eb96 docs: add changelog for 1.6.1 2023-10-16 12:30:18 -07:00
Liam
0ff197b300 haze: fix bMaxPacketSize0 2023-10-16 08:36:33 -07:00
Liam
d9fff85bc4 haze: use gpu console for rendering 2023-10-16 08:36:10 -07:00
Liam
c866c15856 haze: implement GetObjectPropList 2023-10-16 08:36:10 -07:00
Michael Scire
e8ac23e2ee ncm: fix two comments 2023-10-16 08:24:07 -07:00
Michael Scire
3a8cffef57 ncm: better detect + fix 17 brick after-the-fact
This adds detection for missing-save or empty-save, and rebuilds in either case.
2023-10-16 02:38:30 -07:00
Liam
13411902c9 fs: add missing stub for GetProgramId 2023-10-14 07:52:47 -07:00
Michael Scire
693fb423cb kern: fix minor sin 2023-10-12 14:25:17 -07:00
Michael Scire
8a9eb85e05 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "132558c33"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "132558c33"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2023-10-12 09:23:31 -07:00
Michael Scire
d389ef639e docs: add changelog for 1.6.0 2023-10-12 09:19:26 -07:00
Michael Scire
719858ad18 git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "9513a5412"
upstream:
  origin:   "https://github.com/m4xw/emummc"
  branch:   "develop"
  commit:   "9513a5412"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2023-10-12 09:02:30 -07:00
Michael Scire
e4d08ae0c5 erpt: amend min-version for latest CreateReportWithAttachments 2023-10-12 08:55:58 -07:00
Michael Scire
0c063db926 loader: add usb3 patches for 17.0.0 2023-10-12 08:55:58 -07:00
Michael Scire
02e987819b ncm: work around change in Nintendo save handling behavior
Static save files do not require an entry in the save data indexer to mount.
Prior to 17.0.0, save data files were considered static if userid was 0.
In 17.0.0+, only 8000000000000000 is static.

However, some users using cfw do not have an entry for 8000000000000120 in the indexer,
for various reasons (but mostly manual nand-restore, I think). Thus, on boot of 17.0.0+,
FS will say 8000000000000120 is not present (not in indexer), and NCM will create it anew.

The 8000000000000120 save will then be empty, and then the firmware can't boot.

To workaround this, logic has been re-enabled on 17.0.0+ for building the content meta database.
Thus, if the user encounters this error, the 8000000000000120 save will be emptied, but then
it will be automatically reconstructed, fixing the problem.
2023-10-12 08:55:58 -07:00
Michael Scire
2ec3e141c7 bpc.mitm/exo: support pmic reboot/shutdown on mariko (thanks @CTCaer) 2023-10-12 08:55:58 -07:00
Michael Scire
71d0274884 erpt: remove deprecated fields, they didn't actually change IDs, just the mapping between id and name table index 2023-10-12 08:55:58 -07:00
Michael Scire
05259b7519 emummc: fix offsets for 17.0.0 2023-10-12 08:55:58 -07:00
Michael Scire
59a24fa646 fusee: support parsing 17.0.0+ INI 2023-10-12 08:55:58 -07:00
Michael Scire
f5b2eab4a8 exo: fix up new titlekey option extents 2023-10-12 08:55:58 -07:00
Michael Scire
e96e1063e2 jpegdec: stop bundling (TODO post-prerelease) 2023-10-12 08:55:58 -07:00
Michael Scire
aa170a72a9 erpt: Add basic (TODO-impl post-prerelease) support for 17.0.0 changes 2023-10-12 08:55:58 -07:00
Michael Scire
9d4cb685a7 fs: update OpenCodeFileSystem abi for 17.0.0 2023-10-12 08:55:58 -07:00
Michael Scire
c95741142e ncm: update for new 17.0.0 apis 2023-10-12 08:55:58 -07:00
Michael Scire
ef9b111bbf emummc: update for 17.0.0 2023-10-12 08:55:58 -07:00
Michael Scire
114b82284d exo/spl: Add new EsCommonKeyType 2023-10-12 08:55:58 -07:00
Michael Scire
c5d7ca5159 fusee/exo: implement the usual changes for new firmware support 2023-10-12 08:55:58 -07:00
Michael Scire
6d0bf70783 kern: fix assert usage in process load 2023-10-12 08:55:58 -07:00
Michael Scire
aba6ca7329 kern: bump supported version to 17.x 2023-10-12 08:55:58 -07:00
Michael Scire
06a840e550 kern: fix operation type enum-value whoops 2023-10-12 08:55:58 -07:00
Michael Scire
11c02e22e0 kern: implement support for applying relr relocations 2023-10-12 08:55:58 -07:00
Michael Scire
f93aea4c06 kern: split Process/Thread exit to separate WorkerTaskManagers 2023-10-12 08:55:58 -07:00
Michael Scire
4ddfb6183c kern: split out GetInstructionDataUserMode in exception handler 2023-10-12 08:55:58 -07:00
Michael Scire
3737151a2f kern: Add special-case for InvalidateProcessDataCache on current process 2023-10-12 08:55:58 -07:00
Michael Scire
2a4d68f916 kern: KPageTable: remove MapFirst operation, replace with MapFirstGroup 2023-10-12 08:55:58 -07:00
Michael Scire
7b523cfc8d kern: note OnFinalize calls in KPageTable::Finalize 2023-10-12 08:55:58 -07:00
Michael Scire
39a95d4023 kern: implement new default application system resource field in KProcess 2023-10-12 08:55:58 -07:00
Michael Scire
2c5002ce50 kern: update KMemoryRegionType values for new ids + SecureUnknown region 2023-10-12 08:55:58 -07:00
Michael Scire
b7384a8667 kern: KSupervisorPageTable now checks wxn instead of setting it 2023-10-12 08:55:58 -07:00
Michael Scire
85b5f20395 kern: KPageTable::Initialize no longer takes unused process id 2023-10-12 08:55:58 -07:00
Michael Scire
ad5bd81d3f kern: implement PermissionLock, update KPageTableBase attribute/alignment checks 2023-10-12 08:55:58 -07:00
Michael Scire
777b6d285c kern: KPageTableBase::CheckMemoryState now invokes a helper 2023-10-12 08:55:58 -07:00
Michael Scire
ae2c25e9c8 kern: update KMemoryState, remove bijection (separate IoRegister/IoMemory) 2023-10-12 08:55:58 -07:00
Michael Scire
3b8f65d502 kern: update initial process load logic to do per-segment mapping/decompression 2023-10-12 08:55:58 -07:00
Michael Scire
cfd2d5b012 kern: clear new pages in init page allocator, not init page table 2023-10-12 08:55:58 -07:00
Michael Scire
c72ba35684 kern: add speculation barriers after eret 2023-10-12 08:55:58 -07:00
Michael Scire
ec96203cb7 kern: remove unnecessary fields from InitArgs (0x80 -> 0x40) 2023-10-12 08:55:58 -07:00
Michael Scire
1491a7b159 kern: on second thought, move vectors back to end of text 2023-10-12 08:55:58 -07:00
Michael Scire
0daef4a6e8 kern/ldr: move crt0 into .rodata 2023-10-12 08:55:58 -07:00
Michael Scire
4ca3c44e5f kern: pass ini1 size from loader to kernel, remove slab memset from init0 2023-10-12 08:55:58 -07:00
Michael Scire
add4b3fdc3 utils: update erpt script 2023-10-12 08:55:58 -07:00
Liam
159f8d384b dmnt.gen2: enable attach to arbitrary program id 2023-10-11 19:50:09 -07:00
Liam
92a8c8eb88 haze: implement android operations 2023-10-11 18:57:49 -07:00
Liam
9e0daff46e haze: split operations by type 2023-10-11 18:57:49 -07:00
Liam
6b72dbd22d haze: refactor constant use for cleaner separation 2023-10-11 18:57:49 -07:00
Michael Scire
ba91f070e8 mesosphere: remove nostartfiles from specs files (should only be passed to linker wrapper) 2023-09-17 09:33:56 -07:00
Michael Scire
4fe9a89ab8 docs: commit saddest changelog of all time, this is your brain on going to vacation 2023-08-21 17:30:06 -07:00
Michael Scire
de73f6c5bb git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "c3dc418a2"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "c3dc418a2"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2023-08-21 17:27:16 -07:00
Michael Scire
e488b6ee47 ams: add enum recognition for 16.1.0 2023-08-21 17:26:27 -07:00
Michael Scire
99810dc091 fssystem: fix typo error in BucketTree::Visitor::MoveNext 2023-08-15 14:47:09 -07:00
Liam
e54957285f libstrat: comment fixes for fssystem 2023-08-12 11:33:29 -07:00
Michael Scire
fca213460b libstrat: fix more minor style issues pointed out by Pharynx 2023-08-10 11:48:28 -07:00
Michael Scire
4e6bd19fcd fssystem: fix stupid issue in NodeBuffer move-ctor
Code compiles with this constructor deleted, so it wasn't used, but even so...
2023-08-03 16:58:55 -07:00
Michael Scire
8b88351cb4 mitm: fix errant include on non-hos 2023-06-06 19:32:06 -07:00
Michael Scire
63ea152349 fatal: take good idea from shrek 2023-05-19 11:47:38 -07:00
Michael Scire
3cb54e2b4b git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "f4a966eb4"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "f4a966eb4"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2023-05-14 03:17:20 -07:00
Michael Scire
e9de11a746 ams: bump version to 1.5.4 2023-05-14 03:16:27 -07:00
Michael Scire
b979b5aa36 docs: 1.5.4 changelog, zelda why the fuck 2023-05-14 03:16:15 -07:00
SciresM
f2ee44da74
romfs/ams.mitm/pm: refactor to dynamically steal heap for certain games. (#2122)
* fs.mitm: skeleton the use of special allocation in romfs build

* pm: add api for ams.mitm to steal application memory

* pm/mitm: okay, that api won't work, try a different one

* romfs: revert memory usage increases; we'll handle torture games case-by-case.

* pm/romfs: first (broken?) pass at dynamic heap.

I cannot wait to figure out all the ways this is wrong.

* Release the dynamic heap a little more eagerly

* romfs: animal crossing is also not a nice game

* romfs: fix issues in close-during-build

* romfs: zelda is a blight upon this earth
2023-05-14 03:06:52 -07:00
Michael Scire
85c23b5781 fusee: actually identify new FS 2023-05-08 18:38:13 -07:00
Michael Scire
8e042f2262 git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "30205111e"
upstream:
  origin:   "https://github.com/m4xw/emummc"
  branch:   "develop"
  commit:   "30205111e"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2023-05-08 18:25:25 -07:00
Michael Scire
81e9154a52 emummc: add enums for 16.0.3 2023-05-08 18:24:49 -07:00
Michael Scire
e9b9dbc2aa docs: add changelog for 1.5.3 2023-05-08 18:19:31 -07:00
Michael Scire
7e6c849ca4 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "cd0fc2c1d"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "cd0fc2c1d"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2023-05-08 18:06:50 -07:00
Michael Scire
8ec7c096d0 git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "d2fcc73eb"
upstream:
  origin:   "https://github.com/m4xw/emummc"
  branch:   "develop"
  commit:   "d2fcc73eb"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2023-05-08 18:05:36 -07:00
Michael Scire
6e5b901a9b emummc: support 16.0.3 2023-05-08 18:03:35 -07:00
Michael Scire
b800953d66 ams: recognize 16.0.3('s FS) 2023-05-08 17:51:13 -07:00
Michael Scire
f0240db75a fs.mitm: mitm glue for font replacement, before I forget 2023-05-08 17:40:10 -07:00
Michael Scire
1f5ec68a5c ams: fix compilation with gcc 13 2023-05-07 03:36:46 -07:00
Michael Scire
ed9e60acb9 kern: track heap in KPageTableBase::MemoryRange 2023-04-30 16:50:53 -07:00
Liam
a7300b0fa4 haze: fix file size transmission issue 2023-04-18 22:15:48 -07:00
Liam
8e2eca2004 haze: abstract firmware version and serial number fetch 2023-04-18 22:15:48 -07:00
Michael Scire
9f83b3c838 ams: I really need to automate keeping this in sync 2023-04-17 20:57:57 -07:00
Michael Scire
434c8cefc4 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "ecc8b1811"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "ecc8b1811"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2023-04-17 20:40:41 -07:00
Michael Scire
d8aed7de6d ams: add 16.0.2 enum 2023-04-17 20:40:02 -07:00
Liam
a346014dc7 haze: get serial number and firmware version from set:sys 2023-04-17 22:22:28 -04:00
Michael Scire
4b3c801e9f dist: add haze to output zip 2023-04-17 14:35:25 -07:00
Michael Scire
90db1223f6 docs: avoid unintended insinuations 2023-04-17 14:24:27 -07:00
Michael Scire
fa64a6ff4d docs: pretend to be literate 2023-04-17 14:20:16 -07:00
Michael Scire
0c6a06a0cf git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "7340e2eab"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "7340e2eab"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2023-04-17 14:19:59 -07:00
Michael Scire
5efb4a2a98 docs: bump version, 16.0.1 exists too 2023-04-17 14:19:18 -07:00
liamwhite
3b662122f9
troposphere: add haze MTP server (#2095)
* troposphere: add haze MTP server

* haze: adjust banner, new lines between class sections, single-statement if

* haze: remove additional newlines between sections

* haze: avoid use of reference out parameter

* haze: console_main_loop: style

* haze: event_reactor, file_system_proxy, ptp: style

* haze: ptp_data_builder, ptp_object_database, ptp_object_heap, results, usb_session: style

* haze: event_reactor, ptp_data_parser, async_usb_server, ptp_object_database, ptp_object_heap: style

* haze: ptp_responder: style

* haze: usb_session: style

* haze: use svc defs from vapours

* haze: misc comments

* haze: fix pointer overflow check

* haze: fix copy paste error

* haze: use alignment, invalidate cached use values in console

* haze: fix stray hex constant

* haze: misc style

* haze: fixes for windows

* haze: add GetObjectPropsSupported, GetObjectPropDesc, GetObjectPropValue

* haze: add SetObjectPropValue

* haze: improve object database API

* haze: improve WriteVariableLengthData readability

* haze: fix directory renames on windows

* haze: ptp_object_database: fix collation

* haze: event_reactor: fix size validation

* haze: ptp_responder: improve documentation

* haze: ptp_responder: avoid unnecessary fs interaction in GetObjectPropValue

* haze: ptp_responder: fix object deletion on windows

* haze: tear down sessions on suspension

* haze: prefer more specific data types

* haze: misc

* haze: fix usb 3.0 support

* haze: improve host-to-device file transfer performance

* haze: report device serial

* haze: move static_assert to requires, fix alignment
2023-04-17 14:08:05 -07:00
Michael Scire
e9b28ab4b1 kern: adjust wording to be more technically correct 2023-03-27 10:54:58 -07:00
Michael Scire
1afb184c14 docs: pretend I know how to type common words 2023-03-14 01:52:06 -07:00
Michael Scire
5e070600a9 docs: add faq.md
"Alexa, what does June 15th mean?"
2023-03-14 01:48:19 -07:00
Michael Scire
8274081e39 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "b1607dc8a"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "b1607dc8a"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2023-03-13 17:17:50 -07:00
Michael Scire
f1ad26ce84 ams: bump version 2023-03-13 17:16:51 -07:00
Michael Scire
e4c314146e docs: update changelog 2023-03-13 17:16:33 -07:00
Michael Scire
52f00731d9 settings: add os guard 2023-03-12 22:34:23 -07:00
Michael Scire
476d658a79 ams: allow convertible-to-result in abort print macros 2023-03-11 15:14:33 -07:00
Michael Scire
7263022bac docs: mention bluetooth db feature 2023-03-10 10:24:19 -07:00
Michael Scire
e0e7aa1e2f set.mitm: misc style fixes for bluetooth db 2023-03-10 10:19:58 -07:00
ndeadly
bd9d8fff46
Add system setting to mirror bluetooth pairing database to sd card (#1787)
* ams_mitm: add ability to mirror bluetooth device pairing database to sd card via a system setting

* ams_mitm: address requested stylistic changes

* ams_mitm: make use of R_SUCCEED macro

* ams_mitm: use settings::BluetoothDevicesSettings instead of libnx type

* ams_mitm: fix logic error when truncating pairing database on read

* Update .ini comment

* ams_mitm: missing R_TRY around call to fs::FlushFile

* stratosphere: remove union from BluetoothDevicesSettings type

---------

Co-authored-by: ndeadly <24677491+ndeadly@users.noreply.github.com>
2023-03-10 10:06:38 -07:00
Michael Scire
61e3f0b391 windows: disable -fdata-sections
This causes all data to be emitted as .data$*. This breaks fzero-initialized-in-bss,
because linker puts stuff in .data even when it's all-zero and should end up in .bss.
2023-03-09 23:46:54 -07:00
Michael Scire
cd9b173318 windows: re-enable lto for os/fs libraries 2023-03-09 23:46:31 -07:00
Michael Scire
a8df400825 kern: fix stray addressof operator 2023-03-08 09:46:38 -07:00
Michael Scire
68040e2922 windows: add brave new mingw compat hook for gcc 12.2.0+ 2023-03-07 22:07:03 -07:00
Michael Scire
8da4d14e15 kern: minor cleanup (thanks @liamwhite) 2023-03-06 21:18:00 -07:00
Michael Scire
e2ebf9c0ff fatal: correct comment about pools 2023-03-01 03:21:51 -07:00
Michael Scire
5fb6f52b9e fatal: dynamically allocate memory as required (preferring system > nonsecure > unsafe) 2023-03-01 03:20:49 -07:00
Michael Scire
982389dceb os: add UnsafeMemory apis 2023-03-01 03:20:49 -07:00
Adubbz
f636596ee2 daybreak: scale title font size
(cherry picked from commit 035b37c615183bd387210a54d269346e3a9b379a)
2023-02-25 10:53:16 +11:00
Michael Scire
0a2440522f fatal: use a hack to be kinder wrt pl:u session limit 2023-02-23 22:06:49 -07:00
Michael Scire
3292ea5970 kern: fix stray comment copy/paste error 2023-02-23 22:00:00 -07:00
Michael Scire
33d42f4831 erpt: update server code for 16.0.0 logic changes 2023-02-23 21:51:51 -07:00
Michael Scire
46094cfb3e kern: increase non-dynamic heap sizes to 8 GB to match 2023-02-23 19:05:52 -07:00
Michael Scire
618691a500 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "af0d00890"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "af0d00890"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2023-02-23 09:01:41 -07:00
Michael Scire
356d89244f docs: add 1.5.0 pre-release changelog 2023-02-22 18:36:01 -07:00
Michael Scire
1ce3611695 git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "bba1f1fb6"
upstream:
  origin:   "https://github.com/m4xw/emummc"
  branch:   "develop"
  commit:   "bba1f1fb6"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2023-02-22 18:26:15 -07:00
Michael Scire
1ab8b23444 emummc: try fixing commit id 2023-02-22 18:25:41 -07:00
Michael Scire
06b4738d54 emummc: re-update for 16.0.0 2023-02-22 18:24:51 -07:00
Michael Scire
b92c614347 git subrepo clone --force --branch=develop https://github.com/m4xw/emummc
subrepo:
  subdir:   "emummc"
  merged:   "4714b2df9"
upstream:
  origin:   "https://github.com/m4xw/emummc"
  branch:   "develop"
  commit:   "4714b2df9"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2023-02-22 18:23:27 -07:00
Michael Scire
99175c1149 loader: update usb3 patches for 16.0.0 2023-02-22 17:19:51 -08:00
Michael Scire
8876eedfb0 ncm: alignment was changed for PlaceHolderId/ContentId in 16.0.0 2023-02-22 17:19:51 -08:00
Michael Scire
bbcee8c77c ncm: fix inversion in activation skipping 2023-02-22 17:19:51 -08:00
Michael Scire
f7915c2c05 ncm: Add IntegratedContent*Impl 2023-02-22 17:19:51 -08:00
Michael Scire
668cabd4a2 ncm: first pass at ContentManagerImpl refactor (missing the IntegratedImpls, won't link) 2023-02-22 17:19:51 -08:00
Michael Scire
d64ab354ad kern: 16.x web applet crashes on exit with 48 MB stolen (rip) 2023-02-22 17:19:51 -08:00
Michael Scire
59b518783d ncm: fix copy/paste error in switch case 2023-02-22 17:19:51 -08:00
Michael Scire
6462101b6f strat: fix sysmodule building, bump version so I don't forget later 2023-02-22 17:19:51 -08:00
Michael Scire
0ea5dbcfbb libstrat: make build with new ncm/fs api changes (sysmodules probably fail to build) 2023-02-22 17:19:51 -08:00
Michael Scire
bb6446aada erpt: update for new ids 2023-02-22 17:19:51 -08:00
Michael Scire
e46e7e0eb1 boot2: update for 16.0.0 2023-02-22 17:19:51 -08:00
Michael Scire
cb89c66bd8 emummc: update for 16.0.0 2023-02-22 17:19:51 -08:00
Michael Scire
e85a512cf4 fusee/exo: implement the usual changes for new firmware support 2023-02-22 17:19:51 -08:00
Michael Scire
7d9fea01c3 kern: bump supported version to 16.x 2023-02-22 17:19:51 -08:00
Michael Scire
406320f6ec kern: better divide non-secure size, don't waste fatal memory unless necessary 2023-02-22 17:19:51 -08:00
Michael Scire
aad2be0a01 kern: delete creation time field from KProcess 2023-02-22 17:19:51 -08:00
Michael Scire
25383db524 kern: add InfoType_IoRegionHint 2023-02-22 17:19:51 -08:00
Michael Scire
48f4c526f3 kern: refactor priority inheritance to represent locks as C++ objects 2023-02-22 17:19:51 -08:00
Michael Scire
1279d236f3 kern: remove unnecessary interrupt disables from arbiter/condvar 2023-02-22 17:19:51 -08:00
Michael Scire
008eb974d4 kern: KConditionVariable::SignalToAddress now emits dmb before userspace write 2023-02-22 17:19:51 -08:00
Michael Scire
035cebef9d kern: refactor init (kill identity map, merge cpu on logic) 2023-02-22 17:19:51 -08:00
Michael Scire
8db22967bf kern: use variable-count parameter arrays for DebugEvents 2023-02-22 17:19:51 -08:00
Michael Scire
db510f96c3 kern: update KSystemControl::InitializePhase1, dynamically scale 39-bit address space regions 2023-02-22 17:19:51 -08:00
Michael Scire
6e2dd791b2 kern: update for new ChangePermissions page table operation 2023-02-22 17:19:51 -08:00
Michael Scire
bff61c68ab kern: adjust pool allocations 2023-02-22 17:19:51 -08:00
Michael Scire
ca7734ffaf kern: simplify KSchedulerLock::Lock 2023-02-22 17:19:51 -08:00
Michael Scire
ed22f802ee kern: allow QueryIoMapping to find Static mappings 2023-02-22 17:19:51 -08:00
Michael Scire
8ffc177b44 kern: update UnmapIoRegion for new Mapping_Memory handling 2023-02-22 17:19:51 -08:00
Michael Scire
c058376b3b kern: use tree for IoPool regions instead of list 2023-02-22 17:19:51 -08:00
Michael Scire
d5ebf13094 kern: optimize userspace access asm to use cheaper instruction in io memory loops 2023-02-22 17:19:51 -08:00
Michael Scire
695c125721 kern: use different psr masks for 64 and 32-bit El0 threads 2023-02-22 17:19:51 -08:00
Michael Scire
e7e3e7b374 kern: increase stack parameter size by 0x10 2023-02-22 17:19:51 -08:00
Michael Scire
3a5f406c5f kern: update scheduler for new switch count tracking logic 2023-02-21 03:12:17 -07:00
Michael Scire
8176f085f1 gpio: really not sure how this works before, lol 2023-01-30 23:13:45 -07:00
Michael Scire
7a69f2f062 kern/pm: only steal 8 MB from applet.
WebApplet crashes on exit with 16 more MB stolen, apparently.
2023-01-24 19:54:28 -07:00
Michael Scire
32b590e7ab git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "b7711b8fb"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "b7711b8fb"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2023-01-24 14:39:54 -07:00
Michael Scire
590f22933d docs/ams: bump version to 1.4.1 2023-01-24 14:39:06 -07:00
Michael Scire
0dd071b279 romfs: thank you fire emblem, very cool (closes #2021) 2023-01-24 14:07:50 -07:00
Michael Scire
f1132fbf5a romfs: push clobber fix missed by git add 2023-01-24 14:03:54 -07:00
Michael Scire
9cd57b6c61 romfs: reduce peak allocation sizes by enabling intermediate context frees 2023-01-24 14:02:05 -07:00
0x8ff
bf66e40a7b Update ReSwitched Team URL
reswitched.team is a dead domain no longer owned by the ReSwitched Team
2023-01-20 19:01:33 -08:00
Michael Scire
77cc53227a sdmmc: fix wrong mode select for GcAsic(Fpga)Speed 2023-01-19 21:47:19 -07:00
Michael Scire
59a295db79 sdmmc: fix missing call to GetSdStatus at non-uhsi mode 2023-01-19 21:44:44 -07:00
Michael Scire
e4b9930bf3 kern: fix unnecessarily strong load in aligned spinlock
Copy-paste error I didn't notice for two years, whoops
2022-12-25 01:56:31 -07:00
Michael Scire
04c9004e05 erpt: fix multiple issues with automatic report cleanup (thanks @yellows8)
* Setting retrieval was performed before the call that used the setting.
* Call to detect number of files passed incomplete path and was guaranteed to fail.
* Call to delete reports passed incomplete path and was guaranteed to do nothing.
2022-12-13 01:08:13 -07:00
Michael Scire
1f8798ace7 kern: fix GetProcessId wrong result on invalid parameter 2022-12-04 13:40:44 -07:00
Michael Scire
ff7a80e592 dmnt: allow string termination to end a toggle (closes #1980) 2022-10-28 14:14:38 -07:00
Michael Scire
e3ace4be15 exo: fix MemoryArrange enum typo 2022-10-19 15:18:08 -07:00
Michael Scire
36a33617a4 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "b2232894f"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "b2232894f"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2022-10-18 11:11:09 -07:00
Michael Scire
8ce4f19615 ncm: update enums, refactor comparison operators 2022-10-18 11:10:17 -07:00
Michael Scire
05fee5d53c fusee: fix 15.x exFAT nogc patch 2022-10-16 15:45:47 -07:00
Michael Scire
f88606fbc1 gdbstub: fix reading module name for homebrew 2022-10-15 15:13:05 -07:00
Michael Scire
e580c3970c git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "363fba0cf"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "363fba0cf"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2022-10-12 09:16:51 -07:00
Michael Scire
2603136e8b ams: add changelog for 1.4.0 2022-10-12 09:15:16 -07:00
Michael Scire
3d3f8629af loader: update usb3 enable patches for 15.0.0 2022-10-12 09:15:16 -07:00
Michael Scire
d178ea368a lr: new AOC commands use MapAlias for paths... 2022-10-12 09:15:16 -07:00
Michael Scire
b444385762 git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "4714b2df9"
upstream:
  origin:   "https://github.com/m4xw/emummc"
  branch:   "develop"
  commit:   "4714b2df9"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2022-10-12 09:15:16 -07:00
Michael Scire
0c3f1bed33 emummc: update for 15.0.0 2022-10-12 09:15:16 -07:00
Michael Scire
bf4fdf6188 kern: update for new exception flag semantics 2022-10-12 09:15:16 -07:00
Michael Scire
13238fc4fd kern: use slab allocated KSessionRequest dynamic mappings 2022-10-12 09:15:16 -07:00
Michael Scire
e7a1e0fee2 kern: implement Svc(Un)MapInsecureMemory 2022-10-12 09:15:16 -07:00
Michael Scire
5a918f3bc9 kern: move SecureAppletMemory/KPageBuffer heap into the ResourceRegion 2022-10-12 09:15:16 -07:00
Michael Scire
ea82889e6c kern: increase stack region size when thread resource limit is increased 2022-10-12 09:15:16 -07:00
Michael Scire
7f2cbba543 kern: Implement new PageTable operations/PhysicalMemory reference semantics 2022-10-12 09:15:16 -07:00
Michael Scire
5ee7d8a5ed kern: update for new device map semantics 2022-10-12 09:15:16 -07:00
Michael Scire
947fdcf6f6 kern: merge/simplify KInterruptEventTask into KInterruptEvent 2022-10-12 09:15:16 -07:00
Michael Scire
2e73f33eb0 kern: implement K(Secure)SystemResource 2022-10-12 09:15:16 -07:00
Michael Scire
752704a798 kern: update handle table init 2022-10-12 09:15:16 -07:00
Michael Scire
d00406e089 os: update os namespace for 15.0.0, loader/ro: update to use csrng, spl: bump max sessions 2022-10-12 09:15:16 -07:00
Michael Scire
dddb5bfdea boot2: launch new eth sysmodule after bsdsockets 2022-10-12 09:15:16 -07:00
Michael Scire
ed0572bd53 erpt: update IDs for 15.0.0 2022-10-12 09:15:16 -07:00
Michael Scire
b3bbc99cfb ams.mitm: fix up ContentInfo construction 2022-10-12 09:15:16 -07:00
Michael Scire
0ebbbc839f fusee/exo: fix up dram id names/mappings 2022-10-12 09:15:16 -07:00
hexkyz
275c0234cb exo: add new dram ids 2022-10-12 09:15:16 -07:00
Michael Scire
427130a122 ncm: update for new add on content/attr changes 2022-10-12 09:15:16 -07:00
hexkyz
ef07964ea0 fusee: update sdram handling for 15.0.0 2022-10-12 09:15:16 -07:00
Michael Scire
e1aff401ba lr: add support for location resolver disable commands 2022-10-12 09:15:16 -07:00
Michael Scire
05de5538d6 ncm: GetContentAccessibilities, GetContentInfo* 2022-10-12 09:15:16 -07:00
Michael Scire
9929517a83 fusee/exo: enum support for 15.0.0 2022-10-12 09:15:16 -07:00
Michael Scire
545765d167 ams/fuse: update version numbers, update DramId read logic 2022-10-12 09:15:16 -07:00
Michael Scire
8d9e3f2a31 boot: fix ChargerDriver inititalization correctness (thanks @CTCaer) 2022-09-16 15:34:38 -07:00
Michael Scire
28f0940c58 diag: fix process name cache 2022-08-11 14:19:26 -07:00
Michael Scire
d954e85826 fs/emummc: fix DirectoryRedirectionFileSystem not stripping prefix 2022-08-06 08:48:51 -07:00
Michael Scire
7e6b369605 ns.mitm/fs.mitm: allow program specific web override for non-hbl, if present 2022-07-25 16:24:57 -07:00
Liam
e702eab21c KScheduler: fix documentation mistakes 2022-06-29 17:28:26 -07:00
Liam
592b9c66d1 gdbstub: report architecture tag for ARM targets 2022-06-29 17:28:03 -07:00
Michael Scire
8e17feff94 os: pthread_yield is deprecated, don't use it on linux 2022-06-27 15:36:04 -07:00
Michael Scire
6514e365ad gdbstub: fix threads with invalid characters for packets (closes #1904) 2022-06-16 00:11:44 -07:00
Michael Scire
efa4a346af os: silence warning building with gcc 12 on windows 2022-06-12 01:38:04 -07:00
Michael Scire
d75f9bbedf fs: add extension GetEntryList to AesCtrCounterExtendedStorage 2022-06-11 16:54:02 -07:00
Michael Scire
ea7f51a279 os: fix whoops in SetMemoryPermission on windows 2022-06-11 00:58:14 -07:00
Michael Scire
a65b6df8d2 os: implement MemoryHeapManager, SetMemoryAttribute 2022-06-10 22:36:03 -07:00
Michael Scire
4e112de223 dmnt.gen2: fix gt, optimize 2022-06-08 00:49:47 -07:00
Michael Scire
20d200471d kern: optimize postfix-compare to prefix-compare, result logic is identical but breaks earlier in some paths 2022-06-07 23:49:31 -07:00
Michael Scire
5f2d713fe4 kern: mea culpa (some time since 7.x) 2022-06-07 23:40:32 -07:00
Michael Scire
114d2598da dmnt.gen2: sanitize brackets in thread names to be valid xml 2022-06-07 22:03:37 -07:00
Michael Scire
36bdb83cfc util: prevent optimizer from removing endian-swapped writes 2022-06-05 22:57:18 -07:00
Michael Scire
a975689c59 ams: address some warnings when building with gcc-12 2022-06-05 22:57:08 -07:00
Michael Scire
a809e23320 lr: update capacity constants to reflect 12.0.0 changes 2022-05-26 18:44:12 -07:00
Michael Scire
4db485083b strat: update for code changes found in boot (closes #1797) 2022-05-05 17:45:55 -07:00
Michael Scire
e96972c939 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "b91294d3b"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "b91294d3b"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2022-04-29 16:15:06 -07:00
Michael Scire
3545c0aac2 ams: fs accuracy fixes, bump to 1.3.2 2022-04-29 16:14:01 -07:00
Michael Scire
d85875b910 os: fix various regressions since 1.3.1 2022-04-29 15:46:55 -07:00
Michael Scire
b1367942a2 os: fix minor bug (and simplify) MapProcessCodeMemory 2022-04-18 01:43:49 -07:00
Michael Scire
c2c0a2e169 ro/os: use os primitives for MapProcessCodeMemory 2022-04-18 01:39:22 -07:00
Michael Scire
f5052b4bca loader: update for changes in 14.0.0 2022-04-17 20:11:05 -07:00
Michael Scire
70d67bb115 loader: use os apis for interacting with process memory 2022-04-17 18:51:36 -07:00
Michael Scire
9056e0b05f strat: fix linux clang build 2022-04-17 14:01:03 -07:00
Michael Scire
895b6d0470 optional: add c++23 monadic interface 2022-04-17 12:17:25 -07:00
Michael Scire
dfba595cdc fs: fix null check in AesXtsStorageExternal 2022-04-16 12:28:40 -07:00
Michael Scire
175a34da43 os: silence a maybe-uninit warning 2022-04-16 12:28:21 -07:00
Michael Scire
02b126c2be os: refactor multi wait apis to better match Nintendo's latest implementation 2022-04-12 16:47:36 -07:00
Michael Scire
b45671fd35 fs: QueryEntry uses NonSecure buffers 2022-04-08 11:23:39 -07:00
Michael Scire
106599895d fs: fix memory leak when path is reallocated (closes #1842) 2022-04-08 11:02:17 -07:00
Michael Scire
80154b0a54 os: broadcast, not signal, on release more than 1 sema 2022-04-07 12:17:13 -07:00
Michael Scire
62eb4d6989 docs: add changelog for 1.3.1 2022-04-04 17:48:18 -07:00
Michael Scire
b52e44e798 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "590cdaf02"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "590cdaf02"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2022-04-04 17:47:56 -07:00
Michael Scire
72baa4ff18 ams: add enum recognition for 14.1.0 2022-04-04 17:44:56 -07:00
Michael Scire
442656899f util: update some bit utility logic 2022-04-03 10:51:46 -07:00
Michael Scire
d7f89a0c31 fs: update signature for VerifySign1 2022-04-01 21:06:26 -07:00
Michael Scire
2e6223d9d0 fssystem: add unique lock apis 2022-03-28 14:29:22 -07:00
Michael Scire
28f11a86fd fs: update romfs types 2022-03-28 13:57:06 -07:00
Michael Scire
a8b52dc123 fs: remove dead code 2022-03-28 08:37:08 -07:00
Michael Scire
9b47ddf01f fs: update LocalFileSystem 2022-03-28 01:33:40 -07:00
Michael Scire
0fbf007bcf fs: fixup all OperateRange implementations 2022-03-28 00:54:10 -07:00
Michael Scire
4ad8dad416 os: add DetachIoRegionHandle 2022-03-28 00:00:36 -07:00
Michael Scire
8e258bde9d util: LockFreeAtomicType (for time) 2022-03-27 20:15:10 -07:00
Michael Scire
c0d5140ef0 strat: add windows socket api, linux/macos TODO 2022-03-27 14:36:31 -07:00
Michael Scire
1bef1b58d4 fs: also update comment, for locking 2022-03-26 15:29:38 -07:00
Michael Scire
07cd682460 fs: fix inverted optional-lock condition 2022-03-26 15:28:40 -07:00
Michael Scire
e5c3d264ec fs: implement new 14.0.0 spl-ctr dispatch semantics 2022-03-26 15:21:12 -07:00
Michael Scire
bbf22b4c60 ams: globally prefer R_RETURN to return for ams::Result 2022-03-26 14:48:33 -07:00
Michael Scire
dd78ede99f ams: use R_SUCCEED, R_THROW globally 2022-03-26 00:14:36 -07:00
Michael Scire
e5b1739f65 fatal: yield our lbl session unless needed 2022-03-25 23:47:20 -07:00
Michael Scire
a4a2cc2218 fs: update IStorage::Check functions for 14.0.0 2022-03-25 23:29:36 -07:00
Michael Scire
5ffbed1bee fs: update a few loose missed results 2022-03-25 10:02:55 -07:00
Michael Scire
ec44eaa263 fs: update nca drivers (and dependents/callees) for 14.0.0 changes 2022-03-25 09:48:24 -07:00
Michael Scire
20e53fcd82 fs: update HashGeneratorFactorySelector to reflect 14.0.0 2022-03-24 21:57:37 -07:00
SciresM
64c6ef2de7
fs: reduce path size 0x28 -> 0x18
This implements two optimizations on fs::Path, which N added in 12.0.0.

The current structure looks like: 

```cpp
struct Path {
    const char *m_str; // Points to the read-only path string
    char *m_write_buffer_buffer; // Part of std::unique_ptr<char[], ams::fs::impl::Deleter>
    ams::fs::impl::Deleter m_write_buffer_deleter; // Parse of std::unique_ptr<char[], ams::fs::impl::Deleter>, stores the size of the buffer.
    size_t m_write_buffer_length; // Copy of the write buffer's size accessible to the Path() structure.
    bool m_is_normalized; // Whether the path buffer is normalized
};
```

This is pretty wasteful. The write buffer size is stored twice, wasting 8 bytes, because one copy of the size isn't accessible to the path.

In addition, due to alignment, the bool wastes 7 padding bytes.

This commit:

* Encodes normalized in the low bit of the write buffer length, saving 8 bytes.
* Use a custom WriteBuffer class rather than generic unique_ptr, to avoid needing to store the WriteBuffer twice.


These each save 8 bytes, for a final size of 0x18 rather than 0x28.
2022-03-24 20:22:47 -07:00
Michael Scire
817ad8f98d util: pointer traits only if <memory>/stratosphere 2022-03-24 18:24:19 -07:00
Michael Scire
dfa475a769 util: add pointer utils, use to constrain fs pointers 2022-03-24 16:21:03 -07:00
Michael Scire
141ae5c7ab fs: fix removed include 2022-03-24 13:31:49 -07:00
Michael Scire
4646581e93 fs: for my sanity, begin tracking version where code was last checked for accuracy 2022-03-24 08:43:40 -07:00
Michael Scire
b69fa13576 fatal: fix usage of removed bpc api in 14.0.0 2022-03-23 19:11:37 -07:00
Michael Scire
0da15a30fd git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "726a7efdd"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "726a7efdd"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2022-03-23 13:45:59 -07:00
Michael Scire
44d553d12e loader: add usb-3 patch for 14.0.0 2022-03-23 13:45:28 -07:00
Michael Scire
6f54ab5716 fs: fix out of bounds access when parsing directory paths 2022-03-23 13:38:34 -07:00
Michael Scire
596a0f2551 ams.mitm: wrong stack was increased 2022-03-23 11:51:16 -07:00
Michael Scire
ff828dc0bc ams.mitm: increase sysupdater stack size (as needed by new ncm code) 2022-03-23 11:37:30 -07:00
Michael Scire
027f3b4911 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "af48924e5"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "af48924e5"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2022-03-23 11:25:46 -07:00
Michael Scire
3fff114b14 crypto: fix aes-128 dec on arm64/cortex-a57 2022-03-23 11:24:43 -07:00
Michael Scire
f23f490cb4 strat: fix clang build 2022-03-23 10:39:20 -07:00
Michael Scire
c503629ac8 ams.mitm: fix reboot to payload 2022-03-23 10:17:00 -07:00
Michael Scire
6b436739be git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "56a2e8a20"
upstream:
  origin:   "https://github.com/m4xw/emummc"
  branch:   "develop"
  commit:   "56a2e8a20"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2022-03-23 09:22:50 -07:00
Michael Scire
4f763b2aa4 emummc: integrate updates for 14.0.0 2022-03-23 09:22:22 -07:00
Michael Scire
12d83106fd git subrepo clone --branch=develop https://github.com/m4xw/emummc emummc
subrepo:
  subdir:   "emummc"
  merged:   "a9d569594"
upstream:
  origin:   "https://github.com/m4xw/emummc"
  branch:   "develop"
  commit:   "a9d569594"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2022-03-23 09:20:54 -07:00
Michael Scire
e3cb5e74b9 emummc: temp delete 2022-03-23 09:20:31 -07:00
Michael Scire
b1a4a0db67 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "d97cdde1a"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "d97cdde1a"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2022-03-23 09:17:52 -07:00
Michael Scire
847fee4901 docs: fix changelog, some 2022-03-23 09:13:47 -07:00
Michael Scire
f2b48d466f docs: add basic changelog for 1.3.0 2022-03-23 09:10:50 -07:00
Michael Scire
6e97dff27f exo: fix typo causing mishandling of carveouts 2022-03-23 09:10:50 -07:00
Michael Scire
be399772c0 emummc: add 14.0.0 patches 2022-03-23 09:10:50 -07:00
Michael Scire
45da60f902 kern: turns out changing base address gives pretty elfs but breaks relocs 2022-03-23 09:10:50 -07:00
Michael Scire
01fd324d4f os/dd: add missing semicolon to new cache logic 2022-03-23 09:10:50 -07:00
Michael Scire
f95bdb87a0 exo: right, Mariko* is a wiki-ism 2022-03-23 09:10:50 -07:00
Michael Scire
91d3d242f5 exo: update for new dram ids 2022-03-23 09:10:50 -07:00
Michael Scire
383fc2cc99 kern: codegen tweaks, now that we're no longer -Os 2022-03-23 09:10:50 -07:00
Michael Scire
1ca2f61527 kern: good night sweet prince 2022-03-23 09:10:50 -07:00
Michael Scire
cdc619a8a6 kern: on second thought, gcc built ins are for chumps 2022-03-23 09:10:50 -07:00
Michael Scire
ff07ba4201 kern: implement revised IPI/SGI semantics 2022-03-23 09:10:50 -07:00
Michael Scire
9d89835ff8 kern: update for new hw maintenance semantics 2022-03-23 09:10:50 -07:00
Michael Scire
6e17317d5d kern: implement new thread context/fpu semantics 2022-03-23 09:10:50 -07:00
hexkyz
79afa3b64c fusee: add unused mtc table 2022-03-23 09:10:50 -07:00
hexkyz
f3968f5f7c fusee: add new sdram params 2022-03-23 09:10:50 -07:00
hexkyz
a8e23adffe fusee: add new mtc tables 2022-03-23 09:10:50 -07:00
Michael Scire
401047f603 kern: implement additional randomness in KPageHeap allocations 2022-03-23 09:10:50 -07:00
Michael Scire
24739f245e kern: enforce end of dram == end of partitions (move our probably outdated KTraceBuffer to new location) 2022-03-23 09:10:50 -07:00
Michael Scire
8cb3cfd835 kern: add new KCapability checks before creating process 2022-03-23 09:10:50 -07:00
Michael Scire
14e768cd10 kern: add InfoType_IsSvcPermitted 2022-03-23 09:10:50 -07:00
Michael Scire
ef1b67b87b kern: enforce maximum secure region size 2022-03-23 09:10:50 -07:00
Michael Scire
8ef6c49d30 kern: print kernel backtrace on panic 2022-03-23 09:10:50 -07:00
Michael Scire
a89c5dd5d7 ncm: hot take, uninitialized data bad 2022-03-23 09:10:50 -07:00
Michael Scire
dfcb5005d2 fs/sprof/build: fix minor issues 2022-03-23 09:10:50 -07:00
Michael Scire
f3e3649bd5 pm: grant access to GetResourceLimitPeakValue 2022-03-23 09:10:50 -07:00
Michael Scire
07f91f0a83 boot2: launch omm before am 2022-03-23 09:10:50 -07:00
Michael Scire
81005fa3f8 pgl: style nitpick 2022-03-23 09:10:50 -07:00
Michael Scire
60d78bbf75 pgl: hook up logic for enabling extra system threads 2022-03-23 09:10:50 -07:00
Michael Scire
247852db3a pm: hook up the new libnx apis 2022-03-23 09:10:50 -07:00
Michael Scire
51c145f6c9 fusee: update static_assert on key generation 2022-03-23 09:10:50 -07:00
Michael Scire
74fddf667a pm: loosen restriction on resource limit boost 2022-03-23 09:10:50 -07:00
Michael Scire
027242e909 erpt: update id map 2022-03-23 09:10:50 -07:00
Michael Scire
86f98e49c7 sf: add another sanity assert 2022-03-23 09:10:50 -07:00
Michael Scire
3579797309 sf: add new debug-interface-id in cmif out header 2022-03-23 09:10:50 -07:00
Michael Scire
77b3bfcd16 sprofile: fix/simplify import count calculation 2022-03-23 09:10:50 -07:00
Michael Scire
fa98bf9434 libstrat: misc fixes for unused arg warnings 2022-03-23 09:10:50 -07:00
Michael Scire
e975784179 fatal: update for new 14.0.0 command 2022-03-23 09:10:50 -07:00
Michael Scire
dc643daaa7 kern: update version (note: actual 14-kernel diff/impl todo) 2022-03-23 09:10:50 -07:00
Michael Scire
e05df99342 pm/kern: update for 14.0.0 2022-03-23 09:10:50 -07:00
Michael Scire
0cfc93d423 sprofile: update for 14.0.0 (orphaned profiles now deleted on import) 2022-03-23 09:10:50 -07:00
Michael Scire
588d761615 exo/fusee: first pass at updating enums for 14.0.0 2022-03-23 09:10:50 -07:00
Michael Scire
320a946fc7 ncm: update client code to better reflect latest sysupdate 2022-03-21 17:21:44 -07:00
Michael Scire
ca142889c4 strat: only include windows.h in translation units where actually needed 2022-03-21 17:21:44 -07:00
Michael Scire
000713186f windows: link libgcc/libstdc++ statically 2022-03-21 17:21:44 -07:00
Michael Scire
c35114bacc fs: utilities for hac2l to print gc headers 2022-03-21 17:21:44 -07:00
Michael Scire
2d984822c6 fs: add gc validation wrappers for hac2l 2022-03-21 17:21:44 -07:00
Michael Scire
32d443977e fs: add indirection to raw storage open, for hac2l 2022-03-21 17:21:44 -07:00
Michael Scire
9866285f0e util: update function dtors, update gitignore 2022-03-21 17:21:44 -07:00
Michael Scire
9911c44670 lz4: update to git-master 2022-03-21 17:21:44 -07:00
Michael Scire
741efd04ec strat: minor result/overflow check fixes 2022-03-21 17:21:44 -07:00
Michael Scire
e13b81aa9e fs: revise allocation-fail result names 2022-03-21 17:21:44 -07:00
Michael Scire
11e4bed199 strat: revise fs unsupported operation results, add overflow utils 2022-03-21 17:21:44 -07:00
Michael Scire
ba4e7c5866 fs: fix inverted alignment determination in compressed storage 2022-03-21 17:21:44 -07:00
Michael Scire
da1b24b9b5 fs: fix locking in FileSystemBufferManager 2022-03-21 17:21:44 -07:00
Michael Scire
cb3d20ef79 fs: fix clang-build, os: StackGuardManager 2022-03-21 17:21:44 -07:00
Michael Scire
be9338eb33 fs: move bitmap classes out of save:: 2022-03-21 17:21:44 -07:00
Michael Scire
7a69723021 fs: fix missing mutex acquire in compressed storage invalidate/find 2022-03-21 17:21:44 -07:00
Michael Scire
d638bbbb62 fs: first pass at compressed storage (works on iridium with wip hac2l code) 2022-03-21 17:21:44 -07:00
Michael Scire
df631d74f0 fssrv: add ExternalKeyManager (rights-id crypto) for hac2l 2022-03-21 17:21:44 -07:00
Michael Scire
3c6d965e1a symbols: use same strategy on windows as on macOS 2022-03-21 17:21:44 -07:00
Michael Scire
49cddd68e4 use cxxabi for demangling on linux/windows 2022-03-21 17:21:44 -07:00
Michael Scire
ee5f99fdb4 Implement working macOS backtrace symbolization 2022-03-21 17:21:44 -07:00
Michael Scire
7456a77ba9 os: add working stack logic for macOS 2022-03-21 17:21:44 -07:00
Michael Scire
a3865e721a fix stack getting on linux, add test 2022-03-21 17:21:44 -07:00
Michael Scire
6aab36fc6a diag: fix typo in hos-specific backtrace getter 2022-03-21 17:21:44 -07:00
Michael Scire
79b1835a2b crypto: add ability to hash data at compile time, for future diag use 2022-03-21 17:21:44 -07:00
Michael Scire
646f84bad1 abort/error: print backtrace, abuse templates, overhaul result/diag (macos not done yet) 2022-03-21 17:21:44 -07:00
Michael Scire
18168d54c3 lib: simplify pragma macros 2022-03-21 17:21:44 -07:00
Michael Scire
edf80192d9 remove leftover debug print 2022-03-21 17:21:44 -07:00
Michael Scire
13697fa921 libs: add ongoing work to facilitate hactool rewrite 2022-03-21 17:21:44 -07:00
Michael Scire
706b8492fd libs: begin adding capacity for doing crypto on generic os (using externally-preset keys) 2022-03-21 17:21:44 -07:00
Michael Scire
6368d8063a fs: add just in case bounds checking to linux/macos dirent read 2022-03-21 17:21:44 -07:00
Michael Scire
1933f35db6 add basic tests for os::Event/SystemEvent functionality 2022-03-21 17:21:44 -07:00
Michael Scire
64a97576d0 ams: support building unit test programs on windows/linux/macos 2022-03-21 17:21:44 -07:00
Michael Scire
9a38be201a erpt: add automatic report cleanup mechanism on boot (closes #1795) 2022-03-17 00:31:38 -07:00
merry
9545cbb4cb KThreadContext: Use El0PsrMask constant in GetUserContext 2022-03-06 11:22:28 -08:00
Michael Scire
2b6719ec25 ams_mitm: update to use new NcaFileSystemDriver intf 2022-02-21 15:17:17 -08:00
Michael Scire
e08f754646 crypto: fix asm constraints for memory comparison 2022-02-21 15:17:17 -08:00
Michael Scire
3f6010b4dc fix SubStorage copy ctor/= op for new shared_ptr member 2022-02-21 15:17:17 -08:00
Michael Scire
01f7f567b9 fs: add Sha256HashGenerator, LZ4 decompressor 2022-02-21 15:17:17 -08:00
Michael Scire
a2aec363d7 fs: remove now unused StorageOption 2022-02-21 15:17:17 -08:00
Michael Scire
52296fc2dd fs: revise NcaFileSystemDriver for latest semantics 2022-02-21 15:17:17 -08:00
Michael Scire
ccf29a1302 fssystem: revise allocator logic for latest semantics 2022-02-21 15:17:17 -08:00
Michael Scire
28ea6555f8 fssrv: flesh out the program registry 2022-02-21 15:17:17 -08:00
Michael Scire
e8d14eb77d fssrv: skeleton more program registry logic 2022-02-21 15:17:17 -08:00
Michael Scire
33701bb387 fssrv: add skeleton getters for service object sf::SharedPointers 2022-02-21 15:17:17 -08:00
Michael Scire
f3dbdc2391 fs: allocations with mutex held must be unsafe 2022-02-21 15:17:17 -08:00
Michael Scire
64b4cc25fc fs: implement newer allocator templates 2022-02-21 15:17:17 -08:00
Michael Scire
ace409ccec fssrv: skeleton server manager setup/registration 2022-02-21 15:17:17 -08:00
Michael Scire
0e08aa0a31 fssrv: add placeholder for ipc interface 2022-02-21 15:17:17 -08:00
Michael Scire
94de5bf4f4 fs: add skeleton dir for sysmodule code
Please note this isn't likely to immediately be the active ams project.
2022-02-21 15:17:17 -08:00
Michael Scire
4c7fd70c10 kern: fix syntax in audit statement 2022-02-19 13:26:08 -08:00
Michael Scire
36e3519982 strat: add missing semicolon 2022-02-16 22:13:41 -08:00
Michael Scire
7668dfb756 lib: add missing semicolon 2022-02-16 12:55:12 -08:00
Michael Scire
2fce50471b build: remove unnecessary g-dwarf4 flags 2022-02-14 14:58:52 -08:00
SciresM
96f95b9f95
Integrate new result macros. (#1780)
* result: try out some experimental shenanigans

* result: sketch out some more shenanigans

* result: see what it looks like to convert kernel to use result conds instead of guards

* make rest of kernel use experimental new macro-ing
2022-02-14 14:45:32 -08:00
Michael Scire
375ba615be typofix: boogaloo: electric. 2022-02-10 19:49:05 -08:00
Michael Scire
42124fd7d8 fix typo-bug in HierarchicalSha256Storage::Read 2022-02-10 19:43:00 -08:00
Michael Scire
173d5c2d3a docs: add changelog for 1.2.6 2022-01-19 16:41:20 -08:00
Michael Scire
52c1cef064 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "0d161b858"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "0d161b858"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2022-01-19 16:29:16 -08:00
Michael Scire
4efa5d7dd0 ams: first attempt at 13.2.1 support 2022-01-19 16:28:32 -08:00
Michael Scire
275da52305 kern: add missing debug mode check to WriteDebugProcessMemory 2022-01-03 08:59:27 -08:00
Michael Scire
30fac905af ams: deduplicate static initialization logic 2021-12-13 13:07:03 -08:00
Michael Scire
78f7218c4f kern: fix vi devicename missing in HsSupported device list 2021-12-10 18:58:18 -08:00
Michael Scire
09c6aa29dd sf/cmif: optimize dispatch table walk to use binary search over linear search 2021-12-06 13:13:46 -08:00
Michael Scire
1019bc54e6 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "c4d0335b7"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "c4d0335b7"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-11-30 16:53:56 -08:00
Michael Scire
96631d8225 bump version to 1.2.5, fix enum for 13.2.0 2021-11-30 16:53:32 -08:00
Michael Scire
d32dd0f04a git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "b670c079f"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "b670c079f"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-11-30 16:35:09 -08:00
Michael Scire
ddfc16731f ams/hos: add enum support for 13.2.0 2021-11-30 16:22:57 -08:00
Pablo Curiel
26714c7f3b
ldr_embedded_usb_patches: add support for HOS 13.0.0 and 13.1.0 + remove superfluous comments. (#1718) 2021-11-26 00:39:22 -07:00
Michael Scire
767e702a70 kern: correct TotalUserPhysicalMemorySize (closes #1710) 2021-11-16 23:18:47 -08:00
Michael Scire
9d5e652fbd kern: be a little more consistent about pragma GCC location 2021-11-16 11:25:57 -08:00
Michael Scire
1d39e06f32 test/svc: add test for thread create 2021-11-08 13:29:00 -08:00
Michael Scire
21b7884653 test/svc: add test for thread pinning/SynchronizePreemptionState 2021-11-08 13:05:06 -08:00
Michael Scire
14ad2f0ba0 unit testing: catch -> doctest (faster compile, thread-safe) 2021-11-08 11:55:21 -08:00
Michael Scire
fcc7ce49d9 sm/tipc: ensure technical-correctness of sins (no page cost) 2021-11-06 20:05:32 -07:00
Michael Scire
f98c7cba98 sm: save 0x5000 of memory by sinning 2021-11-06 19:33:08 -07:00
Léo Lam
496adb0018
Minor header fixes to reduce parsing issues with Clang (#1700)
* Work around Clang's incomplete C++20 support for omitting typename

* vapours: fix Clang error about missing return in constexpr function

* stratosphere: fix call to non-constexpr strlen in constexpr function

strlen being constexpr is a non-compliant GCC extension; Clang
explicitly rejects it: https://reviews.llvm.org/D23692

* stratosphere: add a bunch of missing override specifiers

* stratosphere: work around Clang consteval bug

Minimal example: https://godbolt.org/z/MoM64v93M

The issue seems to be that Clang does not consider f(x) to be a
constant expression if x comes from a template argument that isn't
a non-type auto template argument (???)

We can work around this by relaxing GetMessageHeaderForCheck (by using
constexpr instead of consteval). This produces no functional changes
because the result of GetMessageHeaderForCheck() is assigned to a
constexpr variable, so the result is guaranteed to be computed
at compile-time.

* stratosphere: fix missing require clauses in definitions

GCC not requiring the require clauses to be repeated for member
definitions is actually a compiler bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96830

Clang rejects declarations with missing require clauses.

* Fix ALWAYS_INLINE_LAMBDA and parameter list relative order

While GCC doesn't seem to care about the position of the always_inline
attribute relative to the parameter list, Clang is very picky
and requires the attribute to appear after the parameter list
(and before a trailing return type)

* stratosphere: fix static constexpr member variable with incomplete type

GCC accepts this for some reason (because of the lambda?) but Clang
correctly rejects this.
2021-11-06 18:19:34 -07:00
Michael Scire
09074798cd KScheduler big brain strat for mdscr_el1 cfg change 2021-11-05 23:38:43 -07:00
Michael Scire
e256261b80 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "ff2883361"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "ff2883361"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-11-04 13:40:55 -07:00
Michael Scire
47218f0da8 ams: overhaul fs.mitm romfs ownership, bump to 1.2.4 2021-11-04 13:38:41 -07:00
Michael Scire
409a48ec73 docs: add changelog for 1.2.3 2021-11-04 00:23:23 -07:00
Michael Scire
0c93cefd39 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "e7b84767c"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "e7b84767c"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-11-04 00:00:26 -07:00
Michael Scire
0bbc907907 git subrepo pull (merge) libraries
subrepo:
  subdir:   "libraries"
  merged:   "8764bd406"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "12d0ba172"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-11-03 23:59:17 -07:00
Michael Scire
4a4a1f0e87 ams: bump api version to 1.2.3 2021-11-03 23:57:30 -07:00
Michael Scire
705dd95375 dmnt2: fix gdb register output 2021-11-03 23:56:25 -07:00
Michael Scire
2d5751356b creport: fix errant ) 2021-11-03 23:56:25 -07:00
Michael Scire
b140834b7e dmnt2: try to avoid writing out of bounds when generating packets 2021-11-03 23:56:25 -07:00
Michael Scire
e3d2af6b3f dmnt2: fix module name detection, add auto-break on hb nro launch 2021-11-03 23:56:25 -07:00
jam1garner
c17ad1e0e3 dmnt2: fix missing null-terminator for invalid command error 2021-11-03 23:56:25 -07:00
Michael Scire
6145b3b72c dmnt2: detect thread name, add monitor get mapping(s), increase buffer sizes 2021-11-03 23:56:25 -07:00
Michael Scire
aba7e4ca7d dmnt2: remove memory-map output which does nothing for us 2021-11-03 23:56:25 -07:00
Michael Scire
4cc5e9cdfd kern/dmnt2: allow retrieval of process info via extension
This also fixes ctrl-c break in gdbstub, and fixes crash on unknown monitor cmd.
2021-11-03 23:56:25 -07:00
Michael Scire
ca0308c7ca dmnt2: first pass at wait-for-application 2021-11-03 23:56:25 -07:00
Michael Scire
1d908295fe dmnt2: add monitor get base, TODO responses for monitor wait * 2021-11-03 23:56:25 -07:00
Michael Scire
277bd101c5 dmnt2: add memory-map read, improve module shared-lib names 2021-11-03 23:56:25 -07:00
Michael Scire
3dce23773a Adding setting usage to dmnt2 means dmnt2 needs settings access 2021-11-03 23:56:25 -07:00
Michael Scire
4489513f7c dmnt: enable experimental standalone usage of gdbstub, while starlink is in dev 2021-11-03 23:56:25 -07:00
Michael Scire
5eabca7f04 ams.mitm: more romfs building space/time tradeoffs.
This is needed for Animal Crossing 2.0.0, which has >99000 fucking files.

We now do several passes over dir/file tables instead of one pass,
doing entire hash tables before we touch dir/file tables. Thus we
no longer need to simultaneously allocate hash table and dir/file table space.

In addition, we now do repeated passes building a segment of hash tables
at a time, when insufficient memory is available. Similar is also now the
case for file/dir tables, we try 0x40000 work buffer and divide by 2
until we successfully alloc. We don't allow a work buffer <0x4000, for
write/perf reasons. If a game triggers that, let me know I guess.

Hard to imagine a worse torture-test for this code than animal crossing.
2021-11-03 23:52:38 -07:00
Michael Scire
a73e0e8f16 ams: add arm/armv8a to gitignore 2021-10-31 11:20:32 -07:00
Michael Scire
2161365f4f ams: update for awareness of architecture revision 2021-10-31 11:18:17 -07:00
Michael Scire
258a83684e creport: print symbols if they're present 2021-10-30 14:18:00 -07:00
Michael Scire
d2a757c39e git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "ceff2f371"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "ceff2f371"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-10-30 11:21:54 -07:00
Michael Scire
6cf5205a28 spl: fix legacy physical keyslot compatibility 2021-10-30 11:21:25 -07:00
Michael Scire
b9c90b9234 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "4d0f1b792"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "4d0f1b792"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-10-29 17:47:35 -07:00
Michael Scire
94e18b8c93 ams: bump version to 1.2.2 2021-10-29 17:47:01 -07:00
Michael Scire
4e92687cab sprofile: various correctness fixes. 2021-10-29 17:38:44 -07:00
Michael Scire
2a0b99d9f9 sprofile: fix off-by-one in struct definition, fix GetImportableProfileUrls 2021-10-29 15:41:25 -07:00
Michael Scire
d1f3c4904b kern: fix minor assembly bugs, avoid unnecessary function call in KScheduler hotloop 2021-10-28 19:16:23 -07:00
Michael Scire
92321ccbc8 kern: fix 32-bit light ipc svc handler asm
Nintendo used to do what we were doing because the function wasn't directly in the handler table,
but we've always been directly in the handler table, so we were trashing the last four arguments to light ipc
when called from aarch32. Nothing uses this, but needed to be fixed.
2021-10-28 15:42:52 -07:00
Michael Scire
db3004e844 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "0a0bd74ca"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "0a0bd74ca"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-10-27 22:57:39 -07:00
Michael Scire
3e97e4addf init: disable fsdev cwd to prevent abort on fsdev usage (fsdev should not be used) 2021-10-27 22:57:09 -07:00
Michael Scire
4b7b33809f kern: optimize and bring into line with N our pstate.i management 2021-10-27 15:00:07 -07:00
Michael Scire
e81a1ce5a8 kern: audit (and fix) our hardware maintenance instructions to match official kernel 2021-10-27 12:31:53 -07:00
Michael Scire
fb59d0ad43 Unfuck emummc to not corrupt remote on subrepo push.
subrepo:
  subdir:   "emummc"
  merged:   "a9d569594"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "a9d569594"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-10-26 01:52:41 -07:00
Michael Scire
73b74b904f docs: add changelog for 1.2.1 2021-10-26 01:46:10 -07:00
Michael Scire
ed41b01b69 git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "f11d22d74"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "f11d22d74"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-10-26 01:13:50 -07:00
Michael Scire
24143d8813 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "13c6987cc"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "13c6987cc"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-10-26 01:12:06 -07:00
Michael Scire
cb38b0b929 ams: bump version to 1.2.1 2021-10-26 01:09:16 -07:00
Michael Scire
dd04113f5d emummc/fusee: support 13.1.0 FS 2021-10-26 01:08:37 -07:00
Michael Scire
0e81eac9d1 sprof: update for 13.1.0 (format version 1) 2021-10-26 00:51:44 -07:00
Michael Scire
a14dc6ed89 crypto: implement md5, which now used by sprof 2021-10-25 23:15:50 -07:00
Michael Scire
9cc6be4d57 kern: other dmbs in kernel were already dmb ish 2021-10-25 17:38:50 -07:00
Michael Scire
1d5f66be56 kern: implement 13.1.0 kernel changes 2021-10-25 17:34:47 -07:00
Michael Scire
ebca23305e kern: simplify random bitmap selection to match latest Nintendo logic 2021-10-25 17:31:14 -07:00
Michael Scire
273f4a87ae kern: add (and use) generic KSystemControlBase 2021-10-25 17:31:14 -07:00
Michael Scire
1f8bf41f0b kern/test: add some scheduler tests (yields work correctly, all non-special priorities are cooperative/not pre-emptive 2021-10-25 17:31:14 -07:00
Michael Scire
ad03be9a38 hos: whoops 2021-10-25 17:31:14 -07:00
Michael Scire
d63be0737b hos: better safe than sorry 2021-10-25 17:31:14 -07:00
Michael Scire
018ae08409 hos: allow turning off ams extension hard-reqs for unit testing 2021-10-25 17:31:14 -07:00
Michael Scire
2a842791eb kern: add toggleable support for 40-bit physaddr caps 2021-10-25 17:31:14 -07:00
Michael Scire
d8a2b47b0a util: add trait/macro for is_constexpr_constructible 2021-10-25 17:31:14 -07:00
Michael Scire
7c1347e692 test: add tests for SetMemoryPermission 2021-10-25 17:31:14 -07:00
Michael Scire
0a58e803be kern/test: add wip qemu-virt board support to mesosphere 2021-10-25 17:31:14 -07:00
Michael Scire
10ed579c38 kernel_ldr: bring initial cache flush in line with Nintendo 2021-10-25 13:38:52 -07:00
Michael Scire
6ad3219656 kern: reflect nintendo cache management behavior for initial processes 2021-10-25 13:02:35 -07:00
Michael Scire
54dde406bc kern: devirtualize KReadableEvent::Reset, KWorkerTask::DoWorkerTask 2021-10-24 20:41:38 -07:00
Michael Scire
fd187f952e kern: enable lto for global instants (saves about a page in deduplicated code) 2021-10-24 17:06:43 -07:00
Michael Scire
8a661cee6e kern: devirtualize KAutoObjectWithList::GetId() 2021-10-24 17:00:05 -07:00
Michael Scire
3e4acc62f3 kern: fix reorder-init in KHandleTable 2021-10-24 13:08:08 -07:00
Michael Scire
d0cd511c0e kern: devirtualize most things that are free to devirtualize (see #1672) 2021-10-24 13:04:31 -07:00
Michael Scire
aaa3770806 kern: optimize timespan -> tick codegen, improve .text layout 2021-10-24 01:16:24 -07:00
Michael Scire
89926f44c6 kern: use optimized red black tree finds for remaining holdouts 2021-10-23 21:58:48 -07:00
Michael Scire
436613401a kern: devirtualize several KAutoObject functions 2021-10-23 21:13:26 -07:00
Michael Scire
2490bbf4f9 kern: KCacheHelper: better reflect nintendo coremask clearing logic 2021-10-23 17:44:30 -07:00
Michael Scire
71e4313d0c kern: devirtualize remaining vcall for class token/dyncast 2021-10-23 16:04:04 -07:00
SciresM
36e4914be8
kern: avoid constexpr init for many objects (avoids unnecessary memory clear) (#1668) 2021-10-23 15:25:20 -07:00
Michael Scire
20716cb3de kern: use new AtomicRef, use Atomic<bool> 2021-10-20 13:29:38 -07:00
Michael Scire
aed9d3f535 util: better match true std::atomic semantics 2021-10-20 11:02:17 -07:00
Michael Scire
c6d7174dd3 exo: use the fancy new optimal atomics 2021-10-20 08:52:54 -07:00
Michael Scire
d74f364107 kern/util: use custom atomics wrapper to substantially improve codegen 2021-10-19 15:24:15 -07:00
Michael Scire
52332e8d75 kern: use 13.0.0 revised KLightLock logic 2021-10-19 02:45:29 -07:00
Michael Scire
3fc695aff8 kern: fix capability check for thread priorities 2021-10-19 01:41:23 -07:00
Michael Scire
d3eb1268bc kern: remove spurious assertion 2021-10-19 01:21:23 -07:00
Michael Scire
f3b532070b kern: update scheduler for 13.0.0 change, fix some ctz/clz bugs 2021-10-19 01:20:28 -07:00
Michael Scire
42b6c2dd95 kern: fix use of plr vs plr_heap, fix close/unlock order in ArbitrateLock 2021-10-19 01:19:31 -07:00
Michael Scire
52c914afcc ams-libs: move -Wno-invalid-offsetof to cxxflags, not cflags 2021-10-18 13:10:02 -07:00
Michael Scire
692247b26b ams-libs: use nintendo_nx identifier for source file compat bpmp<->ccplex 2021-10-18 11:10:25 -07:00
Michael Scire
799a9a5f98 lr: fix EraseRedirection hang introduced by refactoring 2021-10-18 11:00:55 -07:00
Michael Scire
889d843718 ams: improve offsetof style consistency 2021-10-18 00:17:13 -07:00
Michael Scire
ec6d1a92ef util: improve (and use) offsetof that's """standard compliant""" 2021-10-17 21:45:02 -07:00
Michael Scire
ad4c794aea constexpr: resign ourselves to gcc dropping void -> T support 2021-10-17 02:39:16 -07:00
Michael Scire
96d3187f3e kern: remove need for explicit reserved member in KAutoObject 2021-10-16 17:17:26 -07:00
Michael Scire
bfffe6b119 kern: devirtualize KAutoObject::DynamicCast<>()
This is an optimization that saves the most common type of virtual call in the kernel (DynamicCast)
by storing class token as a member, rather than getting it via virtual call every time.

This does not currently cost any memory space on 64-bit targets, due to pre-existing padding space.

This optimization can be turned off via a compile-time flag for accuracy.
2021-10-16 16:24:06 -07:00
Michael Scire
26c02e2019 kern/util: update structure layouts to match Nintendo (saves 0x10 per KThread/KSession) 2021-10-16 16:13:10 -07:00
Michael Scire
7805a3624e fusee: accept non-zero rather than rejecting non-one for emummc enable 2021-10-16 12:26:17 -07:00
Michael Scire
64950dbd31 powctl: remove unused arm_neon header after last commit 2021-10-16 10:11:45 -07:00
Michael Scire
03efc31f9c powctl: don't require arm64 arch for floating -> fixed conversion 2021-10-16 10:04:19 -07:00
Michael Scire
f7f83b4742 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "cf765c094"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "cf765c094"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-10-15 23:55:53 -07:00
Michael Scire
8634ea0f7c docs: add changelog for 1.2.0 2021-10-15 23:54:25 -07:00
Michael Scire
2541f6dd71 tipc: implement special-case templating used by 13.0.0 pgl 2021-10-15 21:23:55 -07:00
Michael Scire
ff5f376c33 tipc: enable named-thread dispatch 2021-10-15 19:59:29 -07:00
Michael Scire
d1bc1a5c57 boot: update for 13.0.0/aula parameter changes (closes #1477) 2021-10-15 19:03:11 -07:00
Michael Scire
990daec3a2 powctl: integrate 13.0.0 changes (aula params not done yet) 2021-10-15 16:30:27 -07:00
Michael Scire
c04a262d49 boot: update display logic for 13.0.0 changes 2021-10-14 19:48:13 -07:00
Michael Scire
7e536f74ae strat: fix some mitm server management logic 2021-10-14 00:40:43 -07:00
Michael Scire
891fa32bf1 tipc/sm: update more fully for 13.0.0 changes 2021-10-13 23:50:57 -07:00
Michael Scire
ca25a884b5 tipc: add additional logic from 13.0.0 2021-10-12 00:57:54 -07:00
Michael Scire
0189c5f1e6 sm/tipc: minor cleanup 2021-10-12 00:20:21 -07:00
Michael Scire
124a1a1ea0 sm: update for 13.0.0, optimize layout to reduce storage size. 2021-10-11 22:16:37 -07:00
Michael Scire
82d07e04aa strat: don't force fs globals to link into every process 2021-10-11 22:16:12 -07:00
Michael Scire
bd1bcdf52b sf: prevent emitting mitm/defer code unless server in process supports it 2021-10-11 19:01:27 -07:00
Michael Scire
d27fe8a229 util: fix consteval CountTrailingZeroes impl 2021-10-11 13:15:11 -07:00
Michael Scire
1c5edaf4fb fatal: use align up for width calc 2021-10-11 12:41:43 -07:00
Michael Scire
3cd8ec509c boot: probably should have done this a few months ago huh 2021-10-11 01:01:31 -07:00
Michael Scire
3bee3e77ca ams: bump api verrsion pre-emptively to 1.2.0 2021-10-11 01:00:07 -07:00
Michael Scire
5708bb1557 ams: allow bootloader to merely approximate correct target firmware 2021-10-11 00:54:17 -07:00
Michael Scire
d41de21753 fusee: fix loader stub 2021-10-11 00:19:47 -07:00
Michael Scire
06f68a8159 loader: refactor to remove fake namespaces 2021-10-10 21:37:29 -07:00
Michael Scire
d9dc04318d loader: refactor ro manager/improve accuracy 2021-10-10 18:22:32 -07:00
Michael Scire
d8a36e39f2 spl: refactor for accuracy/move into libstrat 2021-10-10 12:57:36 -07:00
ndeadly
4758dfa933
docs: add hactool to list of build dependencies (#1662)
Co-authored-by: ndeadly <24677491+ndeadly@users.noreply.github.com>
2021-10-10 04:50:57 -07:00
Michael Scire
bc96ebb74c os: add FlushDataCache 2021-10-10 00:33:52 -07:00
Michael Scire
a595c232b9 strat: use m_ for member variables 2021-10-10 00:14:06 -07:00
Michael Scire
ce28591ab2 svc: use m_ for member variables 2021-10-09 16:14:00 -07:00
Michael Scire
00116450c3 sdmmc: use m_ for member variables 2021-10-09 15:59:59 -07:00
Michael Scire
179d91a563 kern: fix some lingering non-m_ member variables 2021-10-09 15:46:04 -07:00
Michael Scire
67a45c97ef exo/vapours: refactor member variables to m_ over this-> 2021-10-09 15:40:06 -07:00
Michael Scire
5a38311ebf libstrat: remove lingering debugging edits 2021-10-09 14:51:44 -07:00
Michael Scire
1ab0bd1765 ams: replace most remaining operator & with std::addressof 2021-10-09 14:49:53 -07:00
Michael Scire
ce8aacef21 settings: fix correctness issue in LazyFileAccessor 2021-10-09 14:20:37 -07:00
Michael Scire
ec65c39d17 strat: refactor address taking of form &var[...] 2021-10-09 12:45:31 -07:00
Michael Scire
b0e520112b strat: always use explicit result namespacing 2021-10-09 10:36:21 -07:00
Adubbz
303c6eb5f9
settings: implement KeyValueStore (#1659)
* settings: implement KeyValueStore and dependencies

* settings: update KeyValueStore for recent refactoring

* settings: address feedback
2021-10-09 09:16:40 -07:00
Michael Scire
14c8801259 sm: remove apm:p compatibility hack
Homebrew which would hang when doing this were compiled with libnx < 3.0.0.

Homebrew which is compiled with < 3.0.0 cannot send messages to sm, because
of the incorrect serialization problem (which required homebrew recompile when
12.0.0 released).

Thus, there is no case where this makes a difference.
2021-10-08 15:25:52 -07:00
Michael Scire
960ba52a43 kern: put rela in bss
NOTE: This saves ~0x4000 of space at the cost of crimes against the linker script.
2021-10-08 12:48:53 -07:00
Michael Scire
fba962ef11 kern: clean up mesosphere buildscript 2021-10-08 12:32:23 -07:00
Michael Scire
9def4b5925 kern: tidy up capability calc 2021-10-08 12:29:41 -07:00
Michael Scire
578843f92c fusee: fix loader stub size alignment 2021-10-08 11:18:12 -07:00
Michael Scire
e5cce0f61c git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "0a4c2759a"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "0a4c2759a"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-10-07 23:38:51 -07:00
Michael Scire
d14290e357 os: fix mutex push/pop prototypes 2021-10-07 23:38:15 -07:00
Michael Scire
812acb8b68 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "80d72af9f"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "80d72af9f"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-10-07 23:07:34 -07:00
Michael Scire
229651fe72 ams.mitm: avoid using std::unordered_map, it manifests exception code 2021-10-07 22:59:16 -07:00
Michael Scire
41a4bf53f6 cs: prevent exceptions from manifesting 2021-10-07 19:48:40 -07:00
Michael Scire
888b35833e boot: save 12KB 2021-10-07 19:33:07 -07:00
Michael Scire
afccc35e79 erpt: save 8KB 2021-10-07 19:14:31 -07:00
Michael Scire
e7ca22abd7 jpegdec: save 128KB of memory 2021-10-07 18:03:11 -07:00
Michael Scire
ffc143860b strat: use ams::Main() instead of main(argc, argv) 2021-10-07 17:44:54 -07:00
Michael Scire
6a53726833 strat: build sysmodules with -Wextra/-Werror 2021-10-06 23:22:54 -07:00
Michael Scire
e8f1efd01b libstrat: fix compilation without pre-compiled header/without lto 2021-10-06 17:58:42 -07:00
Michael Scire
7ca83c9d3b libstrat: enable -Wextra, -Werror
This caught an embarrassingly large number of bugs.
2021-10-06 15:20:48 -07:00
Michael Scire
e1fbf27398 os: fix MapTransferMemory output not being set 2021-10-06 12:07:26 -07:00
Michael Scire
4866e80769 svc: refactor/rename MemoryInfo fields 2021-10-05 15:16:54 -07:00
Michael Scire
d9159f81d2 ro: double whoops 2021-10-05 12:40:58 -07:00
Michael Scire
306f413874 ro/dmnt: fix process address space detection 2021-10-05 12:34:09 -07:00
Michael Scire
719ead824e strat: remove map namespace, svc: add address space defs 2021-10-05 12:22:34 -07:00
Michael Scire
69777cf792 strat: use sf::NativeHandle for ipc templating 2021-10-05 00:11:36 -07:00
Michael Scire
d97e97258e sf: add NativeHandle type
TODO: figure out how to integrate this into templating...
2021-10-04 17:34:16 -07:00
Michael Scire
d0041a33ac strat: prefer os::NativeHandle to Handle/svc::Handle where sensible 2021-10-04 17:12:32 -07:00
Michael Scire
597d521f52 pm: use svc::LimitableResource where relevant 2021-10-04 16:33:18 -07:00
Michael Scire
6f680fe63b strat: use svc:: over ::svc 2021-10-04 14:54:13 -07:00
Michael Scire
77fe5cf6f5 ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
Michael Scire
6f76066d24 os: remove ManagedHandle, refactor to use NativeHandle typename 2021-10-04 12:33:09 -07:00
Michael Scire
a774833790 ro: simplify program id logic 2021-10-01 19:10:19 -07:00
Michael Scire
65fd967550 pm/cfg: simplify initial process id range logic 2021-10-01 17:37:39 -07:00
Michael Scire
18825866ac strat: automatic program id detection 2021-10-01 17:18:50 -07:00
Michael Scire
9ecec1b935 result: improve Includes codegen 2021-10-01 15:12:38 -07:00
Michael Scire
2b37e5d486 os: adopt nintendo ReaderWriter naming over ReadWrite 2021-10-01 11:42:34 -07:00
Michael Scire
00d0c94f2d os: amend io region api 2021-10-01 01:02:48 -07:00
Michael Scire
3eac814268 os: improve thread name codegen 2021-10-01 00:41:35 -07:00
Michael Scire
82f3416799 os: implement SharedMemory, update AslrSpaceManager 2021-10-01 00:36:18 -07:00
Michael Scire
101e3087fe os: fix AttachTransferMemory return type 2021-09-30 22:18:46 -07:00
Michael Scire
24d6933145 strat: use consistent include style for lib headers 2021-09-30 19:21:08 -07:00
Michael Scire
7444a68cd1 os: adopt multiwait naming over waitable 2021-09-30 19:00:47 -07:00
Michael Scire
d9b4009f82 os: add IoRegion 2021-09-30 11:43:17 -07:00
Michael Scire
2d214f5e1e os: add tentative IoRegionType 2021-09-30 11:32:45 -07:00
Michael Scire
c31060f0b8 lmem: fix assert with side effects 2021-09-29 23:56:30 -07:00
Michael Scire
427ab78bc6 pm: implement newer-N-pm's dynamic resource logic 2021-09-29 23:33:25 -07:00
Michael Scire
41ab4c2c68 stratosphere: use SdkMutex/SdkRecursiveMutex over Mutex 2021-09-29 22:52:50 -07:00
Michael Scire
a4fe1bb5d8 libstrat: uncomment some asserts 2021-09-29 22:02:58 -07:00
Michael Scire
9b04ff0f54 ams-libs: AMS_ASSERT no longer invokes expression 2021-09-29 21:32:40 -07:00
Michael Scire
5dc64bc1f7 os: implement Barrier 2021-09-29 18:03:11 -07:00
Michael Scire
b25218c918 os: implement SdkRecursiveMutex 2021-09-29 14:56:53 -07:00
Michael Scire
c949779b3d stratosphere: grant access to SynchronizePreemptionState 2021-09-29 14:18:03 -07:00
Michael Scire
6b438c7adf ddsf: We can use LightEvent now 2021-09-29 14:17:40 -07:00
Michael Scire
8fc7d715a5 os: add unit tests for ExpandUnsignedValueToAscii 2021-09-29 13:55:40 -07:00
Michael Scire
15ff64e03a os: implement ExpandUnsignedValueToAscii
Nintendo does this as of latest firmware.

It's desirable because it removes the only usage of util::SNPrintf() from os library,
which means programs which don't otherwise use SNPrintf do not need to link it into .text.

This saves ~0xD40 of .text as of time-of-commit when successfully unlinking, and e.g.
reduces our sm (and other modules) memory size by a page.
2021-09-29 13:42:11 -07:00
Michael Scire
1e7a327a25 os: implement LightSemaphore 2021-09-29 13:24:03 -07:00
Michael Scire
b8a1ebd11a os: implement LightMessageQueue 2021-09-29 12:55:52 -07:00
Michael Scire
cf5f431058 os: refactor MessageQueue to use new MessageQueueHelper template 2021-09-29 12:24:18 -07:00
Michael Scire
c7634c66c4 os: tweak LightEvent codegen 2021-09-28 19:11:52 -07:00
Michael Scire
632b6b3330 os: implement LightEvent 2021-09-28 18:54:09 -07:00
Michael Scire
5e0bbb61b1 os: implement ReadWriteBusyMutex 2021-09-28 17:01:11 -07:00
Michael Scire
09570c470c os: implement BusyMutex 2021-09-28 14:53:55 -07:00
Michael Scire
d00cec38b0 kern: use util::BitFlagSet for capability flags 2021-09-27 11:37:27 -07:00
BestPig
273206f314 Reduce insert_splash_screen processing time with python3 from ~1m20s to ~0.6s 2021-09-27 11:35:21 -07:00
Michael Scire
98f438e742 kern: fix/update thread permissions on pin 2021-09-26 14:51:54 -07:00
Michael Scire
99c74469e6 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "e05183a6f"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "e05183a6f"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-09-24 09:17:32 -07:00
Michael Scire
a3d9efb18c ams: bump version to 1.1.1 2021-09-24 09:16:30 -07:00
Michael Scire
3fe072a1d0 kern: devirtualize page table operations 2021-09-21 10:09:27 -07:00
Michael Scire
ab81ed2795 fs.mitm: fix memory leak in romfs build (closes #1031) 2021-09-20 17:53:29 -07:00
shchmue
56bfbb02ec Make build_package3.py Python 2&3 compatible 2021-09-20 12:37:25 -07:00
Michael Scire
006f8022c0 pkg3: fix build when revision collides with a previous commit 2021-09-19 11:07:23 -07:00
Michael Scire
296d049257 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "dc52a3228"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "dc52a3228"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-09-19 11:01:23 -07:00
Michael Scire
155f158197 ncm: fix destructor availability 2021-09-19 11:00:57 -07:00
Michael Scire
3dc51e164f loader: fix enum cast 2021-09-19 10:42:28 -07:00
Michael Scire
801f784fae git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "33ae401bc"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "33ae401bc"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-09-19 10:36:39 -07:00
Michael Scire
ed295c4cb5 docs: add changelog for 1.0.0 2021-09-19 10:34:31 -07:00
Michael Scire
790f7498c1 loader: update for 13.0.0 ncm changes 2021-09-19 10:34:31 -07:00
Michael Scire
7cdfa68dd5 svc: bump supported version 2021-09-19 10:34:31 -07:00
Michael Scire
90732ff311 kern: unify all waiting semantics to use single api 2021-09-19 10:34:31 -07:00
Michael Scire
f6fb5f2c8d kern/svc: implement IoPool/Region svc support 2021-09-19 10:34:31 -07:00
Michael Scire
ce7dd55257 svc/kern/dd: remove MapDeviceAddressSpace() 2021-09-19 10:34:31 -07:00
Michael Scire
481ce12b7b kern: update Initialize0 for new arguments/randomization semantics 2021-09-19 10:34:31 -07:00
Michael Scire
2f2c36b22b kern: KMemoryManager/KPageGroup use physical addresses instead of virtual, now 2021-09-19 10:34:31 -07:00
Michael Scire
2c4bd44d7e kern: support dynamic resource expansion for system heaps/events/sessions. 2021-09-19 10:34:31 -07:00
Michael Scire
2b91956051 kern: improve kdebug attach semantics 2021-09-19 10:34:31 -07:00
Michael Scire
4c73c461f1 kern: update KPageTable::Unmap block closing logic 2021-09-19 10:34:31 -07:00
Michael Scire
8b49cea4a9 kern: optimize logging for release kernel strings (saves printf space in .text) 2021-09-19 10:34:31 -07:00
Michael Scire
fdf008108c kern: add new KMemoryState 2021-09-19 10:34:31 -07:00
Michael Scire
252486913b kern: KWorkerTaskManager no longer tracks id 2021-09-19 10:34:31 -07:00
Michael Scire
44d10da7b8 kern: KSchedulerInterruptTask -> KSchedulerInterruptHandler 2021-09-19 10:34:31 -07:00
Michael Scire
cb28150912 kern: kill the interrupt task manager thread 2021-09-19 10:34:31 -07:00
Michael Scire
29cc3d1c09 kern: remove per-KInterruptEventTask locks 2021-09-19 10:34:31 -07:00
Michael Scire
e6a6fe6f38 kern: delete KWritableEvent, devirtualize KReadableEvent Signal/Clear 2021-09-19 10:34:31 -07:00
Michael Scire
d80ad222cc kern: KConditionVariable arbiter functions now static 2021-09-19 10:34:31 -07:00
Michael Scire
572cbd8619 kern: KAutoObject doesn't need (virtual) destructor 2021-09-19 10:34:31 -07:00
Michael Scire
183243bf16 kern: optimize handle table layout 2021-09-19 10:34:31 -07:00
Michael Scire
6407786059 kern: update GetInfo logic for tick count InfoTypes 2021-09-19 10:34:31 -07:00
Michael Scire
6cbfaaf835 kern: port limit is now 0x180 2021-09-19 10:34:31 -07:00
Adubbz
b6b09d6944 ncm: updated to 13.0.0 2021-09-19 10:34:31 -07:00
Michael Scire
c1c07af99a git subrepo pull emummc
subrepo:
  subdir:   "emummc"
  merged:   "7a3db0fb"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "f6608731"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-09-19 10:34:31 -07:00
Michael Scire
05b54c4c2a erpt: launch sprofile only on 13.0.0+ 2021-09-19 10:34:31 -07:00
Michael Scire
619a7b2074 git subrepo pull emummc
subrepo:
  subdir:   "emummc"
  merged:   "4e1ac0a7"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "c6a2e9cc"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-09-19 10:34:31 -07:00
Adubbz
a941e4be03 ncm: skeleton new commands 2021-09-19 10:34:31 -07:00
Michael Scire
e2a74a9e38 git subrepo pull emummc
subrepo:
  subdir:   "emummc"
  merged:   "2e001dd2"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "29deabb2"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-09-19 10:34:31 -07:00
Michael Scire
89541c8042 sprofile: fully reimplement sprof:bg + sprof:sp 2021-09-19 10:34:31 -07:00
Michael Scire
ae54ec5981 sprofile: implement non-importer bgagent commands 2021-09-19 10:34:31 -07:00
Michael Scire
75d5e2aef0 sprofile: implement OpenProfileUpdateObserver 2021-09-19 10:34:31 -07:00
Michael Scire
bd240b23d8 erpt: skeleton sprofile apis 2021-09-19 10:34:31 -07:00
Michael Scire
568a3b62eb set.mitm: pointer buffer size was increased to 0x200 in 13.0.0 2021-09-19 10:34:31 -07:00
Michael Scire
04cbc06bc1 ams: update current target firmware 2021-09-19 10:34:31 -07:00
Michael Scire
385f00c375 fusee: bump package2 check 2021-09-19 10:34:31 -07:00
Michael Scire
23a1cee2e3 exo: more fixes for 13.0.0 2021-09-19 10:34:31 -07:00
Michael Scire
fedd684a1c fusee/exo: update for new dram id changes 2021-09-19 10:34:31 -07:00
Michael Scire
cb299d9260 fusee/exo: update for recognition of 13.0.0 2021-09-19 10:34:31 -07:00
Michael Scire
724bd2b4d2 boot2: launch nintendo lm from built in system, not none 2021-09-12 12:40:27 -07:00
Michael Scire
50c1b628a8 linguist: add vanity corrections 2021-09-11 20:03:42 -07:00
Michael Scire
f2da92184b cs: fix launching of tio server 2021-09-11 19:41:47 -07:00
Michael Scire
a595091be0 cs: fix screenshot packet semantics 2021-09-11 19:41:47 -07:00
Michael Scire
0ec23e74b5 cs: implement TakeScreenShot command 2021-09-11 19:41:47 -07:00
Michael Scire
8acf0a4fa9 cs: fix allocator aborts 2021-09-11 19:41:47 -07:00
Michael Scire
ebb0bd2b41 kern: improve single-step around user-exception entry 2021-09-11 19:41:47 -07:00
Michael Scire
c10265676f kern: fix spsr register in RestoreContext 2021-09-11 19:41:47 -07:00
Michael Scire
9e7b56b33c kern: optimize hw-single-step management 2021-09-11 19:41:47 -07:00
Michael Scire
05ea0c53d7 dmnt: use hardware single step extension if available 2021-09-11 19:41:47 -07:00
Michael Scire
4075d24e0c kern: add hardware single step extension 2021-09-11 19:41:47 -07:00
Michael Scire
904ab19823 dmnt: implement remaining basic gdbstub packets 2021-09-11 19:41:47 -07:00
Michael Scire
534c2c76f5 dmnt: reload modules on NRO load/unload 2021-09-11 19:41:47 -07:00
Michael Scire
d216a77187 dmnt: first pass at breakpoints/watchpoints 2021-09-11 19:41:47 -07:00
Michael Scire
1401f3520e dmnt: refactor to use process accessor 2021-09-11 19:41:47 -07:00
Michael Scire
c6fad1b0ee osdbg: implement thread info api 2021-09-11 19:41:47 -07:00
Michael Scire
9f1f0c7cbd dmnt: add attach support to gdbstub 2021-09-11 19:41:47 -07:00
Michael Scire
649a0052d0 dmnt: refactor/add support for getting process list in gdb 2021-09-11 19:41:47 -07:00
Michael Scire
a7f9729f63 dmnt: begin working on packet parser 2021-09-11 19:41:47 -07:00
Michael Scire
f85df27875 dmnt: add basic gdb packet receive logic 2021-09-11 19:41:47 -07:00
Michael Scire
db7268de2e dmnt2: add logging logic, for use with gdbstub development 2021-09-11 19:41:47 -07:00
Michael Scire
a2c0cc924b fix dmnt.gen2 title id (not sure how I typo'd this) 2021-09-11 19:41:47 -07:00
Michael Scire
206516411f boot2: launch dmnt.gen2 over dmnt, when using htc 2021-09-11 19:41:47 -07:00
Michael Scire
b61797224d tma2: include sysmodules in stratosphere.romfs 2021-09-11 19:41:47 -07:00
Michael Scire
899efec302 cs: implement GetFirmwareVersion command 2021-09-11 19:41:47 -07:00
Michael Scire
1a1b1355ba scs: implement EventHandlerThread for shell 2021-09-11 19:41:47 -07:00
Michael Scire
aa2dce7316 scs: implement DoShellServer 2021-09-11 19:41:47 -07:00
SciresM
e9849c74cf
LogManager: implement system module, client api, logging api (#1617)
Some notes:

* Unless `atmosphere!enable_log_manager` is true, Nintendo's log manager will be used instead.
  * This prevents paying memory costs for LM when not enabling logging.
  * To facilitate this, Atmosphere's log manager has a different program id from Nintendo's.
  * `atmosphere!enable_htc` implies `atmosphere!enable_log_manager`.
* LogManager logs to tma, and the SD card (if `lm!enable_sd_card_logging` is true, which it is by default).
* Binary logs are saved to `lm!sd_card_log_output_directory`, which is `atmosphere/binlogs` by default.
2021-09-11 19:32:14 -07:00
HamletDuFromage
a1fb8a91c8
Add arguments support to Daybreak (#1616)
* Add arguments support to Daybreak

* Check if Daybreak is run as NRO
2021-09-11 10:55:25 -07:00
Michael Scire
bfeba7c1e8 build: fix building with directory existing 2021-09-09 00:15:35 -07:00
Michael Scire
31d44d821f fusee: fix log_inverted flag parse 2021-09-08 14:32:15 -07:00
Michael Scire
44beeecc9e fusee: fix prodinfo blanking flag detection for sysmmc (closes #1610) 2021-09-07 04:34:57 -07:00
Michael Scire
844e88bdfe git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "0c0bb815"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "0c0bb815"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-09-06 16:33:59 -07:00
Michael Scire
a1af1af74d docs: mention custom splash script in changelog
Also, bring commit count for the fusee_cpp PR to a nice point before merging.
2021-09-06 16:26:50 -07:00
Michael Scire
5e64460bb9 utils: add script for inserting custom image into package3 2021-09-06 16:26:50 -07:00
Michael Scire
960161741d ams: docs/build update 2021-09-06 16:26:50 -07:00
Michael Scire
443271de35 fusee: accept spaces inside ini values (we still left/right strip) 2021-09-06 16:26:50 -07:00
Michael Scire
4ad300c33c fusee: add package3 magic 2021-09-06 16:26:50 -07:00
Michael Scire
715eacbf8e fusee: accept ini files without empty line at end 2021-09-06 16:26:50 -07:00
Michael Scire
dda7ea6ac2 fusee: attempt reboot to self if possible, better abort/fatal handlers 2021-09-06 16:26:50 -07:00
Michael Scire
005aac5a2b package3: fix hekate compatibility (use real sizes) 2021-09-06 16:26:50 -07:00
Michael Scire
1e4356cdb9 build: fix clean target 2021-09-06 16:26:50 -07:00
Michael Scire
e0f45d54f1 stratosphere: remove 0.19.0 update cleanup logic. 2021-09-06 16:26:50 -07:00
Michael Scire
8da223468f fusee: remove TODO comments in buildscript 2021-09-06 16:26:50 -07:00
Michael Scire
045f9b2f15 fusee: fix buildsystem, rename secondary -> package3 2021-09-06 16:26:50 -07:00
Michael Scire
b7521465ee fusee: tactically don't trash PLLA1, fixes audio corruption on boot 2021-09-06 16:26:50 -07:00
Michael Scire
a8f898b591 patches: nogc patches now embedded in fusee rather than being .ips 2021-09-06 16:26:50 -07:00
Michael Scire
158da95b9f config: BCT.ini no longer exists 2021-09-06 16:26:50 -07:00
Michael Scire
36c470ad11 ams-1.0.0: bump version number well ahead of time 2021-09-06 16:26:50 -07:00
Michael Scire
62f8408a2e fusee_cpp: rename source dir to fusee 2021-09-06 16:26:50 -07:00
Michael Scire
a6ea490615 fusee: delete fusee (this will break build temporarily) 2021-09-06 16:26:50 -07:00
Michael Scire
da208f8001 ams-1.0.0: meso no longer optional, remove conditional logic 2021-09-06 16:26:50 -07:00
Michael Scire
320f0bbcfd fusee_cpp: improve/fix file-based emummc 2021-09-06 16:26:50 -07:00
Michael Scire
2247f97cdc fusee: fix sd card size detection for emummc 2021-09-06 16:26:50 -07:00
Michael Scire
0ef9f7ccc8 fusee_cpp: improved relocation logic 2021-09-06 16:26:50 -07:00
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
Michael Scire
1f065e3bac git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "87a1de0b"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "87a1de0b"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-08-20 13:34:30 -07:00
Michael Scire
9296a56303 ams: bump to 0.2.0
NOTE: Release will not occur until hekate is ready to handle new sept-less release format.
2021-08-20 13:31:59 -07:00
Michael Scire
481b209ae8 docs: wipe sept from the docs 2021-08-20 13:17:11 -07:00
SciresM
17ca463c3f
ams: replace sept with tsec firmware (#1594)
* ams: replace sept with tsec firmware

This replaces sept with a custom tsec key derivation firmware.

NOTE: This does not use any TSEC exploits whatsoever; it is a well-signed
TSEC binary assembled with envyas and signed with the real cauth key.

For more details, contact SciresM#0524.

* fusee: only set SBK if it's readable
2021-08-20 13:13:29 -07:00
Michael Scire
f175802136 kern: improve some debug output 2021-08-20 00:06:43 -07:00
Michael Scire
fe79bc253a kern: fix same is_current check in GetThreadContext 2021-08-19 07:38:25 -07:00
Michael Scire
81bf8c577a kern: fix check for thread-is-current in KDebugBase::SetThreadContext 2021-08-19 07:34:08 -07:00
SciresM
aee89db748
mtc: implement memory training for mariko (#1593)
* mtc: implement memory training for mariko

* mtc: fix apply_periodic_compensation_trimmer, train_wr_vref results

* mtc: fix clktree calculations
2021-08-17 17:27:12 -07:00
Michael Scire
f5704d25f8 kern: remove firmare-specific SignalAndModify impl
Nintendo made this breaking change because there was zero official software relying on it,
so it's safe for us to make the same change.
2021-07-22 15:56:45 -07:00
Michael Scire
73afa042f1 dmnt: fix opcode decoding (closes #1575) 2021-07-22 06:06:48 -07:00
Michael Scire
2da31b122f kern: fix hardware watchpoint detection 2021-07-22 00:35:40 -07:00
Michael Scire
43bbfd29bb kern: fix inverted condition in context breakpoint validation 2021-07-21 23:56:28 -07:00
Michael Scire
4cb4707f34 dmnt: add theoretical 'else' support to cheat engine vm conditionals 2021-07-21 19:36:46 -07:00
Michael Scire
389c3b6baa dmnt: various cheat changes/suggestions that have been cooking a while 2021-07-21 19:21:58 -07:00
Michael Scire
0c596e682f exo/daybreak: advertise (and check against) supported hos version 2021-07-21 18:21:38 -07:00
tslater2006
4d430a4c61
Updates to Cheats documentation (#1568)
* docs: update cheats doc to clarify Code Type 5 encoding

This change removes references to the "M" nibble for the "Register Address" encoding of Code Type 5 whis is not used in this mode.

In the dword block the "M" has been replaced with a "0"

* docs: update cheats doc to clarify register usage on Code Type 5

This adds additional clarification for "Register Address Encoding" mode of Code Type 5 that the "R" nibble reflects both the destination as well as the base memory address.

* docs: update cheats doc to make Code Types consistent

Code Types are now consistently written in hex notation.
2021-07-16 11:17:03 -07:00
Michael Scire
0c41489f01 exo: fix SE aes-ctr usage in GetSecureData 2021-07-16 10:55:49 -07:00
Michael Scire
bd6155bcb4 kern: since 10.0.0, KDebug::GetThreadContext always returns X0-X7 2021-07-13 13:00:16 -07:00
Michael Scire
3bedf56512 kern: fix incorrect waiter management in KProcess::ReleaseUserException 2021-07-13 05:27:19 -07:00
Michael Scire
1be74ea6e2 kern: fix bug in KConditionVariable::SignalImpl 2021-07-13 01:40:16 -07:00
Michael Scire
14d458522d kern: update initial cache management to match latest kernel 2021-07-12 18:30:01 -07:00
Michael Scire
12bf9612cb git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "e96b24f8"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "e96b24f8"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-07-12 02:00:12 -07:00
Michael Scire
ea7b6e14f9 ams-libs: fix change detection for library building 2021-07-12 01:59:37 -07:00
Michael Scire
5e3339e866 kern: add missing abort on unmap failure 2021-07-11 21:59:06 -07:00
Michael Scire
a7c14e03b9 ams: std::optional -> util::optional 2021-07-08 02:37:26 -07:00
Michael Scire
9df13781c2 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "eb667fea5"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "eb667fea5"
git-subrepo:
  version:  "0.4.0"
  origin:   "???"
  commit:   "???"
2021-07-06 07:29:10 -07:00
Michael Scire
283736878d docs: add changelog for 0.19.5 2021-07-06 07:28:12 -07:00
Michael Scire
f863164648 ams: basic support for 12.1.0 2021-07-06 07:13:56 -07:00
Michael Scire
3eb76fcd16 exo: update for 12.1.0 2021-07-06 06:55:59 -07:00
Michael Scire
2088c5a34a kern: fix handling of is_aligned parameter in DevicePageTable 2021-07-04 10:45:14 -07:00
Michael Scire
846cde52e0 fs.mitm: ns registers program index map info, not am 2021-06-28 22:43:56 -07:00
Michael Scire
a3dd445b32 fs.mitm: add OpenDataStorageWithProgramIndex support (theoretically, closes #1250) 2021-06-28 22:24:26 -07:00
Michael Scire
c362838e11 erpt: fix 0x100 byte memory leak on creation of new report 2021-06-28 17:36:42 -07:00
Michael Scire
e086022b77 build: use DWARFv4 explicitly for IDA compatibility with debug elfs 2021-06-25 23:48:41 -07:00
Michael Scire
70c1bad08b git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "cbc294c3"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "cbc294c3"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-06-22 16:13:04 -07:00
Michael Scire
38f9a76ba0 emummc: add custom ld/specs file 2021-06-22 16:12:27 -07:00
Michael Scire
4892ffae15 kern: implement improved [new page tables are zero] invariant 2021-06-17 13:03:46 -07:00
Michael Scire
25305257d6 kern: fix missing peak set in KResourceLimit::SetLimitValue 2021-06-17 12:57:56 -07:00
Michael Scire
e423aef033 kern: ensure InitArguments do not cross page boundaries 2021-06-17 12:49:25 -07:00
Michael Scire
8a6afe7909 dns.mitm: fix wildcardcmp failure case (#1539) 2021-06-15 16:35:26 -07:00
Aurora
c02f32f1bf
reboot_to_payload: Use ams:bpc API to set payload, reboot safely and prevent usage on Mariko (#1543) 2021-06-13 16:55:46 -05:00
Michael Scire
2ab01ad33c git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "11ea38a7"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "11ea38a7"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-06-08 08:09:48 -07:00
Michael Scire
3dbc79dd5c ams: bump version to 0.19.4 2021-06-08 08:09:05 -07:00
Michael Scire
90b54c03b3 git subrepo pull emummc
subrepo:
  subdir:   "emummc"
  merged:   "219c723c"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "219c723c"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-06-08 07:50:35 -07:00
Michael Scire
7821241356 kern: fix enormous whoops 2021-05-31 04:20:59 -07:00
Michael Scire
8fea8d9b2e sm: lighten abort restrictions on mitm handle acquisition (closes #1528) 2021-05-30 22:53:32 -07:00
Michael Scire
dcdf46f576 kern: slightly improve genericity of debugger break event 2021-05-30 21:13:42 -07:00
Michael Scire
df5537b748 mem: actually fully fix the heap bug, add comments for future self 2021-05-26 23:21:08 -07:00
Michael Scire
0f2855ada8 mem: fix rare crash/logic error in heap allocation code 2021-05-26 20:43:03 -07:00
Michael Scire
c790d03693 libstrat: fix override operator new to be noexcept (closes #1494) 2021-05-16 23:10:13 -07:00
Michael Scire
25be7c5b1b git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "b5b55f60"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "b5b55f60"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-05-12 22:47:42 -07:00
Michael Scire
7e05e12b83 sf/tipc: treat min/max as true min/max, rather than numeric 2021-05-12 22:43:39 -07:00
Michael Scire
99d7f72c51 warmboot: remove superfluous firmware version check 2021-05-12 16:57:10 -07:00
Michael Scire
691a453d77 docs: amend changelog 2021-05-12 09:11:19 -07:00
Michael Scire
88246f475c git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "9ac6f527"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "9ac6f527"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-05-12 09:10:13 -07:00
Michael Scire
269d4496b2 docs: update changelog for 0.19.3 2021-05-12 09:08:55 -07:00
Michael Scire
bb4c7a390b ams: update for 12.0.2 2021-05-12 09:08:47 -07:00
Dark-Mind
b846628362
Update issue template to ask whether sysmmc or emummc. 2021-05-12 08:27:21 -07:00
Michael Scire
26fb201518 dns.mitm: handle nullptr hostname 2021-05-10 13:27:14 -07:00
Michael Scire
01ce7cef14 exo: revert section sorting 2021-05-10 07:59:38 -07:00
Michael Scire
3f3aaa01fa git subrepo clone --force https://github.com/m4xw/emummc
subrepo:
  subdir:   "emummc"
  merged:   "c6717b93"
upstream:
  origin:   "https://github.com/m4xw/emummc"
  branch:   "develop"
  commit:   "c6717b93"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-05-10 07:50:39 -07:00
Michael Scire
bf8de39e69 ams: move around abort handler to avoid linker errors 2021-05-07 17:49:10 -07:00
Michael Scire
6bb4253df5 emummc: style-change 2021-05-05 09:34:29 -07:00
Michael Scire
cfd7121574 emummc: advance buffer for multi-file case 2021-05-05 08:44:53 -07:00
Michael Scire
972681c57e emummc: fix file-based accesses that cross file boundaries 2021-05-05 08:37:02 -07:00
Michael Scire
0a11cbc2d6 exo: sort sections by alignment 2021-05-02 10:50:18 -07:00
Michael Scire
32f487abfb sm: update to excise unnecessary library code 2021-05-02 10:33:15 -07:00
Michael Scire
7d61cab01c fs: add access log strings for DirectoryEntryType 2021-04-30 19:19:22 -07:00
Michael Scire
14ed4e4057 erpt: fix reading files that don't exist 2021-04-30 14:44:53 -07:00
Michael Scire
e8ba632606 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "acee57e8"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "acee57e8"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-04-30 10:04:30 -07:00
Michael Scire
dbcb1e1564 loader: avoid UB when doing count trailing zeros 2021-04-30 10:03:54 -07:00
Michael Scire
15381409dc fs: fix missed operation rename 2021-04-30 09:02:58 -07:00
Michael Scire
10ad6934ac git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "1c5df037"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "1c5df037"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-04-30 08:56:36 -07:00
Michael Scire
03e66efd85 docs: add changelog for 0.19.2 2021-04-30 08:56:03 -07:00
Michael Scire
7040e8976d i2c: add aula pmic device code 2021-04-30 08:42:25 -07:00
Michael Scire
296a6af058 boot: update all autogenerated parameters other than charge 2021-04-30 08:37:51 -07:00
Michael Scire
2c332d1cf8 ams: bump api version to 0.19.2 2021-04-30 05:00:25 -07:00
Michael Scire
243d7dc777 ams: write-protect stratosphere.romfs 2021-04-30 04:57:46 -07:00
Michael Scire
355010ad84 erpt: implement forced shutdown detection 2021-04-30 04:21:03 -07:00
Michael Scire
ef0c15b764 erpt: Implement 12.0.0 AppletTotalActiveTime tracking 2021-04-29 21:48:47 -07:00
Michael Scire
0dc308d92a fs: properly implement OperateRangeWithBuffer, correct OperationId names. 2021-04-29 20:09:45 -07:00
Michael Scire
eb5542963f git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "4a48e0ee"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "4a48e0ee"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-04-29 03:05:29 -07:00
Michael Scire
18673d96cb daybreak: fix compat with newer deko3d 2021-04-29 01:21:09 -07:00
Michael Scire
36f6bdc3a0 fusee/sept: update to suppress spurious gcc warnings 2021-04-29 01:13:48 -07:00
Michael Scire
d6fff49845 exo: remove duplicate flags 2021-04-29 01:07:01 -07:00
Michael Scire
d05e8fb23a exo: fix for newer binutils 2021-04-29 01:04:26 -07:00
Michael Scire
0767d9f8da ams: assume gcc 11 2021-04-28 15:13:29 -07:00
Michael Scire
21f3d29df7 strat: compat with gcc 11 2021-04-26 20:06:28 -07:00
Michael Scire
4f16106702 exo/meso: update for gcc 11 compatibility 2021-04-26 20:06:18 -07:00
Michael Scire
19be54ff95 kern: fix initial process binary load on 2.0.0-4.1.0 (closes #1460) 2021-04-21 19:24:41 -07:00
Michael Scire
ed80d6ec8c util: add compile-time validation tests for intrusive red black trees 2021-04-21 05:06:11 -07:00
Michael Scire
57b6c71c1c util: implement red black trees as templates over macros 2021-04-20 16:56:33 -07:00
Michael Scire
0a11d341b7 kern: fix constant evaluation correctness, codegen tweak 2021-04-20 14:25:06 -07:00
Michael Scire
8010290472 kern: tweak KHandleTable codegen 2021-04-19 18:04:02 -07:00
Michael Scire
fbc526d163 kern: tweak KAutoObject::Open/Close codegen 2021-04-19 18:03:27 -07:00
Michael Scire
5bb790e4a7 erpt: implement AppletActiveTimeInfoList 2021-04-16 00:55:22 -07:00
Michael Scire
0a6219e6e0 kern: add names/links to kern_assembly_offsets.h 2021-04-15 15:43:29 -07:00
Michael Scire
037b04ac60 kern: mostly kill magic numbers in assembly, fix SVCs >= 0x80 2021-04-14 18:01:08 -07:00
Michael Scire
9e563d590b pm: account for 12.0.0 resource limit changes 2021-04-14 00:41:31 -07:00
Michael Scire
bdcf02a3ef tipc: ports use objects in the object manager 2021-04-14 00:34:46 -07:00
Michael Scire
88ac85c423 sm: save 0x1000 in data costs by not aligning server manager to 0x1000 2021-04-14 00:12:21 -07:00
Michael Scire
2e1a93f1d1 strat: no longer materially constrained by sm session limit 2021-04-13 23:58:10 -07:00
Michael Scire
997e4dd665 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "86c2eec8"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "86c2eec8"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-04-12 17:14:38 -07:00
Michael Scire
aa2d03d8e1 ams: bump to 0.19.1 2021-04-12 17:14:07 -07:00
Michael Scire
274c1deae4 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "68ddbc73"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "68ddbc73"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-04-12 17:13:43 -07:00
Michael Scire
d5bbf32a26 docs: add 0.19.1 changelog 2021-04-12 17:13:12 -07:00
Michael Scire
97a251b4b2 ncm: fix iteration of nested-subdirectory content files 2021-04-12 17:10:27 -07:00
Michael Scire
9d30917f4e boot2: migration also not launched in 12.0.0 2021-04-11 10:37:04 -07:00
Michael Scire
c67c29ebd5 ncm: fix random error when deleting content 2021-04-11 05:44:13 -07:00
Michael Scire
88dd414721 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "44279dbac"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "44279dbac"
git-subrepo:
  version:  "0.4.1"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "a04d8c2"
2021-04-11 04:02:17 -07:00
Michael Scire
0f6f13a1ac git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "b355ee6a8"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "b355ee6a8"
git-subrepo:
  version:  "0.4.1"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "a04d8c2"
2021-04-11 03:58:13 -07:00
Michael Scire
b24784f5c1 git subrepo pull emummc
subrepo:
  subdir:   "emummc"
  merged:   "38ed90b6e"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "5a29e1b2c"
git-subrepo:
  version:  "0.4.1"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "a04d8c2"
2021-04-11 03:51:53 -07:00
Michael Scire
3b3082cf58 changelog: add note about extensions needing recompile 2021-04-11 03:42:16 -07:00
Michael Scire
38a2fdcd76 docs: add changelog for 0.19.0 2021-04-11 03:42:16 -07:00
Michael Scire
0ca2f962de usb: add usb3.0 patches for 12.0.0 2021-04-11 03:42:16 -07:00
Michael Scire
03a98635d8 fs: add (stubbed) OperateRangeWithBuffer implementation 2021-04-11 03:42:16 -07:00
Michael Scire
461e2ced6f erpt: add (stubbed, TODO after 0.19.0) support for 12.0.0 2021-04-11 03:42:16 -07:00
Michael Scire
b2d2f65b87 boot2: grc is no longer launched by boot2 on 12.0.0+ 2021-04-11 03:42:16 -07:00
Michael Scire
b2b0c50802 pgl: update to use tipc (untested) 2021-04-11 03:42:16 -07:00
Michael Scire
1118421fa6 strat: changes for sm tipc (boots 11.0.1, now) 2021-04-11 03:42:16 -07:00
Michael Scire
b1b3914ccf tipc: Result is first raw data word, not last 2021-04-11 03:42:16 -07:00
Michael Scire
9be8b32311 tipc/sm: various fixes for issues 2021-04-11 03:42:16 -07:00
Michael Scire
57c8bc432d sm: reimplement using tipc instead of cmif (probably broken, untested) 2021-04-11 03:42:16 -07:00
Michael Scire
58776f5ba8 tipc: server processor fixes (compiles!) 2021-04-11 03:42:16 -07:00
Michael Scire
affeeb2724 tipc: implement ServerManager processing logic 2021-04-11 03:42:16 -07:00
Michael Scire
822875ecf5 tipc: implement framework/server support logic (except for actual processing) 2021-04-11 03:42:16 -07:00
Michael Scire
e3a65b1405 tipc: fix deserialization of buffers 2021-04-11 03:42:16 -07:00
Michael Scire
20a7fa1588 tipc: hard-enforce boolean constraints in command processing generation 2021-04-11 03:42:16 -07:00
Michael Scire
315b7bdf22 tipc: implement service object interface generation 2021-04-11 03:42:16 -07:00
Michael Scire
ec988c5a99 tipc: first draft object allocation logic 2021-04-11 03:42:16 -07:00
Michael Scire
21b883a75c tipc: fix compilation issues with core serialization routines 2021-04-11 03:42:16 -07:00
Michael Scire
e93d71d932 tipc: tentative core serialization logic (missing imports, won't compile) 2021-04-11 03:42:16 -07:00
Michael Scire
dc6a0d7562 ams: add target firmware 12.0.0, fusee recognition 2021-04-11 03:42:16 -07:00
Michael Scire
1d2be0a2eb kern: mesosphere now implements kernel/sdk 12.3 2021-04-11 03:42:16 -07:00
Michael Scire
96937a611d kern: fuck the KPolice^H^H^H^H^H^HPageGroups 2021-04-11 03:42:16 -07:00
Michael Scire
dc7862882f kern: who needs __purecall? 2021-04-11 03:42:16 -07:00
Michael Scire
6faa3534bf kern: update pinning semantics for terminating threads 2021-04-11 03:42:16 -07:00
Michael Scire
afb1d68d06 kern: ensure handle table is finalized when deferring termination 2021-04-11 03:42:16 -07:00
Michael Scire
911e431d65 kern: simplify handle table registration for port/session 2021-04-11 03:42:16 -07:00
Michael Scire
ee91063bbb kern: update kdebug process management semantics 2021-04-11 03:42:16 -07:00
Michael Scire
cbdf33260e kern: update port/session state semantics 2021-04-11 03:42:16 -07:00
Michael Scire
c62a7381f8 kern: update KLightConditionVariable 2021-04-11 03:42:16 -07:00
Michael Scire
b4498734e4 kern: optimize KHandleTable to use indices instead of pointers 2021-04-11 03:42:16 -07:00
Michael Scire
4407237f5b kern: KAutoObject destruction is now scheduled for next dpc-time 2021-04-11 03:42:16 -07:00
Michael Scire
15956fcf9a kern: update for new slab resource counts/extents 2021-04-11 03:42:16 -07:00
Michael Scire
6a368d3d1a kern: reallocate pool distributions for 8GB units 2021-04-11 03:42:16 -07:00
Michael Scire
8e4be9aef9 kern: simplify global rng initialization 2021-04-11 03:42:16 -07:00
Michael Scire
0f8b7be2d2 kern: load initial process binary from user pool, rather than from pt heap 2021-04-11 03:42:16 -07:00
Michael Scire
a1e137cc1c kern: update Initialize0 for new changes 2021-04-11 03:42:16 -07:00
Michael Scire
504472af4e kern: update KConditionVariable::WaitForAddress/Wait 2021-04-11 03:42:16 -07:00
Michael Scire
19b253fd17 kern: trivially optimize userspace io memory write 2021-04-11 03:42:16 -07:00
Michael Scire
01f5c89902 kern: add bounds checking to KHandleTable::Register/Unreserve 2021-04-11 03:42:16 -07:00
Michael Scire
44ccbc2a7b kern: update set/way cache operations for new semantics 2021-04-11 03:42:16 -07:00
Michael Scire
6e4664ee05 kern: if a page table region is zero-size, nothing overlaps it 2021-04-11 03:42:16 -07:00
Michael Scire
85f9355184 kern: use KScopedLightLockPair helper for page table pair-locks 2021-04-11 03:42:16 -07:00
Michael Scire
60b5bd73b7 kern: track mapped ipc server memory in page table 2021-04-11 03:42:16 -07:00
Michael Scire
53e7aa0a20 kern: add KPageTableBase::Read/WriteDebugIoMemory 2021-04-11 03:42:16 -07:00
Michael Scire
561a16a348 kern: flush memory before reading in KPageTableBase::ReadDebugMemory 2021-04-11 03:42:16 -07:00
Michael Scire
1fce7b08b1 kern: update KMemoryBlockManagerUpdaterAllocator for new ctor/init semantics 2021-04-11 03:42:16 -07:00
Michael Scire
c216f92a91 kern: swap tpidr_el1/cntv_cval_el0 as scratch vs exception stack 2021-04-11 03:42:16 -07:00
Michael Scire
2f930c2d5f kern: support immortal processes 2021-04-11 03:42:16 -07:00
Michael Scire
256eb92f4c kern: update process/thread for new running/termination semantics 2021-04-11 03:42:16 -07:00
Michael Scire
ec1d9c4c49 kern: unconditionally set thread state when appropriate 2021-04-11 03:42:16 -07:00
Michael Scire
3356eddcba kern: update kernel waiter management rules 2021-04-11 03:42:16 -07:00
Michael Scire
f67d1b7026 kern: update KInterruptEvent to store core id 2021-04-11 03:42:16 -07:00
Michael Scire
e64fef109c kern: update pinned thread priority rules 2021-04-11 03:42:16 -07:00
Michael Scire
1b2cf173b3 kern: add new checks to SetThreadPriority/CoreMask 2021-04-11 03:42:16 -07:00
Michael Scire
2fb258ca7e kern: update KInitialPageTable/KInitialPageAllocator 2021-04-11 03:42:16 -07:00
Michael Scire
962cf97150 kern: KLinkedList no longer exists 2021-04-11 03:42:16 -07:00
Michael Scire
b3bd443636 svc: sanitize booleans in autogenerated abi stubs 2021-04-11 03:42:16 -07:00
Michael Scire
4b9e7c7d27 kern: bump svc limit to 192 from 128 2021-04-11 03:42:16 -07:00
hexkyz
46612156f4 exo: add new dram ID 2021-04-11 03:42:16 -07:00
Michael Scire
279bb863df fusee: add support for 12.0.0 kernel 2021-04-11 03:42:16 -07:00
Michael Scire
252ea97ca5 nogc: add patches for 12.0.0 2021-04-11 03:42:16 -07:00
Michael Scire
f89cfe41da emummc: update for 12.0.0 2021-04-11 03:42:16 -07:00
Easy World
e3e3679cfe Update dmnt_cheat_vm.cpp
* fix case fallthrough in function "LogOpcode"
* use same attribute name in one opcode case
2021-04-07 18:46:23 -07:00
Michael Scire
75a2052144 ncm: fix GameCardStorageRoot mount point (closes #1404) 2021-03-24 07:17:03 -07:00
Adubbz
5666c59657 ncm: Updated ListContentId for 11.0.0 2021-03-22 14:58:28 -07:00
Michael Scire
c99ce36d7d ams: convert to util::ConstructAt where appropriate 2021-03-21 20:36:49 -07:00
Michael Scire
d84dcb653d ams: prefer construct_at/destroy_at over placement new/explicit destructor 2021-03-21 20:30:40 -07:00
Michael Scire
aff0da9427 ams: remove TYPED_STORAGE() macro in favor of template 2021-03-21 18:47:30 -07:00
Michael Scire
8d9174b227 ams: bump version to 0.19.0.
Release (probably) not actually imminent, I just don't want to forget.
2021-03-21 13:16:49 -07:00
Michael Scire
c8404e8452 boot2: clean up pre-0.19.0 ams contents on upgrade 2021-03-21 13:16:30 -07:00
Michael Scire
79e4c82d7e ams: distribute sysmodules in single file as stratosphere.romfs 2021-03-21 13:16:30 -07:00
Adubbz
3afd9a737c daybreak: Added a warning when resetting to factory settings 2021-03-18 21:08:22 -07:00
Michael Scire
a7564cf303 kern: add extension InfoType for retrieving current process handle. 2021-03-17 17:48:30 -07:00
SciresM
5362ee9450
[tma2] [Ongoing] Continue implementing modules for tma2. (#1388)
* cs: add stub sysmodule to host command shell server

* cs: implement logic for main (linker error paradise, for now)

* cs: implement more of the system module's skeleton

* htcs: update client type names for libnx pr merge
2021-03-16 17:13:30 -07:00
Michael Scire
021d4c88fa kern: use fix usage of incorrect page table for UserBuffer ipc 2021-03-13 15:14:36 -08:00
Michael Scire
deb4aece9a kern: fix inverted conditional in KDebugBase::SetThreadContext 2021-03-11 12:53:43 -08:00
SciresM
a6729171d3
set.mitm: fake compatibility for usb!usb30_force_enabled on 9.0.0+ (#1391)
* set.mitm: fake compatibility for usb!usb30_force_enabled on 9.0.0+

* set.mitm: add value meaning comment for usb!usb30_force_enabled

* loader: pretend to be polite about patch ordering
2021-03-01 14:18:27 -08:00
Michael Scire
c9015581ca boot2: fix tma launch when htc is disabled 2021-02-26 08:08:05 -08:00
Michael Scire
35c816d62f htclow: fix ordering of channels, uninitialized bug in service json parse 2021-02-26 04:49:20 -08:00
Michael Scire
18031ae107 tio: fix wrong body size on optimized ListDirectory 2021-02-26 04:49:20 -08:00
Michael Scire
c7e4f963e8 fs: fix GetFileTimeStampRawForDebug 2021-02-26 04:49:20 -08:00
Michael Scire
97875c7d2f tio: fix bug in body receive 2021-02-26 04:49:20 -08:00
Michael Scire
0da3b2b273 tio: implement SdCardObserver (finishes sysmodule) 2021-02-26 04:49:20 -08:00
Michael Scire
3cbd99a709 tio: implement all command processor logic 2021-02-26 04:49:20 -08:00
Michael Scire
6ce2076d92 tio: implement server/dispatch logic. 2021-02-26 04:49:20 -08:00
Michael Scire
cee1ecd06f tio: add stub sysmodule to host target io server 2021-02-26 04:49:20 -08:00
Michael Scire
a739e3fb20 docs: remove deprecated hid mitm from settings template 2021-02-24 04:08:15 -08:00
Michael Scire
953246a175 htc: disable socket driver, needs design thought before we can turn it on for real. 2021-02-24 04:06:54 -08:00
Michael Scire
d8faa37de0 socket: fix config size calculations 2021-02-24 04:06:54 -08:00
Michael Scire
64c7c6b2a5 ams: implement socket api for htclow socket driver 2021-02-24 04:06:54 -08:00
Michael Scire
1c974a387c htc: implement socket driver (socket api not really impl'd yet) 2021-02-24 04:06:54 -08:00
Michael Scire
b5ab491603 htc: implement htcmisc service object commands 2021-02-24 04:06:54 -08:00
Michael Scire
8b32b9eadf kern: Increase reserved system memory, require mesosphere for htc/tma 2021-02-24 04:06:54 -08:00
Michael Scire
ce149f996c htc: configure usage via system setting 2021-02-24 04:06:54 -08:00
Michael Scire
0ec54ed492 htcs: fixes, echo server is now fully functional 2021-02-24 04:06:54 -08:00
Michael Scire
72de4d85f3 htcs: implement remaining client bindings 2021-02-24 04:06:54 -08:00
Michael Scire
d0673aa2fb htcs: implement client socket bindings 2021-02-24 04:06:54 -08:00
Michael Scire
f7fcb54622 htcs: implement virtual socket collection 2021-02-24 04:06:54 -08:00
Michael Scire
ec643789ab htcs: implement data channel manager 2021-02-24 04:06:54 -08:00
Michael Scire
70caadafd5 htcs: implement rpc tasks 2021-02-24 04:06:54 -08:00
Michael Scire
7667104961 htcs: hook up HtcsService to rpc client 2021-02-24 04:06:54 -08:00
Michael Scire
0c791f2279 htcs: fix magic template argument deduction, do Close/Connect/Bind 2021-02-24 04:06:54 -08:00
Michael Scire
f71943c03a htcs: declare all rpc tasks 2021-02-24 04:06:54 -08:00
Michael Scire
536e3e99a8 htcs: hook up CreateSocket/RpcClient Begin<>/End<> 2021-02-24 04:06:54 -08:00
Michael Scire
abff428212 htcs: hook up manager impl to (unimplemented) service 2021-02-24 04:06:54 -08:00
Michael Scire
1541985222 htcs: hook manager up to (unimplemented) manager impl 2021-02-24 04:06:54 -08:00
Michael Scire
61929d6e21 htcs: hook service objects up to (unimplemented) manager apis 2021-02-24 04:06:54 -08:00
Michael Scire
f0ef9fb918 htc: fixes for WriteFileLarge/sending over data channel 2021-02-24 04:06:54 -08:00
Michael Scire
7621bd4e13 htcfs: fix CreateFile packet header 2021-02-24 04:06:54 -08:00
Michael Scire
d20bceff75 htc: implement the remaining commands for htcfs 2021-02-24 04:06:54 -08:00
Michael Scire
1961cb1034 htc: ReadDirectoryLarge/data channel support 2021-02-24 04:06:54 -08:00
Michael Scire
9daec3a66a htc: Implement (almost) all host-directory commands 2021-02-24 04:06:54 -08:00
Michael Scire
e79417c37c htcfs: implement OpenDirectory/CloseDirectory 2021-02-24 04:06:54 -08:00
Michael Scire
b371487525 sf: optimize argument parsing for const LargeData & 2021-02-24 04:06:54 -08:00
Michael Scire
5c97469348 htc: implement htcfs protocol bringup 2021-02-24 04:06:54 -08:00
Michael Scire
99a38dce32 htc: fix event wait loops for rpc clients 2021-02-24 04:06:54 -08:00
Michael Scire
f28a410ba0 htc: fixes, can now enter ReadyState with wip starlink code 2021-02-24 04:06:54 -08:00
Michael Scire
5fc1981061 htc: fix htcfs sf definition 2021-02-24 04:06:54 -08:00
Michael Scire
1bd0094bee htc: finish last code for Main() 2021-02-24 04:06:54 -08:00
Michael Scire
870b45f208 htc: add htcfs server/service object skeletons 2021-02-24 04:06:54 -08:00
Michael Scire
9fbbb9fadb htclow: add Channel wrapper class 2021-02-24 04:06:54 -08:00
Michael Scire
dec06ff649 htc: add htcfs service api definitions 2021-02-24 04:06:54 -08:00
Michael Scire
b898241112 htcs: add hipc server/service object skeletons 2021-02-24 04:06:54 -08:00
Michael Scire
10255f7f51 htc: skeleton HtcsManagerImpl, implement HtcsMonitor 2021-02-24 04:06:54 -08:00
Michael Scire
cb5a706659 htcs: add sf interface info/types 2021-02-24 04:06:54 -08:00
Michael Scire
4d86863f2c htc: ObserverThread (mostly), system now boots + works with htc in bg 2021-02-24 04:06:54 -08:00
Michael Scire
79a3f442d6 htc: implement psc/pm loop 2021-02-24 04:06:54 -08:00
Michael Scire
7485a1968a htc: implement HtcmiscImpl::ServerThread/HtcmiscRpcServer::ReceiveThread 2021-02-24 04:06:54 -08:00
Michael Scire
3be005b638 htc: Implement RpcClient::ReceiveThread + SendThread 2021-02-24 04:06:54 -08:00
Michael Scire
d60b1abed0 htc: Implement HtcmiscImpl::ClientThread 2021-02-24 04:06:54 -08:00
Michael Scire
1867c31f63 htc: add RpcTaskQueue/RpcTaskIdFreeList 2021-02-24 04:06:54 -08:00
Michael Scire
82757cd1b4 htc: nullptr != false 2021-02-24 04:06:54 -08:00
Michael Scire
f5e98de1a3 htc: add RpcTaskTable 2021-02-24 04:06:54 -08:00
Michael Scire
0880cebc4d htc: implement htcmisc rpc tasks 2021-02-24 04:06:54 -08:00
Michael Scire
1f03b11dbc htc: skeleton constructors for htcmisc 2021-02-24 04:06:54 -08:00
Michael Scire
b925344c3b htc: implement remainder of Mux/Tasks 2021-02-24 04:06:54 -08:00
Michael Scire
42cf3f50d7 htc: implement mux side of connecting (and more) 2021-02-24 04:06:54 -08:00
Michael Scire
70aae4e27a htc: fix driver manager c/p error 2021-02-24 04:06:54 -08:00
Michael Scire
87165e0f08 htc: implement remaining htclow::HtclowManagerImpl funcs (mux impls pending) 2021-02-24 04:06:54 -08:00
Michael Scire
e20c2450ce htc: declare and begin impl of HtclowManagerImpl interface 2021-02-24 04:06:54 -08:00
Michael Scire
968ce12492 htc: optimize Mux::QuerySendPacket 2021-02-24 04:06:54 -08:00
Michael Scire
00ab210e66 mux: optimize many accesses to O(log(n)) vs Nintendo's O(log(n)^2) 2021-02-24 04:06:54 -08:00
Michael Scire
4cb6c63516 htc: implement HtclowDriver 2021-02-24 04:06:54 -08:00
Michael Scire
1963ae7ec0 htc: begin skeletoning types for HtcmiscImpl 2021-02-24 04:06:54 -08:00
Michael Scire
889f144b27 htc: hook up creation of the htc manager service object 2021-02-24 04:06:54 -08:00
Michael Scire
4408ad6a47 htc: module id names, skeleton rest of main 2021-02-24 04:06:54 -08:00
Michael Scire
4ed665bcd3 htc: implement remaining worker thread send logic (for channel mux) 2021-02-24 04:06:54 -08:00
Michael Scire
df3d62df84 htc: send logic for HtcctrlService, bugfixes (thanks @misson20000) 2021-02-24 04:06:54 -08:00
Michael Scire
0977ee72ca rapidjson: add customization point for allocation/asserts 2021-02-24 04:06:54 -08:00
Michael Scire
2cdfde6637 htc: add remaining worker receive thread logic 2021-02-24 04:06:54 -08:00
Michael Scire
6fc24d8883 htc: implement service channel parsing (ReceiveReadyPacket) 2021-02-24 04:06:54 -08:00
Michael Scire
4e9bc617bb rapidjson: import -master as ams::rapidjson 2021-02-24 04:06:54 -08:00
Michael Scire
679fec2ddc htc: implement much of worker receive logic 2021-02-24 04:06:54 -08:00
Michael Scire
8f85cc17dc htc: fix copy/paste error in usb driver 2021-02-24 04:06:54 -08:00
Michael Scire
e40eece74e htc: free ourselves from the tyranny of numerical enums 2021-02-24 04:06:54 -08:00
Michael Scire
2341f18edd htc: implement htclow listener thread 2021-02-24 04:06:54 -08:00
Michael Scire
c9c41e0e8d htc: actually use the usb driver 2021-02-24 04:06:54 -08:00
Michael Scire
c59388caf1 htc: implement complete usb driver 2021-02-24 04:06:54 -08:00
Michael Scire
c878123274 htc: implement (fixing linker errors) through HtclowManagerImpl::OpenDriver 2021-02-24 04:06:54 -08:00
Michael Scire
1687bf2e07 htclow: fix copyright headers, skeleton more manager types 2021-02-24 04:06:54 -08:00
Michael Scire
cf99f54a34 htc: skeleton much of the type hierarchy for htclow manager 2021-02-24 04:06:54 -08:00
Michael Scire
83c1c175ba htc: skeleton some more of main 2021-02-24 04:06:54 -08:00
Michael Scire
fc060d3777 htc: skeleton main file/sysmodule dir 2021-02-24 04:06:54 -08:00
Michael Scire
eb50e99748 kern: alleviate a little KPort pressure. 2021-02-23 14:31:24 -08:00
Michael Scire
287f4e6fa1 sm: fix abort on RegisterService while at port limit
closes #1382
2021-02-23 14:21:46 -08:00
Michael Scire
cbf3ba9b75 General system stability improvements to enhance the user's experience. 2021-02-21 23:50:01 -08:00
Michael Scire
95a6b0828f dmnt: set the debug process handle slightly more carefully 2021-02-20 17:37:59 -08:00
Michael Scire
1545fa9d44 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "bc08912d"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "bc08912d"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-02-15 19:52:28 -08:00
Michael Scire
71add1add8 ams: bump version to 0.18.1 2021-02-15 19:51:48 -08:00
Michael Scire
a96786fd2c ams: add kernel to debug elf zip 2021-02-15 19:40:00 -08:00
Michael Scire
74e4e70053 fs.mitm: fix cache of non-current-process data storages (closes #1371) 2021-02-15 19:39:32 -08:00
znxDomain
26b6216fa0 Correct ams_mitm.md formatting
Move set_mitm H3's under correct H2 element
2021-02-11 05:47:31 -08:00
Michael Scire
fe5c850e69 psc: fix pm module init 2021-02-10 02:57:22 -08:00
Michael Scire
2b825d56dc usb: fix wrong command id for AppendConfigurationData 2021-02-07 17:14:48 -08:00
Michael Scire
13b17a5848 usb: add ds client api 2021-02-07 16:29:38 -08:00
Michael Scire
621520c30b kern: fix support for virtual core IDs 2021-02-05 14:59:03 -08:00
Michael Scire
846cc0b47a util: add FixedSet 2021-02-04 02:29:54 -08:00
Michael Scire
e82ad1cdc5 util: add FixedMap::clear 2021-02-04 02:16:37 -08:00
Michael Scire
b40da8f445 ams: add transient unit testing sysmodule to gitignore 2021-02-04 02:08:49 -08:00
Michael Scire
a9c6476416 util: various FixedMap fixes 2021-02-04 02:08:21 -08:00
Michael Scire
c1d93a9495 util: add FixedMap/FixedTree 2021-02-04 01:00:19 -08:00
Michael Scire
201b17f100 util: impl::AvailableIndexFinder 2021-02-03 17:47:32 -08:00
Michael Scire
c0e3cee657 dns.mitm: allow nullptr for port string (closes #1352) 2021-02-03 12:41:23 -08:00
Michael Scire
26d8db74f8 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "17960517"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "17960517"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-02-02 18:33:22 -08:00
Michael Scire
ee2e9d50fd hid: fix sm usage 2021-02-02 18:32:29 -08:00
Michael Scire
fd1a39996e ncm: fix ContentStorageImplBase constructor 2021-02-02 17:12:02 -08:00
Michael Scire
8eb65ab401 dns.mitm: fix hosts file parsing bug 2021-02-02 17:11:53 -08:00
Michael Scire
bcda834980 dns.mitm: make line ordering explicit, rather than implicit.
This doesn't actually change functionality, because this is how std::unordered_map worked anyway...

...but it's better for us to be explicit, I think.
2021-02-02 13:48:40 -08:00
Michael Scire
408b81b881 docs: fix missing meme (important) 2021-02-02 12:17:00 -08:00
Michael Scire
d854b94382 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "90d85295"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "90d85295"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-02-02 12:16:49 -08:00
Michael Scire
63440cab18 ams: bump version to 0.18.0 2021-02-02 12:15:53 -08:00
Michael Scire
4fa585a23f docs: expand dns_mitm wildcard wording 2021-02-02 11:41:49 -08:00
Michael Scire
e521ae805d dns.mitm: add documentation 2021-02-02 11:41:49 -08:00
Michael Scire
6950989552 dns.mitm: support % in hosts file as stand-in for environment identifier 2021-02-02 11:41:49 -08:00
Michael Scire
ffbdf29c10 dns.mitm: fix ABORT_UNLESS -> ABORT 2021-02-02 11:41:49 -08:00
Michael Scire
135d42ffee dns.mitm: hint = {} fix in options 2021-02-02 11:41:49 -08:00
Michael Scire
1306d03136 dns.mitm: add GetAddrInfo redir, AtmosphereReloadHostsFile, debug logging control 2021-02-02 11:41:49 -08:00
Michael Scire
97aa209c43 dns.mitm: fix inverted hostname detection 2021-02-02 11:41:49 -08:00
Michael Scire
4ce2a6deb3 meso: update for new fatal encoding 2021-02-02 11:41:49 -08:00
Michael Scire
e45d8cd7d8 ams: take three tries to edit a structure 2021-02-02 11:41:49 -08:00
Michael Scire
79211e1159 ams: afsr0 -> 32 bits in fatal error 2021-02-02 11:41:49 -08:00
Michael Scire
ca8e8ce487 ams: fix fatal error context 2021-02-02 11:41:49 -08:00
Michael Scire
b30311be65 dns.mitm: support wildcards in hosts 2021-02-02 11:41:49 -08:00
Michael Scire
6694d8c2d9 dns.mitm: edit default behavior/hosts filenames 2021-02-02 11:41:49 -08:00
Michael Scire
658389fc60 dns.mitm: fix issue in host file parsing 2021-02-02 11:41:49 -08:00
Michael Scire
d6477cf024 dns.mitm: parse redirections from hosts file 2021-02-02 11:41:49 -08:00
Michael Scire
400f5142ee dns: implement GetHostByName redirection (backend TODO) 2021-02-02 11:41:49 -08:00
Michael Scire
8bf8df43e2 dns: skeleton passthrough mitm 2021-02-02 11:41:49 -08:00
Michael Scire
a28c60970f kern: fix scheduler update semantics in KLightLock::LockSlowPath 2021-01-28 17:47:26 -08:00
Michael Scire
b5f72b9f20 fssystem: fix bug in BufferedStorage 2021-01-28 14:28:45 -08:00
Michael Scire
8d10584a51 result: always prefer diag::Abort to fatal 2021-01-28 00:15:24 -08:00
Michael Scire
366c265ab2 dd: fix include, note gcc-11 TODO 2021-01-27 23:41:35 -08:00
Michael Scire
42964992d1 dmnt: ro:dmnt available on all sysvers 2021-01-27 14:44:25 -08:00
Michael Scire
4a82d9bf28 sm: supercede ams extension via DetachClient 2021-01-27 14:36:15 -08:00
Michael Scire
4190281b2f ams: communicate status to libnx 2021-01-27 14:20:30 -08:00
Michael Scire
48830d190f timespan: explicitly require TimeSpanType as is_pod 2021-01-25 08:27:42 -08:00
Michael Scire
3389aaefc3 strat: update for revised libnx weak alloc funcs 2021-01-22 03:52:10 -08:00
Michael Scire
f8f987aa8d boot: remove references to memalign/malloc 2021-01-20 23:39:31 -08:00
Michael Scire
e87e146112 ams_mitm: update for new sf semantics 2021-01-20 23:39:31 -08:00
Michael Scire
5751bcc117 dmnt: update for new sf semantics 2021-01-20 23:39:31 -08:00
Michael Scire
eb1e979257 creport: update for new sf semantics 2021-01-20 23:39:31 -08:00
Michael Scire
204539664b boot2: update for new sf semantics 2021-01-20 23:39:31 -08:00
Michael Scire
f5c6736431 boot: update for new sf-semantics 2021-01-20 23:39:31 -08:00
Michael Scire
d00ebaa28a fatal: update screen task to use native window directly 2021-01-20 23:39:31 -08:00
Michael Scire
402e4d1adb fatal: wip (pending libnx pr) update for new sf semantics 2021-01-20 23:39:31 -08:00
Michael Scire
ed7c0605f9 jpegdec: note libjpeg-turbo TODO 2021-01-20 23:39:31 -08:00
Michael Scire
c848a830ee libstrat: move weak HasLaunchedBootProgram to non-lto object file 2021-01-20 23:39:31 -08:00
Michael Scire
dbe8add4f4 loader: fix failure-to-early-return in launch record management 2021-01-20 23:39:31 -08:00
Michael Scire
e4e278bb3d util::unique_lock, update loader to new sf semantics 2021-01-20 23:39:31 -08:00
Michael Scire
3761f80592 string_view: remove now unecessary comment 2021-01-20 23:39:31 -08:00
Michael Scire
9878c18e47 ncm: update for new sf semantics 2021-01-20 23:39:31 -08:00
Michael Scire
3bb94aa146 util::string_view, update pgl for new sf semantics 2021-01-20 23:39:31 -08:00
Michael Scire
83c04fa5d7 pm: update for new sf semantics 2021-01-20 23:39:31 -08:00
Michael Scire
dc4ee1a5bc erpt: update for new sf semantics 2021-01-20 23:39:31 -08:00
Michael Scire
5191f0e305 ro: reduce memory usage by excising (unused) std::malloc 2021-01-20 23:39:31 -08:00
Michael Scire
170034aed3 ro: update for new sf semantics 2021-01-20 23:39:31 -08:00
Michael Scire
21236020cb sm, spl: update to use new sf semantics 2021-01-20 23:39:31 -08:00
Michael Scire
f06de12bea libstrat: convert to experimental new (super-accurate) sf allocation semantics 2021-01-20 23:39:31 -08:00
Michael Scire
8314d015f3 docs: vaguely update roadmap 2021-01-14 06:12:42 -08:00
Michael Scire
49f07b065a git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "6c11c07e"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "6c11c07e"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-01-13 10:42:02 -08:00
Michael Scire
9e104bb83f ams: bump version to 0.17.1 2021-01-13 10:41:13 -08:00
Michael Scire
33457d61da docs: changelog for 0.17.1 2021-01-13 10:40:45 -08:00
Michael Scire
b5816b4a91 stratosphere: discard unnecessary .eh_frame segment 2021-01-13 08:30:24 -08:00
Michael Scire
af7233d84c os: fix missing logic in SdkReplyAndReceive 2021-01-12 18:23:28 -08:00
Michael Scire
8ac8abf295 os: implement 11.x SdkReplyAndReceive 2021-01-12 18:18:39 -08:00
Michael Scire
b26ebc12e1 fs: fix keyslotcache unique_lock usage 2021-01-12 04:37:34 -08:00
Michael Scire
b4122da6ad strat: avoid using unique_lock in a few places 2021-01-12 03:54:46 -08:00
Michael Scire
6a2ee02409 util: fix header dependence 2021-01-12 03:02:09 -08:00
Michael Scire
094cede39e ams: use util::SNPrintf over std:: (size/linker improvements) 2021-01-12 02:59:41 -08:00
Michael Scire
9cfd259c5c spl: reduce heap size 2021-01-12 02:31:57 -08:00
Michael Scire
4f7f37fae6 sf: alter serialization to re-use as much logic as possible 2021-01-12 02:21:33 -08:00
Michael Scire
d2f81d2ca2 ams: save 0x11000 of memory in spl via minor tweaks 2021-01-12 01:27:38 -08:00
Michael Scire
b8072b1398 util: faster constexpr offsetof calc, at the cost of standards compliance 2021-01-08 04:07:45 -08:00
Michael Scire
a6e3a93c07 kern: discard std::__cmpexch_failure_order(std::memory_order) 2021-01-08 02:44:04 -08:00
Michael Scire
1e643f7ab0 kern: further codegen tweaks 2021-01-08 02:35:29 -08:00
Michael Scire
4aa18b06e8 kern: greatly improve codegen for atomics, scheduler 2021-01-08 02:13:43 -08:00
CaramelDunes
f051f707ed Do not blank Rsa2048DeviceCertificate or Rsa2048Device as it prevents HOS from booting on newer PRODINFO versions. 2021-01-07 14:09:15 -08:00
Michael Scire
1c9d6b4d90 kern: fix svc bounds checking for main memory size 4GB -> 8GB (closes #1320) 2021-01-07 03:43:09 -08:00
Michael Scire
b21f8a5043 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "8ad00caa"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "8ad00caa"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2021-01-05 15:14:58 -08:00
Michael Scire
e53b9cc518 ams: update Makefile to build zips with new names 2021-01-05 11:05:33 -08:00
Michael Scire
99e4920d9d fusee: pass along lcd vendor to exosphere (needed for mariko fatal) 2021-01-05 11:05:33 -08:00
Michael Scire
428b5b266c docs/changelog: don't let dreams remain memes 2021-01-05 11:05:33 -08:00
Michael Scire
2b48743265 fusee: perform only pmic reboots on mariko 2021-01-05 11:05:33 -08:00
Michael Scire
a0769844f4 ams: provisional changelog for 0.17.0, release sometime this week 2021-01-05 11:05:33 -08:00
Michael Scire
e0fe29743d pmic: use correct shutdown impl for erista power-off 2021-01-05 11:05:33 -08:00
Michael Scire
9ace85a4aa sept: fix sdram parameter scratch save 2021-01-05 11:05:33 -08:00
Michael Scire
e53b171693 ams: mariko support implies 0.17.0 2021-01-05 11:05:33 -08:00
Michael Scire
8b1835368a sept: fixes to work with new hwinit/etc 2021-01-05 11:05:33 -08:00
Michael Scire
cf7ae775e8 sept is erista-only, and doesn't need mariko sdram (space saving measure) 2021-01-05 11:05:33 -08:00
Michael Scire
07202f7c88 fusee: fix overcorrection for boot reason address 2021-01-05 11:05:33 -08:00
Michael Scire
97157577ab fusee: sdram scratch fixes 2021-01-05 11:05:33 -08:00
Michael Scire
6d65aa7e72 fusee: implement mariko warmboot firmware cache 2021-01-05 11:05:33 -08:00
Michael Scire
601c4516bf fusee/exo: fixes to allow booting (sleep broken until warmboot cache implemented) 2021-01-05 11:05:33 -08:00
Michael Scire
192ea926f6 fusee: commit pre-rendered splash binary 2021-01-05 11:05:33 -08:00
hexkyz
f1d320b6b6 fusee: fix regulator configuration 2021-01-05 11:05:33 -08:00
Michael Scire
6b3a3ecb44 fusee: execute more ccplex boot code out of iram 2021-01-05 11:05:33 -08:00
Michael Scire
dcfd01cf59 fusee: use pre-rendered splash screen instead of bmp 2021-01-05 11:05:33 -08:00
Michael Scire
4b09b5d5ce fusee: minor hwinit fixes 2021-01-05 11:05:33 -08:00
hexkyz
f6833a794a fusee: fix cluster bringup for mariko 2021-01-05 11:05:33 -08:00
Michael Scire
b7895ff2a7 fusee: fix support for mariko key derivation/package1 parsing 2021-01-05 11:05:33 -08:00
Michael Scire
f7898f3519 fusee: add special log level for sd card debug 2021-01-05 11:05:33 -08:00
Michael Scire
96f3c0c387 fusee/sept: build fixes 2021-01-05 11:05:33 -08:00
hexkyz
f4e763ce40 fusee: fix mariko master key derivation 2021-01-05 11:05:33 -08:00
hexkyz
a05e87f78a fusee: cleanup code and start fleshing out mariko keygen 2021-01-05 11:05:33 -08:00
hexkyz
4809ced64d fusee: start fleshing out nxboot for Mariko 2021-01-05 11:05:33 -08:00
hexkyz
222300d03c fusee: accurately match Mariko pk1ldr 2021-01-05 11:05:33 -08:00
hexkyz
b918d4b2aa fusee: 11.0.0 support 2021-01-05 11:05:33 -08:00
hexkyz
53c684a17a fusee/sept: delegate SoC selection to individual components and keep common code SoC-agnostic 2021-01-05 11:05:33 -08:00
hexkyz
4ffdf8d525 fusee: artificially raise main length to avoid elf compilation issues (final size will be much smaller) 2021-01-05 11:05:33 -08:00
hexkyz
7480b6bb80 fusee: move dsi register write to the proper configuration list 2021-01-05 11:05:33 -08:00
hexkyz
3e8688e19e fusee: update display code for mariko 2021-01-05 11:05:33 -08:00
Michael Scire
3b05315616 fusee: fixup extents for chainloader/stack 2021-01-05 11:05:33 -08:00
Michael Scire
2b81ed7315 fusee-primary: fix reboot-to-self for decompressed code 2021-01-05 11:05:33 -08:00
Michael Scire
ff7e52a1c1 fusee/sept: fix fuse driver to not infinitely recurse on get_soc_type() 2021-01-05 11:05:33 -08:00
Michael Scire
e391f593de fusee: fixup common for primary 2021-01-05 11:05:33 -08:00
Michael Scire
f600dff961 fusee: uncompress fusee-primary, which is now getting pretty big. 2021-01-05 11:05:33 -08:00
hexkyz
8104beb2e0 fusee: implement mariko sdram params saving 2021-01-05 11:05:33 -08:00
hexkyz
4cd56f8423 fusee: mariko sdram initialization 2021-01-05 11:05:33 -08:00
hexkyz
198bdacaf4 fusee: initial mariko hwinit 2021-01-05 11:05:33 -08:00
hexkyz
35ab0939fa fusee: support mariko in sdmmc 2021-01-05 11:05:33 -08:00
hexkyz
4958d01153 fusee/sept: support mariko fuses 2021-01-05 11:05:33 -08:00
hexkyz
b625fd324e fusee/sept: update fuse driver code 2021-01-05 11:05:33 -08:00
hexkyz
5e342d8c52 fusee: fix sdmmc speed modes 2021-01-05 11:05:33 -08:00
hexkyz
d233b482fb fusee: update FatFs to R0.14 2021-01-05 11:05:33 -08:00
hexkyz
3e2f776184 fusee/sept: isolate common code for mariko preparation (to be revised during C++ rewrite) 2021-01-05 11:05:33 -08:00
Michael Scire
7a9018dc7a sm: fix wait list reentrancy and state on processing loop entry 2020-12-31 16:01:26 -08:00
Michael Scire
f768e3c8f9 sm: implement accurate request deferral semantics 2020-12-31 16:01:26 -08:00
tuxuser
d42f2e4d1b
Add lz4 dependency to the build instructions (#1308)
* Add lz4 dependency to the build instructions

At build-time of exosphere, the `split_program.py` script is called.
It requires python module `lz4` -> https://github.com/Atmosphere-NX/Atmosphere/blob/master/exosphere/program/split_program.py

Adding lz4 to the building.md documentation.

* Remove "(Python Library)" from deps-entries
2020-12-31 12:29:17 -08:00
Michael Scire
24111d46a1 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "b05ba02f"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "b05ba02f"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-12-29 13:08:25 -08:00
Michael Scire
f2a6a4a6e6 fusee: fix sept enc header dependency 2020-12-29 13:07:48 -08:00
Michael Scire
6633af769e boot: fix rebuild-every-time-make-is-invoked 2020-12-29 13:01:06 -08:00
Michael Scire
131c8609c8 libmeso: explicitly blacklist ::sdmmc::, instead of relying on incorrect board tricks 2020-12-29 12:36:26 -08:00
Michael Scire
30e70e20d8 strat: fix board namespacing for nintendo::nx 2020-12-29 12:30:43 -08:00
Michael Scire
a26e8ac54f ams: resolve source dir inconsistency 2020-12-29 12:28:07 -08:00
Michael Scire
8bfda27e0e kern: remove target-firmware logic for kernel loader 2020-12-29 12:21:41 -08:00
Michael Scire
0c9cb830f7 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "be8388d6"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "be8388d6"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-12-28 17:34:31 -08:00
Michael Scire
ee1b638dde svc: we support kernel version 15.4 2020-12-28 17:33:45 -08:00
Michael Scire
9826358533 ams: update five -> aula, per CalWriterManu 2020-12-28 15:54:25 -08:00
Michael Scire
113ab8439d kern: fix KTrace buffer memory region type to match official kernel 2020-12-28 00:57:45 -08:00
ameerj
60c888126b fix typo in KServerPort::Destroy() 2020-12-25 20:23:10 -08:00
Michael Scire
d7b14f48d2 fusee: fix no-BCT.ini for fusee-secondary 2020-12-19 12:08:05 -08:00
Michael Scire
1085ccbe60 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "886dfaf6"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "886dfaf6"
git-subrepo:
  version:  "0.4.0"
  origin:   "???"
  commit:   "???"
2020-12-19 10:22:37 -08:00
Michael Scire
8b61537aa3 ams: bump version to 0.16.2 2020-12-19 10:21:15 -08:00
Michael Scire
968f50bc07 kern: refactor to use m_ for member variables 2020-12-18 13:31:01 -08:00
Michael Scire
0bf2ade76f ams: use default bct0 by default 2020-12-18 13:27:52 -08:00
Adubbz
35a6705d55 git subrepo pull troposphere/daybreak/nanovg/ 2020-12-17 17:19:54 -08:00
Michael Scire
b8471bcd4e loader: correct GetCapabilityId allowal 2020-12-17 04:10:25 -08:00
Michael Scire
f7e83a72a9 kern: fix generic KDevicePageTable 2020-12-16 14:33:07 -08:00
Michael Scire
f6b847177a kern: fix LegacyNFiq interrupt ID 2020-12-16 14:28:24 -08:00
Michael Scire
a6d40e85f1 kern: fix linear region printing output 2020-12-14 21:18:14 -08:00
Michael Scire
6a81206373 pgl: add new snapshotdump logic 2020-12-14 19:31:05 -08:00
Michael Scire
4be5733c8e pgl: update for 11.0.0 behavior 2020-12-14 19:16:18 -08:00
Michael Scire
8dcb07152e creport: update for 11.0.0 behavior 2020-12-14 19:15:49 -08:00
Michael Scire
3b5dff0f83 pm: since 9.0.0, exceptions are signaled only once 2020-12-14 18:53:16 -08:00
Michael Scire
1ca373cd71 set.mitm: add setting for controlling DebugModeFlag for am 2020-12-14 15:56:04 -08:00
Michael Scire
4ff026224e kern: fix inverted conditional in waiter debug print 2020-12-14 10:32:49 -08:00
Michael Scire
2c39efea4c r2p: bring in line with other defs 2020-12-14 10:01:07 -08:00
Michael Scire
16cd1141d1 kern: fix some typos/naming semantics 2020-12-12 05:36:48 -08:00
Michael Scire
4b71e3a87e kern: implement process cpu utilization debug 2020-12-12 05:34:31 -08:00
Michael Scire
d090a7886d kern: add kernel thread utilization debug 2020-12-12 05:02:23 -08:00
Michael Scire
9a6cca7499 kern: add page table contents debug 2020-12-11 19:30:48 -08:00
Michael Scire
1ec2c0c2cb git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "59b4e750"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "59b4e750"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-12-11 05:02:58 -08:00
Michael Scire
569e1bc650 kern: cfi fix pt 2 2020-12-11 04:59:20 -08:00
Michael Scire
652e9bf9e8 kern: fix cfi (requires x18 not cleared on return to userland) 2020-12-11 04:53:25 -08:00
Michael Scire
ca2cc5e179 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "5a18bea6"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "5a18bea6"
git-subrepo:
  version:  "0.4.1"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "a04d8c2"
2020-12-11 03:49:45 -08:00
Michael Scire
17c8c390fc kern: fix building debug config 2020-12-11 03:48:34 -08:00
Michael Scire
d8ae1d873c ams: update changelog for 0.16.1 2020-12-11 03:22:28 -08:00
Michael Scire
63e3c02688 fusee/exo: support dynamic control of invert flag for logging 2020-12-11 03:18:21 -08:00
Michael Scire
14a415c4b2 ams: bump version to 0.16.1 2020-12-11 03:06:47 -08:00
Michael Scire
734122f20a fusee: update for 11.0.1 2020-12-11 03:06:17 -08:00
Michael Scire
7fb902d8fb kern: update for 11.0.1 2020-12-11 02:59:09 -08:00
Michael Scire
be8473cf65 kern: implement memory debug 2020-12-10 16:32:19 -08:00
Michael Scire
6df26d674c kern/sm: fix debug port output 2020-12-10 04:06:02 -08:00
Michael Scire
1a6e003a5d kern: add kernel object debug 2020-12-10 03:31:57 -08:00
Michael Scire
0acd79c8c2 kern: implement port debug 2020-12-10 01:44:27 -08:00
Michael Scire
8a4bf6a0a8 kern: add handle table/process/suspend/resume debug 2020-12-09 23:44:36 -08:00
Michael Scire
af259eabda kern: implement thread call stack debug 2020-12-09 22:49:04 -08:00
Michael Scire
16e2f46aed fatal: prevent crash on fatal from currently-debugged process 2020-12-09 06:45:19 -08:00
Michael Scire
bcc7eed037 kern: add debug thread dump 2020-12-09 05:59:54 -08:00
Michael Scire
abd7ad2720 meso: properly initialize per-thread CFI-value for 11.x 2020-12-08 16:16:49 -08:00
Michael Scire
58c3c8c19a fusee: take three tries for a basic assignment 2020-12-07 19:34:13 -08:00
Michael Scire
f62330c73b fusee: update for exo flags arr-type 2020-12-07 19:33:29 -08:00
Michael Scire
2de85c633a exo/meso/fusee: support dynamic control of log port/baud rate 2020-12-07 19:25:06 -08:00
Michael Scire
121c981bb4 sept: be more forgiving about entrypoint 2020-12-07 03:20:01 -08:00
Michael Scire
15396dbbc2 fs: add ProgramIndexMapInfo 2020-12-07 01:03:39 -08:00
Michael Scire
9ca1d3a7f7 loader: fix process handle management on create process error 2020-12-06 21:20:42 -08:00
Michael Scire
32803d9920 fs: update + consolidate path normalization logic 2020-12-06 19:56:45 -08:00
Michael Scire
5ef93778f6 fs: move file storage to common 2020-12-05 03:31:12 -08:00
Michael Scire
7548940efa IStorage: rename access check helpers 2020-12-05 03:15:48 -08:00
Michael Scire
bf55776241 fsa: *Impl -> Do* 2020-12-05 03:05:06 -08:00
Michael Scire
73167448cc fs/system: deduplicate RomFs code 2020-12-04 22:08:33 -08:00
Michael Scire
c45088d1cd kern: add support for InfoType_FreeThreadCount 2020-12-04 18:20:56 -08:00
Michael Scire
7336dc2b7a git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "2c3ccef1"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "2c3ccef1"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-12-03 12:54:44 -08:00
Michael Scire
d2f48d5e36 err: fix narrowing conversion 2020-12-03 12:53:20 -08:00
Michael Scire
422e9434d8 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "49c1ace8"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "49c1ace8"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-12-03 12:48:41 -08:00
Michael Scire
2b93bbd9ee git subrepo pull emummc
subrepo:
  subdir:   "emummc"
  merged:   "5eed18eb"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "5eed18eb"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-12-03 12:48:06 -08:00
Michael Scire
021b29d2db erpt: give access to ectx:r 2020-12-03 11:22:18 -08:00
Michael Scire
6da28f4a27 erpt: update for 11.0.0 (closes #1218) 2020-12-03 11:13:35 -08:00
Michael Scire
bba99d49da kern: fix inverted conditional in UnmapProcessCodeMemory 2020-12-02 11:31:50 -08:00
Michael Scire
e760a9d4b0 kern: fix reboot to fatal error 2020-12-02 11:31:15 -08:00
Michael Scire
ee91f3fde0 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "78510a74"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "78510a74"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-12-02 10:00:52 -08:00
Michael Scire
f72475872a exo: add new dram IDs 2020-12-02 09:59:53 -08:00
Michael Scire
199a9aec8b exo: explicitly TODO the warmboot magic 2020-12-02 09:16:34 -08:00
Michael Scire
1b83f5169a docs: typo 2020-12-02 08:36:35 -08:00
Michael Scire
7bb77f44af docs: clarify wording 2020-12-02 08:36:19 -08:00
Michael Scire
801ce24622 docs: usb homebrew is broken, not ams's fault but worth mentioning 2020-12-02 08:28:44 -08:00
Michael Scire
1d778b2dc8 docs: update changelog for 0.16.0 2020-12-02 08:23:05 -08:00
Michael Scire
7c9608021d git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "8233fa00"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "8233fa00"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-12-02 06:55:24 -08:00
Michael Scire
b8fbd0baff fssystem: fix bug in BufferedStorage 2020-12-02 06:48:42 -08:00
Michael Scire
525da05629 erpt: update category list 2020-12-02 06:47:50 -08:00
Michael Scire
2e9db4d113 git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "6fd752da"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "6fd752da"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-12-02 06:45:38 -08:00
Michael Scire
4f1a4e7499 kernel patches: fuck armconverter.com 2020-12-02 06:43:37 -08:00
Michael Scire
972283032a kern: tweak KScopedAutoObject 2020-12-02 06:43:37 -08:00
Michael Scire
57f935391d kern: allow non-inline GetObjectForIpc 2020-12-02 06:43:37 -08:00
Michael Scire
4804e1e1e0 kern: fix KHandleTable null deref in ipc 2020-12-02 06:43:37 -08:00
Michael Scire
4ae74b9b4e kern: session mapping getters are on the hotpath 2020-12-02 06:43:37 -08:00
Michael Scire
726d7b6e4d kern: tweak optimization settings for hot paths 2020-12-02 06:43:37 -08:00
Michael Scire
390bdc7b6b kern: more iterator adjustments 2020-12-02 06:43:37 -08:00
Michael Scire
2d8acf9c64 strat: add new npdm field 2020-12-02 06:43:37 -08:00
Michael Scire
9743f63f0d ams.mitm: fix old hid api references 2020-12-02 06:43:37 -08:00
Michael Scire
ccd2798ae2 ams: this version will be 0.16.0 2020-12-02 06:43:37 -08:00
Adubbz
f3dbab4876 daybreak: update for hid refactor (#1222) 2020-12-02 06:43:37 -08:00
Michael Scire
41a53075e5 hot path: just in case 2020-12-02 06:43:37 -08:00
Michael Scire
ab8de72db0 microkernel: hot paths are pretty fucking hot 2020-12-02 06:43:37 -08:00
Michael Scire
331fa1d00d kern: update KConditionVariable to support new has_waiter_flag rules 2020-12-02 06:43:37 -08:00
Michael Scire
fd745ab2d3 kern: fix SvcGetResourceLimitPeakValue 2020-12-02 06:43:37 -08:00
Michael Scire
972b396f61 kern: fix copy/paste error 2020-12-02 06:43:37 -08:00
Michael Scire
3c8e7de915 kern: fix bugs caused by UB + transition to -Os 2020-12-02 06:43:37 -08:00
Michael Scire
1b164613a6 loader: support 11.x DisableDeviceAddressSpaceMerge 2020-12-02 06:43:37 -08:00
Michael Scire
3d4ab95ab2 kern: allow non-inline KSchedulerLock::Lock 2020-12-02 06:43:37 -08:00
Michael Scire
152def19c0 kern: build as -Os instead of -O2 2020-12-02 06:43:37 -08:00
Michael Scire
63974d9bce kern: reduce KMemoryRegionAllocator slab size 2020-12-02 06:43:37 -08:00
Michael Scire
2b483866c7 kern: assume that uart has been setup by secmon 2020-12-02 06:43:37 -08:00
Michael Scire
7e1da15f6e kern: update Initialize0 to account for new ordering 2020-12-02 06:43:37 -08:00
Michael Scire
0a1465f198 kern: add new overflow checks on KMemoryRegions 2020-12-02 06:43:37 -08:00
Michael Scire
748893fe77 kern: fix assertion in the multi-region pool partition code 2020-12-02 06:43:37 -08:00
Michael Scire
1ca64cf2a1 kern: improve KMemoryManager pool detection 2020-12-02 06:43:37 -08:00
Michael Scire
aac8af8bf5 kern: update KMemoryRegion to store last address rather than size 2020-12-02 06:43:37 -08:00
Michael Scire
5da6b60008 kern: add KAlpha/KBeta 2020-12-02 06:43:37 -08:00
Michael Scire
e400e2afc7 kern: stubs for Svc39, 3A, 46, 47 2020-12-02 06:43:37 -08:00
Michael Scire
56c6e4244a kern: remove now unused SetupFor*Compare funcs 2020-12-02 06:43:37 -08:00
Michael Scire
c8ebd7eea0 KConditionVariable/KAddressArbiter: no need for global compare thread 2020-12-02 06:43:37 -08:00
Michael Scire
550f5690bf kern: set EL2 id registers on deprivilege 2020-12-02 06:43:37 -08:00
Michael Scire
28f9b534b6 kern: implement 64-virtual-core interface 2020-12-02 06:43:37 -08:00
fincs
3fd59b61bc reboot_to_payload: Update for new libnx HID interface 2020-12-02 06:43:37 -08:00
fincs
f86059de70 strat/cfg: Update for new libnx HID interface 2020-12-02 06:43:37 -08:00
fincs
a03ee7b148 strat/hid: Update for new libnx HID interface 2020-12-02 06:43:37 -08:00
Michael Scire
8b2ed36698 kern: cleanup KThread, optimize/normalize KThreadQueue/KWaitObject 2020-12-02 06:43:37 -08:00
Michael Scire
1852fe8612 kern: improve KSynchronizationObject, kill KSynchronization 2020-12-02 06:43:37 -08:00
Michael Scire
b60054dba1 kern: update for new interrupt event locking scheme 2020-12-02 06:43:37 -08:00
Michael Scire
c7f37f81ee kern: fix sleep save/resume for new x18/tpidr scheme 2020-12-02 06:43:37 -08:00
Michael Scire
19a279ce45 kern: fix race-crash on interrupt controller save, improve fatal output 2020-12-02 06:43:37 -08:00
Michael Scire
783f1077be kern: KObjectContainer::Register -> void 2020-12-02 06:43:37 -08:00
Michael Scire
b0debd72a7 kern: Kill KCoreLocalRegion 2020-12-02 06:43:37 -08:00
Michael Scire
24d545701c kern: remove more of clc 2020-12-02 06:43:37 -08:00
Michael Scire
aae565629e kern: move scheduler/interrupt task manager out of core local region 2020-12-02 06:43:37 -08:00
Michael Scire
bee629b8ad kern: update KHardwareTimer, move out of KCoreLocalRegion 2020-12-02 06:43:37 -08:00
Michael Scire
5cb237d030 kern: use single interrupt manager object 2020-12-02 06:43:37 -08:00
Michael Scire
a4e09fc6c4 kern: fix unnecessary align-down 2020-12-02 06:43:37 -08:00
Michael Scire
73d9d5ff47 kern: fix error in SeparatePages 2020-12-02 06:43:37 -08:00
Michael Scire
08cfee54fa kern: fix re-order/assert in KMemoryBlock 2020-12-02 06:43:37 -08:00
Michael Scire
7b279ab863 kern: remove KPageTableBase::MakeAndOpenContiguousPageGroup 2020-12-02 06:43:37 -08:00
Michael Scire
6a85f7225d kern: implement DisableDeviceAddressSpaceMerge 2020-12-02 06:43:37 -08:00
Michael Scire
f469dfbeb3 kern: SvcGetResourceLimitPeakValue 2020-12-02 06:43:37 -08:00
Michael Scire
cc11d452e5 kern: KMemoryManager::Allocate -> AllocateAndOpen 2020-12-02 06:43:37 -08:00
Michael Scire
3bce008170 kern: implement kmemoryblock/kmemoryinfo merge disable 2020-12-02 06:43:37 -08:00
Michael Scire
3383509da6 kern: remove KMemoryAttribute_AnyLocked 2020-12-02 06:43:37 -08:00
Michael Scire
281dcf232a kern: update KMemoryBlockManagerUpdateAllocator api 2020-12-02 06:43:37 -08:00
Michael Scire
71a2fe1bb6 kern: implement new software-reserved page table bits 2020-12-02 06:43:37 -08:00
Michael Scire
4a216dc928 kern: update KPageTableBase for new disable-merge attrs 2020-12-02 06:43:37 -08:00
Michael Scire
18099e19b1 fusee: recognize/support 11.x kernel 2020-12-02 06:43:37 -08:00
Michael Scire
a0a45853dd nogc: update for new lafw 2020-12-02 06:43:37 -08:00
Michael Scire
fe9a4cd2fc fusee: whoops 2020-12-02 06:43:37 -08:00
Michael Scire
88a66c89e2 fusee: fix 11.x pk21 support 2020-12-02 06:43:37 -08:00
Michael Scire
93128b6b17 fusee-secondary: update for 11.0.0 erista 2020-12-02 06:43:37 -08:00
Michael Scire
db2de8ef31 erpt: lightly update (TODO: use context, do new svc stuff) 2020-12-02 06:43:37 -08:00
Michael Scire
05832cec73 sm: implement UserService::DetachClient 2020-12-02 06:43:37 -08:00
Michael Scire
632c8984c8 loader: update for 11.0.0 (anti-dg + set program args abi) 2020-12-02 06:43:37 -08:00
Michael Scire
694e3b579e pgl: update for 11.0.0 2020-12-02 06:43:37 -08:00
Michael Scire
20eba0dc98 fs: nogc patches for 11.0.0 2020-12-02 06:43:37 -08:00
Michael Scire
730ef6d6db emummc: untested 11.0.0 support 2020-12-02 06:43:37 -08:00
Michael Scire
7cb24713ab kldr: update for 11.0.0 2020-12-02 06:43:37 -08:00
Michael Scire
a685842804 exo: update for 11.0.0 2020-12-02 06:43:37 -08:00
Michael Scire
ad6dd60474 result: update for accurate ::Includes 2020-12-02 06:43:37 -08:00
Michael Scire
05af215191 erpt: add update autogenerated ids 2020-12-02 06:43:37 -08:00
hexkyz
e06b73aafa
boot: add missing RegisterWrite in DisplayConfigDsi01Init03 2020-11-30 19:35:06 +00:00
Michael Scire
fd7e4dfb97 ncm: fix abort in ListContentMetaInfo 2020-11-29 19:00:15 -08:00
Lusamine
77d7e6b121
Correct some occurrences of "occured" (#1213)
* Correct all occurrences of "occured"

* Correct some occurrences of "occured"
2020-11-25 06:29:09 -08:00
Michael Scire
ee9585dd57 git subrepo pull emummc
subrepo:
  subdir:   "emummc"
  merged:   "25075973"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "25075973"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-11-24 23:20:20 -08:00
Michael Scire
8ba513fefb fs: fix bug in buffer manager 2020-11-24 19:49:11 -08:00
ObscenityIB
ef4d7dc024 docs/building: missing required lib glm 2020-11-23 23:20:50 -08:00
Michael Scire
87512439a3 ams.mitm: fix reboot to payload/fatal error distinction 2020-11-22 10:28:23 -08:00
Michael Scire
51aeb280f1 exo/mariko fatal: add missing ( 2020-11-22 10:28:23 -08:00
Michael Scire
078a42f80c fusee: integrate mariko fatal. 2020-11-22 10:28:23 -08:00
Michael Scire
06dcc6bc17 exo/mariko fatal: disable backlight before we do screen re-init 2020-11-22 10:28:23 -08:00
Michael Scire
2bc6dec126 exo/mariko fatal: stop sound output on fatal error 2020-11-22 10:28:23 -08:00
Michael Scire
5382011b0d exo/mariko fatal: print descriptor for fatal error report 2020-11-22 10:28:23 -08:00
Michael Scire
8ba1cdeef2 exo/mariko fatal: perform display init, reboot on power button press 2020-11-22 10:28:23 -08:00
Michael Scire
45830472c1 exo/mariko fatal: halt other cores when beginning fatal program 2020-11-22 10:28:23 -08:00
Michael Scire
7f1a7cfd2d fs: fix RomFs GetEntryType (fixes mariko daybreak) 2020-11-21 04:00:52 -08:00
Michael Scire
24eef96b15 os: remove completed TODO 2020-11-20 17:50:05 -08:00
Michael Scire
1ea49bdae3 os: do not use deprecated libnx ::virtmemReserve api 2020-11-20 17:48:58 -08:00
Michael Scire
c98f4f1ff6 strat: use 39-bit address space when available (new loader extension) 2020-11-20 17:02:32 -08:00
Michael Scire
dd56f8449f ldr/hbl: support address space width overrides 2020-11-20 16:57:07 -08:00
Michael Scire
835aa6b9db exo: fix building on release 2020-11-18 15:08:44 -08:00
Michael Scire
69f9fb8713 exo: receive saved lcd vendor from bl 2020-11-18 15:08:44 -08:00
Michael Scire
a843cc0ee7 fatal: restructure, skeleton disp 2020-11-18 15:08:44 -08:00
Michael Scire
b96b162b0b sdmmc: fix UHS-I tuning init for SD cards 2020-11-18 15:08:44 -08:00
Michael Scire
512fc8f9b1 sdmmc: various fixes + logging as bugs are debugged 2020-11-18 15:08:44 -08:00
Michael Scire
b32c9bf17c exo/mariko fatal: save fatal error binaries to the SD 2020-11-18 15:08:44 -08:00
Michael Scire
5f6942aec8 exo/mariko_fatal: add sdmmc write function 2020-11-18 15:08:44 -08:00
Michael Scire
a2c89a8f3f mariko fatal: map 0xC0000000 for framebuffer usage 2020-11-18 15:08:44 -08:00
Michael Scire
898fe61034 exo: read first two sd card sectors in mariko_fatal 2020-11-18 15:08:44 -08:00
Michael Scire
7bcd5c6e3b exo: implement start of mariko fatal handler 2020-11-18 15:08:44 -08:00
Michael Scire
123ed80dc7 boot: update DisplayConfigMipiCal01 to reflect newest boot sysmodule 2020-11-16 17:51:52 -08:00
Michael Scire
5dfe355df1 git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "791681f5"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "791681f5"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-11-15 22:46:12 -08:00
Michael Scire
c77b76fbd2 emummc: add GetSocType/GetHardwareType utils 2020-11-15 22:45:31 -08:00
Michael Scire
1525c66de7 git subrepo clone --force --branch=develop https://github.com/m4xw/emummc
subrepo:
  subdir:   "emummc"
  merged:   "24bdbec8"
upstream:
  origin:   "https://github.com/m4xw/emummc"
  branch:   "develop"
  commit:   "24bdbec8"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-11-15 22:39:39 -08:00
Michael Scire
f72b21d665 exo: upload memory layout design document I use 2020-11-15 08:44:57 -08:00
Michael Scire
74da8a4885 exo: map stack region for mariko-only program 2020-11-15 08:43:55 -08:00
Michael Scire
cb7c6a5d8a exo: load mariko-only program during boot 2020-11-15 08:35:57 -08:00
Michael Scire
fc97237447 exo: add logging to boot under debug config 2020-11-15 03:24:04 -08:00
Michael Scire
a203ac3f80 exo: free space by moving keys to volatile iram, support logging under debug config 2020-11-15 02:47:44 -08:00
Michael Scire
2ef41f0027 exo: shuffle logic around to support debug code region in iram 2020-11-15 01:36:50 -08:00
Michael Scire
ee3a7e7740 exo: disable untranslated gpu accesses on mariko 2020-11-15 00:45:41 -08:00
Michael Scire
3c595994df exosphere: release, debug, audit configs 2020-11-14 14:40:16 -08:00
Michael Scire
b4c908ba9f exo/program: release, debug, audit configs 2020-11-14 14:14:07 -08:00
Michael Scire
c572024a5e rebootstub: audit/debug/release 2020-11-14 12:19:01 -08:00
Michael Scire
71a38ae74d libexo/sc7fw: support release/debug/audit 2020-11-14 12:17:38 -08:00
Michael Scire
f74527d93c libexosphere: support building under debug/audit configurations 2020-11-14 11:35:51 -08:00
Michael Scire
72f83ea43e exo: reserve a portion of iram for secure monitor debug (including code) 2020-11-14 11:11:41 -08:00
Michael Scire
43ef260c66 boot2: don't wait for bpc.mitm on mariko 2020-11-14 10:40:40 -08:00
Michael Scire
f2c553be1a bpc.mitm: don't mitm bpc on mariko 2020-11-14 10:34:13 -08:00
Michael Scire
304b9bfbd1 i2c: correct missing destruction 2020-11-14 03:37:51 -08:00
Michael Scire
1d8744164e ams.mitm: provide different boot0-protection for custom public key 2020-11-14 03:37:51 -08:00
Michael Scire
d587054f96 wec: whoops 2020-11-14 03:37:51 -08:00
Michael Scire
29facf6141 updater: don't overwrite custom-public-key BCTs 2020-11-14 03:37:51 -08:00
Michael Scire
b8c3128d16 pinmux: whoops 2020-11-14 03:37:51 -08:00
Michael Scire
b62aa044e4 boot/powctl/i2c: more miscellaneous fixes 2020-11-14 03:37:51 -08:00
Michael Scire
affdea9244 boot: various bugfixes (b/w logo displays now) 2020-11-14 03:37:51 -08:00
Michael Scire
fdab964e3d powctl: implement max17050 driver 2020-11-14 03:37:51 -08:00
Michael Scire
15c752f52d powctl: add battery driver logic (missing impl) 2020-11-14 03:37:51 -08:00
Michael Scire
28862f69f8 powctl: implement max17050 custom parameter init 2020-11-14 03:37:51 -08:00
Michael Scire
a20f278ede powctl: implement full bq24193 driver 2020-11-14 03:37:51 -08:00
Michael Scire
7c58a21c4c i2c: add register acccessor helpers 2020-11-14 03:37:51 -08:00
Michael Scire
5bd02f128d powctl: add ChargerDriver body (needs impl) 2020-11-14 03:37:51 -08:00
Michael Scire
d9350d24a9 pinmux: implement updated initial config api 2020-11-14 03:37:51 -08:00
Michael Scire
68f42a14c8 boot: update/refactor display management to support hw type 5/display 0x1040/0x2050 2020-11-14 03:37:51 -08:00
Michael Scire
4d1c4f1677 dd: implement DeviceAddressSpaceType api 2020-11-14 03:37:51 -08:00
Michael Scire
708f5bf1fb boot: refactor battery checking to use new powctl apis 2020-11-14 03:37:51 -08:00
Michael Scire
485304bd17 powctl: implement client api (needs board-specific impl) 2020-11-14 03:37:51 -08:00
Michael Scire
3d31837ca1 pwm: implement driver for boot sysmodule 2020-11-14 03:37:51 -08:00
Michael Scire
35552bac2c gpio: add missing driver functions for boot 2020-11-14 03:37:51 -08:00
Michael Scire
323e893433 i2c: implement remaining required driver logic 2020-11-14 03:37:51 -08:00
Michael Scire
258cfb62a2 i2c: command list format, get boot down to linker errors 2020-11-14 03:37:51 -08:00
Michael Scire
42caa4ffd1 i2c/gpio: hook up open session for sf interface 2020-11-14 03:37:51 -08:00
Michael Scire
b74b309a77 i2c: implement driver init api 2020-11-14 03:37:51 -08:00
Michael Scire
09f3b29a98 i2c: finish I2cBusAccessor 2020-11-14 03:37:51 -08:00
Michael Scire
6c4280d27a i2c: implement BusAccessor::WriteHeader 2020-11-14 03:37:51 -08:00
Michael Scire
6ff58fa4b3 i2c: implement BusAccessor except Send/Receive/WriteHeader 2020-11-14 03:37:51 -08:00
Michael Scire
e5bf06254a boot: add rgltr/clkrst overrides, skel I2cBusAccessor 2020-11-14 03:37:51 -08:00
Michael Scire
f4e499fed9 i2c: add auto-generated bus/device map 2020-11-14 03:37:51 -08:00
Michael Scire
4a2daa4810 i2c: begin skeleton device driver framework 2020-11-14 03:37:51 -08:00
Michael Scire
21fac86080 gpio: remove copy-pasted unused file 2020-11-14 03:37:51 -08:00
Michael Scire
bd3ab76fd2 gpio: implement more of server library for boot sysmodule client usage 2020-11-14 03:37:51 -08:00
Michael Scire
e1b5d81d65 wec: implement wec driver components for boot sysmodule 2020-11-14 03:37:51 -08:00
Michael Scire
4b4f05b4a6 gpio: add (most of) driver framework for boot sysmodule usage 2020-11-14 03:37:51 -08:00
Michael Scire
ddf2f5f3c5 ddsf: implement namespace 2020-11-14 03:37:51 -08:00
Michael Scire
d2e530c2aa libstrat: fix precompiled-header dependency detection 2020-10-30 11:56:12 -07:00
SciresM
166318ba77
sdmmc: implement driver suitable for fs + bootloader
* sdmmc: begin skeletoning sdmmc driver

* sdmmc: add most of SdHostStandardController

* sdmmc: implement most of SdmmcController

* sdmmc: Sdmmc2Controller

* sdmmc: skeleton implementation of Sdmmc1Controller

* sdmmc: complete abstract logic for Sdmmc1 power controller

* sdmmc: implement gpio handling for sdmmc1-register-control

* sdmmc: implement pinmux handling for sdmmc1-register-control

* sdmmc: fix building for arm32 and in stratosphere context

* sdmmc: implement voltage enable/set for sdmmc1-register-control

* util: move T(V)SNPrintf from kernel to util

* sdmmc: implement BaseDeviceAccessor

* sdmmc: implement MmcDeviceAccessor

* sdmmc: implement clock reset controller for register api

* sdmmc: fix bug in WaitWhileCommandInhibit, add mmc accessors

* exo: add sdmmc test program

* sdmmc: fix speed mode extension, add CheckMmcConnection for debug

* sdmmc: add DeviceDetector, gpio: implement client api

* gpio: modernize client api instead of doing it the lazy way

* sdmmc: SdCardDeviceAccessor impl

* sdmmc: update test program to read first two sectors of sd card

* sdmmc: fix vref sel

* sdmmc: finish outward-facing api (untested)

* ams: changes for libvapours including tegra register defs

* sdmmc: remove hwinit
2020-10-30 11:54:30 -07:00
SciresM
ac04e02a08
Meso build targets (#1196)
* meso: commit wip (thanks fincs) rewrite to support build targets

* meso: commit mostly-working build system

* meso: correct .o dependencies in kernel/kldr

* libstratosphere: fix building after PCH related build changes

Co-authored-by: fincs <fincs@devkitpro.org>
2020-10-27 13:55:19 -07:00
Michael Scire
1c71d12d9d ams.mitm: avoid inadvertently breaking ftpd/file listers 2020-10-27 10:28:51 -07:00
Michael Scire
37738699f2 docs: edit terminology to be hip to the jive 2020-10-26 16:14:25 -07:00
Michael Scire
e973ef7533 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "10e9e0e8"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "10e9e0e8"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-10-26 16:03:40 -07:00
Michael Scire
2ee2a4f1ac docs/fatal error: update for 0.15.0 2020-10-26 16:00:34 -07:00
Michael Scire
2a2bffeb35 ams: fix building debug elf zip 2020-10-15 09:47:06 -07:00
Michael Scire
d04046ecaf ams: bump version to 0.15.0 (release slated for post-crown-tundra) 2020-10-15 09:41:49 -07:00
Michael Scire
f24171dc41 ams: build experimental zip in addition to standard one 2020-10-15 09:41:01 -07:00
Michael Scire
5b02c77400 ams: fix updater misbehavior before 0.15.0 releases 2020-10-14 12:28:26 -07:00
Michael Scire
2e7214b6fa kern: perform rescheduling on dispatch re-enable (closes #1169) 2020-10-13 23:07:51 -07:00
Michael Scire
d52179c708 util: follow 90fd771 to its natural conclusion (generic base rbtree) 2020-10-12 01:06:19 -07:00
Michael Scire
388f9e6455 kern: minor behavioral fixes to condvar/address arbiter 2020-10-12 01:06:19 -07:00
SciresM
c547c7f0e7
Note that we are a python 2 project. 2020-10-09 17:37:51 -07:00
Michael Scire
4138abbefa erpt: fix attachment-in-save paths (closes #1124, #1145) 2020-09-23 19:49:20 -07:00
Michael Scire
1275eb0bf3 erpt: add fixed-width format option 2020-09-23 17:52:08 -07:00
Michael Scire
5ac9e45d86 erpt: support older erpt binaries 2020-09-23 17:36:46 -07:00
Michael Scire
feba788bc6 erpt.py: remove idaapi usage 2020-09-23 16:05:27 -07:00
Michael Scire
f4d10a4481 set.mitm: much more aggressively cache locale (#1160) 2020-09-23 02:01:07 -07:00
Michael Scire
ff310a0647 fusee: try to alleviate a little suffering 2020-09-22 13:54:23 -07:00
Michael Scire
85505db9b7 loader: adjust thread priority for applet-hbl 2020-09-22 12:01:28 -07:00
Michael Scire
48b4dd48a4 ams: expose reboot payload for kernel panic 2020-09-18 00:43:55 -07:00
Michael Scire
8d46d901d9 ams: make mesosphere usage user-visible in display version 2020-09-17 21:18:44 -07:00
Michael Scire
1930880270 fusee: change ncm from opt-in to opt-out 2020-09-17 21:04:43 -07:00
Michael Scire
fa0df994ba git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "f6dac1e6"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "f6dac1e6"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-09-17 08:34:48 -07:00
Michael Scire
909a1767a6 ams: bump version to 0.14.4 2020-09-17 08:34:02 -07:00
Michael Scire
dbe59fd041 kern: fix KCodeMemory SVCs when Owner process != Generator process 2020-09-17 08:26:08 -07:00
Michael Scire
9b65daf439 kern: default to release config 2020-09-17 08:26:08 -07:00
Michael Scire
4acdc899f5 kern: generate fatal error on panic 2020-09-17 08:26:08 -07:00
Michael Scire
76957e502d kern: add build-define for logging to iram ringbuffer 2020-09-17 08:26:08 -07:00
Michael Scire
909397233c sm: Fix atmosphere-extension interaction with official JIT sysmodule usage 2020-09-17 08:24:47 -07:00
Michael Scire
211a828730 ro: fix process handle leak when using JitPlugin NROs 2020-09-17 08:17:11 -07:00
Michael Scire
28ceedb533 git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "6a814ebb"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "exo2"
  commit:   "6a814ebb"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-09-14 18:21:38 -07:00
Michael Scire
f551ca4461 emummc: manually fix .gitrepo 2020-09-14 18:17:32 -07:00
Michael Scire
2cf5c65bc5 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "48dbf480"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "48dbf480"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-09-14 18:14:05 -07:00
Michael Scire
47d0d5c6ab ams: support 10.2.0 (bump vers to 0.14.3) 2020-09-14 18:13:18 -07:00
Michael Scire
fd0e3e2160 docs: update changelog 2020-09-14 18:12:48 -07:00
Michael Scire
074364753f loader: improve verification terminology 2020-09-08 15:34:22 -07:00
Michael Scire
b7d99b732a ro: rename ModuleType to reflect reality 2020-09-08 15:05:15 -07:00
Michael Scire
1cccb6efc4 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "04ef9bf8"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "04ef9bf8"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-09-07 10:52:49 -07:00
Michael Scire
f4cd4bcf03 ams: bump version to 0.14.2 2020-09-07 10:51:15 -07:00
Michael Scire
e36fe62fca kern: lps driver fixes, sleep confirmed working on 1.0.0 2020-09-07 10:43:35 -07:00
Michael Scire
870b589379 kern: fix c/p error 2020-09-07 10:43:35 -07:00
Michael Scire
acdce230da kern: add debug logging on smmu error interrupt 2020-09-07 10:43:35 -07:00
Michael Scire
34dc062c11 kern: finish 1.x lps driver 2020-09-07 10:43:35 -07:00
Michael Scire
ab2568ddfb kern: add most of 1.x lps driver 2020-09-07 10:43:35 -07:00
Michael Scire
4dc728824f kern: skeleton legacy lps driver 2020-09-07 10:43:35 -07:00
Michael Scire
cc6b8ea4d1 exo/kern: 1.0.0 requires access to bpmp smmu regs, userland (am) needs to map bpmp exception vectors 2020-09-07 10:43:35 -07:00
Michael Scire
49af4fae32 kern: begin 1.0.0 backwards compat changes (kips run, full boot fails) 2020-09-07 10:43:35 -07:00
Michael Scire
e8ffbe630f kern: support 2-pool layout on 2.x-4.x instead of modern 4-pool layout 2020-09-07 10:43:35 -07:00
Michael Scire
ce95af89ef kern: change terminology metadata -> management 2020-09-07 10:43:35 -07:00
Michael Scire
546e2de300 kern: pool management should be within carveout 2020-09-07 10:43:35 -07:00
Michael Scire
11b120b667 kern: fix phys/virt pool management mixup 2020-09-07 10:43:35 -07:00
Michael Scire
4da1fe545c kern: fix linear mapped dram -> pool partition check 2020-09-07 10:43:35 -07:00
Michael Scire
1983f86875 kern: revamp KMemoryRegionType to better encode derivation hierarchies 2020-09-07 10:43:35 -07:00
Michael Scire
d50c7c5c79 kern: PMC must be user-mappable for 1.0.0 compat 2020-09-07 10:43:35 -07:00
Michael Scire
496f93ccdb kern: expose mesosphere meta over GetInfo instead of GetSystemInfo 2020-09-07 10:43:35 -07:00
Michael Scire
25ba61adae loader: extend memory region descriptors a touch more gracefully 2020-09-07 10:43:35 -07:00
Michael Scire
79c9bed528 kern/pm: support for 5.x under mesosphere 2020-09-07 10:43:35 -07:00
Michael Scire
657470830f loader: support MapRegion capability as an atmosphere extension (normally kips-only) 2020-09-07 10:43:35 -07:00
Michael Scire
cd62d83586 fusee: fix sleep/wake on 6.x 2020-09-07 10:43:35 -07:00
Michael Scire
bb11c57e7d kern: fix warn-errors 2020-09-07 10:43:35 -07:00
Michael Scire
bb1cdd8c87 fusee: fixes for sd meso on lower firmwares 2020-09-07 10:43:35 -07:00
Michael Scire
ff9b9fc5ff fusee: change meso loading to parse INI from Nintendo's kernel 2020-09-07 10:43:35 -07:00
Michael Scire
99b5458539 sm: fix deadlock semantics surrounding mitm installation 2020-09-07 10:40:57 -07:00
Michael Scire
fac502aaa3 kern: fix KTypedAddress, strengthen assertions 2020-08-18 15:17:40 -07:00
Michael Scire
47f2e93a42 kern: add version bounds checking 2020-08-18 15:17:40 -07:00
Michael Scire
56ec55f3c4 kern: avoid hardcoding maximum board memory size 2020-08-18 15:17:40 -07:00
Michael Scire
1a262c1063 kern: improve resource region size definitions/calculations 2020-08-18 15:17:40 -07:00
Michael Scire
79201428b0 kern: resolve NonSecure definition TODO 2020-08-18 15:17:40 -07:00
Michael Scire
a75c16226e kern: correct thread termination atomicity 2020-08-18 15:17:40 -07:00
Michael Scire
e5d30217d3 kern: fix reference leak in KThread::GetThreadFromId callers 2020-08-18 15:17:40 -07:00
Michael Scire
f77a4fbf98 kern: non-loop cas-weak -> cas-strong 2020-08-18 15:17:40 -07:00
Michael Scire
717265a54c kern: fix bug in KScheduler::ClearPreviousThread 2020-08-18 15:17:40 -07:00
fincs
3ace441b1c arm64: set -march in cpu specific configuration 2020-08-18 15:17:40 -07:00
fincs
2effe130e3 kern: use size instead of phys addr as sentinel value in InitializeCore linear mapping logic 2020-08-18 15:17:40 -07:00
fincs
2cedf2bcf0 kern: remove accidentally copypasted code 2020-08-18 15:17:40 -07:00
fincs
68e29b56b6 kern: add stubbed KDevicePageTable implementation for systems without iommu 2020-08-18 15:17:40 -07:00
fincs
8e688de570 kern: move SetupPoolPartitionMemoryRegions into board specific implementation 2020-08-18 15:17:40 -07:00
fincs
b917ea283e kern: make GetTargetFirmware a compile-time constant when not building for Switch 2020-08-18 15:17:40 -07:00
Michael Scire
3c85e37667 kern: use std::atomic_ref instead of reinterpret_cast to std::atomic 2020-08-18 15:17:40 -07:00
Michael Scire
48e8562033 kern: use common GIC implementation for arm/arm64 2020-08-18 15:17:40 -07:00
Michael Scire
f07bd0e337 kern: correct flushing of init arguments 2020-08-18 15:17:40 -07:00
Michael Scire
4a35904d73 kern: simplify SetupForIpcClient cleanup 2020-08-18 15:17:40 -07:00
Michael Scire
b8c2782ede kern: SvcLegacyGetFutureThreadInfo 2020-08-18 15:17:40 -07:00
Michael Scire
3ec9a9e59f kern: rename CacheHelper operation for accuracy 2020-08-18 15:17:40 -07:00
Michael Scire
595c6dbe8f kern: KPageTableBase::WriteDebugMemory stores/invalidates cache 2020-08-18 15:17:40 -07:00
Michael Scire
b5f2698bf0 kern: fix multicore instruction cache invalidation 2020-08-18 15:17:40 -07:00
Michael Scire
f058536b59 kern: add tracing for irq/scheduling 2020-08-18 15:17:40 -07:00
Michael Scire
8e5c0a9663 kern: cleanup some KMemoryManager functions 2020-08-18 15:17:40 -07:00
Michael Scire
1b63002f91 kern: refactor KMemoryLayout 2020-08-18 15:17:40 -07:00
Michael Scire
90fd771fce IntrusiveRedBlackTree: refactor to add ->GetPrev(), ->GetNext() to BaseNode inheritors 2020-08-18 15:17:40 -07:00
Michael Scire
c3fa3bd5d6 kern: N reduced the slabheap gap size in 10.0.0 2020-08-18 15:17:40 -07:00
Michael Scire
cda15f08d8 kern: mark KThread/KProcess.GetId() final to save virtual calls 2020-08-18 15:17:40 -07:00
Michael Scire
e5b7eb89e5 kern: fix built-in usage for libc 2020-08-18 15:17:40 -07:00
Michael Scire
e1bd6fb874 kern: fix missing scheduler updates in KLightLock/Exception, fix RequestScheduleOnInterrupt 2020-08-18 15:17:40 -07:00
Michael Scire
920b017677 kern: implement svc trace 2020-08-18 15:17:40 -07:00
Michael Scire
f9d68db3f6 kern: SvcChangeKernelTraceState 2020-08-18 15:17:40 -07:00
Michael Scire
89f1c0ce33 kern: remove stray log in SetHeapSize 2020-08-18 15:17:40 -07:00
Michael Scire
e435f56367 exo: build with -Wextra 2020-08-17 14:39:18 -07:00
Michael Scire
73798cb812 kern: build with -Wextra 2020-08-17 14:20:24 -07:00
Michael Scire
d3014f6ed9 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "2d522dc6"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "2d522dc6"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-08-15 09:20:46 -07:00
Michael Scire
35fffade4e libstrat: fix building of source/os/* 2020-08-15 09:20:11 -07:00
Michael Scire
2c6b7ce6c2 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "5a60240f"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "5a60240f"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-08-14 17:37:03 -07:00
Michael Scire
7658c07492 strat: fix inclusion/ordering for some c headers 2020-08-14 17:33:49 -07:00
Michael Scire
51b5c3d87d ams: avoid UB infinite loops 2020-08-13 17:28:29 -07:00
Michael Scire
874208b44a sf: handle serialization errors more accurately and gracefully 2020-08-11 16:40:57 -07:00
Michael Scire
44c5cb9789 ams: add support for cpu-extension specific source files 2020-08-11 11:43:34 -07:00
Michael Scire
420bc7df9b ams: update build system to add generic-fallback support 2020-08-11 11:22:56 -07:00
Michael Scire
ee3e0fa537 fatal: use TimeSpan for timing 2020-08-03 19:52:53 -07:00
Aurora Wright
501280b6e5 fatal: Fix autoreboot logic 2020-08-03 19:44:14 -07:00
Michael Scire
ee5a095c1a git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "cac5957d"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "cac5957d"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-08-02 15:03:17 -07:00
Michael Scire
3726def6ec ams: dump version to 0.14.1 2020-08-02 15:02:43 -07:00
Michael Scire
29358dc593 kernel_ldr: use unoptimized memcpy before mmu bringup (closes #1102)
Before the MMU is up, all reads/writes must be aligned; the optimized
memcpy implementation does not guarantee all reads/writes it performs
are aligned.

This commit splits the libc impl to be separate for kernel/kernel_ldr,
and so now only kernel will use the optimized impl. This is safe,
as the MMU is brought up before kernel begins executing.
2020-08-02 14:40:28 -07:00
Michael Scire
a82914d58e git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "f288b81b"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "f288b81b"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-08-01 15:37:27 -07:00
Michael Scire
0508b5d31b target firmware: I am remarkably bad at this 2020-08-01 15:36:50 -07:00
Michael Scire
235c070a37 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "4e80a401"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "4e80a401"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-08-01 15:36:09 -07:00
Michael Scire
82f757459e target firmware: fix typo 2020-08-01 15:35:38 -07:00
Michael Scire
b2b47da8c1 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "27c71f4e"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "27c71f4e"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-08-01 15:34:13 -07:00
Michael Scire
bc364029b2 docs: update changelog 2020-08-01 15:30:25 -07:00
Michael Scire
ac9832c5ce docs: update roadmap 2020-08-01 15:29:59 -07:00
Michael Scire
b65707efd9 ams: add support for 10.1.1 2020-08-01 15:29:59 -07:00
hexkyz
98ca5e2927 fusee: re-design and fix emummc handling 2020-08-01 17:20:56 +01:00
Michael Scire
91bbdf2baf TimeSpan: fix FromDays 2020-07-31 14:52:00 -07:00
Michael Scire
3fd4002bc9 kern: complete final SVC stubs (KernelDebug/Trace debug-impl still TODO) 2020-07-31 14:50:52 -07:00
Michael Scire
5d462c626c kern: SvcReturnFromException 2020-07-31 14:50:52 -07:00
Michael Scire
8cd81b3092 kern: fix dynamic calculation of slab heap size 2020-07-31 14:50:52 -07:00
Michael Scire
5c4fbf5c67 kern SvcGetDebugThreadContext, SvcSetDebugThreadContext 2020-07-31 14:50:52 -07:00
Michael Scire
3afd723b92 kern: SvcGetDebugThreadParam 2020-07-31 14:50:52 -07:00
Michael Scire
e1f3bb10a5 kern: clean up majority of TODOs 2020-07-31 14:50:52 -07:00
Michael Scire
bea550ebce kern: resolve final non-user-exception MESOSPHERE_UNIMPLEMENTED 2020-07-31 14:50:52 -07:00
Michael Scire
85f533e6c4 kern: SvcGetDebugEventInfo64From32 2020-07-31 14:50:52 -07:00
Michael Scire
c9f8252577 kern: resolve MESOSPHERE_UNIMPLEMENTEDs other than UserException 2020-07-31 14:50:52 -07:00
Michael Scire
325802e29d kern: Add real SvcBreak implementation 2020-07-31 14:50:52 -07:00
Michael Scire
4c3c910774 kern: SvcBreakDebugProcess, SvcTerminateDebugProcess 2020-07-31 14:50:52 -07:00
Michael Scire
b88e09de5b kern: SvcSetHardwareBreakPoint 2020-07-31 14:50:52 -07:00
Michael Scire
b143f1e05f kern: Svc(Legacy)ContinueDebugEvent 2020-07-31 14:50:52 -07:00
Michael Scire
3289b45408 kern: Add 4.x InitialProcessIdRange to SvcGetInfo 2020-07-31 14:50:52 -07:00
Michael Scire
91fa0d651f kern: SvcQueryPhysicalAddress 2020-07-31 14:50:52 -07:00
Michael Scire
9bc2c0c0c5 kern: style parity for return in GetThreadList 2020-07-31 14:50:52 -07:00
Michael Scire
96c3dfee14 kern: SvcGetThreadList 2020-07-31 14:50:52 -07:00
Michael Scire
51084c0837 kern: SvcGetLastThreadInfo, SvcGetDebugFutureThreadInfo 2020-07-31 14:50:52 -07:00
Michael Scire
0993ae0685 kern: SvcFlushDataCache, SvcFlushEntireDataCache 2020-07-31 14:50:52 -07:00
Michael Scire
e4b30f4022 kern: build without unwind tables for lto 2020-07-31 14:50:52 -07:00
Michael Scire
f6f43300e0 kern: SvcReadDebugProcessMemory, SvcWriteDebugProcessMemory 2020-07-31 14:50:52 -07:00
Michael Scire
1ffe08672d kern: fix EL0 TLB conflict handler 2020-07-31 14:50:52 -07:00
Michael Scire
f866f37cdc kern: panic on failure-to-open auto object in debug config 2020-07-31 14:50:52 -07:00
Michael Scire
008bfc27f3 kern: automatic PC alignment on ERET is implementation defined 2020-07-31 14:50:52 -07:00
Michael Scire
7352d87b20 kern: switch memset to optimized impl 2020-07-31 14:50:52 -07:00
Michael Scire
9ddb4194b3 kern: use optimized memcmp/memcpy implementations 2020-07-31 14:50:52 -07:00
Michael Scire
3f17a34b67 SvcQueryDebugProcessMemory 2020-07-31 14:50:52 -07:00
Michael Scire
5de853b662 kern: fix ARM vs THUMB mode selection on 32-bit entry 2020-07-31 14:50:52 -07:00
Michael Scire
36a3909a24 kern: fix whoops in light ipc 2020-07-31 14:50:52 -07:00
Michael Scire
8922bbd108 kern: SendSyncRequestLight, ReplyAndReceiveLight 2020-07-31 14:50:52 -07:00
Michael Scire
b6cb561c47 kern: fix slab heap atomics 2020-07-31 14:50:52 -07:00
Michael Scire
2db6760461 kern: fix bug in server handle cleanup 2020-07-31 14:50:52 -07:00
Michael Scire
bb7f320f7f kern: fix nonsensical copy/pasted comments in QueryMemory 2020-07-31 14:50:52 -07:00
Michael Scire
94a170c437 kern: QueryMemory64From32, QueryProcessMemory64From32 2020-07-31 14:50:52 -07:00
Michael Scire
7cf0432569 kern: add KCodeMemory code left out of previous commit 2020-07-31 14:50:52 -07:00
Michael Scire
39b22cee8c kern: implement KCodeMemory (and SVCs) 2020-07-31 14:50:52 -07:00
Michael Scire
3fb3beeaff kern: SvcGetSystemTick 2020-07-31 14:50:52 -07:00
Michael Scire
4bb9ef061a kern: implement SvcGetThreadContext3 2020-07-31 14:50:52 -07:00
Michael Scire
f70ee67753 kern: correct behavior when setting activity/core mask for pinned thread 2020-07-31 14:50:52 -07:00
Michael Scire
787964f7e7 kern: implement thread pinning/SvcSynchronizePreemptionState 2020-07-31 14:50:52 -07:00
Michael Scire
b1f38be3ae kern: fix building under release config 2020-07-31 14:50:52 -07:00
Michael Scire
9dc3e025fc kern: Map L1/L2 blocks when possible 2020-07-31 14:50:52 -07:00
Michael Scire
4ac94e9179 kern: improve KLightLock accuracy 2020-07-31 14:50:52 -07:00
Michael Scire
1448068b69 kern: fix assertion in KThread::(Try)Suspend 2020-07-31 14:50:52 -07:00
Michael Scire
0af44d2875 kern: fix bug in page table mapping calculations 2020-07-31 14:50:52 -07:00
Michael Scire
a4d376cc0f kern: fix hardware timer task corruption on core migration 2020-07-31 14:50:52 -07:00
Michael Scire
840ab0785c kern: SvcMapPhysicalMemoryUnsafe, SvcUnmapPhysicalMemoryUnsafe 2020-07-31 14:50:52 -07:00
Michael Scire
583899ede3 kern: General system stability improvements to enhance the user's experience. 2020-07-31 14:50:52 -07:00
Michael Scire
2ad9927a88 kern: Fix bug in thread core migration 2020-07-31 14:50:52 -07:00
Michael Scire
893b046111 kern: update interrupt manager 2020-07-31 14:50:52 -07:00
Michael Scire
3a01fd1ebc svc: add BreakReason flags 2020-07-31 14:50:52 -07:00
Michael Scire
1b9acc4a6a kern: SvcUnmapPhysicalMemory, cleanup thread pinning 2020-07-31 14:50:52 -07:00
Michael Scire
cbecda2a27 kern: SvcQueryProcessMemory64, notification SvcBreaks 2020-07-31 14:50:52 -07:00
Michael Scire
5ecc80a5f6 kern: implement SvcMapPhysicalMemory 2020-07-31 14:50:52 -07:00
Michael Scire
695b82b945 kern: finish SvcGetInfo 2020-07-31 14:50:52 -07:00
Michael Scire
fd9b986938 kern: Implement SecureMemory (system resource) 2020-07-31 14:50:52 -07:00
Michael Scire
9231646f33 kern: implement SvcSleepSystem 2020-07-31 14:50:52 -07:00
Michael Scire
418de7b0dc kern: SvcInvalidateProcessDataCache 2020-07-31 14:50:52 -07:00
Michael Scire
46935fea80 kern: fix resource leak bugs 2020-07-31 14:50:52 -07:00
Michael Scire
11d5353827 kern: SvcMapProcessCodeMemory, SvcUnmapProcessCodeMemory 2020-07-31 14:50:52 -07:00
Michael Scire
240e6227e9 kern: Fix bug when reducing heap size 2020-07-31 14:50:52 -07:00
Michael Scire
1d4d637818 kern SvcGetCurrentProcessorNumber, SvcSetProcessActivity, half of SvcSetThreadActivity 2020-07-31 14:50:52 -07:00
Michael Scire
23eed522d3 kern: SvcGetThreadCoreMask, SvcSetThreadCoreMask 2020-07-31 14:50:52 -07:00
Michael Scire
c622539b95 kern: SvcSetMemoryPermission 2020-07-31 14:50:52 -07:00
Michael Scire
d87a9f011c kern: implement transfer memory (and SVCs) 2020-07-31 14:50:52 -07:00
Michael Scire
28aab09b5d kern: implement process exit 2020-07-31 14:50:52 -07:00
Michael Scire
3917ecad46 kern: add SvcFlushProcessDataCache, SvcStoreProcessDataCache 2020-07-31 14:50:52 -07:00
Michael Scire
ab96255a5d kern: implement SvcSetMemoryAttribute 2020-07-31 14:50:52 -07:00
Michael Scire
185baa7c4d boot2: work around pcv<->fs<->settings race condition 2020-07-31 14:50:52 -07:00
Michael Scire
eecf59dd00 kern: fix bugs in interrupt permittance, DpcManager init 2020-07-31 14:50:52 -07:00
Michael Scire
afe7e41de8 kern: SvcGetProcessInfo, SvcTerminateProcess 2020-07-31 14:50:52 -07:00
Michael Scire
632a75eee7 kern: KConditionVariable::SignalImpl 2020-07-31 14:50:52 -07:00
Michael Scire
7aa3120f60 kern: fully implement KSharedMemory (and Svcs) 2020-07-31 14:50:52 -07:00
Michael Scire
81db43932d kern: add SvcStartProcess 2020-07-31 14:50:52 -07:00
Michael Scire
51311a7332 kern: add KProcess::Initialize (for non-kip processes) 2020-07-31 14:50:52 -07:00
Michael Scire
8759cb4da3 kern: implement first half of SvcCreateProcess 2020-07-31 14:50:52 -07:00
Michael Scire
fb6e85b291 kern: implement SvcMapProcessMemory, SvcUnmapProcessMemory 2020-07-31 14:50:52 -07:00
Michael Scire
3cf793f87e kern: implement KThread::Finalize 2020-07-31 14:50:52 -07:00
Michael Scire
3265927ed7 kern: KDevicePageTable::Finalize, InfoType_RandomEntropy 2020-07-31 14:50:52 -07:00
Michael Scire
0c82709af4 kern: fix attribute checks in device unmap 2020-07-31 14:50:52 -07:00
Michael Scire
058f223b97 kern: finish SvcGetSystemInfo 2020-07-31 14:50:52 -07:00
Michael Scire
43ad4eb794 kern: fix asid tlb invalidation 2020-07-31 14:50:52 -07:00
Michael Scire
dea1235e12 kern: dump page table on user exception 2020-07-31 14:50:52 -07:00
Michael Scire
266001ded4 kern: implement ResourceLimit Svcs 2020-07-31 14:50:52 -07:00
Michael Scire
ea6000b372 kern: add ResourceLimit to svcGetInfo 2020-07-31 14:50:52 -07:00
Michael Scire
4fca870f2f kern: fix incorrect cache routines, implement SvcSetProcessMemoryPermission 2020-07-31 14:50:52 -07:00
Michael Scire
26df56cd87 kern: implement SvcCancelSynchronization 2020-07-31 14:50:52 -07:00
Michael Scire
5b8a20dbf7 kern: fix bug in SvcSetThreadPriority 2020-07-31 14:50:52 -07:00
Michael Scire
94f9cc1626 kern: SvcCreateSession, KDebug finalization 2020-07-31 14:50:52 -07:00
Michael Scire
36eb78a3ce kern: implement SvcDebugActiveProcess, svcGetDebugEvent, SvcWaitProcessWideKeyAtomic 2020-07-31 14:50:52 -07:00
Michael Scire
1c5b58ce66 fusee: add support for booting mesosphere 2020-07-31 14:50:52 -07:00
Michael Scire
0bd14b7114 kern: fix bug in KPageTableBase::SetupForIpcServer 2020-07-31 14:50:52 -07:00
Michael Scire
75e6999668 kern: implement SvcSetThreadPriority 2020-07-31 14:50:52 -07:00
Michael Scire
5fa59ec888 kern: fix kscheduler interrupt api, adjust debug logging 2020-07-31 14:50:52 -07:00
Michael Scire
fae2daf77c kern: fix bug in up/downcasting of scoped auto objects 2020-07-31 14:50:52 -07:00
Michael Scire
8d507aa5a1 kern: implement SvcSignalToAddress, SvcWaitForAddress 2020-07-31 14:50:52 -07:00
Michael Scire
a0cc22302c kern: add KAddressArbiter::WaitIfEqual 2020-07-31 14:50:52 -07:00
Michael Scire
01a7606f95 kern: implement SvcSetHeapSize 2020-07-31 14:50:52 -07:00
Michael Scire
9c4c058307 kern: implement all device address space svcs 2020-07-31 14:50:52 -07:00
Michael Scire
9beb05da50 kern: retrieve target firmware from exosphere instead of hardcoding 2020-07-31 14:50:52 -07:00
Michael Scire
2ca6772475 kern: implement DetachDeviceAddressSpace, skeleton other das funcs in KDevicePageTable 2020-07-31 14:50:52 -07:00
Michael Scire
0d3aa13f70 kern: add infra (but not impl) for all DeviceAddressSpace svcs 2020-07-31 14:50:52 -07:00
Michael Scire
863515a3b5 kern: qualify inherited KAutoObjectWithListContainer accessor typenames 2020-07-31 14:50:52 -07:00
Michael Scire
fe035736ca kern: implement SvcGetProcessList 2020-07-31 14:50:52 -07:00
Michael Scire
cfddb75398 kern: add SvcCreateDeviceAddressSpace, SvcAttachDeviceAddressSpace 2020-07-31 14:50:52 -07:00
Michael Scire
04f325cf5a kern: implement SvcCreateInterruptEvent 2020-07-31 14:50:52 -07:00
Michael Scire
b35380a942 kern: implement SvcCreateEvent, SvcSignalEvent, SvcClearEvent, SvcResetSignal 2020-07-31 14:50:52 -07:00
Michael Scire
93be2ffcba kern: add SvcCreatePort, SvcConnectToPort 2020-07-31 14:50:52 -07:00
Michael Scire
9f79710cb7 kern: add SvcReadWriteRegister 2020-07-31 14:50:52 -07:00
Michael Scire
ef1763334b kern: patch svc tables via asm, instead of relying on compiler to be nice 2020-07-31 14:50:52 -07:00
Michael Scire
d9e9fbe3c2 kern: Implement QueryIoMapping logic for < 8.0.0 2020-07-31 14:50:52 -07:00
Michael Scire
ff022115ca kern: Support older SVC ABIs 2020-07-31 14:50:52 -07:00
Michael Scire
3d2eb8e903 Daybreak: support installing non-exfat update if only exfat firm is missing/corrupt 2020-07-27 15:42:17 -07:00
Hthh
65b42497d7 Fix building with devkitarm-rules 1.1.0 2020-07-26 22:46:01 -07:00
Michael Scire
46bd03c06d fs: correct retry loop again 2020-07-20 13:33:09 -07:00
Michael Scire
9482fafabd fs: fix retry bug in OpenContentStorageFileSystem 2020-07-20 13:18:48 -07:00
Michael Scire
762db93f4a libs: add libexosphere to targets 2020-07-20 13:12:43 -07:00
Michael Scire
5c3cd7d610 Update makefile 2020-07-17 08:25:35 -07:00
Adubbz
48a38847c2 daybreak: Added support for factory resetting (#1083)
* daybreak: ui code cleanup

(cherry picked from commit a31c246337d245abd1a827d17941f4ea48c25ca2)

* daybreak: snprintf fixes

(cherry picked from commit e62a7fcaec4552c91984ac4575d09beab046e910)

* daybreak: support resetting to factory settings

(cherry picked from commit 1c0e196eae91cfd85f63064c36cc288a0ea0363f)
2020-07-17 08:25:35 -07:00
misson20000
9382ff0939 Add stack overflow detection to fatal error code 2020-07-15 20:45:47 -07:00
hexkyz
f71ad5ac2c fusee/sept: ensure proper array initialization in exception handling 2020-07-14 18:58:19 +01:00
hexkyz
fef8a4918e
sept: add missing include 2020-07-14 18:31:27 +01:00
hexkyz
72afe34cf9 fusee/sept: fix error printing 2020-07-14 18:12:31 +01:00
Michael Scire
51dd668c7c loader: fix typo 2020-07-13 17:44:20 -07:00
Michael Scire
c01753370a ams: update to know about 10.1.0 2020-07-13 17:34:48 -07:00
Michael Scire
33434e21ef kern: Prepare to commit cardinal sin 2020-07-13 17:00:51 -07:00
Michael Scire
18698bf1d3 kern: add SvcQueryIoMapping (NOTE: pre-10.x, ABI needs update) 2020-07-13 13:24:32 -07:00
Michael Scire
57867d6ced kern: fix/add InfoType_(Total/Used)(NonSystem/)MemorySize 2020-07-13 12:17:28 -07:00
Michael Scire
35c1959131 kern: assert correctness for complete class hierarchy 2020-07-13 11:11:30 -07:00
Michael Scire
a4e3eae4b6 svc/ipc: fix handle count accessors 2020-07-13 11:00:46 -07:00
Michael Scire
84d8634938 kern: fix bugs in Receive/Exchange ipc buffers 2020-07-13 10:02:01 -07:00
Michael Scire
095fc6b996 kern: fix UpdateLock perms for ipc 2020-07-12 22:22:54 -07:00
Michael Scire
bc767742f7 kern: fix unaligned map alias buffers 2020-07-12 18:53:45 -07:00
Michael Scire
e2e5a2ccc2 kern: fix bugs in MapAlias ipc mappings 2020-07-12 18:17:29 -07:00
Michael Scire
a8d4b10b17 kern: implement IPC KPageTable functionality 2020-07-12 15:42:47 -07:00
Michael Scire
3c8d8161cc kern: fix bug in ToMessageBuffer pointer transfer selection 2020-07-11 02:06:44 -07:00
Michael Scire
4a7ce9dd75 kern/KScheduler: implement special yields 2020-07-11 00:48:26 -07:00
Michael Scire
ca9327a120 kern: implement SvcSleepThread for ns > 0 2020-07-10 23:30:15 -07:00
Michael Scire
f37eda6b86 kern: implement KPageTableBase::CopyHeapToHeap(WithoutCheckDestination) 2020-07-10 21:37:56 -07:00
Michael Scire
c72bdec328 kern: add KPageTableBase::CopyMemory Linear <-> User and Linear <-> Kernel 2020-07-10 20:09:06 -07:00
Michael Scire
4a767c9082 kern: mostly implement thread exit 2020-07-10 18:39:53 -07:00
Michael Scire
c8f71007ec kern/ipc: fix bug in SendMessage 2020-07-10 16:57:11 -07:00
Michael Scire
4ff10f3ce0 kern/ipc: implement remaining KServerSession reply code 2020-07-10 16:46:55 -07:00
Michael Scire
d52655eaf1 kern: add SvcExitThread, SvcSendAsyncRequestWithUserBuffer, SvcReplyAndReceiveWithUserBuffer 2020-07-10 15:31:23 -07:00
Michael Scire
1b429918de kern/ipc: implement most of reply 2020-07-10 13:42:36 -07:00
Michael Scire
b29dc76b20 kern/ipc: implement SendReply, declare SendMessage 2020-07-10 12:49:52 -07:00
Michael Scire
4db9d95958 os: fix building with new svc defs 2020-07-10 11:57:40 -07:00
Michael Scire
2ec4ed3568 kern/ipc: add Atmosphere's mitm pid passthrough logic 2020-07-10 11:55:33 -07:00
Michael Scire
4e226b523e ipc/receive: trivially correct result return codeflow 2020-07-10 11:55:33 -07:00
Michael Scire
9fa6d12586 kern/ipc: finish Receive part of ReplyAndReceive 2020-07-10 11:55:33 -07:00
Michael Scire
804aa0e55d ipc: add MapAlias processing logic for Receive 2020-07-10 11:55:33 -07:00
Michael Scire
9d57783aa8 ipc::Reply -> implement Pointer handling logic 2020-07-10 11:55:33 -07:00
Michael Scire
a510a1138d ipc::Reply -> add raw data copy logic 2020-07-10 11:55:33 -07:00
Michael Scire
4e667bc7c1 kern: implement remaining non-KServerSession:: part of Reply/Receive 2020-07-10 11:55:33 -07:00
Michael Scire
84b1be1d58 kern: partially implement Receive half of ReplyAndReceive 2020-07-10 11:55:33 -07:00
Michael Scire
1b2203d102 kern: implement SvcSendSyncRequest(WithUserBuffer) 2020-07-10 11:55:33 -07:00
Michael Scire
4f12449acf kern: implement SvcArbitrateLock, SvcArbitrateUnlock 2020-07-10 11:55:33 -07:00
Michael Scire
f4fd4cbbb2 kern: skeleton SvcReplyAndReceive 2020-07-10 11:55:33 -07:00
Michael Scire
be98aaa185 kern: partially implement SvcSignalProcessWideKey 2020-07-10 11:55:33 -07:00
Michael Scire
7f4c6ae9e7 kern: implement SvcCreateThread, SvcStartThread 2020-07-10 11:55:33 -07:00
Michael Scire
9503aae522 kern: implement SvcMapMemory 2020-07-10 11:55:33 -07:00
Michael Scire
78da7422ae kern: implement SvcAcceptSession 2020-07-10 11:55:33 -07:00
Michael Scire
f52232f0f2 kern: implement SvcWaitSynchronization 2020-07-10 11:55:33 -07:00
Michael Scire
16c9c53a4a kern: implement KEvent, KWritableEvent, KServerSession::OnClientClosed 2020-07-10 11:55:33 -07:00
Michael Scire
d0d8914f28 kern: implement SvcCloseHandle 2020-07-10 11:55:33 -07:00
Michael Scire
7400a8ff68 kern: SvcConnectToNamedPort 2020-07-10 11:55:33 -07:00
Michael Scire
a2eb93fde8 kern: svcOutputDebugString, svcGetThreadPriority, svcGetThreadId 2020-07-10 11:55:33 -07:00
Michael Scire
1a0696f8a3 kern: implement SvcUnmapMemory, more of SvcGetInfo 2020-07-10 11:55:33 -07:00
Michael Scire
faad5609b9 ncm: safer access patterns for FirmwareVariationInfo 2020-07-10 11:49:44 -07:00
Michael Scire
ad551c3b55 ncm: loosen FirmwareVariation restrictions. 2020-07-10 11:46:53 -07:00
Adubbz
c2408395d8
daybreak: address nitpicks (#1081)
* daybreak: address nitpicks

* daybreak: append / to paths

* daybreak: more label tweaks

* daybreak: even more label changes
2020-07-10 06:44:32 -07:00
Adubbz
084dd3232e
daybreak: various ux improvements (#1080) 2020-07-09 04:33:52 -07:00
VolcaEM
8d6e076b77
ncm: Mark two variables as const (#1078)
ncm: Mark two variables as const
2020-07-08 21:48:41 -07:00
Michael Scire
9bd6916646 ams: bump version to 0.14.0, add emummc info configitem 2020-07-08 17:36:52 -07:00
Michael Scire
f168542931 ams: distribute daybreak in release zips 2020-07-08 17:11:52 -07:00
Michael Scire
852c039f70 ncm: rights ids were added in 2.0.0 2020-07-08 16:02:47 -07:00
Michael Scire
bffd553b80 sf: correct deprecated spl interface definition 2020-07-08 15:42:15 -07:00
Michael Scire
2d9f5b6942 sf: support service objects which must themselves be shared pointers 2020-07-08 15:07:40 -07:00
Michael Scire
aa2d1e15ab exo: integrate multiple PRs' split_program changes 2020-07-07 20:28:42 -07:00
Adubbz
0cac10a2f0
daybreak: sort folders alphabetically and only display success message on success (#1075)
(cherry picked from commit f6893b1fff4219d81a6ecc87361fb383096fc990)
2020-07-07 20:06:21 -07:00
Michael Scire
499f29d2f0 ncm: make *ActivateContentMetaDatabase play nice with 1.0.0 2020-07-07 20:00:51 -07:00
Michael Scire
9efca346d9 docs: update roadmap 2020-07-07 18:15:06 -07:00
SciresM
9fde97cfdd
sf: Change interface definition methodology (#1074)
* sf: Begin experimenting with new interface declaration format

* sf: convert fs interfaces to new format

* sf: finish conversion of libstrat to new definitions

* sf: convert loader to new format

* sf: convert spl to new format

* sf: update ncm for new format

* sf: convert pm to new format

* sf: convert ro/sm to new format

* sf: update fatal for new format

* sf: support building dmnt under new scheme

* sf: update ams.mitm for new format

* sf: correct invocation def for pointer holder

* fs: correct 10.x+ user bindings for Get*SpaceSize
2020-07-07 17:07:23 -07:00
Adubbz
94eb2195d3
Added Daybreak, a system updater homebrew (#1073)
* Implemented a system updater homebrew (titled Daybreak)

* git subrepo pull ./troposphere/daybreak/nanovg

subrepo:
  subdir:   "troposphere/daybreak/nanovg"
  merged:   "c197ba2f"
upstream:
  origin:   "https://github.com/Adubbz/nanovg-deko.git"
  branch:   "master"
  commit:   "c197ba2f"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???" (+1 squashed commits)

Squashed commits:

[232dc943] git subrepo clone https://github.com/Adubbz/nanovg-deko.git troposphere/daybreak/nanovg

subrepo:
  subdir:   "troposphere/daybreak/nanovg"
  merged:   "52bb784b"
upstream:
  origin:   "https://github.com/Adubbz/nanovg-deko.git"
  branch:   "master"
  commit:   "52bb784b"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"

* daybreak: switch to using hiddbg for home blocking (+1 squashed commits)

Squashed commits:

[4bfc7b0d] daybreak: block the home button during installation
2020-07-07 17:07:00 -07:00
Michael Scire
b08ccd7341 exo: fixes, now tested working on mariko hardware 2020-07-02 14:06:42 -07:00
Michael Scire
0a53c74aad libstrat: fix bugs/compiler warnings 2020-07-02 14:02:50 -07:00
Michael Scire
70e67da1e1 fs: use access_log for other user fs/dir/file bindings 2020-07-02 14:02:50 -07:00
Michael Scire
e2b17086d4 fs: implement AccessLog, enable for File operations 2020-07-02 14:02:50 -07:00
Michael Scire
3fe7700e5c docs: update roadmap 2020-06-29 07:05:02 -07:00
Michael Scire
828b170aac exo: add mariko spare reg write during setup 2020-06-29 05:40:09 -07:00
Michael Scire
1084817d84 exo: kernel saves dbg* registers 2020-06-29 05:14:49 -07:00
Michael Scire
e16b87c843 exo: implement mariko fuse driver 2020-06-29 04:40:59 -07:00
Michael Scire
2a5d1572e1 libstrat: correct firmware comparison in meta database builder 2020-06-29 04:40:01 -07:00
Michael Scire
f7f284e5c0 exo: add note to mariko keygen for future sciresm 2020-06-28 21:14:32 -07:00
Michael Scire
bf92daf055 exo: implement remaining SE changes for mariko support 2020-06-28 21:11:29 -07:00
Michael Scire
5cb9fa510e exo: implement mariko se/tzram context save 2020-06-28 20:32:45 -07:00
Michael Scire
46c460e235 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "89f8944f"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "89f8944f"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-06-28 19:41:42 -07:00
Michael Scire
29f1eb8070 libstrat: fix dependencies for pre-compiled header 2020-06-28 19:40:56 -07:00
Michael Scire
9229696308 docs: update roadmap 2020-06-28 19:33:04 -07:00
Michael Scire
1473adf5c4 fusee/exo: correct device key management for newer consoles (closes #1053) 2020-06-28 05:39:25 -07:00
Michael Scire
a5447dd72d fs: more IndirectStorage::OperatePerEntry updates/fixes 2020-06-28 02:52:02 -07:00
Michael Scire
ecbd986529 sysupdater: minor api fixes (now verified working on hardware) 2020-06-28 01:46:51 -07:00
Michael Scire
73a6aeed15 sysupdater: implement (untested) rest of the api 2020-06-28 01:46:51 -07:00
Michael Scire
f223c27bb0 sysupdater: Add ValidateUpdate, begin implementing Async logic 2020-06-28 01:46:51 -07:00
Michael Scire
1bc271bab1 sysupdater: don't do unnecessary work when parsing update 2020-06-28 01:46:51 -07:00
Michael Scire
3324dd52ef sysupdater: make GetUpdateInformation work on hardware. 2020-06-28 01:46:51 -07:00
Michael Scire
a6218ed814 sysupdater: implement content meta mounting 2020-06-28 01:46:51 -07:00
Michael Scire
28a6bb713c sysupdater: begin implementing api 2020-06-28 01:46:51 -07:00
hexkyz
fdc7ef62f7
fusee: handle case where saving a fatal report fails (thanks @HookedBehemoth) 2020-06-26 18:36:30 +01:00
Michael Scire
f197b88dd7 fs: update IndirectStorage for 10.x, bugfixes 2020-06-25 17:36:05 -07:00
Michael Scire
f594de0081 ams: add -Wno-format-truncation to flags 2020-06-25 17:32:34 -07:00
Adubbz
9003ad6e49 ncm: fix exfat system updates 2020-06-22 16:15:56 -07:00
Michael Scire
3295132946 ams: update zip to include exosphere.ini template 2020-06-14 23:04:28 -07:00
Michael Scire
22ae311393 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "cf8f0c3c"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "cf8f0c3c"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-06-14 22:59:53 -07:00
Michael Scire
033ae1dbe0 ams: fix comment warn 2020-06-14 22:59:12 -07:00
Michael Scire
2ed7f84523 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "adf5cd34"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "adf5cd34"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-06-14 22:55:18 -07:00
Michael Scire
a680b35e09 hos: fix c/p error' 2020-06-14 22:53:39 -07:00
Michael Scire
d236b88571 hos: be a little friendlier about versioning 2020-06-14 22:50:08 -07:00
Michael Scire
9b8ffdf093 docs/changelog: heh, right 2020-06-14 22:44:08 -07:00
Michael Scire
45a8c5a54a docs: update changelog for 0.13.0 2020-06-14 22:42:36 -07:00
Michael Scire
f68d33b70a ams: update roadmap documentation 2020-06-14 22:18:13 -07:00
Michael Scire
0698338312 exo2: resolve remaining erista TODOs, clean up debugging code 2020-06-14 22:07:45 -07:00
Michael Scire
23d3f786e3 git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "06ab9b89"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "exo2"
  commit:   "06ab9b89"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-06-14 22:07:45 -07:00
Michael Scire
d9c9083574 emummc: cleanup pr per review 2020-06-14 22:07:45 -07:00
Michael Scire
b966345b25 exo2: correct pkg2 encryption key load 2020-06-14 22:07:45 -07:00
Michael Scire
c129256dd0 exo: amend pk21 restrictions 2020-06-14 22:07:45 -07:00
Michael Scire
43f5a0ef45 exo2: account for sleep/wake enabling jtag 2020-06-14 22:07:45 -07:00
Michael Scire
73c1615cda exo2: only enforce soc device preconditions when they are guaranteed to apply 2020-06-14 22:07:45 -07:00
Michael Scire
c827c0d599 exo2: properly perform smc restriction 2020-06-14 22:07:45 -07:00
Michael Scire
d165ec7162 stratosphere: fix command availability to include minor versions 2020-06-14 22:07:45 -07:00
Michael Scire
79e4c0ef6e exo2: add security checks, full 2.0.0 support 2020-06-14 22:07:45 -07:00
Michael Scire
37d13f92a8 ams: bump to 0.13.0, add 10.0.4 recognition 2020-06-14 22:07:45 -07:00
Michael Scire
1047ceab98 exo2/fusee: full 1.0.0 support. 2020-06-14 22:07:45 -07:00
Michael Scire
597bdded69 fusee/exo2: more fixes to boot lower firmwares 2020-06-14 22:07:45 -07:00
Michael Scire
47512cc8a2 fusee: always use the exo2 (modern tz) key layout 2020-06-14 22:07:45 -07:00
Michael Scire
6780b096ca exo2: address volca review commentary 2020-06-14 22:07:45 -07:00
Michael Scire
da4107996a exo2: first pass at backwards-compat 2020-06-14 22:07:45 -07:00
Michael Scire
42f1a3bf60 exo2: rename exosphere2 -> exosphere 2020-06-14 22:07:45 -07:00
Michael Scire
282f8f6612 ams: delete exo1 2020-06-14 22:07:45 -07:00
Michael Scire
c75e61a40b fusee: switch to use exo2 instead of exo1 2020-06-14 22:07:45 -07:00
Michael Scire
293c213bf2 exo2: implement warmboot firmware 2020-06-14 22:07:45 -07:00
Michael Scire
ff87ff2592 emummc: update for exo2 2020-06-14 22:07:45 -07:00
Michael Scire
f82954e98b git subrepo clone --force --branch=exo2 https://github.com/m4xw/emummc
subrepo:
  subdir:   "emummc"
  merged:   "3791be9f"
upstream:
  origin:   "https://github.com/m4xw/emummc"
  branch:   "exo2"
  commit:   "3791be9f"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-06-14 22:07:45 -07:00
Michael Scire
6c145d76c7 exo2: implement SmcIramCopy/reboot to payload/rcm 2020-06-14 22:07:45 -07:00
Michael Scire
bb6671a94a exo2: implement SmcReencryptDeviceUniqueData 2020-06-14 22:07:45 -07:00
Michael Scire
95d38a1a94 exo2: suspend fixes (sleep/wake now works on hardware) 2020-06-14 22:07:45 -07:00
Michael Scire
2fb363dcf0 exo2: implement the rest of cpu suspend (security checks TODO) 2020-06-14 22:07:45 -07:00
Michael Scire
34098f7215 exo2: add sc7fw load, skeleton rest of suspend 2020-06-14 22:07:45 -07:00
Michael Scire
0202a95832 exo2: implement the first half of SmcCpuSuspend 2020-06-14 22:07:45 -07:00
Michael Scire
e1835d9ba2 exo2: correct exception stack calc (fixes smc cpu off) 2020-06-14 22:07:45 -07:00
Michael Scire
068c25ce66 exo2: add a number of minor configuration fixes 2020-06-14 22:07:45 -07:00
Michael Scire
8e401f4daa exo2: implement smc cpu off 2020-06-14 22:07:45 -07:00
Michael Scire
8a4019151b exo2: implement SmcModularExponentiate(ByStorageKey) 2020-06-14 22:07:45 -07:00
Michael Scire
ccba70abfe exo2: implement SmcPrepareEsDeviceUniqueKey, SmcPrepareEsCommonTitleKey, SmcLoadPreparedAesKey 2020-06-14 22:07:45 -07:00
Michael Scire
985e97cf78 exo2: implement SmcGetEmummcConfig 2020-06-14 22:07:45 -07:00
Michael Scire
36754e2c38 exo2: implement the atmosphere extension mappers 2020-06-14 22:07:45 -07:00
Michael Scire
1e0124fb67 exo2: fix bugs in device unique data decrypytion 2020-06-14 22:07:45 -07:00
Michael Scire
b922dff414 exo2: tweak debug for better logging 2020-06-14 22:07:45 -07:00
Michael Scire
1fb9407d5d fusee/sept: changes for exo2 (note: not final) 2020-06-14 22:07:45 -07:00
Michael Scire
91e0bbd9d7 exo2: Implement (untested) SmcDecryptDeviceUniqueData 2020-06-14 22:07:45 -07:00
Michael Scire
4fe42eb997 exo2: implement some mariko TODOs 2020-06-14 22:07:45 -07:00
Michael Scire
99e0448f30 exo2: cache soc type/hardware type for quick lookup 2020-06-14 22:07:45 -07:00
Michael Scire
a0b08d0540 exo2: fix bugs in Cmac and DeviceId calculation 2020-06-14 22:07:45 -07:00
Michael Scire
bb3a8a888f exo2: fix a number of bugs, add temp debug-log code 2020-06-14 22:07:45 -07:00
Michael Scire
aa50944568 exo2: tentative (read: bugged) SmcComputeCmac, SmcGenerateSpecificAesKey, SmcGetSecureData 2020-06-14 22:07:45 -07:00
Michael Scire
e0dbfc69a8 exo2: implement SmcComputeAes, SmcGetResult, SmcGetResultData 2020-06-14 22:07:45 -07:00
Michael Scire
b6b114ec40 exo2: implement SmcSetKernelCarveoutRegion 2020-06-14 22:07:45 -07:00
Michael Scire
bf546d5fb3 exo2: implement SmcGenerateAesKek, SmcLoadAesKey 2020-06-14 22:07:45 -07:00
Michael Scire
864b6085a8 exo2: fix bugs in non-core0 bootup 2020-06-14 22:07:45 -07:00
Michael Scire
fa64bf4951 exo2: implement GenerateRandomBytes 2020-06-14 22:07:45 -07:00
Michael Scire
6bf283ec2e exo2: implement SmcGetConfig 2020-06-14 22:07:45 -07:00
Michael Scire
e3eadcd2e3 exo2: Implement SmcReadWriteRegister 2020-06-14 22:07:45 -07:00
Michael Scire
8c4c1db506 exo2: minor fixes, now completes main and receives SMCs on hw 2020-06-14 22:07:45 -07:00
Michael Scire
27843314a4 exo2: minor stack/mmu fixes, now gets to main on hw 2020-06-14 22:07:45 -07:00
Michael Scire
1fdd83628e exo2: fix typo bug 2020-06-14 22:07:45 -07:00
Michael Scire
3d6baf96a3 exo2: implement SmcPowerCpuOn 2020-06-14 22:07:45 -07:00
Michael Scire
ab703646d5 exo2: by default, map end of iram for debug 2020-06-14 22:07:45 -07:00
Michael Scire
435d2fb0c3 exo2: remove unused lvars 2020-06-14 22:07:45 -07:00
Michael Scire
63629b22a1 exo2: use N's strategy for randcache, it's better 2020-06-14 22:07:45 -07:00
Michael Scire
b7ff9e8fcc exo2: reorganize to save >0x300 bytes and 0x100 of stack in main 2020-06-14 22:07:45 -07:00
Michael Scire
ad664daea5 exo2: implement remainder of warmboot tz code 2020-06-14 22:07:45 -07:00
Michael Scire
97ab282351 exo2: update configitem names to match wiki 2020-06-14 22:07:45 -07:00
Michael Scire
81846fa5c3 exo2: implement warmboot through start of virtual exec 2020-06-14 22:07:45 -07:00
Michael Scire
dc6abf9f68 exo2: Implement the rest of main/return-to-el1 2020-06-14 22:07:45 -07:00
Michael Scire
87bdc46beb exo2: implement rest of main other than SetupSocProtections 2020-06-14 22:07:45 -07:00
Michael Scire
f391354415 exo2: implement through package2 decryption 2020-06-14 22:07:45 -07:00
Michael Scire
9ddcbe9dc3 exo2: implement main through sync-for-pk21-load 2020-06-14 22:07:45 -07:00
Michael Scire
e11fad6598 exo2: implement through boot config load/validate 2020-06-14 22:07:45 -07:00
Michael Scire
cbcd1d87fb exo2: implement through end of random cache init 2020-06-14 22:07:45 -07:00
Michael Scire
f66b41c027 exo2: Initial work on the exosphere rewrite.
exo2: Implement uncompressor stub and boot code up to Main().

exo2: implement some more init (uart/gic)

exo2: implement more of init

exo2: improve reg api, add keyslot flag setters

exo2: implement se aes decryption/enc

exo2: fix bugs in loader stub/mmu mappings

exo2: start skeletoning bootconfig/global context types

arch: fix makefile flags

exo2: implement through master key derivation

exo2: implement device master keygen

exo2: more init through start of SetupSocSecurity

exo2: implement pmc secure scratch management

se: implement sticky bit validation

libexosphere: fix building for arm32

libexo: fix makefile flags

libexo: support building for arm64/arm

sc7fw: skeleton binary

sc7fw: skeleton a little more

sc7fw: implement all non-dram functionality

exo2: fix DivideUp error

sc7fw: implement more dram code, fix reg library errors

sc7fw: complete sc7fw impl.

exo2: skeleton the rest of SetupSocSecurity

exo2: implement fiq interrupt handler

exo2: implement all exception handlers

exo2: skeleton the entire smc api, implement the svc invoker

exo2: implement rest of SetupSocSecurity

exo2: correct slave security errors

exo2: fix register definition

exo2: minor fixes
2020-06-14 22:07:45 -07:00
Michael Scire
71e0102f7a boot2: correct service access for mitm-forward-declare 2020-05-27 03:58:10 -07:00
Michael Scire
fe0bd03feb strat: use 1 fewer fs session at runtime (and match official ncm usage) 2020-05-27 03:51:11 -07:00
Michael Scire
80e49696ea ams: update for 10.0.3 2020-05-25 19:33:21 -07:00
Michael Scire
f215da3b37 fs: miscellaneous bucket tree fixes 2020-05-19 09:48:44 -07:00
Michael Scire
a2496e5462 exo: fix warmboot memory address error 2020-05-18 08:57:20 -07:00
Michael Scire
de9a3c6dfc git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "797dfa78"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "797dfa78"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-05-18 08:22:36 -07:00
Adubbz
79ae47f028
ncm: implement firmware downgrading (#958)
* ncm: implement firmware downgrading

* ncm: make storage list const
2020-05-18 08:03:38 -07:00
Michael Scire
19d8a0fc2b os: use ported libnx mutex impl 2020-05-17 23:20:21 -07:00
Michael Scire
8052dd6249 fusee: fix boot support on < 7.x 2020-05-16 16:00:45 -07:00
Michael Scire
9baf096a10 dmnt: make debug event result handling more robust (closes #938) 2020-05-16 15:05:46 -07:00
jam1garner
9598da0a0b
Tweak default settings to allow nro replacement mods for smash (#956) 2020-05-15 14:28:51 -07:00
Michael Scire
c8e5461e3f git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "bbbe6793"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "bbbe6793"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-05-14 02:22:58 -07:00
Michael Scire
53a47e07fd nca-pr: update for c++20 2020-05-14 02:22:24 -07:00
Michael Scire
311d2678c7 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "b38939ad"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "b38939ad"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-05-12 15:44:47 -07:00
SciresM
81f91803ec
Implement support for parsing/interacting with NCAs. (#942)
* fs: implement support for interacting with ncas.

* spl: extend to use virtual keyslots
2020-05-11 15:04:51 -07:00
SciresM
3a1ccdd919
Switch atmosphere's build target to C++20. (#952)
* ams: update to build with gcc10/c++20

* remove mno-outline-atomics

* ams: take care of most TODO C++20s

* fusee/sept: update for gcc10

* whoosh, your code now uses pre-compiled headers

* make: dependency fixes
2020-05-11 15:02:10 -07:00
Michael Scire
17b6bcfd37 loader: correct anti-downgrade tables for new version scheme 2020-05-06 22:39:11 -07:00
Michael Scire
0e289461bb ams: use psc acknowledge_ex on 5.1.0+ (fixes wake-from-sleep on 5.1.0) 2020-05-06 22:34:34 -07:00
Michael Scire
8e75a4169d ams: revamp target firmware 2020-05-06 22:29:07 -07:00
Michael Scire
85cd2c97a0 ams:bpc: allow programatically setting reboot payload 2020-05-04 23:29:54 -07:00
hexkyz
3e6031b8f4
docs: fix wrong link (thanks @jul2003) 2020-05-03 15:49:23 +01:00
Michael Scire
9ddc6e596b kern: fix link error 2020-05-02 22:30:34 -07:00
hexkyz
b56f9966b7
Merge pull request #929 from hexkyz/master
docs: re-write documentation
2020-05-01 18:10:56 +01:00
Michael Scire
3bc7c52ade pm: correct extra application thread allocation counts 2020-05-01 05:23:37 -07:00
SciresM
e819f3dbce
exefs.nsp 2020-04-29 14:13:34 -07:00
SciresM
4d78b834cb
ldr: add technical semantics for redirection 2020-04-29 11:45:58 -07:00
Michael Scire
f670949ca9 os: oh geez look at the time 2020-04-29 00:41:51 -07:00
Michael Scire
72f1e85aba git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "292a8ad4"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "292a8ad4"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-04-28 00:14:42 -07:00
Michael Scire
491ba8fdcf emummc: fix console reinitialize on 10.x
10.x FS now receives a transfer memory to wipe BIS with and maps it.

This requires SVCs that emummc did not give itself access to.

This commit adds them, which prevents a FS process abort on re-init.
2020-04-28 00:11:42 -07:00
hexkyz
67b91cfa13
docs: minor style fix 2020-04-27 18:52:53 +01:00
hexkyz
7361fa25a9 Merge branch 'master' of https://github.com/Atmosphere-NX/Atmosphere 2020-04-27 18:44:07 +01:00
hexkyz
793bde256c Merge branch 'master' of https://github.com/hexkyz/Atmosphere 2020-04-27 18:41:11 +01:00
hexkyz
234c83522a docs: address review commentary 2020-04-27 18:40:22 +01:00
Michael Scire
0bfbc6e6eb git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "6913aa52"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "6913aa52"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-04-27 10:34:30 -07:00
Michael Scire
2dfe5b192e result: add R_CATCH_MODULE 2020-04-27 10:33:51 -07:00
SciresM
aca2992c68
Add up-to-date roadmap. 2020-04-27 09:35:23 -07:00
hexkyz
39f5933600 Merge branch 'master' of https://github.com/Atmosphere-NX/Atmosphere 2020-04-27 16:28:17 +01:00
Michael Scire
52c89a76b2 kern: fix KLinkedList dtor 2020-04-27 03:56:12 -07:00
hexkyz
faaef5eff5
docs: hid_mitm is disabled by default 2020-04-26 21:01:54 +01:00
hexkyz
a9cc74da34
docs: remove misleading sentence in fatal module 2020-04-26 20:59:29 +01:00
hexkyz
93e855a293
docs: document exefs PFS0 replacement 2020-04-26 20:56:12 +01:00
hexkyz
a61fdc8d65
docs: correct "nogc" description 2020-04-26 20:49:14 +01:00
hexkyz
9622912059
docs: remove switch-freetype dependency 2020-04-26 20:43:32 +01:00
hexkyz
59ea93e9cd docs: style fixes 2020-04-26 19:18:49 +01:00
hexkyz
57ac153671 docs: initial re-write of all documentation 2020-04-26 19:06:59 +01:00
Michael Scire
71d266f867 kern: implement SvcSetUnsafeLimit 2020-04-26 02:49:59 -07:00
Michael Scire
970b85bf9a kern: implement KUnsafeMemory 2020-04-26 02:35:10 -07:00
Michael Scire
7bc0250cea exosphere: correct reencryption of rsa private keys 2020-04-24 17:36:37 -07:00
Michael Scire
524da78b0e git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "bb40dae3"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "bb40dae3"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-04-24 17:29:50 -07:00
Michael Scire
7458879555 ams: bump version to 0.12.0 2020-04-24 17:28:57 -07:00
Michael Scire
1d40a08ef9 dmnt: move stuff around slightly, add client bindings 2020-04-24 17:24:15 -07:00
SciresM
be07035954
Dmnt: Add break/continue commands, add static register api. (#899)
* dmnt: implement break/continue, static reg commands

* dmnt: revise per WerWolv's feedback.
2020-04-24 17:00:43 -07:00
Pika
b7c4dae899
docs: fix Behemoth's username (#922) 2020-04-23 17:23:19 -07:00
jhNsXO
94d0d06660
Update building.md (#916)
add dependency needed since 90d754f920
2020-04-22 19:30:20 -07:00
Michael Scire
2e4e59dbda docs: right 2020-04-22 17:59:03 -07:00
Michael Scire
0fb528836c note that we support 10.0.1 2020-04-22 17:56:13 -07:00
Michael Scire
4a01ae8b9d docs: yeah this is kinda too big a changelog 2020-04-22 17:54:19 -07:00
Michael Scire
5bec9395b1 docs: Add a bunch of 0.11.2's changelog ahead of time.
0.11.2 will release sometime in the next week or two or so.

I am writing this now while I remember all the things that have happened,
so that I don't forget about them when release comes.

There is also a PR for dmnt changes that will be merged into 0.11.2 not included here,
and there may be more changes before the release occurs.
2020-04-22 17:49:52 -07:00
SciresM
3bc2d79384
PRODINFO: Revamp blanking/write disallow policy. (#913)
* exo/fusee: hookup new prodinfo settings

* fusee: new scheme doesn't need FLAGS_DEFAULT

* fusee: fix c/p errors

* ams.mitm: completely revamp prodinfo backup mechanism

* ams.mitm: Implement revamped blanking/write policy

* strat: make early boot more debuggable

* exo: condense flag logic
2020-04-22 16:22:14 -07:00
Michael Scire
6ac1ff6f24 creport: Try to take screenshot of application crashes on 9.x+ 2020-04-22 14:50:16 -07:00
Michael Scire
93e0c9194d erpt: fix access to time service on versions where it is disallowed 2020-04-22 12:03:55 -07:00
Michael Scire
6ad0f0e7f2 kern/kldr: fix bugs in physical randomization 2020-04-22 03:45:21 -07:00
Michael Scire
4f50f57bb7 os: bug fixes after re-review of rwlock code 2020-04-21 22:40:45 -07:00
Michael Scire
97cba5e881 os: implement ReadWriteLock 2020-04-21 20:23:50 -07:00
Michael Scire
6eb77e69c4 refactor jpegdec implementation into libstrat (thanks again, Behemoth!) 2020-04-20 04:37:08 -07:00
HookedBehemoth
90d754f920
jpegdec reimplementation (#912)
* add jpegdec reimplementation

* reduce work memory

* fix color space

* jpegdec: cleanup results to use atmosphere style

* fix outdated comments, correct do/while bug

Co-authored-by: Michael Scire <SciresM@gmail.com>
2020-04-20 02:07:37 -07:00
Michael Scire
b39b6f0d5b kern: implement 10.x perm change, fix many page table bugs 2020-04-19 17:16:19 -07:00
Michael Scire
dcfb3bc9b5 kern: randomize dynamic slab heaps to reflect 10.x changes 2020-04-19 00:35:05 -07:00
Michael Scire
b4d003b4b9 kern: fix suboptimal mapping choices by kernel/kernelldr 2020-04-19 00:01:06 -07:00
Michael Scire
bc1d3ccc91 kern: Update init to reflect 10.0.0 changes 2020-04-18 22:19:09 -07:00
Michael Scire
152a945561 kern: Update page bitmaps/alloc to reflect 10.0.0 changes 2020-04-18 17:10:26 -07:00
Michael Scire
3da0cda4ae ams: centralize system thread definitions 2020-04-17 01:06:07 -07:00
Michael Scire
d77fe98203 sf: properly support preservation of inline context 2020-04-16 23:51:42 -07:00
Michael Scire
94ec9ae41b hos: change initialization API
This was needed to make stratosphere buildable with debugging on.

os:: assertions rely on GetCurrentThread() working, and this requires
the global os resource manager to be constructed. However, __appInit executes
before global constructors. We now require that hos::InitializeForStratosphere()
be called before anything else is done. This initializes the os resource manager,
sets the hos version for libnx, and may do more things in the future.

TODO: Consider replacing __appInit/__appExit with ams:: namespace functions in general,
and wrap them so that we guarantee hos::InitializeForStratosphere is called first, and
generally ensure a consistent stratosphere environment.
2020-04-16 22:57:01 -07:00
Michael Scire
332dbdd497 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "c1fe12fc"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "c1fe12fc"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-04-16 20:06:20 -07:00
SciresM
98cc051387
pgl: Reimplement the pgl sysmodule (#896)
* pgl: add skeleton folder to stratosphere

* pgl: Add service interface for IShellInterface

* pgl: begin skeletoning shell service, implement two commands.

* pgl: Implement three more commands.

* pgl: implement bool tracking commands

* pgl: Implement TriggerApplicationSnapShotDumper

* pgl: implement InitializeProcessControlTask

* pgl: Implement pgl::srv::Initialize

* pgl: Implement main()

* pgl: Implement (Get)ShellEventObserver

* pgl: implement LaunchProgramFromHost, GetHostContentMetaInfo

* pgl: Implement ProcessControlTask

* settings: fix duplicate object name

* pgl: fix minor bugs in impl
2020-04-16 19:55:47 -07:00
Michael Scire
f2944d36ba kern: amend syntax 2020-04-16 18:00:42 -07:00
Michael Scire
46d79387e8 mesosphere: implement KMemoryBlockManager::UpdateLock 2020-04-16 17:58:51 -07:00
Michael Scire
0bb2c0a04f licensing: update exemptions (approved by contributors). 2020-04-16 17:33:04 -07:00
Michael Scire
eca2b453ae pgl: update with client C++ bindings 2020-04-15 20:07:20 -07:00
Michael Scire
e14dc18bd3 pgl: skeleton api 2020-04-15 17:37:11 -07:00
Michael Scire
c7743c6098 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "96825c75"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "96825c75"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-04-15 11:55:50 -07:00
Michael Scire
d81a3bdc36 bump version to 0.11.1 2020-04-15 01:34:35 -07:00
Michael Scire
32e5283ac2 bump version to 0.11.1 2020-04-15 01:30:12 -07:00
Michael Scire
1d9a4f47fd exosphere: set cpuactlr to guarantee it holds non reset value 2020-04-15 01:26:28 -07:00
Michael Scire
3f5f9b60ea exosphere: ... 2020-04-15 00:14:36 -07:00
Michael Scire
08e1b4d116 docs: fix partial changelog 2020-04-14 14:12:57 -07:00
Michael Scire
683580861f docs: add changelog for 0.11.0 2020-04-14 13:54:17 -07:00
Michael Scire
7d30460214 exosphere: fix reentrancy of se interrupt handler 2020-04-14 12:23:08 -07:00
Michael Scire
d7ba3291ed git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "b168ddf5"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "b168ddf5"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-04-14 11:17:12 -07:00
Michael Scire
c07f54f370 emummc: fix for svcQueryIoMapping abi change 2020-04-14 11:15:19 -07:00
Michael Scire
6fe8ada37a ncm/build dist: minor fixes 2020-04-14 10:20:27 -07:00
Michael Scire
94b10b5779 ams: fix boot sysmodule/kernel for 10.0.0 2020-04-14 10:11:58 -07:00
Michael Scire
9b677c81a5 fusee: support passing target firmware to kernel loader. 2020-04-14 10:11:58 -07:00
Adubbz
a25be61e94
ncm: update to 10.0.0 (#879) 2020-04-14 10:11:51 -07:00
Michael Scire
116e00c21c kernel_ldr: update to support 10.0.0 2020-04-14 07:38:01 -07:00
Michael Scire
122b0775f1 git subrepo clone --force --branch=develop https://github.com/m4xw/emummc
subrepo:
  subdir:   "emummc"
  merged:   "f35ce000"
upstream:
  origin:   "https://github.com/m4xw/emummc"
  branch:   "develop"
  commit:   "f35ce000"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-04-14 04:49:43 -07:00
Michael Scire
11f840b1e3 creport: update for 10.0.0 2020-04-14 04:48:57 -07:00
Michael Scire
36039ddbb7 git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "9dd60229"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "9dd60229"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-04-14 04:35:26 -07:00
Michael Scire
5347f0d583 emummc: add support for 10.0.0 2020-04-14 04:34:35 -07:00
Michael Scire
408dde533f emummc: lie to git subrepo 2020-04-14 04:34:15 -07:00
Michael Scire
b15b46a68e fusee: identify 10.x fs kip 2020-04-14 03:45:11 -07:00
Michael Scire
ba6f298618 fs: add nogc patches for 10.0.0 2020-04-14 03:41:03 -07:00
Michael Scire
c6424921a6 10.0.0 + a new sysmodule reimplementation probably merits 0.11.0 2020-04-14 03:34:35 -07:00
Michael Scire
8547802904 boot2: update for 10.0.0 2020-04-14 03:30:03 -07:00
Michael Scire
353e27b9e2 ldr: update 10.0.0 conditionals 2020-04-14 03:20:23 -07:00
Michael Scire
4a38a36036 exo: fix c/p error 2020-04-14 03:03:04 -07:00
Michael Scire
200d2df785 pm: Update to support 10.0.0 2020-04-14 02:54:55 -07:00
Michael Scire
73552c86c3 loader: update for 10.0.0 2020-04-14 02:45:28 -07:00
Michael Scire
dd80e1f463 loader: update anti-downgrade tables for 10.0.0 2020-04-13 23:44:01 -07:00
Michael Scire
15c929a0e4 fusee: add support for 10.0.0 2020-04-13 23:35:52 -07:00
Michael Scire
aa4c79cd9c exosphere: update to support 10.0.0 2020-04-13 23:30:54 -07:00
Michael Scire
6719abec65 hos::Version: rename enum members 2020-04-13 22:19:44 -07:00
SciresM
79b9e07ee9
erpt: reimplement the sysmodule (#875)
* erpt: reimplement the sysmodule

* fatal: update for latest bindings

* erpt: amend logic for culling orphan attachments
2020-04-13 17:07:37 -07:00
Michael Scire
eca5ac01b8 erpt: include all known types/categories in autogen 2020-04-10 03:33:30 -07:00
Michael Scire
50ea19e7a2 erpt: identify flags in autogen 2020-04-08 10:32:53 -07:00
Michael Scire
823a1f3ea3 erpt: tweak autogen 2020-04-08 10:09:56 -07:00
Michael Scire
b73895df0a util: add bitflagset 2020-04-08 08:39:36 -07:00
Michael Scire
5062329979 erpt: add ids (and autogeneration tool) 2020-04-08 07:17:42 -07:00
Michael Scire
065485b971 os: refactor/rewrite entire namespace. 2020-04-08 02:21:35 -07:00
Michael Scire
6193283f03 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "da6eac98"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "da6eac98"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-04-06 17:45:00 -07:00
Michael Scire
eb48e7cc59 buildsystem: fix building 2020-04-06 17:44:14 -07:00
Michael Scire
d98490d339 fs: Implement AesXtsStorage 2020-04-06 05:44:33 -07:00
Michael Scire
b2e86f5a1b fs: correct error result in AesCtrStorage 2020-04-06 04:56:49 -07:00
Michael Scire
0e9974e7b3 fs: add AesCtrStorage 2020-04-06 03:58:52 -07:00
Michael Scire
496be5ecd4 fs: implement PooledBuffer 2020-04-06 03:15:38 -07:00
Michael Scire
50a91b1d6e fs: implement system heap 2020-04-06 03:15:33 -07:00
Michael Scire
f872be67eb git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "18396d1a"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "18396d1a"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-04-05 23:26:06 -07:00
Michael Scire
e04679f05a crypto: add aes (ecb, ctr, xts) 2020-04-05 23:25:28 -07:00
Michael Scire
8d1ada2a1b fssystem: add RomFsFileSystem 2020-04-04 02:37:21 -07:00
Adubbz
a50d6a2696
NCM client implementation (#858)
* ncm: Implement InstallTaskDataBase and FileInstallTaskData

* ncm: minor bugfixes

* ncm: Implemented MemoryInstallTaskData

* ncm: more std

* ncm: begin implementing install task base

* ncm: move protected funcs

* ncm: fix recursive include

* ncm: more install task progress

* ncm install task: implement IncrementProgress and update UpdateThroughputMeasurement

* ncm: more work

* ncm client: more progress

* ncm client: more progress

* ncm client: finish implementing GetContentMetaInfoList

* ncm client: more progress

* ncm client: finished InstallTaskBase

* ncm client: implement PackageInstallTaskBase

* ncm client: fixes

* ncm: improve accuracy

* ncm client: implement PackageInstallTask

* ncm client: implement PackageSystemUpdateTask

* ncm client: minor name tweaks

* ncm client: implement SubmissionPackageInstallTask

* ncm client: add missing this to SubmissionPackageInstallTask

* ncm client: add missing nullptr check to SubmissionPackageInstallTask destructor

* ncm client: SubmissionPackageInstallTask fixes

* ncm: fix forward declarations

* ncm client: added simplified funcs

* ncm: cleanup client code

* ncm: fix bug introduced by cleanup

* ncm: fix typo

* ncm: implement correct ReadVariationContentMetaInfoList behavior

* ncm: correct InstallContentMetaWriter ctor

* ncm: correct conversion of content meta header types

Co-authored-by: Michael Scire <SciresM@gmail.com>
2020-04-03 22:40:46 -07:00
Michael Scire
76d72fa946 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "62f5667b"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "62f5667b"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-04-02 00:29:14 -07:00
Michael Scire
8b19fdfd51 sf: fix OutArray/InArray constructors to behave as expected 2020-04-02 00:28:39 -07:00
Michael Scire
612d846132 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "0f46474d"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "0f46474d"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-03-31 22:43:12 -07:00
Michael Scire
816ce605d3 fs: add an extension common name generator for sd card 2020-03-31 22:42:02 -07:00
SciresM
07c95662b1
nim: add DestroySystemUpdateTask/ListSystemUpdateTask (#863) 2020-03-31 12:50:55 -07:00
Michael Scire
2b930d21fd git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "de221b5d"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "de221b5d"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-03-30 21:41:49 -07:00
Michael Scire
0b52596087 fix CONCATENATE 2020-03-30 21:40:48 -07:00
Michael Scire
e9134d8044 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "63d5df84"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "63d5df84"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-03-30 20:41:45 -07:00
Michael Scire
33d6dfb6b3 updater: improve api 2020-03-30 20:39:56 -07:00
bunnei
6096fa0e45
KPageHeap: Fix a typo in initialization block alignment. (#862) 2020-03-30 19:27:02 -07:00
Michael Scire
058f265bd6 lmem: fix memory block header placement error 2020-03-30 00:56:57 -07:00
Michael Scire
bd4c608b08 ncm: use static memory pools for different allocations 2020-03-29 17:20:25 -07:00
Michael Scire
7fc1e86bf5 stratosphere: fix building with latest libnx 2020-03-29 15:24:40 -07:00
SciresM
87ec045a98
mem: implement most of StandardAllocator (#860)
This was tested using `https://github.com/node-dot-cpp/alloc-test` plus a few other by-hand tests.

It seems to work for the case we care about (sysmodules without thread cache-ing).

External users are advised to build with assertions on and contact SciresM if you find issues.

This is a lot of code to have gotten right in one go, and it was written mostly after midnight while sick, so there are probably un-noticed issues.
2020-03-29 14:43:16 -07:00
Michael Scire
7502e2174f git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "6f77a6bf"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "6f77a6bf"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-03-27 17:00:36 -07:00
Michael Scire
0545eb18c0 fs: add MountImageDirectory 2020-03-27 16:59:27 -07:00
Adubbz
0c161a4c1b
fs: implement FileHandleStorage (#857)
* fs: implement FileHandleStorage

* fs: merge FileHandleStorage into file_storage TU

Co-authored-by: Michael Scire <SciresM@gmail.com>
2020-03-27 11:45:02 -07:00
Adubbz
3d518759da
fssystem: Implement PartitionFileSystemCore (#856)
* fssystem: implement PartitionFileSystemMetaCore

* fssystem: PartitionFileSystemMetaCore cleanup

* fs: add IFile::DryWrite, update results

* fssystem: implement PartitionFileSystemCore

* fssystem: cleanup PartitionFileSystemCore

* fssystem: implement Sha256PartitionFileSystem

Co-authored-by: Michael Scire <SciresM@gmail.com>
2020-03-27 03:40:52 -07:00
Michael Scire
0af2758fde fs.mitm: use new namespace types for saves 2020-03-24 17:50:36 -07:00
Michael Scire
9bb5af9823 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "30f3e4c3"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "30f3e4c3"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-03-20 17:06:23 -07:00
Michael Scire
82eab9c8d0 Add Span<T>. 2020-03-20 17:04:01 -07:00
Michael Scire
3cca3801ca fs: fix bugs with external code filesystems 2020-03-20 11:47:19 -07:00
Michael Scire
03408f404a git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "07630f73"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "07630f73"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-03-18 20:06:10 -07:00
Michael Scire
92e7a3ca08 fs: add MountDeviceSaveData 2020-03-18 20:05:39 -07:00
Michael Scire
b27c7552d2 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "38fc51c6"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "38fc51c6"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-03-18 16:20:29 -07:00
Michael Scire
426257d4ae ams: bump version to 0.10.5 in prep for release later tonight 2020-03-18 16:19:59 -07:00
Michael Scire
7d34d599bb git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "07684b2c"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "07684b2c"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-03-18 00:15:32 -07:00
Michael Scire
067fe2d10f stratosphere: fix building with latest libnx 2020-03-18 00:14:34 -07:00
Michael Scire
4759c2f92c svc: add ipc accessor boilerplate 2020-03-18 00:09:51 -07:00
Michael Scire
ca26d8ce27 kern: Implement SvcManageNamedPort 2020-03-18 00:09:51 -07:00
Michael Scire
6c52cc3e26 memset: use neon-less impl, reformat other asm 2020-03-18 00:09:50 -07:00
Michael Scire
e42d3a3abf libmesosphere: use ARM-software/optimized-routines for memcpy/memset/memcmp 2020-03-18 00:09:50 -07:00
Michael Scire
884844bc23 svc: revert codegen changes 2020-03-18 00:09:50 -07:00
Michael Scire
f556db8c89 svc: make autogen asm register-clobber aware 2020-03-18 00:09:50 -07:00
Michael Scire
96d15b28c6 kern: implement CallSecureMonitor, some of GetInfo/GetSystemInfo 2020-03-18 00:09:50 -07:00
Michael Scire
37f7afb426 ams.mitm: greatly reduce memory requirements to build romfs 2020-03-18 00:07:19 -07:00
Michael Scire
7dd4e76c1d os: add rngmanager 2020-03-16 13:08:20 -07:00
Michael Scire
daa0deb1bf Add architecture-specific guard for get tick 2020-03-16 01:05:30 -07:00
Michael Scire
43bd733f0a os: implement Tick api, make build with -Werror 2020-03-16 01:02:55 -07:00
Michael Scire
70367e3e7c crypto: add Sha256Context 2020-03-11 03:26:55 -07:00
Michael Scire
45f8343659 kern: tweak KHandleTable impl 2020-03-10 04:54:53 -07:00
Michael Scire
e8dfe04701 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "a4ce1172"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "a4ce1172"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2020-03-09 18:04:11 -07:00
Michael Scire
95d5375158 ams: bump version to 0.10.4 2020-03-09 18:03:11 -07:00
hexkyz
b735bc53c4
stratosphere-ldr: fix code mount name 2020-03-09 21:53:40 +00:00
hexkyz
b4856a2d07 exo/fusee/sept: fix uart pinmuxing (thanks @CTCaer and @TuxSH) 2020-03-09 19:38:56 +00:00
hexkyz
ed4491a24f fusee/sept: fix volatile usage and simplify logic in gpio code (thanks @TuxSH) 2020-03-09 19:33:39 +00:00
Michael Scire
93004be59e ams: finish stdio -> fs bindings for stratosphere 2020-03-09 03:58:02 -07:00
Michael Scire
237b513408 loader: refactor to use fs bindings 2020-03-09 03:10:12 -07:00
Michael Scire
4c5e980e07 ams: dump tls in fatal error context 2020-03-08 17:01:53 -07:00
Michael Scire
08d9de6907 ldr: optimize memory usage for tracking system programs 2020-03-08 16:54:32 -07:00
Michael Scire
6eee3f5fe7 stratosphere-except-ldr: use fs bindings (this temporarily breaks loader) 2020-03-08 16:33:49 -07:00
Michael Scire
4eb3109c93 fusee: update fss0 header 2020-03-08 11:50:38 -07:00
Michael Scire
f7fb689412 fatal: use fs bindings 2020-03-08 04:50:47 -07:00
Michael Scire
2181adb82b creport: minor reformatting/fixes 2020-03-08 03:08:39 -07:00
Michael Scire
40c6733de3 creport: use fs bindings 2020-03-08 01:45:12 -08:00
Michael Scire
c703be86fc stratosphere template: allow for per-module defines 2020-03-08 01:39:16 -08:00
Michael Scire
f3732c72dc fusee: embed opt-in NCM kip 2020-03-08 00:21:01 -08:00
Adubbz
c7026b9094
Implement the NCM sysmodule (closes #91)
* Implement NCM

* Modernize ncm_main

* Remove unnecessary smExit

* Give access to svcCallSecureMonitor

* Stack size bump

* Fix incorrect setup for NandUser's content storage entry

* Fix a potential data abort when flushing the placeholder accessor cache

* Fix HasFile and HasDirectory

* Use r+b, not w+b

* Misc fixes

* errno begone

* Fixed more stdio error handling

* More main fixes

* Various command improvements

* Make dispatch tables great again

* Fix logic inversion

* Fixed content path generation

* Bump heap size, fix CleanupAllPlaceHolder

* Various fixes. Note: This contains debug stuff which will be removed later. I was getting tired of having to cherrypick tiny changes

* Fixed placeholder/content deletion

* Fixed incorrect content manager destruction

* Prevent automatic placeholder creation on open

* Fixed List implementation. Also lots of debug logging.

* Removed debug code

* Added a scope guard for WritePlaceHolder

* Manually prevent placeholder/content appending

* Revert "Removed debug code"

This reverts commit d6ff261fcc.

* Always cache placeholder file. Switch to ftell for preventing appending

* Universally use EnsureEnabled

* Abstract away file writing logic

* Misc cleanup

* Refactor placeholder cacheing

* Remove debug code (again)

* Revert "Remove debug code (again)"

This reverts commit 168447d80e.

* Misc changes

* Fixed file modes

* Fixed ContentId/PlaceHolderId alignment

* Improved type safety

* Fixed reinitialization

* Fixed doubleup on path creation

* Remove debug code

* Fixed 1.0.0 booting

* Correct amount of add on content

* Correct main thread stack size

* lr: Introducing registered data

* Reorder stratosphere Makefile

* Move results to libstrat

* lr: Cleanup lr_redirection

* lr: lr_manager tweaks

* lr: Imrpoved path handling and adjust ResolveAddOnContentPath order

* lr: Organise types

* Add eof newlines

* lr: Eliminate unnecessary vars

* lr: Unnecessary vars 2 electric boogaloo

* lr: Various helpers

* lr: RegisteredLocationResolver helpers

* ncm: Move ncm_types to libstrat

* ncm: Misc cleanup

* Implement NCM

* Modernize ncm_main

* Remove unnecessary smExit

* Give access to svcCallSecureMonitor

* Stack size bump

* Fix incorrect setup for NandUser's content storage entry

* Fix a potential data abort when flushing the placeholder accessor cache

* Fix HasFile and HasDirectory

* Use r+b, not w+b

* Misc fixes

* errno begone

* Fixed more stdio error handling

* More main fixes

* Various command improvements

* Make dispatch tables great again

* Fix logic inversion

* Fixed content path generation

* Bump heap size, fix CleanupAllPlaceHolder

* Various fixes. Note: This contains debug stuff which will be removed later. I was getting tired of having to cherrypick tiny changes

* Fixed placeholder/content deletion

* Fixed incorrect content manager destruction

* Prevent automatic placeholder creation on open

* Fixed List implementation. Also lots of debug logging.

* Removed debug code

* Added a scope guard for WritePlaceHolder

* Manually prevent placeholder/content appending

* Revert "Removed debug code"

This reverts commit d6ff261fcc.

* Always cache placeholder file. Switch to ftell for preventing appending

* Universally use EnsureEnabled

* Abstract away file writing logic

* Misc cleanup

* Refactor placeholder cacheing

* Remove debug code (again)

* Revert "Remove debug code (again)"

This reverts commit 168447d80e.

* Misc changes

* Fixed file modes

* Fixed ContentId/PlaceHolderId alignment

* Improved type safety

* Fixed reinitialization

* Fixed doubleup on path creation

* Remove debug code

* Fixed 1.0.0 booting

* Correct amount of add on content

* Correct main thread stack size

* lr: Introducing registered data

* Reorder stratosphere Makefile

* Move results to libstrat

* lr: Cleanup lr_redirection

* lr: lr_manager tweaks

* lr: Imrpoved path handling and adjust ResolveAddOnContentPath order

* lr: Organise types

* Add eof newlines

* lr: Eliminate unnecessary vars

* lr: Unnecessary vars 2 electric boogaloo

* lr: Various helpers

* lr: RegisteredLocationResolver helpers

* ncm: Move ncm_types to libstrat

* ncm: Misc cleanup

* Updated AddOnContentLocationResolver and RegisteredLocationResolver to 9.0.0

* Finished updating lr to 9.0.0

* Updated NCM to 9.0.0

* Fix libstrat includes

* Fixed application launching

* title_id_2 -> owner_tid

* Updated to new-ipc

* Change to using pure virtuals

* Title Id -> Program Id

* Fixed compilation against master

* std::scoped_lock<> -> std::scoped_lock

* Adopted R_UNLESS and R_CONVERT

* Prefix namespace to Results

* Adopt std::numeric_limits

* Fixed incorrect error handling in ReadFile

* Adopted AMS_ABORT_UNLESS

* Adopt util::GenerateUuid()

* Syntax improvements

* ncm_types: Address review

* Address more review comments

* Updated copyrights

* Address more feedback

* More feedback addressed

* More changes

* Move dispatch tables out of interface files

* Addressed remaining comments

* lr: move into libstratosphere

* ncm: Fix logic inversion

* lr: Add comments

* lr: Remove whitespace

* ncm: Start addressing feedback

* ncm: Cleanup InitializeContentManager

* lr: support client-side usage

* lr_service -> lr_api

* ncm: Begin refactoring content manager

* ncm: More content manager improvements

* ncm: Content manager mount improvements

* ldr: use lr bindings

* lr bindings usage: minor fixes

* ncm/lr: Pointer placement

* ncm: placeholder accessor cleanup

* ncm: minor fixes

* ncm: refactor rights cache

* ncm: content meta database cleanup

* ncm: move content meta database impl out of interface file

* ncm: Use const ContentMetaKey &

* ncm: fix other non-const ContentMetaKey references

* ncm: content meta database cleanup

* ncm: content storage fixes for 2.0.0

* ncm: add missing end of file newlines

* ncm: implement ContentMetaReader

* ncm: client-side api

* ncm: trim trailing spaces

* ncm: FS_MAX_PATH-1 -> fs::EntryNameLengthMax

* ncm: Use PathString and Path

* fs: implement accessor wrappers for ncm

* fs: implement user fs wrappers

* fs: add MountSdCard

* ncm: move to content manager impl

* ncm: fix up main

* kvdb: use fs::

* fs: Add wrappers needed for ncm

* ncm: use fs bindings, other refactoring

* ncm: minor fixes

* fsa: fix ReadFile without size output

* fs: add substorage, rom path tool

* ncm: fix dangling fsdev usage

* fs: fix bug in Commit

* fs: fixed incorrect mode check

* fs: implement Mount(System)Data

* ncm: don't delete hos

* results: add R_SUCCEED_IF

* ams-except-ncm: use R_SUCCEED_IF

* ncm: added comments

* ncm: fix api definitions

* ncm: use R_SUCCEED_IF

* pm: think of the savings

* ncm: employ kernel strats

* ncm: Nintendo has 5 MiB of heap. Give ourselves 4 to be safe, pending analysis

* ncm: refactor IDs, split types header into many headers

* ams.mitm: use fs bindings instead of stdio

* fs: SystemData uses SystemDataId

* ncm: improve meta-db accuracy

* ncm: inline getlatestkey

* fs: improve UnsupportedOperation results

* fs: modernize mount utils

* ams: misc fixes for merge-errors

* fs: improve unsupportedoperation results

* git subrepo pull emummc

subrepo:
  subdir:   "emummc"
  merged:   "d12dd546"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "d12dd546"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"

* util: add boundedmap

* ncm: minor style fixes

* ncm: don't unmount if mounting fails

* lr: bug fixes

* ncm: implement ncm.for-initialize + ncm.for-safemode

* lr: ncm::ProgramId::Invalid -> ncm::InvalidProgramId

* ncm: fix open directory mode on 1.0.0

* ncm: fix fs use, implement more of < 4.0.0 for-initialize/safemode

* ncm: implement packagedcontent -> content for building metadb

* ncm: fix save data flag management

* ncm: address some review suggestions (thanks @leoetlino!)

* updater: use fs bindings

* fs: implement MountCode

* fs: prefer make_unique to operator new

* ncm: implement remaining ContentMetaDatabaseBuilder functionality

Co-authored-by: Michael Scire <SciresM@gmail.com>
2020-03-08 00:06:23 -08:00
Michael Scire
f9403201f0 git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "83aa6133"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "83aa6133"
git-subrepo:
  version:  "0.4.1"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "a04d8c2"
2020-03-02 20:00:49 -08:00
Michael Scire
fd34e2342a ams: bump version to 0.10.3 2020-03-02 20:00:10 -08:00
Michael Scire
0e5ade727c git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "807c6866"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "807c6866"
git-subrepo:
  version:  "0.4.1"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "a04d8c2"
2020-03-02 19:52:45 -08:00
Michael Scire
c4065c976c pm/fusee: add support for 9.2.0 2020-03-02 19:49:34 -08:00
Michael Scire
392c9c3a0b ams: prepare for 0.10.3 2020-03-02 18:35:10 -08:00
TuxSH
4f33afe0ee vapours: fix MASKL, MASK2L to match Armv8 ARM (inclusive bit range) 2020-03-01 15:16:12 +00:00
Michael Scire
dc1404061c fs.mitm: implement layered html redirection (closes #814) 2020-02-25 16:44:36 -08:00
Michael Scire
8da705d40b fs.mitm: support html redirection (non-layered, for #814) 2020-02-25 06:41:53 -08:00
Michael Scire
4f34a38a97 Add additional licensing exemption 2020-02-24 20:47:11 -08:00
Michael Scire
799f94958c util/lmem: minor fixes 2020-02-24 20:28:39 -08:00
Michael Scire
c17b6d0d44 util: add uuid 2020-02-24 20:14:48 -08:00
SciresM
5a8aebf74d
lmem: Implement UnitHeap, ExpHeap (#823)
* lmem: implement ExpHeap

* lmem: Implement Slab^H^H^H^HUnitHeap
2020-02-24 19:44:27 -08:00
Michael Scire
191414c832 util: add ConvertTo*Endian48 2020-02-24 19:29:00 -08:00
Michael Scire
a429c61f33 crypto/spl: implement rsa-oaep 2020-02-24 19:09:13 -08:00
Michael Scire
ad1158b30a ro: save 0x25000 while maintaining security improvements 2020-02-24 18:17:33 -08:00
Michael Scire
ba8c77fec6 ro: implement 9.1.0 security measures 2020-02-24 18:02:01 -08:00
Michael Scire
f427c3d7a5 ro: move in use trackers outside of info objects 2020-02-24 16:47:07 -08:00
Michael Scire
05a24b5726 boot: fix more typos/copy paste errors 2020-02-24 09:49:43 -08:00
Michael Scire
8306464758 boot: fix wrong fallthroughs 2020-02-24 09:45:40 -08:00
Michael Scire
4a30437e80 boot: update to accurate as of 9.1.0 2020-02-24 08:21:31 -08:00
Michael Scire
80e1847534 libstrat: fix unconverted _WITH_ASSERTs 2020-02-24 05:01:41 -08:00
Michael Scire
8ccac1d18a pss: extra validity check 2020-02-24 04:32:37 -08:00
Michael Scire
c3656aae30 crypto: constant-time pss (if it survives optimization) 2020-02-24 02:27:01 -08:00
Michael Scire
5fa534fb71 ro: implement NRR signature checks 2020-02-23 18:07:14 -08:00
Michael Scire
f3629f863d crypto: implement RSA-2048-PSS 2020-02-23 17:34:30 -08:00
Michael Scire
d675aa3414 crypto: Implement BigNum/ExpMod 2020-02-23 06:51:32 -08:00
Michael Scire
981166783b stratosphere: misc static -> global 2020-02-22 23:16:53 -08:00
Michael Scire
c0f7cd95b9 pm: save ~0x3000 in binary 2020-02-22 23:11:28 -08:00
Michael Scire
40400aee1f ams: revamp assertion system 2020-02-22 23:05:14 -08:00
Michael Scire
9572fb2ce3 vapours: cleanup svc includes 2020-02-22 19:54:50 -08:00
Michael Scire
eb75d54b2b vapours: new include style, add crypto 2020-02-22 19:47:08 -08:00
Michael Scire
081bd0aefc fix building libstratosphere 2020-02-22 19:21:26 -08:00
SciresM
fa4a96d021
Merge pull request #821 from Atmosphere-NX/mesosphere-dev
Mesosphere: Implement kernel initialization.
2020-02-22 19:07:30 -08:00
SciresM
3c5efefb15
Merge branch 'master' into mesosphere-dev 2020-02-22 19:07:05 -08:00
Michael Scire
3e4c962bbb kern: correct error in KUserPointer 2020-02-22 15:38:31 -08:00
Michael Scire
34fb48b412 kern: mem access prep for svc streams, TODO_IMPLEMENT -> UNIMPLEMENTED 2020-02-22 05:42:46 -08:00
Michael Scire
40980904f7 kern: paranoid assertions about the class tokens 2020-02-22 03:04:31 -08:00
Michael Scire
5055bdb23e kern: correct KClassToken generation 2020-02-22 02:53:14 -08:00
Michael Scire
d2a888d9e8 kern: minor fixes to prevent core0-2 panics during boot 2020-02-21 13:05:16 -08:00
Michael Scire
bb3f7c8ab9 kern: fix building without debugging turned on 2020-02-20 10:14:27 -08:00
Michael Scire
efae01c165 kern: implement KUserPointer (and test with QueryMemory) in advance of svc dev 2020-02-20 09:05:24 -08:00
Michael Scire
9f9593e05f kern: implement large page group mapping, fix debug flag cap 2020-02-19 22:35:31 -08:00
Michael Scire
80b115ef57 kern: implement user thread start, el0 code now runs 2020-02-19 21:21:44 -08:00
Michael Scire
560c340c96 kern: fix supervisor page table activation 2020-02-19 20:43:19 -08:00
Michael Scire
aae3c789f2 kern: implement unsuspension of init threads 2020-02-19 20:42:21 -08:00
Michael Scire
c568788609 kern: implement KProcess::Run 2020-02-19 19:38:20 -08:00
Michael Scire
28ea0b12a8 kern: implement SetProcessMemoryPermission 2020-02-19 08:07:44 -08:00
Michael Scire
b857153964 kern: finish KProcess::Initialize() for KIPs 2020-02-19 06:46:59 -08:00
Michael Scire
d9c3908caf kern: mark initial threads as intended constinit 2020-02-19 05:45:32 -08:00
Michael Scire
b99bcbc619 kern: implement MapIo 2020-02-19 05:35:22 -08:00
Michael Scire
905ce0eeea kern: implement capabilities parsing 2020-02-19 04:55:00 -08:00
Michael Scire
0534ddd37a kern: correct alloc region size 2020-02-19 01:26:16 -08:00
Michael Scire
30b3825f5c libmesosphere: precompile mesosphere.hpp 2020-02-19 01:22:51 -08:00
Michael Scire
05a3e95834 kern: implement process(pagetable) init 2020-02-19 01:22:27 -08:00
Michael Scire
fba8fb539d kern: add KProcess members 2020-02-18 05:04:49 -08:00
Michael Scire
772e1f1c4f kern: implement IsValidPageGroup 2020-02-18 01:44:40 -08:00
Michael Scire
154422562a kern: implement page group unmapping 2020-02-18 01:04:44 -08:00
Michael Scire
25b0baae59 kern: change decompression asserts -> audits 2020-02-17 02:57:01 -08:00
Michael Scire
92521eed2a kern: implement through kip decompression 2020-02-17 02:49:21 -08:00
Michael Scire
cbc73f4407 kern: skeleton initial process loading 2020-02-15 03:44:41 -08:00
Michael Scire
30d6b359f9 kern: implement smmu init 2020-02-15 00:00:35 -08:00
Michael Scire
2c496e94d5 kern: switch->nx, implement sleep manager init 2020-02-14 19:58:57 -08:00
Michael Scire
20b5268e90 kern: kern::arm64 -> kern::arch::arm64 2020-02-14 18:22:55 -08:00
Michael Scire
11f70759ce kern: implement lightlock slowpath (works on hw) 2020-02-14 15:27:34 -08:00
Michael Scire
b3e6571586 kern: improve panic output 2020-02-14 04:01:09 -08:00
Michael Scire
5b98426171 kern: implement KWorkerTaskManager 2020-02-14 02:56:42 -08:00
Michael Scire
c91386b0fa kern: implement interrupt thread init 2020-02-14 02:20:33 -08:00
Michael Scire
19e6d2e1c0 kernel_ldr: fix consistency on hardware 2020-02-13 22:53:26 -08:00
Michael Scire
ea0011d572 kern: use TinyMT instead of mt19937_t 2020-02-13 22:37:30 -08:00
Michael Scire
364b04b68a libmesosphere: move .s to kernel (prevent manifesting in kernelldr) 2020-02-13 22:05:20 -08:00
Michael Scire
8c93eb5712 kern: implement enough of KPageTable to initialize a thread 2020-02-13 17:38:56 -08:00
Michael Scire
c6d1579265 vapours: add time primitives, fix result name 2020-02-13 16:18:39 -08:00
hexkyz
34bb800440 fusee/sept: restore and further match official behavior for SDMMC 2020-02-11 17:13:01 +00:00
Michael Scire
ef3da6cb51 kern: implement KMemoryBlockManager::Update 2020-02-10 09:57:00 -08:00
Michael Scire
3bcc4adb5c kern: implement init through InterruptTaskManager.Initialize() 2020-02-10 02:26:00 -08:00
Michael Scire
3c78bc4dbf kern: implement KMemoryBlockManager init 2020-02-10 01:50:23 -08:00
Michael Scire
fdd7b1db15 kern: add KPageTableBase members 2020-02-09 18:29:38 -08:00
Michael Scire
50b8189e7f kern: begin skeletoning page table types 2020-02-09 03:45:45 -08:00
Michael Scire
3284656aad kern: print build date/time, git revision 2020-02-09 02:05:49 -08:00
Michael Scire
1d65352167 kern: print layout for debug during startup 2020-02-09 01:16:13 -08:00
Michael Scire
d8e94996ad kern: newlines at end of svc files 2020-02-08 11:56:13 -08:00
Michael Scire
5dae43b192 kern: add svc stubs, turn on svc table build 2020-02-08 11:53:27 -08:00
Michael Scire
4b6b06fcaa mesosphere: hard enforcement of TODOs 2020-02-08 03:18:08 -08:00
Michael Scire
919b8124dc kern: Implement exception vector ASM 2020-02-08 02:49:32 -08:00
Michael Scire
e330b6187f kern: bugfix, turn on auditing for the time being 2020-02-07 19:48:07 -08:00
Michael Scire
1224ed8abe kern: implement dpc + skeleton rest of main 2020-02-07 19:16:09 -08:00
Michael Scire
e9e949ec36 kern: obj stubs to get past slab init 2020-02-07 11:51:58 -08:00
Michael Scire
8cfffc69d5 kern: print backtrace on panic 2020-02-07 06:26:01 -08:00
Michael Scire
cb6af379d8 kern: implement dynamic slab init + ini relocation 2020-02-07 04:58:35 -08:00
Michael Scire
d9e6771e63 kern: implement more of KMemoryManager through KPageBuffer slab init 2020-02-06 20:36:26 -08:00
Michael Scire
f7d3d50f33 kern: implement KMemoryManager init 2020-02-06 17:40:57 -08:00
hexkyz
9dc7a4dc18 fusee/sept: don't abort on SDMMC DMA transfer failures 2020-02-06 19:15:13 +00:00
Michael Scire
1de607c183 kern: implement KResourceLimit 2020-02-06 05:34:38 -08:00
Michael Scire
23f5d77f37 kern: fix carveout region calcs 2020-02-06 01:22:21 -08:00
Michael Scire
5961151a92 kern: implement uart init + logging 2020-02-06 01:05:35 -08:00
Michael Scire
323858cf96 kern: s/MemoryBlock/MemoryRegion/g 2020-02-05 14:16:56 -08:00
Michael Scire
5f857cb079 kern: implement more of KInterruptManager 2020-02-05 14:07:51 -08:00
Michael Scire
62de3322ff kern: implement much of KScheduler, KHardwareTimer 2020-02-05 13:02:35 -08:00
TuxSH
1309e93e26 libvapours: reorganize includes.hpp 2020-02-04 19:02:17 +00:00
TuxSH
c6a736a6f6 libvapours: constexpr ALWAYS_INLINE T CombineBits 2020-02-04 02:09:46 +00:00
TuxSH
30e39e60f7 libvapour: forgot to add util_bitutil.hpp to util.hpp 2020-02-04 02:04:59 +00:00
TuxSH
108b997ef2 libvapours: introduce BitsOf, Bits 2020-02-04 01:32:59 +00:00
TuxSH
877b2cf790 libvapours: introduce BITL, MASK, MASKL, MASK2, MASK2L which were already present in other ams components 2020-02-03 23:01:00 +00:00
Michael Scire
5e4307046a style cleanup 2020-01-31 16:38:33 -08:00
Michael Scire
2355047715 kern: add abstract scoped lock template 2020-01-31 16:37:58 -08:00
Michael Scire
57222e8301 kern: implement KSchedulerLock 2020-01-31 16:25:17 -08:00
Michael Scire
797c04d19f kern .fini array: one weird trick 2020-01-31 04:57:28 -08:00
Michael Scire
9accbcf8e1 meso: use -fno-non-call-exceptions, -fno-use-cxa-atexit 2020-01-31 04:47:08 -08:00
Michael Scire
86eea62cd8 kernel: use .rel.ro 2020-01-31 03:37:49 -08:00
Michael Scire
00b093ec62 util: remove spurious error in parent offset calc 2020-01-31 02:03:34 -08:00
Michael Scire
b2b1129cc0 kern: mostly implement KThread::Initialize 2020-01-31 01:53:30 -08:00
Michael Scire
d9db723bc8 kern: add all kthread members 2020-01-31 00:07:06 -08:00
Michael Scire
08cb370a45 kern: implement KThreadContext 2020-01-30 22:46:18 -08:00
Michael Scire
d262ff92cc kern: implement KPriorityQueue 2020-01-30 20:56:24 -08:00
Michael Scire
e1adbb6dba util: add BitSet 2020-01-30 17:45:54 -08:00
Michael Scire
e25a4ca8d7 kern: implement KAffinityMask 2020-01-30 17:07:08 -08:00
Michael Scire
059c706f19 kern: implement KThreadLocalPage 2020-01-30 16:51:35 -08:00
Michael Scire
484f132651 kern: implement KHandleTable, other cleanup 2020-01-30 15:29:51 -08:00
Michael Scire
d5a4c17ee7 kern: fully implement slabheap init 2020-01-30 01:41:59 -08:00
Michael Scire
7d6b16d7fb kern: Skeleton KSynchronizationObject 2020-01-29 23:46:55 -08:00
Michael Scire
2faf3d33b5 kern: Implement KAutoObject, KSlabHeap, KLightLock 2020-01-29 22:06:25 -08:00
Michael Scire
bb4ade30e4 kern: optimize memory block tree lookups 2020-01-29 14:55:26 -08:00
Michael Scire
981bb1f15d kern: skeleton enough types to init KCoreLocalRegion in main() 2020-01-29 14:26:24 -08:00
Michael Scire
ad0d2faa6c meso: makefile improvements, sysreg accessors 2020-01-29 05:37:14 -08:00
Michael Scire
507ab46709 cpu: optimize core barrier 2020-01-29 04:36:18 -08:00
Michael Scire
7820e5b759 kern: implement debug register/vectors init 2020-01-29 02:42:41 -08:00
Michael Scire
7c703903ea kern: implement pool partition memblock setup 2020-01-29 01:49:04 -08:00
Michael Scire
e7dee2a9fc kern: Implement most of memory init (all cores hit main, but still more to do) 2020-01-28 22:09:47 -08:00
Michael Scire
b2e522c0a0 meso: find -exec sed -i'' -e 's/2018-2019 Atmo/2018-2020 Atmo/g' {} + 2020-01-24 02:12:37 -08:00
Michael Scire
875b62f06a config: fix typos 2020-01-24 02:11:27 -08:00
Michael Scire
32fb22e361 kern: finish implementing assembly init routines 2020-01-24 02:11:26 -08:00
Michael Scire
b3bfd6c4c9 meso: discard .interp section 2020-01-24 02:11:25 -08:00
Michael Scire
866771fdae kern: reuse data cache code during init 2020-01-24 02:11:25 -08:00
Michael Scire
308ddecc9c kern: fix bss end align (now gets through kernelldr on hardware) 2020-01-24 02:11:25 -08:00
Michael Scire
24d41ce55e kern: push code through call to kernelldr 2020-01-24 02:11:25 -08:00
Michael Scire
bce7133128 meso: add script to build mesosphere.bin 2020-01-24 02:11:24 -08:00
Michael Scire
3982afdd6b meso: skeleton buildsystem for kernel 2020-01-24 02:11:23 -08:00
Michael Scire
6ee305464a mesosphere: Implement SVC table auto-generation 2020-01-24 02:11:21 -08:00
Michael Scire
6ecf04c3b7 find -exec sed -i'' -e 's/2018-2019 Atmo/2018-2020 Atmo/g' {} + 2020-01-24 02:10:40 -08:00
Jan4V
471bc7cc92 fusee/exo/sept: fix dev key derivation 2020-01-21 13:07:07 -08:00
Michael Scire
9df7f0aada svc: whoops 2020-01-18 03:54:54 -08:00
Michael Scire
3a91a6b786 svc: populate namespace 2020-01-17 20:11:03 -08:00
Michael Scire
7806766a59 sm: I accidentally wasted 2 MB 2020-01-17 14:26:56 -08:00
Michael Scire
11d4e74620 scope guard: ensure implicit lambdas are always inline 2020-01-17 14:17:18 -08:00
Michael Scire
9068e2071c offsetof: proper detection when sizeof() != alignof 2020-01-16 04:09:11 -08:00
Michael Scire
769a57526c util::IntrusiveList: assert member referencing is correct 2020-01-16 00:30:42 -08:00
Michael Scire
0751db5d12 fixes for previous two commits 2020-01-15 23:47:14 -08:00
Michael Scire
d1fbd64235 make dist: save ELFs for debugging 2020-01-15 21:42:58 -08:00
Michael Scire
da59334c5e util: make offsetof/parent-of-member actually constexpr 2020-01-15 21:35:14 -08:00
Michael Scire
f3fa680d5d fatal: use STB instead of freetype 2020-01-03 22:35:11 -08:00
Michael Scire
5b1060b30e fatal: make aarch32 fatal screen prettier 2020-01-03 20:21:12 -08:00
Michael Scire
d5458960d5 fatal: increase stack size (needed for some custom fonts) 2020-01-03 14:33:12 -08:00
Michael Scire
4d5cde3f7b ams.bpc: fix report serialization 2020-01-03 14:17:32 -08:00
Michael Scire
8528248d2b git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "08c9b3cb"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "08c9b3cb"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "5d6aba9"
2020-01-03 13:06:25 -08:00
Michael Scire
814c9d1cfb Bump version to 0.10.2 2020-01-03 13:04:16 -08:00
Michael Scire
9d7b548ce0 ams: add changelog for 0.10.2 2020-01-02 23:00:22 -08:00
Michael Scire
d779eea009 hid.mitm: disable by default 2020-01-02 22:40:47 -08:00
Michael Scire
3038612774 ams: use bitpack for api version 2020-01-02 18:17:48 -08:00
Michael Scire
59be817bb8 fix header include 2020-01-02 17:45:30 -08:00
Michael Scire
b965e3f335 libvapours: add (kibi/mebi/gibi)byte literals 2020-01-02 17:44:22 -08:00
Michael Scire
43c0e39c34 meso: use BitPack 2020-01-02 03:30:10 -08:00
Michael Scire
0d8bde6079 loader: use BitPack for caps 2020-01-02 03:13:40 -08:00
Michael Scire
38f942adf5 strat: use util::FourCC where relevant 2020-01-02 01:52:13 -08:00
Michael Scire
145ee8fcc8 util: add BitPack 2020-01-02 01:41:52 -08:00
Michael Scire
48772307bf bpc.mitm: detect preferred reboot function (closes #785) 2020-01-01 21:50:42 -08:00
hexkyz
2619ccad0c fusee/sept/exo: minor code style fixes 2020-01-01 17:21:46 +00:00
Michael Scire
6d5d97cfcd sept: don't lock out fuses for hekate's sake 2019-12-31 16:05:52 -08:00
Michael Scire
846f610fff fatal: include stack/tls in reports 2019-12-31 15:23:25 -08:00
Michael Scire
2e8f06ef44 exo: fix data abort in car access 2019-12-31 13:48:35 -08:00
Michael Scire
5fbd728962 exo: fix off-by-one 2019-12-31 13:29:08 -08:00
Michael Scire
11ec6a6912 fusee/exo/sept: additional fixes 2019-12-31 13:26:15 -08:00
hexkyz
b89f0e45ec Cleanup FUSE, TSEC and SE code and add KFUSE state check during TSEC initialization (thanks @CTCaer). 2019-12-31 17:59:15 +00:00
Michael Scire
18d998034d buildsystem: more fixes 2019-12-31 02:54:06 -08:00
Michael Scire
27994bb306 buildsystem: avoid use of $(shell find) for significant speedup 2019-12-31 02:46:01 -08:00
Michael Scire
3e2ec256ab fs.mitm: mitm sdb (allows common sysarchive redir) 2019-12-31 01:57:26 -08:00
Michael Scire
bf5bbfbcef kernel_ldr: clean up KSystemControl init API 2019-12-31 00:46:09 -08:00
Michael Scire
d10621e832 mesosphere: refactor Elf vs Elf64 distinction 2019-12-31 00:46:09 -08:00
Michael Scire
d3b697fd1d fusee: inject our kernel_ldr in place of N's 2019-12-31 00:46:09 -08:00
fincs
daa7f5db79 kernel_ldr: Explicitly reserve space for bss section in output .bin 2019-12-31 00:46:09 -08:00
fincs
4adc0e4096 Replace HFILES with HFILES_BIN in all makefiles 2019-12-31 00:46:09 -08:00
Michael Scire
8e3c34ea89 meso: build with -ffixed-x18 2019-12-31 00:46:09 -08:00
Michael Scire
a85e20bcea kernel_ldr::cpu: prevent reordering around barrier instructions 2019-12-31 00:46:09 -08:00
Michael Scire
879f8a5147 fusee: fix sd kernel 2019-12-31 00:46:09 -08:00
Michael Scire
f78653d815 kernelldr: miscellaneous fixes 2019-12-31 00:46:09 -08:00
Michael Scire
3c7c1fbd8a kernel_ldr: ensure crt0 is at start of output binary 2019-12-31 00:46:09 -08:00
Michael Scire
8efdd04fcd kernel_ldr: finish implementing all core logic. 2019-12-31 00:46:09 -08:00
fincs
623b5f4eb9 meso: miscellaneous cleanup and build fixes 2019-12-31 00:46:09 -08:00
SciresM
af352e4f7f Remove unnecessary copyright header. 2019-12-31 00:46:09 -08:00
Michael Scire
2866cb5fe6 mesosphere: Implement kernelldr through first page table mapping 2019-12-31 00:46:09 -08:00
Michael Scire
b5becba8ff kernelldr: skeleton build system in prep for dev 2019-12-31 00:46:09 -08:00
Michael Scire
36c47a0014 meso: skeleton libmesosphere in prep for kernelldr dev 2019-12-31 00:46:09 -08:00
Michael Scire
0b0fdc5c58 sf: fix support for automatic recvlist buffers 2019-12-31 00:19:58 -08:00
Michael Scire
5a15d62b8b fs.mitm: require less contiguous memory to build romfs 2019-12-30 05:02:07 -08:00
Michael Scire
d0404f3cc9 fs.mitm: lazily initialize sd-romfs metadata 2019-12-30 03:23:40 -08:00
Michael Scire
2ae298de24 fs.mitm: conserve memory when building romfs paths 2019-12-30 02:51:32 -08:00
Michael Scire
a2d2b1b346 issue templates: end my suffering 2019-12-17 13:44:27 -08:00
Michael Scire
06e4b94674 fs.mitm: only iter romfs dir if it exists (closes #763) 2019-12-16 17:31:53 -08:00
misson20000
f1a9dd8a98 loader: fix ECS after new-ipc rewrite
The call to serviceCreate(...) tries to query pointer buffer size, but
since we haven't had a chance to return the server side of the session
yet, this deadlocks. Instead, we defer creating the session and
mounting the filesystem until the first time the ECS object is
used. If mounting the filesystem fails, the ECS is silently discarded.
2019-12-13 13:45:52 -08:00
Michael Scire
0a18c63f24 pm: fix process exit on < 5.0.0 (closes #748) (thanks @misson20000) 2019-12-13 13:35:33 -08:00
Michael Scire
f9a199557c git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "9261160c"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "9261160c"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "5d6aba9"
2019-12-11 18:37:44 -08:00
Michael Scire
0fdbdb1f4d remove title_id removal TODO 2019-12-11 18:37:01 -08:00
Michael Scire
e734b23f11 cfg: Allow more flexible hbl configuration 2019-12-11 18:33:53 -08:00
Michael Scire
de1e6c9705 loader: update anti-downgrade tables for 9.1.0 2019-12-11 13:35:22 -08:00
Michael Scire
71b220a4e9 pm: revise session limit in accordance with our handle limit 2019-12-10 20:40:03 -08:00
Michael Scire
5448332009 pm: increase dmnt sessions. sm: remove session limit hack 2019-12-10 20:36:19 -08:00
Michael Scire
d3bafc5b3b git subrepo push libraries
subrepo:
  subdir:   "libraries"
  merged:   "4d5a09e5"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "4d5a09e5"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "5d6aba9"
2019-12-10 19:18:08 -08:00
Michael Scire
2c9e1a814c Bump version to 0.10.1 2019-12-10 18:33:01 -08:00
Michael Scire
df012e6e21 boot: do not use secure memory 2019-12-10 18:16:51 -08:00
Michael Scire
2420b26981 sf: Allow for more than one process id holder (ugly) 2019-12-10 18:10:47 -08:00
Michael Scire
c1d68d7f0d util: add fourcc, intrusive list fixes 2019-12-10 12:27:19 -08:00
Michael Scire
7cead4b620 Fix another off-by-one in TinyMT init calcs 2019-12-10 01:14:36 -08:00
Michael Scire
27202b2fab tinymt: correct init iter count 2019-12-09 23:53:09 -08:00
Michael Scire
1556a92a38 random: use TinyMT instead of XorShift 2019-12-09 23:50:47 -08:00
Michael Scire
206b1a1b57 kvdb: correct condition inversion in kvdb::Archive 2019-12-09 22:44:10 -08:00
Michael Scire
a26e157579 make dist: ensure libraries are built 2019-12-09 19:13:13 -08:00
Michael Scire
9578622abf sf: Improve class member function detection 2019-12-09 19:02:58 -08:00
Michael Scire
d4f99ddb4d libstratosphere: use from /atmosphere/libraries 2019-12-09 18:54:29 -08:00
Michael Scire
0105455086 git subrepo clone https://github.com/Atmosphere-NX/Atmosphere-libs libraries
subrepo:
  subdir:   "libraries"
  merged:   "07af583b"
upstream:
  origin:   "https://github.com/Atmosphere-NX/Atmosphere-libs"
  branch:   "master"
  commit:   "07af583b"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "5d6aba9"
2019-12-09 18:54:29 -08:00
Michael Scire
28717bfd27 fusee/pm: on 5.0.0+, fix system memory pool increase.
Previously, we were only setting resource limit,
which didn't modify actual reserved pool size for
the system pool. This adds kernel patches which reduce
the applet pool size, granting the extra memory to
the system partition. The given value has been chosen
specifically to allow normal applet usages. Further
reduction may result in crashes during normal applet usage.
2019-12-09 17:56:38 -08:00
Michael Scire
71fd69eb5a git subrepo push stratosphere/libstratosphere
subrepo:
  subdir:   "stratosphere/libstratosphere"
  merged:   "303fc400"
upstream:
  origin:   "https://github.com/Atmosphere-NX/libstratosphere"
  branch:   "master"
  commit:   "303fc400"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "5d6aba9"
2019-12-08 16:30:41 -08:00
Michael Scire
9d7b52e2d4 Remove boost submodule 2019-12-08 16:27:45 -08:00
Michael Scire
255e46e6d2 sf: correct size calculation for In/OutArray 2019-12-08 12:35:07 -08:00
Michael Scire
7472bc1c7f Improve exception wrapping 2019-12-08 03:29:47 -08:00
Michael Scire
3c7ece2f8b fs.mitm: fix infinite loop due to off-by-one in romfs read comparison 2019-12-07 21:27:12 -08:00
Michael Scire
a7e89c6dbb git subrepo push stratosphere/libstratosphere
subrepo:
  subdir:   "stratosphere/libstratosphere"
  merged:   "93d4f691"
upstream:
  origin:   "https://github.com/Atmosphere-NX/libstratosphere"
  branch:   "master"
  commit:   "93d4f691"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "5d6aba9"
2019-12-07 18:45:59 -08:00
Michael Scire
b0cae74bb9 ro: bss size is allowed to be zero 2019-12-07 18:13:16 -08:00
Michael Scire
889ea5e5aa Fix memory corruption in romfs build (closes #708) 2019-12-07 17:43:11 -08:00
Michael Scire
7e6ff1f327 exosphere: support enabling usermode pmu regs (closes #703) 2019-12-07 15:35:34 -08:00
Michael Scire
ea49c2ccd1 Update changelog for 0.10.0 2019-12-07 15:23:25 -08:00
Michael Scire
d484872a73 git subrepo clone --force https://github.com/m4xw/emummc
subrepo:
  subdir:   "emummc"
  merged:   "bd81a674"
upstream:
  origin:   "https://github.com/m4xw/emummc"
  branch:   "develop"
  commit:   "bd81a674"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "5d6aba9"
2019-12-07 14:54:15 -08:00
Michael Scire
6ee525201c Update emummc README 2019-12-07 14:39:01 -08:00
Michael Scire
5ac7ae7edb Update emummc for 9.1.0 2019-12-07 14:36:31 -08:00
Michael Scire
0c590eb768 Fix double semi-colon 2019-12-07 14:03:47 -08:00
Michael Scire
bd40d4f237 Turn on fs.mitm multithreading 2019-12-07 14:02:07 -08:00
Michael Scire
788436b4a3 Bump version to 0.10.0 2019-12-07 13:47:52 -08:00
Michael Scire
2bb77237bc Increase default applet reservation size to make psel work 2019-12-07 13:45:14 -08:00
Michael Scire
33827fe3a3 Implement support for 9.1.0 2019-12-07 13:44:08 -08:00
Lioncash
48b0b2fc46 dmnt_cheat_vm: Correct register Restore and ClearRegs behavior
Previously they were performing the same behavior as the Save and
ClearSave opcode types.
2019-12-07 12:41:56 -08:00
Michael Scire
4f29eedfe9 ams_mitm: implement hbl_html redirection 2019-12-07 12:41:28 -08:00
Michael Scire
66372e2b2e ams_mitm: implement ns.mitm 2019-12-07 12:41:28 -08:00
Michael Scire
2bae1ad116 Delete pre-rewrite ams_mitm code 2019-12-07 12:41:28 -08:00
Michael Scire
bbdc643b6d ams_mitm: fix directory save bugs 2019-12-07 12:41:28 -08:00
Michael Scire
a66fcde0ee fix uninitialized data access 2019-12-07 12:41:28 -08:00
Michael Scire
7835486a4d ams_mitm: Implement savedata redirection 2019-12-07 12:41:28 -08:00
Michael Scire
90367aea0d ams_mitm: add titles dir compat shim (to remove in 0.10.1) 2019-12-07 12:41:28 -08:00
Michael Scire
16c638756c ams_mitm: implement automatic backups of biskeys/cal0 2019-12-07 12:41:28 -08:00
Michael Scire
b08a97d883 shared_from_this requires public inheritance 2019-12-07 12:41:28 -08:00
Michael Scire
746dbfe018 ams_mitm: Implement emummc Nintendo folder redirection 2019-12-07 12:41:28 -08:00
Michael Scire
733f2b3cdd ams_mitm: implement layeredfs 2019-12-07 12:41:28 -08:00
Michael Scire
ad64cb5212 os/dd: primitive fixes 2019-12-07 12:41:28 -08:00
Michael Scire
b1a9e8d0df compat fixes for libnx master 2019-12-07 12:41:28 -08:00
Michael Scire
4f9838df3c avoid lambda use in shared_ptr deleters 2019-12-07 12:41:28 -08:00
Michael Scire
f4ca2c02a7 fs.mitm: Implement bis protection 2019-12-07 12:41:28 -08:00
Michael Scire
e1391d4162 stop overriding user config on update 2019-12-07 12:41:28 -08:00
Michael Scire
8d9c51f204 set_mitm: embed defaults in code, allow for missing ini 2019-12-07 12:41:28 -08:00
Michael Scire
c10ba67973 ams_mitm: Implement system settings mitm 2019-12-07 12:41:28 -08:00
Michael Scire
55610694c8 ams_mitm: Implement set:sys firmwareversion mitm 2019-12-07 12:41:28 -08:00
Michael Scire
8764d94fd9 Implement set_mitm 2019-12-07 12:41:28 -08:00
Michael Scire
5228768841 ams_mitm: implement hid mitm 2019-12-07 12:41:28 -08:00
Michael Scire
9c68bea16c Add icon for reboot to payload (closes #644) 2019-12-07 12:41:28 -08:00
Michael Scire
5484740cab hbl: support different keys for any-app vs specific
This also makes the default configuration:

To override a generic app, hold R.
To override album, do not hold R.
2019-12-07 12:41:28 -08:00
Michael Scire
421324b498 mitm/cfg: pass around override status for decision-making 2019-12-07 12:41:28 -08:00
Michael Scire
37e065fa2d ams_mitm: implement bpc:mitm 2019-12-07 12:41:28 -08:00
Michael Scire
b758e3fc55 strat: update for latest libnx. 2019-12-07 12:41:28 -08:00
Michael Scire
393596ef9a ams_mitm: begin skeleton refactor 2019-12-07 12:41:28 -08:00
Michael Scire
02d4c97c6d sf: explicitly namespace in DEFINE_SERVICE_DISPATCH_TABLE 2019-12-07 12:41:28 -08:00
Michael Scire
2c5ef434f0 sf: fixes (basic mitm service functionality now confirmed working) 2019-12-07 12:41:28 -08:00
Michael Scire
122f3e4403 libstrat: implement mitm server registration 2019-12-07 12:41:28 -08:00
Michael Scire
ea3ebbaa7d strat: TitleId -> ProgramId, titles->contents 2019-12-07 12:41:28 -08:00
Michael Scire
1636668762 strat: fixes for compat with latest libnx 2019-12-07 12:41:28 -08:00
Michael Scire
c6b9a0c4bf sf: PrepareForErrorReply is common to all objects 2019-12-07 12:41:28 -08:00
Michael Scire
93a218abeb libstrat: enable lto 2019-12-07 12:41:28 -08:00
Michael Scire
d7a06057eb strat: split out common functionality for future meso use 2019-12-07 12:41:28 -08:00
Michael Scire
8cb77ac136 namespace sts -> namespace ams
namespace sts::ams -> ams::exosphere, ams::.

This is to facilitate future use of ams:: namespace code in
mesosphere, as we'll want to include ams::util, ams::result, ams::svc...
2019-12-07 12:41:28 -08:00
Michael Scire
4059dc6187 Results: Implement namespaced, type-safe results.
Because I was working on multiple things at once, this commit also:
- Adds wrappers for/linker flags to wrap CXX exceptions to make them
  abort. This saves ~0x8000 of memory in every system module.
- Broadly replaces lines of the pattern if (cond) { return ResultX; }
  with R_UNLESS(!cond, ResultX());.
- Reworks the R_TRY_CATCH macros (and the result macros in general).
2019-12-07 12:41:28 -08:00
Michael Scire
15773e4755 libstrat: fix domain issues. in/out objects now work. 2019-12-07 12:41:28 -08:00
Michael Scire
4f455dacf4 sf: implement mitm forwarding + domains. 2019-12-07 12:41:28 -08:00
Michael Scire
0b22af1206 libstrat: namespace remaining non-namespaced code. more new-ipc updates 2019-12-07 12:41:28 -08:00
Michael Scire
ae2fa2fa60 boot: reduce memory footprint 2019-12-07 12:41:28 -08:00
Michael Scire
6abd756e0c boot2: move to separate process 2019-12-07 12:41:28 -08:00
Michael Scire
535e49a38d strat: statically allocate additional threads 2019-12-07 12:41:28 -08:00
Michael Scire
fbb5730369 strat: update for latest libnx commit 2019-12-07 12:41:28 -08:00
Michael Scire
e5d62025d3 dmnt: update for new-ipc 2019-12-07 12:41:28 -08:00
Michael Scire
89c6fc6437 creport: update for new-ipc 2019-12-07 12:41:28 -08:00
Michael Scire
799c158b86 fatal: update for new-ipc 2019-12-07 12:41:28 -08:00
Michael Scire
8d16d2152b boot: update for api changes 2019-12-07 12:41:28 -08:00
Michael Scire
635ae4e3da spl: update for new-ipc (fixes two bugs in sf) 2019-12-07 12:41:28 -08:00
Michael Scire
59140d8dfa sf-impl: remove debug condition 2019-12-07 12:41:28 -08:00
Michael Scire
2cb8aadafc pm: statically allocate more resources to save memory 2019-12-07 12:41:28 -08:00
Michael Scire
aa0826bb70 pm: update for new-ipc 2019-12-07 12:41:28 -08:00
Michael Scire
8bd2a9a23b ldr: fix copy/paste, only 1 ldr:pm session needed 2019-12-07 12:41:28 -08:00
Michael Scire
2f959785e1 loader: update for new-ipc 2019-12-07 12:41:28 -08:00
Michael Scire
88a86a3363 sf: implement CopyFromCurrentDomain 2019-12-07 12:41:28 -08:00
Michael Scire
0c7827104f hipc: begin implementing domains. fixes ro + sm together 2019-12-07 12:41:28 -08:00
Michael Scire
c8ed190e5c new-ipc: implement deferral. sm now works. 2019-12-07 12:41:28 -08:00
Michael Scire
f4dcd1db9b sf: implement service framework enough for ro to work.
This completely re-does the whole interface for ipc servers.
2019-12-07 12:41:28 -08:00
Michael Scire
bd341d5c00 libstrat: update for latest libnx, delete ipc in prep for rewrite 2019-12-07 12:41:28 -08:00
Michael Scire
add18d868f sts: add STS_UNREACHABLE_DEFAULT_CASE() 2019-12-07 12:41:28 -08:00
Michael Scire
609a302e16 os: implement waitable management.
This implements waitable management for Events (and
implements Events). It also refactors PM to use new
Event/Waitable semantics, and also adds STS_ASSERT
as a macro for asserting a boolean expression. The
rest of stratosphere has been refactored to use
STS_ASSERT whenever possible.
2019-12-07 12:41:28 -08:00
Michael Scire
e07011be32 mitm: fix long-standing C descriptor issue. 2019-12-07 12:41:28 -08:00
Michael Scire
bb223eb5ae libstrat: namespace hossynch.hpp 2019-12-07 12:41:28 -08:00
hexkyz
73d904036d
fusee: relax emummc multipart check for FAT32 2019-09-27 19:35:00 +01:00
Michael Scire
542833866e git subrepo push stratosphere/libstratosphere
subrepo:
  subdir:   "stratosphere/libstratosphere"
  merged:   "8bae7b4a"
upstream:
  origin:   "https://github.com/Atmosphere-NX/libstratosphere"
  branch:   "master"
  commit:   "8bae7b4a"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "5d6aba9"
2019-09-18 12:43:47 -07:00
Michael Scire
89c484414b dmnt: Truncate cheat names after maxlen instead of failing 2019-09-18 11:54:30 -07:00
Michael Scire
fe2dd671fb dmnt: fix edge case in debug events thread 2019-09-18 11:54:30 -07:00
Michael Scire
8abee1bdaa dmnt: fix some bugs in init 2019-09-18 11:54:30 -07:00
Michael Scire
78a730ddf6 dmnt: refactor to use sts:: namespace. 2019-09-18 11:54:30 -07:00
Michael Scire
a750e55f75 tmp-hid-mitm: less aggressively enable controllers
This fixes a crash in SSBU and possibly other games.
2019-09-14 13:37:31 -07:00
Michael Scire
c62c4846fc Bump version to 0.9.4. 2019-09-14 10:43:39 -07:00
Michael Scire
8db5b01507 hbl_html: enforce line ending = lf (fixes broken whitelist) 2019-09-14 10:43:39 -07:00
Michael Scire
a6e405c988 ldr: fix hbl_html redirection invocation 2019-09-14 10:43:39 -07:00
Michael Scire
6613fda4b1 ams_mitm: add temporary hid mitm on 9.x for compat 2019-09-14 10:43:39 -07:00
Michael Scire
a18a6e87df git subrepo pull emummc
subrepo:
  subdir:   "emummc"
  merged:   "5f5817e6"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "5f5817e6"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "5d6aba9"
2019-09-14 10:43:39 -07:00
Michael Scire
93d83c5bb9 ams: initial support for 9.0.0 2019-09-14 10:43:39 -07:00
Michael Scire
6ee8720028 boot: fix pinmux init off-by-one 2019-08-29 00:18:40 -07:00
Michael Scire
600d68bd1a ams_mitm: fix bis key generation for newer hardware 2019-08-29 00:14:23 -07:00
hexkyz
0c3a294cbe Minor information update regarding previously unknown mysteries 2019-08-22 20:52:40 +01:00
Michael Scire
25218795b4 Bump version to 0.9.3 2019-08-08 18:06:21 -07:00
Michael Scire
a65ec67128 git subrepo push stratosphere/libstratosphere
subrepo:
  subdir:   "stratosphere/libstratosphere"
  merged:   "2d081135"
upstream:
  origin:   "https://github.com/Atmosphere-NX/libstratosphere"
  branch:   "master"
  commit:   "2d081135"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "5d6aba9"
2019-08-08 17:50:09 -07:00
Michael Scire
5d753f2384 Add default system settings for hbl applet support 2019-08-08 17:45:31 -07:00
Michael Scire
1f2de35f94 fatal: use new vi enum value 2019-08-07 13:02:02 -07:00
Michael Scire
5c140b4f35 dist: include fusee-mtc in release zips. 2019-08-05 19:37:02 -07:00
Michael Scire
362ee3cdb0 autobackup: dump bis keys (closes #583). 2019-08-05 19:35:04 -07:00
Michael Scire
215f1bc8ee fatal: fix abort in viSetDisplayPowerState on < 3.0.0 2019-08-05 18:55:04 -07:00
hexkyz
4d72c2b37a
fusee-primary: force displaying of fatal errors 2019-07-31 20:01:01 +01:00
hexkyz
dc4dbe29ae Move memory training code into it's own stage (fusee-mtc) 2019-07-26 20:38:15 +01:00
TuxSH
72dd25a99e Fix uart init 2019-07-24 00:52:02 +02:00
Michael Scire
39d041466d fatal: refactor into sts namespace 2019-07-23 14:01:16 -07:00
Michael Scire
442ebff829 util: fix copy/paste error in intrusive lists 2019-07-23 14:01:16 -07:00
hexkyz
7e169bc7df
pm: work around HOS bug 2019-07-23 19:38:14 +01:00
hexkyz
00f4e5158f Add missing dummy reads in gpio code 2019-07-23 18:33:34 +01:00
hexkyz
0c688189f6 Fix uart pinmux configuration 2019-07-21 21:21:13 +01:00
hexkyz
7cee36544c Cleanup and re-write uart code 2019-07-21 19:18:15 +01:00
hexkyz
f9c1d5fc1b Fix GPIO/SFIO defines: cosmetic change, gpio code was working properly despite the mistake 2019-07-21 15:55:40 +01:00
Michael Scire
d95e20952c kvdb: fix iterator access issue 2019-07-18 20:34:15 -07:00
Michael Scire
32a90334bb spl: rsa service does not need a dispatch table 2019-07-17 20:58:46 -07:00
Michael Scire
f534d3498e git subrepo clone https://github.com/Atmosphere-NX/libstratosphere stratosphere/libstratosphere
subrepo:
  subdir:   "stratosphere/libstratosphere"
  merged:   "0c5dab80"
upstream:
  origin:   "https://github.com/Atmosphere-NX/libstratosphere"
  branch:   "master"
  commit:   "0c5dab80"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "5d6aba9"
2019-07-17 20:04:00 -07:00
Michael Scire
3ea9f444db Remove libstratosphere submodule 2019-07-17 20:03:48 -07:00
TuxSH
5672c935ed Update libstratosphere submodule 2019-07-16 01:26:07 +02:00
Michael Scire
4cc2b5c38a creport: address review commentary 2019-07-15 14:35:48 -07:00
Michael Scire
00e3d874e3 creport: fix dangling reference to user_result 2019-07-15 14:35:48 -07:00
Michael Scire
803e91a8c4 creport: pass user break result directly 2019-07-15 14:35:48 -07:00
Michael Scire
227a1d938d creport: refactor to use sts:: namespace. 2019-07-15 14:35:48 -07:00
Michael Scire
fc7f06dc78 pm/sm: add ability to forward declare mitm'd services (closes #557) 2019-07-11 22:24:59 -07:00
Michael Scire
6777dd9b38 pm: inform sm of title ids. remove inconsistent mitm association. 2019-07-11 22:24:59 -07:00
Michael Scire
4db212ea7b pm: actually use the flag detection code in libstratosphere 2019-07-11 22:24:59 -07:00
Michael Scire
8177a27db9 pm: fix boot2 launch logic error 2019-07-11 22:24:59 -07:00
Michael Scire
27ff119ba6 pm: fix minor resource manager bugs 2019-07-11 22:24:59 -07:00
Michael Scire
c20774ff5d pm: fix missing flag clears 2019-07-11 22:24:59 -07:00
Michael Scire
a9f5b7728b pm: address review comments. 2019-07-11 22:24:59 -07:00
Michael Scire
08ad48fbf3 pm: implement correct application thread boosting mechanism 2019-07-11 22:24:59 -07:00
Michael Scire
2d0c881ffe strat: go all in on ncm::TitleId 2019-07-11 22:24:59 -07:00
Michael Scire
c916a7db88 strat: remove sizeof() / sizeof([0]) 2019-07-11 22:24:59 -07:00
Michael Scire
a5da286351 fix dumb mistake 2019-07-11 22:24:59 -07:00
Michael Scire
20a48c3a26 pm: complete rewrite 2019-07-11 22:24:59 -07:00
hexkyz
5bba0f47ff
Merge pull request #625 from suppai/master
Fix compilation with latest libnx master
2019-07-08 16:56:54 +01:00
suppai
bfc987abcd Fix for libnx commit 4f441a4/latest master at time of writing 2019-07-07 23:56:21 -04:00
hexkyz
85bf7c86e0 fusee: cleanup and optimize boot sequence 2019-07-06 20:58:01 +01:00
Michael Scire
2225b86eea Adjust version string based on ReSwitched vote. 2019-07-02 11:49:24 -07:00
hexkyz
d09be18359 Fix argument type for isalnum and toupper 2019-07-02 17:22:28 +01:00
hexkyz
09ab3efddd Fix argument type for isspace 2019-07-01 20:29:43 +01:00
hexkyz
382a0192f9 Fix spacing in diskio 2019-07-01 20:20:34 +01:00
hexkyz
e3b968fa80 Update FatFs to R0.13c 2019-07-01 20:12:30 +01:00
Connor
6f85b11fcc Fix for 4.X units (new strato rework broke a method in spl) (#616)
* Fix for 4.X units (new strato rework broke a method in spl)

* Fixed formatting in spl
2019-07-01 03:53:46 -07:00
hexkyz
e561919a52 Fix logic in ldr_ro_manager
Fix argument type for isdigit/isxdigit
2019-06-30 18:48:16 +01:00
Michael Scire
b0a66a63ba Fix sept-secondary headers in fusee-secondary 2019-06-29 20:13:24 -07:00
Michael Scire
0d840e199d Bump version to 0.9.2. 2019-06-29 20:05:21 -07:00
Michael Scire
3a2bceef8d git subrepo pull emummc
subrepo:
  subdir:   "emummc"
  merged:   "5f51fa3b"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "5f51fa3b"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "5d6aba9"
2019-06-28 11:36:07 -07:00
hexkyz
e871a754a8
fusee: remove unnecessary prefix from emummc config keys 2019-06-28 16:35:18 +01:00
hexkyz
6333327b81
fusee: update partition based emummc sector detection 2019-06-28 16:34:04 +01:00
Michael Scire
18ca8aaf5b stratosphere: all in on enum class CommandId 2019-06-27 23:34:53 -07:00
SciresM
67c0f4527e
Merge pull request #603 from Atmosphere-NX/ldr_rewrite
loader: completely rewrite.
2019-06-27 23:28:00 -07:00
Michael Scire
e5c5101e8a Add missing extension cleanup. 2019-06-27 20:51:57 -07:00
Michael Scire
934ff7bbde <int> -> <s32> 2019-06-27 20:16:56 -07:00
Michael Scire
014f08f6b4 ldr: fix mount check mistake 2019-06-27 18:01:44 -07:00
Michael Scire
6ba2090c01 ldr: address review commentary. 2019-06-27 17:37:33 -07:00
Michael Scire
61fcf5e0f4 loader: completely rewrite. 2019-06-26 15:46:19 -07:00
Michael Scire
9217e4c5f9 sm: add HasService/HasMitm, refactor into sts:: 2019-06-24 17:57:49 -07:00
SciresM
3ccbb34c62
Merge pull request #598 from Atmosphere-NX/ro_refactor
ro: refactor/rewrite into sts:: namespace
2019-06-24 15:40:45 -07:00
Michael Scire
9baa4a17ed ro: refactor/rewrite into sts:: namespace 2019-06-24 02:05:51 -07:00
SciresM
6bbece39bc
Merge pull request #592 from Atmosphere-NX/boot_refactor
Refactor boot sysmodule to use sts::boot namespace.
2019-06-23 20:39:39 -07:00
hexkyz
729447eab0 fusee: cleanup and simplify emummc logic 2019-06-23 18:50:20 +01:00
Michael Scire
1e7f41ea9f boot: move updater into libstrat 2019-06-22 12:30:36 -07:00
Michael Scire
d0d4888184 boot/spl: update for spl-in-libstrat 2019-06-22 12:23:46 -07:00
Michael Scire
804e5d49bb boot: split out gpio, pinmux. 2019-06-22 11:34:18 -07:00
Michael Scire
6d1d226842 remove unnecessary sts:: prefixing 2019-06-22 00:14:24 -07:00
Michael Scire
06416aeded boot: refactor to use sts::boot namespace 2019-06-22 00:10:21 -07:00
Michael Scire
4fbae9e5a4 boot: move updater to sts::updater namespace 2019-06-21 21:06:04 -07:00
Michael Scire
c87be7cd69 boot: refactor i2c driver into namespace 2019-06-21 20:25:27 -07:00
SciresM
e62754ed56
Merge pull request #585 from Atmosphere-NX/sm_rewrite
Completely re-write sm.
2019-06-21 17:37:06 -07:00
Michael Scire
53d7281e66 sm: use enums for GetInfo 2019-06-21 17:37:01 -07:00
SciresM
731a2c11a4
Merge pull request #587 from Atmosphere-NX/spl_refactor
spl: refactor into sts namespace
2019-06-21 17:33:34 -07:00
hexkyz
ec4d078d6d
fusee: fix emummc multipart device 2019-06-21 22:14:14 +01:00
Michael Scire
f9b48f06a3 spl: refactor into sts namespace 2019-06-21 01:36:00 -07:00
Michael Scire
d986ffa153 sm: use AutoHandles 2019-06-20 23:51:15 -07:00
Michael Scire
2357bc70a7 Implementation cleanup 2019-06-20 23:34:59 -07:00
Michael Scire
e86e1588e3 Simplify namespacing 2019-06-20 18:32:00 -07:00
Michael Scire
4be88c7180 sm: adjust Makefile 2019-06-20 18:24:35 -07:00
Michael Scire
8e8daa64ba sm: completely rewrite module 2019-06-20 18:23:40 -07:00
Michael Scire
1671c04e24 stratosphere: prefer static waitable managers 2019-06-20 13:15:39 -07:00
Michael Scire
d3d6c552b7 stratosphere: remove trailing whitespace 2019-06-20 13:00:32 -07:00
Michael Scire
8d9336f561 git subrepo clone --branch=develop --force https://github.com/m4xw/emuMMC emummc
subrepo:
  subdir:   "emummc"
  merged:   "e935968d"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "e935968d"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "5d6aba9"
2019-06-20 12:41:50 -07:00
Michael Scire
169ec9c12e Update libstrat 2019-06-20 05:01:42 -07:00
Michael Scire
60b831f369 ams_mitm: refactor for R_TRY 2019-06-20 04:04:33 -07:00
Michael Scire
4191dcee75 dmnt: fix missing init 2019-06-20 04:04:11 -07:00
Michael Scire
44725c8910 sm: refactor mitm service handle acquisition 2019-06-20 02:21:01 -07:00
Michael Scire
cead8a36ea stratosphere: more result cleanup 2019-06-20 02:00:59 -07:00
Michael Scire
7b6050a0cb boot: refactor for R_TRY 2019-06-20 00:57:17 -07:00
Michael Scire
491383c637 dmnt: trailing whitespace 2019-06-19 22:20:44 -07:00
Michael Scire
d7a3645f7f dmnt: update for R_TRY 2019-06-19 22:19:53 -07:00
Michael Scire
241b8f4627 fusee: fix config init/ini read order 2019-06-19 20:28:06 -07:00
Michael Scire
3f7238cb10 0.9.1 Changelog. 2019-06-19 13:02:23 -07:00
Michael Scire
1e8a6358ad Bump version to 0.9.1. 2019-06-19 13:00:46 -07:00
Michael Scire
c412d996fd git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "e7799388"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "e7799388"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "5d6aba9"
2019-06-19 13:00:30 -07:00
SciresM
f2086fe054
Merge pull request #577 from Atmosphere-NX/810_support
Implement support for 8.1.0
2019-06-19 12:59:30 -07:00
Michael Scire
3f9d6574fb emummc: support for 8.1.0 2019-06-19 12:53:24 -07:00
Michael Scire
e996acff66 Latest supported version is 8.1.0 2019-06-19 12:41:51 -07:00
Michael Scire
e274d3ef37 sept: tweak cluster verif 2019-06-19 12:40:39 -07:00
Michael Scire
8663eb1a6e sept: tweak vector check 2019-06-19 12:26:37 -07:00
Michael Scire
938da08e14 sept: add vector check to key derivation 2019-06-19 12:22:37 -07:00
Michael Scire
0468bd9483 git subrepo pull emummc
subrepo:
  subdir:   "emummc"
  merged:   "817020a9"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "817020a9"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "5d6aba9"
2019-06-19 12:05:51 -07:00
Michael Scire
c077c75b8d sept: update makefile vars to allow for presigned bin 2019-06-19 12:04:43 -07:00
Michael Scire
24f7977fa6 SEPT_ENC_PATH -> SEPT_00_ENC_PATH + SEPT_01_ENC_PATH 2019-06-19 11:57:40 -07:00
Michael Scire
6699fda8c9 loader: implement 8.1.0 changes 2019-06-19 11:51:30 -07:00
Michael Scire
06e4158b93 sept: indulge paranoia, some. 2019-06-19 00:42:30 -07:00
Michael Scire
b82d8aaba9 sept: validate ccplex reset vector 2019-06-19 00:32:04 -07:00
Michael Scire
6829572556 sept: elide context save for safety. 2019-06-19 00:20:42 -07:00
Michael Scire
11d8021435 sept: minor fix 2019-06-18 23:58:59 -07:00
Michael Scire
493b074a9e exo: support for 8.1.0 2019-06-18 23:54:53 -07:00
Michael Scire
befd912a88 sept: update to support 8.1.0 2019-06-18 23:23:31 -07:00
Michael Scire
c96ae0148e Revise sept key generation methodology. 2019-06-18 22:22:40 -07:00
Michael Scire
63a9c856fc git subrepo pull emummc
subrepo:
  subdir:   "emummc"
  merged:   "44ecdb45"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "44ecdb45"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "5d6aba9"
2019-06-18 11:32:03 -07:00
Michael Scire
31fde233e1 fatal: refactor for R_TRY 2019-06-17 16:41:03 -07:00
Michael Scire
f9bf8923b1 loader: refactor for R_TRY 2019-06-17 16:29:09 -07:00
Michael Scire
ee40dcd76f PM: Refactor for R_TRY, remove gotos 2019-06-17 15:27:29 -07:00
Michael Scire
c60ee15449 Merge branch 'master' of https://github.com/Atmosphere-NX/Atmosphere 2019-06-17 14:47:45 -07:00
Michael Scire
876d94c338 ro: update for R_TRY usage 2019-06-17 14:46:18 -07:00
hexkyz
7c37b7497b
emummc: sanitize raw image file find loop (thanks @AnalogMan) 2019-06-17 19:47:47 +01:00
Michael Scire
dfcba5e6d4 sm: refactor to use R_TRY 2019-06-17 09:17:53 -07:00
Michael Scire
a0cf3bbed8 spl: refactor to use R_TRY 2019-06-17 09:00:15 -07:00
Michael Scire
1c503d59b5 git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "b9ac428b"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "b9ac428b"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "5d6aba9"
2019-06-16 15:01:52 -07:00
Michael Scire
0bf7df0426 emummc: fix nintendo path redir on 4.1.0 2019-06-16 15:01:10 -07:00
hexkyz
2c46ec9638 emummc: fix file based mode 2019-06-16 20:51:25 +01:00
Michael Scire
ef0c8e0aac git subrepo push emummc
subrepo:
  subdir:   "emummc"
  merged:   "417e3d36"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "417e3d36"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "5d6aba9"
2019-06-16 11:09:33 -07:00
Michael Scire
1a5801ee0f emummc: improve linkscript/building 2019-06-16 11:09:02 -07:00
SciresM
aa289410bb
Merge pull request #567 from Atmosphere-NX/emunand_dev
Implement support for emummc.
2019-06-15 21:41:40 -07:00
Michael Scire
b7a370b156 git subrepo clone --branch=develop https://github.com/m4xw/emuMMC emummc
subrepo:
  subdir:   "emummc"
  merged:   "e72e8f1c"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "e72e8f1c"
git-subrepo:
  version:  "0.4.0"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "5d6aba9"
2019-06-15 21:37:41 -07:00
Michael Scire
87a1aa17a7 Add additional credit 2019-06-15 16:28:18 -07:00
Michael Scire
2fde907c5e fusee: remove debug filesave 2019-06-15 16:00:37 -07:00
hexkyz
3caa7166f2
fusee: update folder structure for emummc files mode 2019-06-15 19:08:23 +01:00
hexkyz
af5d88d4e4
Further clarify emummc files mode structure 2019-06-15 18:24:21 +01:00
hexkyz
cd080e2552
fusee: BCT.ini to emummc.ini 2019-06-15 17:39:03 +01:00
hexkyz
68c530c4a4
BCT: remove emummc entry 2019-06-15 17:34:30 +01:00
Michael Scire
aad02cd751 ams_mitm: update write handle persist path 2019-06-15 07:57:50 -07:00
Michael Scire
9de7b01ee6 Bump version to 0.9.0 2019-06-15 06:10:54 -07:00
SciresM
65d499adb3
Merge pull request #564 from WinterMute/ctype-usage-fixes
fix usage of ctype macros
2019-06-15 05:48:50 -07:00
Michael Scire
e5402bd8b8 fusee: embed a copy of emummc 2019-06-15 05:48:04 -07:00
Michael Scire
5ae9bd5fe5 move emummc config to emummc/emummc.ini 2019-06-14 21:53:58 -07:00
Michael Scire
0dcb496522 Fix emummc nintendo dir redirection 2019-06-14 21:20:53 -07:00
Michael Scire
c8f2d17d02 sept: fix undefined behavior with emummc 2019-06-14 18:19:10 -07:00
hexkyz
a4daa0761a fusee: cleanup sdmmc related code 2019-06-14 20:33:48 +01:00
Michael Scire
8bd79e8299 fusee: add automatic emummc injection support 2019-06-14 06:37:25 -07:00
Michael Scire
4f8ab5c599 exo: add smcAmsGetEmummcConfig 2019-06-14 04:06:33 -07:00
WinterMute
8cf30176cb fix usage of ctype macros 2019-06-14 10:52:52 +01:00
hexkyz
e5e605a362
Merge pull request #563 from ammaraskar/patch-1
Fix documentation for sept's python dependencies
2019-06-12 17:45:27 +01:00
hexkyz
1021b4a455
emummc: mount all of boot0/boot1 and fix start sector for contiguous access 2019-06-12 17:39:02 +01:00
Ammar Askar
919c3b2a65
Fix documentation for sept's python dependencies
pyCrypto and pycryptodome are never supposed to be installed
together [1]. Installing them together causes very weird import
errors when sept runs. We should specify one, probably
pycryptodome since its more modern.

[1] https://pycryptodome.readthedocs.io/en/latest/src/installation.html#installation
2019-06-12 01:42:21 -07:00
hexkyz
0986b48a55 emummc: implement SD partition mode; clean up and rename emunand code 2019-06-09 19:33:44 +01:00
hexkyz
4c4f037361 Merge branch 'master' into emunand_dev 2019-06-09 19:23:51 +01:00
Michael Scire
e7e5ef4e5d dmnt: update targetio file ops for new libnx api 2019-06-08 15:58:35 -07:00
SciresM
df3c8f4c94
Merge pull request #555 from lioncash/header
bpcmitm_main: Add missing header guard
2019-06-04 12:23:37 -07:00
Lioncash
89a83b0e5a bpcmitm_main: Remove unnecessary includes
Quite a few headers are unused in this header, so we can remove them to
make compilation a tiny bit faster.
2019-06-04 06:29:14 -04:00
Lioncash
7bdd4bb2d1 bpcmitm_main: Add missing header guard
Prevents potential inclusion issues.
2019-06-04 06:28:34 -04:00
SciresM
f29ab6d0f3
Merge pull request #550 from lioncash/resource
setsys_settings_items: Minor cleanup to string buffer management
2019-06-03 19:58:06 -07:00
Lioncash
dd10547ac2 setsys_settings_items: Less resource churn with combined key/value construction
The previous string construction discards two temporary std::string
instances (operator+ returns by value, not by reference), and creates a
std::string that it doesn't need to (the one around key). Instead we can
just append to the end of the initial std::string itself, saving on two
unnecessary created strings.

append() has a const char* overload as well (as does operator+), so we
can just append the key string as is without creating an entire new
string.
2019-06-03 21:37:53 -04:00
Lioncash
452c61db7a setsys_settings_items: Simplify buffer management in LoadConfiguration()
We can use a std::string here instead of setting up a scope guard and
manual allocations. We also don't need to care about null-termination,
as c_str() will automatically ensure this is done when passing it into
ini_parse_string().
2019-06-03 21:37:12 -04:00
hexkyz
00e22c7fd0 fusee: update and simplify emunand image path handling 2019-06-03 20:29:37 +01:00
Michael Scire
837b30d075 Merge branch 'master' into emunand_dev 2019-06-03 12:22:01 -07:00
Michael Scire
50e307b4b7 Update for latest libnx 2019-06-03 12:19:05 -07:00
hexkyz
4c328b6c50 Merge branch 'master' into emunand_dev 2019-06-03 20:14:22 +01:00
SciresM
4387da1ecc
Add licensing exemption for yuzu. 2019-05-30 18:20:24 -07:00
Michael Scire
6dd366cb22 Fix emunand SMC behaviors 2019-05-28 13:25:12 -07:00
Michael Scire
40b838c896 exo: add extension smc to write to user address 2019-05-28 02:56:15 -07:00
Michael Scire
d6502c174a pm: actually implement GetBootFinishedEvent 2019-05-27 21:52:28 -07:00
Michael Scire
f38965d0bd dmnt: implement debug log opcode 2019-05-27 18:44:09 -07:00
SciresM
c2cb94062a
Merge pull request #548 from Thog/feature/creport-32-stack-frames
creport: Add 32 bits stack frames parsing support
2019-05-27 18:11:10 -07:00
Michael Scire
cfa050cc8f dmnt: explicitly reserve double-extended width opcodes 2019-05-27 18:10:49 -07:00
Thomas Guillemard
bbcb3757bd
Address comment 2019-05-28 00:26:56 +02:00
Thomas Guillemard
a33ace8996
creport: Add 32 bits stack frames parsing support
Also fix FP, SP and LR registers being set wrongly by svcGetDebugThreadParam for 32 bits processes.
2019-05-28 00:18:10 +02:00
Michael Scire
79d96bbdfd fusee/exo: add emunand configitem support 2019-05-27 12:07:51 -07:00
Michael Scire
4dac80df75 fs.mitm: add Nintendo directory redirection code 2019-05-27 11:48:17 -07:00
Michael Scire
cb532e3fb3 Merge branch 'master' into emunand_dev 2019-05-27 11:43:37 -07:00
Michael Scire
766097d0b7 creport: dump tls/name on crash (closes #310) 2019-05-25 13:33:33 -07:00
SciresM
5f5a8567ce
docs: remove nonsense from thermo (closes #296) 2019-05-23 15:42:43 -07:00
Michael Scire
7dbe61c94c docs: mention we don't do smhax (closes #303) 2019-05-23 12:25:03 -07:00
Michael Scire
422dce6974 ams: bump version to 0.8.10 2019-05-22 12:30:37 -07:00
Michael Scire
1d429261e9 Add 0.8.10 changelog ahead of release. 2019-05-22 12:30:01 -07:00
Michael Scire
6f25e92892 set.mitm: language emulation (closes #489) 2019-05-22 12:13:10 -07:00
SciresM
6cc29185d2
Merge pull request #545 from Kronos2308/simple-sd-save-flag
simple sd_save flag
2019-05-17 07:34:07 -07:00
SciresM
13a1566b4e
Merge pull request #542 from leo60228/master
Allow pressing buttons on all controllers in loader (closes #541)
2019-05-17 07:33:55 -07:00
Kronos2308
bbb658a7e5
orthography 2019-05-17 10:03:53 +01:00
Kronos2308
ad812c8125
use configuration of system_settings.ini
prioritize the configuration of system_settings.ini
2019-05-17 09:28:46 +01:00
Kronos2308
a64fdce505
flag is now "redirect_save" 2019-05-17 08:44:41 +01:00
Kronos2308
7e950c3bcc Revert "Add files via upload"
This reverts commit d0d7772f98.
2019-05-17 08:38:21 +01:00
Kronos2308
d0d7772f98
Add files via upload 2019-05-17 08:29:38 +01:00
Kronos2308
674175e1c6
simple sd_save flag
something that allows you to decide which title to redirect games saves and which does not
2019-05-17 03:28:24 +01:00
leo60228
eab2d05680 Do same in dmnt and reboot_to_payload 2019-05-12 10:43:49 -04:00
leo60228
56d7473451 Do same in ams_mitm 2019-05-12 09:04:58 -04:00
Michael Scire
bfd4d41834 boot: fix a few issues in gpio/pinmux config 2019-05-12 03:49:36 -07:00
leo60228
defee07625 Allow pressing buttons on all controllers in loader (closes #541) 2019-05-11 15:15:17 -04:00
hexkyz
2c3111f9c9 fusee: Add more verbose error messages
boot: Fix license text
2019-05-10 17:15:25 +01:00
Michael Scire
ca2c171482 fusee: how did this ever work 2019-05-10 08:40:21 -07:00
Michael Scire
cfcb1cd3a1 update libstratosphere 2019-05-10 05:36:55 -07:00
Michael Scire
bb6cc6532b fusee/exo: add ability to disable user exception handlers
please do not use this
yellows8 needs it to debug am, 99% of use cases want them on
2019-05-10 03:50:25 -07:00
Michael Scire
03a425a579 stratosphere: TODO: panic -> std::abort() 2019-05-10 03:28:18 -07:00
Michael Scire
41f5b39f6b stratosphere: stop using kernelAbove 2019-05-10 03:25:07 -07:00
Michael Scire
b5dd621250 pm: fix memory usage on 5.0 2019-05-10 03:24:50 -07:00
SciresM
27cde7da7a
Merge pull request #536 from Atmosphere-NX/boot_dev
Boot: reimplement the boot sysmodule
2019-05-10 02:37:03 -07:00
Michael Scire
377b8dae9f boot: fix two logic inversions in wake pin init 2019-05-09 21:58:13 -07:00
Michael Scire
78828427a4 boot: fix writes to WAKE2_MASK 2019-05-09 20:47:18 -07:00
SciresM
fe28dac9d3
Merge pull request #537 from friedkeenan/boot_dev
boot: fix the width of the text splash
2019-05-09 12:23:34 -07:00
friedkeenan
a85102c97c boot: fix the width of the text splash 2019-05-09 14:18:57 -05:00
Michael Scire
9b11f1cb19 boot: improve display init consistency 2019-05-09 10:17:02 -07:00
Michael Scire
cf6b9de370 boot: correct typo in MipiCal03 config 2019-05-09 09:06:36 -07:00
Michael Scire
80c380e61e boot: fix missing write in LCD vendor 0xF20 init 2019-05-09 08:15:12 -07:00
Michael Scire
967fa456ba boot: fix trailing whitespace 2019-05-09 05:03:35 -07:00
Michael Scire
6ae6c80c25 fusee: enable boot sysmodule. 2019-05-09 03:23:26 -07:00
Michael Scire
142df74694 boot: remove boot_old legacy code 2019-05-09 03:22:40 -07:00
Michael Scire
00db1dc286 boot: fix abort on < 3.0.0 2019-05-09 03:20:06 -07:00
Michael Scire
1456246f60 boot: implement PmicDriver::ShutdownSystem 2019-05-09 02:45:31 -07:00
Michael Scire
7581306109 boot: implement CheckAndRepairBootImages 2019-05-09 01:17:56 -07:00
Michael Scire
a4ee4d20ad boot: use correct clock out setting on < 6.0 2019-05-08 06:20:36 -07:00
Michael Scire
625ac5b357 boot: implement wake event configuration 2019-05-07 10:02:53 -07:00
Michael Scire
3f75a92fd2 boot: implement pmc wake config init (todo: events) 2019-05-07 09:32:37 -07:00
Michael Scire
b5e91ff9a4 boot: fix some silly mistakes 2019-05-07 01:18:54 -07:00
Michael Scire
db47a0c041 boot: implement SetFanEnabled 2019-05-06 23:14:06 -07:00
Michael Scire
5e7b33cabd 20ms, not 2s 2019-05-06 23:09:13 -07:00
Michael Scire
3cc79f4e11 boot: finish implementing CheckBatteryCharge 2019-05-06 23:08:28 -07:00
Michael Scire
7c36a827da boot: implement bc24193 driver, part of CheckBatteryCharge 2019-05-06 15:53:29 -07:00
Michael Scire
ea90325535 boot: remove debug logic for showing battery icons 2019-05-06 13:34:44 -07:00
Michael Scire
72377c2345 boot: implement battery icon drawing functions 2019-05-06 13:33:54 -07:00
Michael Scire
cccef3b85c boot: Implement battery driver setup. 2019-05-06 08:00:22 -07:00
Michael Scire
e10c6a3217 boot: add battery calibration accessors. 2019-05-06 05:59:27 -07:00
Michael Scire
4ef7b83e34 boot: implement ConfigurePinmux 2019-05-03 06:20:50 -07:00
Michael Scire
4ca53e2ef1 boot: implement SetInitialClockConfiguration 2019-05-03 05:18:36 -07:00
Michael Scire
d9da531b41 boot: implement ShowSplashScreen/Display 2019-05-03 05:00:03 -07:00
Michael Scire
93fb060fac boot: Implement DetectBootReason 2019-05-02 19:33:12 -07:00
Michael Scire
fe0d41623c boot: i2c driver fixes 2019-05-02 19:32:03 -07:00
Michael Scire
4ea6ce3156 boot: implement CheckClock 2019-05-02 18:10:07 -07:00
Michael Scire
520b5f6c59 boot: fix gpio configuration access errors 2019-05-02 17:56:04 -07:00
Michael Scire
505324f625 boot: functional exception handling/rebooting to payload 2019-05-02 17:55:50 -07:00
Michael Scire
9319463a6e fatal: use new I2cDevice enum 2019-05-02 17:54:05 -07:00
Michael Scire
31c4c33042 boot: finish i2c driver 2019-05-02 08:30:13 -07:00
Michael Scire
55a8154691 boot: implement I2cResourceManager 2019-05-02 07:18:05 -07:00
Michael Scire
453c05cf7c boot: implement I2cDriverSession 2019-05-02 06:36:31 -07:00
Michael Scire
4c5c78858c boot: implement I2cBusAccessor 2019-05-02 05:57:10 -07:00
Michael Scire
967613a261 boot: add i2c device configs 2019-05-02 02:53:48 -07:00
Michael Scire
348345340d fs.mitm: Implement FileStorage 2019-04-29 12:55:02 -07:00
Michael Scire
38159bdf9a boot: Implement initial gpio configuration 2019-04-29 09:43:48 -07:00
Michael Scire
e58948a42b boot: implement voltage change 2019-04-29 07:22:49 -07:00
Michael Scire
9c53c0c0cc boot: make our tasks explicit. 2019-04-29 06:09:47 -07:00
Michael Scire
7c5dc61795 boot: prepare for rewrite of boot sysmodule 2019-04-29 03:25:24 -07:00
Michael Scire
6034beb084 boot_100.kip vs boot_200.kip is gross 2019-04-29 03:00:04 -07:00
hexkyz
0177b612f4 emunand: Use HOS archive style for rawnand parts 2019-04-28 18:22:32 +01:00
hexkyz
a9afbd2458 Merge branch 'master' into emunand_dev 2019-04-28 16:53:39 +01:00
Michael Scire
8c3dae846e Bump version to 0.8.9 2019-04-26 07:32:49 -07:00
Michael Scire
dcc93ce60e strat: disable exception handlers when creport would be better 2019-04-26 07:32:23 -07:00
Michael Scire
7fef83885f ams: improve fatal error context 2019-04-26 07:25:38 -07:00
Michael Scire
3207c38a44 spl: use deprecated ssl decrypt command on 4.x in child interfaces 2019-04-26 03:20:12 -07:00
Michael Scire
5952ebab54 spl: amend range for DecryptRsaPrivateKeyDeprecated 2019-04-26 03:13:15 -07:00
Michael Scire
ad41d010d3 Atmosphere: Add 0.8.9 changelog ahead of release, update system settings. 2019-04-26 03:10:56 -07:00
Michael Scire
21db90bae9 spl: make ssl key decryption work on >= 5.0.0 2019-04-26 02:32:23 -07:00
SciresM
cf4f74c8f9
Merge pull request #528 from Atmosphere-NX/spl_dev
Reimplement the SPL sysmodule (closes #92)
2019-04-26 01:17:55 -07:00
Michael Scire
bf5a649928 sept-secondary shouldn't be .PHONY 2019-04-25 12:12:36 -07:00
Michael Scire
c5fa4660c8 fatal: add clkrst service access. 2019-04-25 11:42:44 -07:00
Michael Scire
0d4a0348b5 spl: Loosen keyslot restrictions on 1.0.0 2019-04-25 11:36:23 -07:00
Michael Scire
51858e732a fusee: embed spl. 2019-04-25 11:24:25 -07:00
Michael Scire
edcfbf4254 spl: Implement DeprecatedService. 2019-04-25 11:12:30 -07:00
Michael Scire
d984621150 spl: Implement FsService lotus commands (gamecards work now) 2019-04-25 07:06:27 -07:00
Michael Scire
4b8ebfa7c3 spl: fix CryptAesCtr (eshop games work now) 2019-04-25 06:00:34 -07:00
Michael Scire
bc44e02aed spl: fix vtables/other issues, now boots (not all commands work) 2019-04-25 05:27:35 -07:00
Michael Scire
85e8506fa8 spl: Implement non-Lotus FsService commands. 2019-04-25 00:33:10 -07:00
Michael Scire
5633444d5e spl: implement ManuService 2019-04-25 00:01:47 -07:00
Michael Scire
99106076e6 spl: Finish implementing EsService. 2019-04-24 23:42:49 -07:00
Michael Scire
0a194cb6a6 spl: add spl:ssl/spl:es to main, fix cmd ids 2019-04-24 23:16:47 -07:00
Michael Scire
f4a8124dc3 spl: implement SslService, some of EsService 2019-04-24 23:10:13 -07:00
Michael Scire
9ea1a2a941 spl: Implement RsaService 2019-04-24 21:42:39 -07:00
Michael Scire
bfa84e27c1 spl: implement CryptoService. 2019-04-24 21:00:39 -07:00
Michael Scire
14683405be fatal: update to use clkrst api on 8.0.0+ 2019-04-24 16:39:06 -07:00
Michael Scire
ccbab35deb spl: finish GeneralService. 2019-04-24 06:10:30 -07:00
Michael Scire
2dfa1c96d1 spl: continue implementing. 2019-04-24 05:38:11 -07:00
Michael Scire
d44b91826d dmnt: only init roDmnt when we can 2019-04-24 05:19:37 -07:00
Michael Scire
3a8f9114fc fatal: fix sm session usage 2019-04-24 05:18:31 -07:00
Michael Scire
9858d6fc95 spl: Start skeletoning spl. 2019-04-24 01:19:38 -07:00
Michael Scire
f6645387b0 update libstrat 2019-04-24 00:55:14 -07:00
Michael Scire
df963967f5 8.0.1 seems to work fine. 2019-04-23 17:34:21 -07:00
Michael Scire
8313669716 Fix NRO patch offset application 2019-04-23 08:31:11 -07:00
Michael Scire
13c825a8bb ro: only hold sm session open when needed 2019-04-22 13:17:57 -07:00
Michael Scire
30485f1df9 pm: fix dangling -> 2019-04-22 13:10:29 -07:00
Michael Scire
7945a921ca Merge branch 'ro_dev' 2019-04-22 13:07:11 -07:00
Michael Scire
b09adb6a34 stratosphere: only hold sm sessions open when needed 2019-04-22 12:59:49 -07:00
Michael Scire
c3875796df dmnt: update for ldr/ro api change 2019-04-22 09:50:45 -07:00
Michael Scire
a1d4caa7b4 ro: add support for applying ips patches to NROs. 2019-04-22 04:32:15 -07:00
Michael Scire
9f972831cc fs.mitm: fix data abort 2019-04-22 03:42:37 -07:00
Michael Scire
f50bfaf7d7 dist: add boot2.flag for ro (to launch on <3.0.0) 2019-04-22 01:54:44 -07:00
Michael Scire
bfd04cfe92 loader: remove more unused ro functionality 2019-04-22 00:40:19 -07:00
Michael Scire
cb74bc6bb8 ro: fix UnloadNro logic error 2019-04-22 00:31:17 -07:00
Sun
be4ca7eee5 Implement Auto Reboot Timer (#518) (#519)
* Implement Auto Reboot Timer (#518)

* Use > to check for values below -1

* Use TimeoutHelper and accept MS

* Add fatal_auto_reboot_interval into config (commented)

* Check for 0
2019-04-22 00:18:01 -07:00
Michael Scire
7b24b43477 Merge branch 'master' into ro_dev 2019-04-21 09:08:19 -07:00
Michael Scire
253afc90a4 loader: remove ldr:ro (moved into ro sysmodule) 2019-04-21 09:08:08 -07:00
Michael Scire
a09c08994f sm: change location of apm:p check, fixes failure to launch older games 2019-04-21 08:57:21 -07:00
Michael Scire
13ded6bd1c ro: implement loadnro/unloadnro 2019-04-21 07:28:07 -07:00
Michael Scire
4ba6d8b24c ro: implement rest of LoadNrr/LoadNrrEx 2019-04-21 05:28:57 -07:00
Michael Scire
cb88fdfd62 ro: implement UnloadNrr, half of LoadNrr/LoadNrrEx 2019-04-21 03:39:29 -07:00
Michael Scire
d69fc060f4 ro: Implement ro:dmnt 2019-04-21 02:09:08 -07:00
Michael Scire
e04fcfff6b ro: fix typo 2019-04-20 18:37:50 -07:00
Michael Scire
79c52e2b91 ro: skeleton ldr:ro 2019-04-20 18:37:01 -07:00
Michael Scire
4ac8f2745b ro: skeleton ro:dmnt 2019-04-20 18:16:33 -07:00
Michael Scire
6004b7479e ro: add ro sysmodule skeleton 2019-04-20 18:16:33 -07:00
Michael Scire
ed86c44a49 loader: refactor to use LoaderModuleInfo 2019-04-20 18:15:39 -07:00
Michael Scire
5c9d0f05b1 loader: use libstratosphere randomness 2019-04-20 16:53:56 -07:00
Michael Scire
87f7a6ebdc fusee: support both exfat and non-exfat 2019-04-20 11:24:05 -07:00
Michael Scire
664e5e6b52 Small 0.8.8 changelog addition 2019-04-20 10:37:53 -07:00
Michael Scire
9691286d73 Bump version to 0.8.8 2019-04-20 10:36:38 -07:00
Michael Scire
81895c8019 fusee: update to support booting 8.0.0 2019-04-20 10:36:38 -07:00
Michael Scire
1a396235cd fusee: only partially hash 8.0.0 kernel, add ControlCodeMemory patch 2019-04-20 10:36:38 -07:00
hexkyz
732a6159f7 fusee: Properly finalize SDMMC1 (fixes 8.0.0 issues with PCV) 2019-04-20 10:36:38 -07:00
Michael Scire
a3389e25c9 nogc: implement 8.0.0 patches 2019-04-20 10:36:38 -07:00
Michael Scire
908de31a0e pm: on 7.0.0+, npns is launched in maintenance boot (closes #511) 2019-04-20 10:36:38 -07:00
Michael Scire
4e5f033e41 sm: for 8.0.0, add some first class homebrew support 2019-04-20 10:36:38 -07:00
Michael Scire
ae90a9d7a6 exo/fusee: implement 8.0.0 support (package2 changes still TODO) 2019-04-20 10:36:38 -07:00
Michael Scire
a67d4064f0 pm: update with new meme command for 8.0.0 2019-04-20 10:36:38 -07:00
hexkyz
017d473b99 emunand: Add multipart support for rawnand images in fusee 2019-04-13 18:28:54 +01:00
hexkyz
a1512cf30f Merge branch 'master' into emunand_dev 2019-04-13 18:23:23 +01:00
Michael Scire
d0659377e8 creport: speed up code region detection (closes #491) 2019-04-12 23:04:12 -07:00
Michael Scire
ac07971211 stratosphere: custom exception handlers (reboot to fusee) 2019-04-12 15:28:46 -07:00
Michael Scire
b03a778611 Bump version to 0.8.7 2019-04-11 16:54:12 -07:00
Michael Scire
67891954ec loader: fix support for 7.0.0+ games with NPDM flag bit 4 set. 2019-04-11 16:39:59 -07:00
Michael Scire
1e5fcff242 exo: always enable usermode exception handlers 2019-04-10 23:30:19 -07:00
hexkyz
88294116b8
fusee-secondary: Fix arg names in raw_dev 2019-04-09 19:40:00 +01:00
hexkyz
fe62ab9aed emunand: Implement folder and file detection (boot0/boot1 now work from SD) 2019-04-09 19:32:18 +01:00
hexkyz
5868e0769a Merge branch 'master' into emunand_dev 2019-04-09 19:14:21 +01:00
2g4y1
3cb60b324b More 2019 Copyrights (#503) 2019-04-08 12:47:01 +02:00
Michael Scire
03e176d7f1 atmosphere: current year is 2019 2019-04-07 19:00:49 -07:00
hexkyz
92816be055 emunand: Move all emulation code to fusee-secondary and simplify logic 2019-04-07 19:02:01 +01:00
hexkyz
9eb0b84ed1 Merge branch 'master' into emunand_dev 2019-04-07 18:56:28 +01:00
Michael Scire
6b41a7e2e1 fatal: unconditionally reassign cpu_ctx ptr 2019-04-06 15:02:48 -07:00
Michael Scire
aed472775c fatal: fix invalid struct access, cap stack trace size. 2019-04-06 15:00:40 -07:00
hexkyz
a8ca92bc1e BCT: Restore newline 2019-04-06 20:04:16 +01:00
hexkyz
c878e96398 emunand: Fix bugs and add missing stuff 2019-04-06 20:01:11 +01:00
hexkyz
e5045556bf emunand: Preliminary skeleton for emunand in fusee 2019-04-06 19:35:27 +01:00
Michael Scire
5bedcd305d dmnt-cheat: add clear-reg to save/restore reg 2019-04-05 14:19:12 -07:00
Michael Scire
c7ffcad74e dmnt-cheat: add clear to save/restore reg 2019-04-05 14:16:07 -07:00
Michael Scire
2f1f56307d fix libstrat revision again 2019-04-05 13:46:48 -07:00
Michael Scire
9113b04b48 update libstrat 2019-04-05 13:42:34 -07:00
Michael Scire
05c4dfd8f8 Merge remote-tracking branch 'origin/master' 2019-04-05 13:42:17 -07:00
Michael Scire
938169cd3c fs.mitm: experimental support for save redirection to sd. 2019-04-05 13:42:09 -07:00
Mat M
7a4d1e786c ldr_map: Silence lingering initializer warning (#500)
One initializer warning case that I seem to have missed (my bad).
2019-04-04 23:13:46 -07:00
Mat M
b237168ec7 loader: Silence Wmissing-field-initializers warnings (#499)
Specifying 0 as the initial entry of a structure is a C-ism. C++ permits
using an empty set of braces to signify the same behavior, silencing
missing initializer warnings.
2019-04-04 21:05:41 -07:00
Mat M
753958de28 fs_mitm/fs_dir_utils: Amend logic error within IterateDirectoryRecursivelyInternal() (#498)
This likely intended to get the size of the string and then subtract the
null terminator byte. Instead, this would always result in a sizeof of
8.
2019-04-04 20:04:26 -07:00
Michael Scire
fb5e02050b fs.mitm: fix logic error in CopyFile 2019-04-04 15:41:41 -07:00
Michael Scire
08a2f02a7c dmnt-cheat: Add Save/Restore register mask opcode 2019-04-04 12:23:51 -07:00
Michael Scire
477bee2e4c dmnt-cheat: Add Save/Restore register opcode 2019-04-04 12:16:00 -07:00
Michael Scire
a0f3183c79 strat: sha256 s/linux/libnx/g 2019-04-04 12:02:00 -07:00
Mat M
f44a730a90 fatal_font: Add missing va_end() calls to PrintFormatLine() and PrintFormat() (#497)
Fairly self-explanatory. Ensures va_start() is balanced with va_end()
2019-04-04 11:21:25 -07:00
SciresM
3459968ac3
more fixes 2019-04-01 17:41:58 -07:00
SciresM
428e176d9c
Wording, (dkp-) 2019-04-01 17:39:44 -07:00
James Elliott
16430217ff Add additional dependency information (#495)
- individually listed packages required when using (dkp-)packman.
- added sept dependencies
- added requirement to use -r flag
- added recommendation for zip (for use if someone wants to make dist)
2019-04-01 17:35:10 -07:00
Michael Scire
262d6af519 bis_protect: guard against autorcm on rcm-patched units 2019-04-01 17:24:15 -07:00
Michael Scire
350dccff3d exo: also check for rcm ipatch (thanks @balika011) 2019-04-01 16:37:04 -07:00
Michael Scire
4d76f4d79c exo: add config item for rcm patch detection (note TODO) 2019-04-01 13:10:45 -07:00
thedax
fd4d6a4e55 exosphere: add new ConfigItem which allows the caller to retrieve the git commit hash. (#493) 2019-03-29 15:16:03 -07:00
Michael Scire
81aa5c7ec7 set_mitm: result defs instead of magics 2019-03-28 23:04:13 -07:00
Michael Scire
c6d67eab6a strat: 0 -> ResultSuccess 2019-03-28 22:39:39 -07:00
Michael Scire
9427a5cf46 strat: use TitleId defs instead of magics. 2019-03-28 21:49:14 -07:00
Michael Scire
4167dfea14 strat: vi results over magics 2019-03-28 20:39:17 -07:00
Michael Scire
c50cb83ec1 strat: use lr results instead of magics 2019-03-28 20:31:48 -07:00
Michael Scire
0001e93810 strat: use atmosphere results instead of magics 2019-03-28 20:19:38 -07:00
Michael Scire
84c4cd7c53 strat: use sf/hipc results instead of magic numbers 2019-03-28 20:00:16 -07:00
Michael Scire
29be429d2f strat: fix remaining FS result magic numbers 2019-03-28 19:45:41 -07:00
Michael Scire
acffae6643 strat: replace kernel/dbg magic numbers with result defs 2019-03-28 16:57:18 -07:00
Michael Scire
285feba42b fatal: Standardize result definitions 2019-03-28 15:37:50 -07:00
Michael Scire
b940f61d42 sm: Use result definitions instead of magic numbers 2019-03-28 15:28:36 -07:00
Michael Scire
696f66f620 pm: Use result definitions instead of magic numbers 2019-03-28 15:16:36 -07:00
Michael Scire
db19fa0f7f loader: Use result definitions instead of magic numbers 2019-03-28 15:06:50 -07:00
Michael Scire
2678735f73 stratosphere: migrate result headers to libstrat 2019-03-28 14:23:34 -07:00
thedax
23424629c9 BCT.md: Atmosphere -> Atmosphère for consistency with other docs. (#490) 2019-03-28 10:52:37 -07:00
Michael Scire
f2433824ba fs.mitm: fix missing include in fs_shim.c 2019-03-28 10:51:51 -07:00
Michael Scire
d00b183f92 fs.mitm: Implement DirectorySaveDataFileSystem. 2019-03-28 10:43:33 -07:00
Michael Scire
994d7d5429 loader: same heap size change for gcc 8.3.0 compat 2019-03-26 20:56:04 -07:00
Michael Scire
eb90603f18 pm: increase heap size (fixes fs reliability issues with gcc 8.3.0) 2019-03-26 17:47:29 -07:00
Michael Scire
2d27dab6ab ams: bump version to 0.8.6 2019-03-26 12:03:55 -07:00
Michael Scire
325c71b1b4 ams_mitm: fix erroneous comment due to copy-paste. 2019-03-26 12:03:55 -07:00
Michael Scire
f9c9c1048e fs.mitm: prefer official web content to hbl_html 2019-03-26 11:53:30 -07:00
Michael Scire
4ccb39a228 ams_mitm: add ns:web mitm for HBL web support 2019-03-26 11:35:50 -07:00
Michael Scire
ad8acaefec fs.mitm: fix some filesystem issues 2019-03-26 09:05:19 -07:00
Michael Scire
106ae81614 fatal: improve start address detection 2019-03-26 09:04:32 -07:00
Michael Scire
93745dc40c docs: update, add 0.8.6 changelog ahead of release 2019-03-25 17:50:59 -07:00
Michael Scire
3316820f86 pm: use fixed-sized buf + scoped lock (gcc 8.3 compat) 2019-03-25 17:12:19 -07:00
Michael Scire
f4950ff26e dmnt-cheat: Add support for saving/restoring cheat toggle state 2019-03-25 10:35:08 -07:00
Michael Scire
20ba6432b9 set.mitm: fix 1.0.0 compat (closes #459) 2019-03-24 19:27:37 -07:00
BlockBuilder57
a611027eeb Add info to set_mitm docs, clean up loader docs (#488)
* Add info to set_mitm docs, clean up loader docs

Also add the list of buttons found in all cases of ParseOverrideKey

* Fix typo in fs_mitm.md
2019-03-24 15:39:16 -07:00
Michael Scire
1a82b407a4 sept-sign: remove += for compatibility 2019-03-24 08:26:14 -07:00
Michael Scire
dc1db0dc72 loader: Ensure code:/ unmounts if mounted. 2019-03-23 18:27:53 -07:00
Michael Scire
047f3b653e fs.mitm: also give choinx access to boot1 (closes #485) 2019-03-23 16:33:49 -07:00
Michael Scire
79244078a6 fs.mitm: make HBL web content work (verified on hw) 2019-03-22 16:54:37 -08:00
Michael Scire
fce2099d7d fs.mitm: fix error in FsPathUtils::VerifyPath 2019-03-22 15:06:50 -07:00
Michael Scire
22d4de27f1 fs.mitm: fix null deref 2019-03-22 14:49:07 -07:00
Michael Scire
9d5ca47ac8 fs.mitm: Add Hbl Web override support, also support choinx" 2019-03-22 12:41:51 -07:00
Michael Scire
c1588d0300 fs.mitm: Implement path normalization 2019-03-22 11:52:03 -07:00
Michael Scire
b62014554c fs.mitm: Implement SubDirectoryFileSystem 2019-03-22 11:28:09 -07:00
Michael Scire
afcaf20020 fs.mitm: ProxyFile, ProxyDirectory, ProxyFileSystem 2019-03-22 10:20:36 -07:00
Michael Scire
bcf20b4441 fs.mitm: implement ifilesystem wrapper 2019-03-22 09:51:47 -07:00
Michael Scire
c8a4a6dc58 fs.mitm: fix inverted ifile condition 2019-03-22 08:58:08 -07:00
Michael Scire
634ce933be fs.mitm: start implementation of IFileSystem api. 2019-03-22 08:49:10 -07:00
Michael Scire
ca42a9daec hbl: change default to every_app=true, change default override key 2019-03-22 07:13:49 -07:00
Michael Scire
9e1e9ff8c0 loader: separate override_any_app (deprecate =app) 2019-03-22 06:59:28 -07:00
zkitX
761c383958 Fix spelling mistake (#483) 2019-03-21 03:09:44 -07:00
Michael Scire
48e4688c13 loader: begin needed support for HBL to use web browser commands 2019-03-20 07:53:56 -07:00
TuxSH
7ddaad615b loader; suppress gcc warning 2019-03-19 21:29:31 +01:00
thedax
a5854afd2f Update BCT.md to bring it into the modern age. (#482)
* Bring BCT.md into the modern age. It was terribly outdated.

* Added notes on debugging modes
2019-03-19 02:46:12 -07:00
Michael Scire
db3c5cf20f loader: fix ldr:ro unmap semantics for < 3.0.0 2019-03-16 19:16:19 -07:00
tslater2006
e7f941fa3d Update cheat docs with latest opcodes (#479)
* Update cheat docs with latest opcodes

This covers changes made to Opcode 10 as well as the new 0xC0 opcode

* Corrected Opcode 10 documentation
2019-03-15 22:20:20 -07:00
Michael Scire
51fa778fb2 loader/ams_mitm: Change Down -> Held in API 2019-03-15 21:28:38 -07:00
Michael Scire
35167da6dd loader: Actually use hidKeysHeld 2019-03-15 19:51:00 -07:00
Michael Scire
2a973b9e16 dmnt-cheat: extend StoreRegisterToAddressOpcode some more 2019-03-15 19:24:23 -07:00
Michael Scire
83626923cf loader/ams_mitm: hidKeysHeld, not hidKeysDown (and remove workaround) 2019-03-15 18:34:55 -07:00
Michael Scire
7551bebb88 dmnt-cheat: Fix a few bugs in vm. 2019-03-15 18:29:43 -07:00
Michael Scire
433b01aaf8 dmnt-cheat: add other register source to new condition opcode 2019-03-15 13:52:11 -07:00
Michael Scire
da664b49ad dmnt-cheat: amend inline docs 2019-03-15 13:46:53 -07:00
Michael Scire
5d79952bdd dmnt-cheat: Add register conditional vm instruction 2019-03-15 13:45:35 -07:00
Michael Scire
e5ecd243f2 dmnt-cheat: Implement real workaround for 6.0.0+ kernel bug 2019-03-15 03:30:51 -07:00
Michael Scire
274035edd6 Add 64-bit IDA binaries to gitignore 2019-03-15 00:25:24 -07:00
Michael Scire
60776e8111 loader: fix ldr:ro mapping error on < 3.0.0 2019-03-15 00:25:09 -07:00
Michael Scire
3fcad4bc65 exo: fix SE driver coherency bug (closes #384) 2019-03-14 13:07:54 -07:00
Michael Scire
991fe78740 creport/fatal: fix time-retrieval functionality 2019-03-14 09:16:55 -07:00
Michael Scire
aac64b1ded dmnt-cheat: workaround for 6.0.0+ kernel bug. 2019-03-14 09:15:59 -07:00
Léo Lam
b6d3df3335 fs_mitm: Fix mismatched new[] / delete (#389)
* fs.mitm: Fix mismatched new[] / delete

Using delete instead of delete[] on a pointer given by new[] is
undefined behaviour.

For memory sources, malloc/free are used because cleaning up is tricky
when data can be either allocated with new (RomfsHeader) or new[]
(metadata).

* set.mitm: Fix mismatched new[] / delete
2019-03-08 07:25:33 -08:00
Michael Scire
66560d0a7b fs.mitm: fix two cases of inverted logic 2019-03-07 19:53:21 -08:00
Michael Scire
b42d16cf1c Atmosphere: Bump version to 0.8.5 2019-03-07 10:27:22 -08:00
Michael Scire
bcdf32b214 0.8.5: amend changelog 2019-03-07 10:26:53 -08:00
Michael Scire
9c3728c8f2 Add 0.8.5 changelog ahead of release, fix keypress docs. 2019-03-07 04:13:32 -08:00
Michael Scire
23fff1e8fd Add cheats.md 2019-03-07 03:51:18 -08:00
Michael Scire
a553fbcdd1 docs: add dmnt.md 2019-03-07 02:51:26 -08:00
Michael Scire
e62606d276 fatal: only set display magnification on 3.0.0+ 2019-03-06 14:39:48 -08:00
Michael Scire
e25d83f701 fss: seems ext_csd is not initialized by then 2019-03-06 08:34:33 -08:00
Michael Scire
ed37c149d1 fss: how many commits does it take to fix one line of code? 2019-03-06 05:56:58 -08:00
Michael Scire
7c8d126f23 fusee-secondary: fix previous generalization 2019-03-06 05:55:35 -08:00
Michael Scire
c9b88f0404 fusee: dynamically read NAND num_sectors (thanks @shchmue!) 2019-03-06 05:40:32 -08:00
Michael Scire
e24d7a1fd2 default-settings: Language. 2019-03-06 00:21:29 -08:00
Michael Scire
d756f2fc0d dmnt-cheat: make cheats default toggle configurable 2019-03-06 00:20:17 -08:00
Michael Scire
4d0ab41e6e dmnt-cheat: Fix debug event management 2019-03-05 23:58:36 -08:00
Michael Scire
512dbc3a24 dmnt: prevent lag on game thread-spawning 2019-03-05 18:57:50 -08:00
Michael Scire
a3d44e37b5 dmnt-cheat: *properly* update frozen address values on write 2019-03-05 11:56:17 -08:00
Michael Scire
18e4d80073 dmnt-cheat: update frozen address values on write 2019-03-05 11:44:24 -08:00
Michael Scire
e5bedd52ac fusee-secondary: add content type to content headers 2019-03-05 10:53:17 -08:00
Michael Scire
a38927ec04 fatal: remove debugging log that slipped through 2019-03-05 07:52:42 -08:00
Michael Scire
fbddf090a4 dmnt: only initialize HID once 2019-03-05 07:50:50 -08:00
Michael Scire
b4b1208222 stratosphere: fix svcExitThread usage 2019-03-05 07:50:27 -08:00
Michael Scire
4e95397ed5 dmnt-cheat: const correctness 2019-03-05 01:40:49 -08:00
Michael Scire
853a57e4d4 dmnt-cheat: Support nested conditionals in VM 2019-03-05 01:39:20 -08:00
Michael Scire
8c86074da2 dmnt-cheat: Add opcode to store register to memory 2019-03-05 01:20:18 -08:00
Michael Scire
88a6ef4cd7 ams: default USB 3.0 off (some users see issues) 2019-03-05 00:56:17 -08:00
Michael Scire
7d2dd628ba dmnt-cheat: multi-nybble opcodes, update libstrat 2019-03-05 00:53:45 -08:00
Michael Scire
7e93ca0977 dmnt: give hid access 2019-03-04 22:40:58 -08:00
Michael Scire
eddbd7c072 dmnt-cheat: output value on EnableFrozenAddress 2019-03-04 22:17:18 -08:00
Michael Scire
e734a5412a dmnt-cheat: Implement frozen addresses 2019-03-04 22:13:43 -08:00
Michael Scire
7ddb0da5f6 dmnt-cheat: Implement cheat management service commands 2019-03-04 21:11:12 -08:00
Michael Scire
862aa73783 Add maximum instruction opcode bounds check (thanks hthh) 2019-03-04 20:24:49 -08:00
Michael Scire
34af93b72f dmnt-cheat: implement cheat loading from SD 2019-03-04 20:13:52 -08:00
Michael Scire
5ef3ca9364 fs.mitm: make prodinfo backups actually work 2019-03-04 19:05:52 -08:00
Michael Scire
37d3577028 dmnt: allow disabling cheats via title-specific button combo 2019-03-04 06:55:37 -08:00
Michael Scire
ef68881e5c dmnt-cheat: Implement memory service cmds 2019-03-04 05:56:44 -08:00
Michael Scire
e8a5aa81f4 dmnt-cheat: fix decode error, add debug logging 2019-03-04 01:41:01 -08:00
Michael Scire
f2f25dd5ed atmosphere: launch tma (fixes home button) 2019-03-03 23:53:53 -08:00
Michael Scire
8d140d835a dmnt-cheat: fix compat 2019-03-03 23:42:52 -08:00
Michael Scire
afae7eaa11 dmnt-cheat: finish vm instruction decoder 2019-03-03 09:09:21 -08:00
Michael Scire
af70a4a3a3 dmnt-cheat: skeleton decode, fix missing libnx call 2019-03-03 06:44:21 -08:00
Michael Scire
bc6ad53018 dmnt-cheat: Implement remaining VM opcodes 2019-03-03 06:29:48 -08:00
Michael Scire
a3fc2c95b8 dmnt-cheat: Add new, better math instruction to vm 2019-02-27 19:30:29 -08:00
Michael Scire
68af2c1c2a dmnt-cheat: Implement static math opcode. 2019-02-27 18:46:53 -08:00
Michael Scire
2552c0327c dmnt-cheat: Begin implementing Cheat VM. 2019-02-27 18:33:07 -08:00
Michael Scire
f5ac895062 dmnt-cheat: revise cheatentry definition 2019-02-27 04:47:43 -08:00
Michael Scire
e4cc39c29b dmnt-cheat: Implement all meta commands. 2019-02-27 04:37:02 -08:00
Michael Scire
c80eb26135 dmnt-cheat: continue fleshing out cheat manager code 2019-02-27 04:27:49 -08:00
Michael Scire
964a698875 dmnt-cheat: flesh out new process logic 2019-02-27 04:09:14 -08:00
Michael Scire
b57ec74ca3 pm: remove duplicate definitions 2019-02-27 03:33:42 -08:00
Michael Scire
66d5c9fe26 dmnt-cheat: Skeleton cheat manager 2019-02-27 03:30:08 -08:00
Michael Scire
434f600f95 dmnt: Skeleton cheat service API. 2019-02-27 02:51:05 -08:00
Michael Scire
89503049b3 dmnt: pull in from ams.tma branch 2019-02-27 01:44:47 -08:00
Michael Scire
aaabb4bfc4 atmosphere: add define for supported hos version 2019-02-24 20:28:06 -08:00
Michael Scire
be772b40e1 fusee-secondary: add content metadata 2019-02-24 20:22:57 -08:00
Dylan Nguyen
3149b8a6fe Update readme.md reswitched website (#339)
Should be reswitched.team, 

the other one (reswitched.tech) is not availble
2019-02-24 12:51:45 -08:00
Michael Scire
c8e0028874 Make default override key !L 2019-02-23 22:14:38 -08:00
Michael Scire
a8d929a343 fs.mitm: fix inverted conditional 2019-02-23 22:11:57 -08:00
thedax
618de9546a Makefile tweaks. (#376)
-Have fusee-secondary clean sept-secondary as required.
-Use $(TARGET) variable for sept-secondary, and clean the encrypted output as required.
2019-02-23 17:16:37 -08:00
Michael Scire
2673118478 update loader doc 2019-02-23 07:43:12 -08:00
Michael Scire
6cc69fb3fc fs.mitm: Add title-specific override key support. 2019-02-23 07:39:40 -08:00
Michael Scire
eefee8c7a8 loader: add support for title-specific override keys 2019-02-23 07:18:24 -08:00
Pedro Diaz
dcf44e406e Fix sept-secondary build when using prebuild sept-secondary.enc (#371) 2019-02-22 18:57:27 -08:00
thedax
1970a52fc9 Allow the user to build with a prebuilt sept-secondary blob via a SEPT_ENC_PATH variable. (#365) 2019-02-21 18:26:41 -08:00
Michael Scire
37161c5d11 ams: bump version to 0.8.4 2019-02-21 11:54:07 -08:00
Michael Scire
d646023bbd changelog: mention kernel patches 2019-02-21 09:22:28 -08:00
Michael Scire
b63061a505 sept: prepare for reboot immediately 2019-02-21 08:23:33 -08:00
Michael Scire
61b057c37d ams: write changelog for 0.8.4 a while before actual release. 2019-02-21 08:03:44 -08:00
David Buchanan
2388a3f4fd sept_sign: Python 3 compat (#356) 2019-02-21 07:52:42 -08:00
Michael Scire
cfc9576eaf rebootstub: pc-relative load (thanks fincs) 2019-02-21 07:47:49 -08:00
Michael Scire
e9e3f29d74 sept-sign: uncorrect misguided meme correction 2019-02-21 07:41:58 -08:00
Michael Scire
83f21d7d2a exo: don't forget to dereference your pointers kids 2019-02-21 07:41:09 -08:00
hexkyz
4adf297c80
sept-secondary: Better meme compliance 2019-02-21 15:25:42 +00:00
hexkyz
f5695145ef
sept-secondary: Better meme compliance 2019-02-21 15:25:08 +00:00
Michael Scire
a0e06cf7b2 exo/bpc.mitm: Add support for proper shutdown. 2019-02-21 07:05:58 -08:00
Michael Scire
0288986e14 if you edit splash in a forest and nobody is around does it make a sound 2019-02-21 01:48:56 -08:00
Michael Scire
fa6cf1ffb8 fix splash boundaries 2019-02-21 01:37:43 -08:00
Michael Scire
5b235a4b03 sept-s: revise splash for roundedness one more time 2019-02-21 00:52:33 -08:00
Michael Scire
771039e6a7 Sept: improve edge case cleanup a little. 2019-02-20 23:25:31 -08:00
Michael Scire
1a63078c32 README: add sept to component list 2019-02-20 23:16:39 -08:00
Michael Scire
4a60cee5ff sept-s: revise splash (larger, square) 2019-02-20 22:34:34 -08:00
Michael Scire
0df92148a4 sept: change splash to fancy one by @xamanthas 2019-02-20 21:28:12 -08:00
Michael Scire
f1ea368585 sept-s: turn on backlight after drawing image. 2019-02-20 15:24:11 -08:00
Michael Scire
656053582a Fix copy/pasted copyright notice 2019-02-20 15:18:39 -08:00
Michael Scire
37eb3315b6 sept-s: splash! (thanks @CtCaer, @balika011) 2019-02-20 15:05:25 -08:00
Michael Scire
d20cd73523 sept-s: redefine a while. 2019-02-20 14:28:31 -08:00
Michael Scire
a0acbda9ce creport: include firmware version header 2019-02-20 14:23:38 -08:00
Michael Scire
f00dd05f82 Make stratosphere use new libnx HosVersion API 2019-02-20 14:17:51 -08:00
Michael Scire
92d8829ee1 makefile: include sept binaries so people don't have to extract from embedded-in-fusee 2019-02-20 13:50:18 -08:00
Michael Scire
9979cec045 update makefile for sept 2019-02-20 13:42:05 -08:00
Michael Scire
8cff208d36 lightweight sept dox 2019-02-20 13:37:40 -08:00
Michael Scire
7d170259d3 sept-s: fix building without keys (output won't work though) 2019-02-20 13:26:54 -08:00
Michael Scire
d0ff791260 fusee: remove print in panic 2019-02-20 13:12:53 -08:00
Michael Scire
ddc5222208 sept-s: First functional version. 2019-02-20 13:12:15 -08:00
Michael Scire
f1068d6c3f sept-s: Implement key derivation 2019-02-20 11:31:36 -08:00
Michael Scire
fb2baa8c8d sept-s: remove a bunch of debug garbage 2019-02-20 10:49:25 -08:00
Michael Scire
c56561b234 sept-secondary: reboot to clean state + grab keys from SE 2019-02-20 09:20:19 -08:00
Michael Scire
f58f7c8a16 sept: implement cryptographic meme 2019-02-20 06:54:44 -08:00
Michael Scire
5fe24b620d sept: add secondary skeleton + buildscript 2019-02-20 06:33:23 -08:00
Michael Scire
26f45fab19 sept: commit working primary. 2019-02-20 04:52:44 -08:00
Michael Scire
85669ef491 Fix off-by-one (thanks @CtCaer) 2019-02-20 04:52:44 -08:00
m4xw
56246551e6 [Fusee] Refactor Kernel patching (#343)
* [Fusee] Refactor Kernel patching
Add offset based patching
Add svcControlCodeMemory patches for ver. 5, 6, 7
2019-02-13 09:20:07 -08:00
Michael Scire
6027ff243d Enforce upper bound on application tid range 2019-02-12 02:53:31 -08:00
Michael Scire
1d0efbf456 fix json typo 2019-02-05 10:58:52 -08:00
Michael Scire
67c7ef69f4 bpc.mitm: Make reboot type configurable 2019-02-05 01:51:05 -08:00
Michael Scire
e2a7f23214 ams.mitm: simplify bpc ShouldMitm logic, fix enum problem 2019-02-04 21:47:55 -08:00
Michael Scire
784964d49d ams.mitm: add bpc handler, for reboot power button stuff 2019-02-04 21:17:05 -08:00
Michael Scire
e715197290 Merge fs.mitm and set.mitm. 2019-02-04 20:15:16 -08:00
Michael Scire
5f836aca6d Loader: set 7.0.0+ process bit when relevant 2019-01-31 04:46:20 -08:00
Michael Scire
4e99eaa590 pm: Update for 7.0.0 2019-01-31 03:32:47 -08:00
Michael Scire
a3adb70a04 stratosphere: version detect via svcCallSecureMonitor 2019-01-31 03:24:19 -08:00
Michael Scire
de07ed42bb update libstratosphere for new GetRuntimeFirmwareVersion() impl 2019-01-31 03:08:14 -08:00
Michael Scire
53488eb8e5 Add nogc patches for 7.0.0 2019-01-31 02:55:10 -08:00
Michael Scire
752e0757d9 fusee: basic byok support for 7.0.0 2019-01-31 02:23:43 -08:00
Michael Scire
a71b2d9329 Exo: update package2 constants 2019-01-31 01:39:53 -08:00
Michael Scire
506ac3f167 exo: theoretical support for moved MAILBOX page 2019-01-30 23:13:27 -08:00
Michael Scire
46f4896992 exo/fusee: add support for new master key 2019-01-30 22:37:26 -08:00
Michael Scire
6c41e105c4 fusee: fix stack oob read 2019-01-30 21:56:33 -08:00
Michael Scire
bdfd7946e3 ldr:ro: Correct LoadNrrEx definition, unimpl'd for now 2019-01-30 21:55:04 -08:00
Michael Scire
f78fd29e38 Add basic support to fusee for multiple tsec_root_keys. 2019-01-30 21:53:37 -08:00
Michael Scire
3d6405be85 exo: change config to its own static page
This is necessary to support both pre-7.0.0 and 7.0.0...
2019-01-30 13:53:16 -08:00
Michael Scire
7bdb2ae897 libstrat: update for deadlock fix 2019-01-26 06:24:49 -08:00
Michael Scire
891b865da8 fusee: change default power-off-time to 6 seconds. 2019-01-26 05:58:02 -08:00
Michael Scire
dc2b8ebab9 fusee: remove unnecessary delay. 2019-01-26 00:59:27 -08:00
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
SciresM
cd8621c632
Merge pull request #333 from nicoelayda/fix-makefile
Add component subdirectories to root Makefile's .PHONY
2019-01-25 12:07:36 -08:00
Nico Elayda
e55a7bef26 Add component subdirectories to root Makefile's .PHONY 2019-01-26 01:33:51 +08:00
Michael Scire
da68d02c77 pm: fix memory profiles *again* (required for botw video update on 3.0) 2019-01-25 00:03:54 -08:00
Michael Scire
2677cf68d4 pm/0.8.3: remove memory profile adjustment entirely 2019-01-24 12:09:41 -08:00
Michael Scire
cedbcba3e3 0.8.3: fix some memory/deadlock issues 2019-01-24 11:41:32 -08:00
Michael Scire
5b1bb71787 docs: add sm extension I forgot to mention 2019-01-24 09:45:57 -08:00
Michael Scire
7d4a257d57 Bump version to 0.8.3 2019-01-24 09:44:03 -08:00
Michael Scire
051789c430 fatal: alignas doesn't actually work 2019-01-24 09:31:54 -08:00
Michael Scire
0e4c300745 exo: fix rebootstub makefile 2019-01-24 09:18:18 -08:00
Michael Scire
f99dea798a alignas preferred to __attribute__((aligned)) 2019-01-24 09:13:24 -08:00
Michael Scire
f15fc6645e rtp: more libnx api updates 2019-01-24 09:11:46 -08:00
Michael Scire
c56db864eb rtp: update to new libnx console API 2019-01-24 09:10:51 -08:00
Michael Scire
5b4e81aa8b rip fancy e in nacp 2019-2019 2019-01-24 09:09:17 -08:00
Michael Scire
e75f4e9f5a troposphere: add reboot_to_payload example homebrew 2019-01-24 09:05:06 -08:00
Michael Scire
08d1e9b880 fatal: fix payload size, pm: take from application instead of applet 2019-01-24 08:33:06 -08:00
Michael Scire
b2fb42e39d dist: add default system settings 2019-01-24 08:24:22 -08:00
Michael Scire
776ab21641 dist: copy fusee-primary as default reboot payload 2019-01-24 08:21:52 -08:00
Michael Scire
031c9e545b fatal: reboot to sdmc:/atmosphere/reboot_payload.bin 2019-01-24 08:20:27 -08:00
Michael Scire
c6f06e2c40 exosphere: properly implement reboot-to-payload 2019-01-24 08:12:10 -08:00
TrainDoctor
c9c8f64f09 Better issue templates! 2019-01-22 05:38:35 -08:00
Michael Scire
9bc45475f4 docs: fix formatting for github 2019-01-22 05:38:27 -08:00
Michael Scire
8bf8503fcd docs: Add set.mitm documentation 2019-01-22 05:38:27 -08:00
Michael Scire
8a73ad996a pm: add support for maintenance mode 2019-01-22 05:38:27 -08:00
Michael Scire
24f74312f2 Update libstrat for bugfix 2019-01-22 05:38:27 -08:00
Michael Scire
5f179cf19f set.mitm: increase memory, fix race condition that could cause hang during boot 2019-01-22 05:38:27 -08:00
Michael Scire
254ac59016 set.mitm: revise down memory usage 2019-01-22 05:38:27 -08:00
Michael Scire
2711702e29 set.mitm: Add delay to allow fatal to work when thrown 2019-01-22 05:38:27 -08:00
Michael Scire
18ee6eb2e6 set.mitm: Parse settings from SD card (closes #268) 2019-01-22 05:38:27 -08:00
Michael Scire
4711d0565d set.mitm: mitm everything
We still only lie about firmware version to qlaunch/maintenance.

This is to prepare for loading settings off of the SD card.
2019-01-22 05:38:27 -08:00
Michael Scire
f61f5feaf4 pm: Launch set.mitm earlier in boot. 2019-01-22 05:38:27 -08:00
SciresM
2165555170 smdocs: remove extraneous \ 2019-01-22 05:38:27 -08:00
Michael Scire
260a819fd2 sm: update mitm api docs for change 2019-01-22 05:38:27 -08:00
Michael Scire
83025080c8 sm: change InstallMitM to wait for registration instead of 0xE15 2019-01-22 05:38:27 -08:00
Michael Scire
b6684ff845 sm: Add sm:dmnt query extension 2019-01-22 05:38:27 -08:00
Michael Scire
deb124138b exosphere: Implement smc_ams_iram_copy 2019-01-22 05:38:27 -08:00
Michael Scire
eeef08e58e exo: ensure IRAM initialization. 2019-01-22 05:38:27 -08:00
Michael Scire
295574740d exosphere: improve nested switch format 2019-01-22 05:38:27 -08:00
Michael Scire
a52e601f2e exosphere: Add support for rebooting to a payload in IRAM. 2019-01-22 05:38:27 -08:00
Michael Scire
d349bdb1f8 fusee/exo: build warmboot, use instead of Nintendo's. 2019-01-22 05:38:27 -08:00
Michael Scire
caba025e97 warmboot: fix bugs in firmware 2019-01-22 05:38:27 -08:00
Michael Scire
add52b90c9 exosphere: Add support for AMS SMC extensions 2019-01-22 05:38:27 -08:00
Michael Scire
c42fc16d8e creport: RESULT_SUCCESS is not a defined value by libnx. 2019-01-22 05:38:27 -08:00
Michael Scire
a09137c008 creport: Okay, maybe actually fix formatting. 2019-01-22 05:38:27 -08:00
Michael Scire
2a2d1bc78b creport: Fix formatting error. 2019-01-22 05:38:27 -08:00
Michael Scire
50db685274 creport: attempt to improve userbreak errcode output 2019-01-22 05:38:27 -08:00
jakibaki
d0285fb57c Remove '=' file from the root of the repo 2019-01-22 05:38:27 -08:00
Michael Scire
a899a61f80 fs.mitm: match any_app override semantics 2019-01-22 05:38:27 -08:00
natinusala
da0d22f05a loader: add 'override any app' feature 2019-01-22 05:38:27 -08:00
misson20000
35cf3b65a3 loader/ECS: don't clear ECS on failure, add ClearExternalContentSource command 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
SciresM
36a727ef81 fincs has write-access to the ams repo + deserves credit 2019-01-22 05:38:27 -08:00
The Dax
3ce32d2014 DevkitARM r50-2 buildfix. 2019-01-22 05:38:27 -08:00
misson20000
a01d0e94f8 stratosphere/Makefile: change KIPS to MODULES 2018-12-21 00:29:08 -08:00
Michael Scire
34c16e211f warmboot: make remaining TODOs explicit 2018-12-18 16:02:49 -08:00
Michael Scire
95a9e1e215 warmboot: add code for decrypting/restoring tzram. 2018-12-18 15:55:16 -08:00
Michael Scire
3924a2ef76 warmboot: start secmon_restore_to_tzram 2018-12-18 15:31:34 -08:00
Michael Scire
4f9ecc9d50 warmboot: finish cluster_initialize_cpu 2018-12-17 17:32:44 -08:00
Michael Scire
f6bc4abfd0 warmboot: implement cluster_power_on_cpu 2018-12-17 17:17:19 -08:00
Michael Scire
7a704827f1 warmboot: add flow_perform_ram_repair 2018-12-17 17:13:24 -08:00
Michael Scire
72594c6783 warmboot: add crail power on code 2018-12-17 17:03:39 -08:00
Michael Scire
754aaecc18 warmboot: add i2c code to enable PMIC 2018-12-17 16:48:14 -08:00
Michael Scire
b419c0df29 warmboot: more code, through power on i2c5 2018-12-17 16:34:41 -08:00
Michael Scire
a4ce50ffd5 warmboot: add through dpd disable 2018-12-17 16:18:27 -08:00
Michael Scire
802830d8d4 warmboot: start cluster_init, skeleton all remaining code 2018-12-17 16:04:50 -08:00
Michael Scire
83941f8647 warmboot: add car_mbist_workaround 2018-12-17 15:35:07 -08:00
Michael Scire
8d08e60916 warmboot: add ram config 2018-12-17 14:40:30 -08:00
Michael Scire
0b15539479 warmboot: add car_configure_oscillators 2018-12-17 14:18:04 -08:00
Michael Scire
a94bee71d2 warmboot: add fuse bypass init 2018-12-17 13:58:28 -08:00
Michael Scire
5f905c6b42 warmboot: Add device debug configuration 2018-12-17 13:22:08 -08:00
Michael Scire
e0f1e637f7 Add single source of truth for target firmwares. 2018-12-17 12:40:06 -08:00
Michael Scire
fc4912ef54 exo: add stub warmboot.bin 2018-12-17 12:01:10 -08:00
Michael Scire
dca51291aa Exo: bpmpfw -> sc7fw, lp0 -> sc7 2018-12-17 11:30:59 -08:00
Michael Scire
b72a68f622 exo: follow hekate's example, disable warmboot signature checks via bootrom arbwrite.
(rip mariko)
2018-12-16 17:46:53 -08:00
Michael Scire
a9a71fbeed fs.mitm: Fix HID usage (closes #292) 2018-12-10 19:30:59 -08:00
Michael Scire
84c776fa6b Bump version to 0.8.2 2018-12-07 17:30:07 -08:00
Michael Scire
a21b5d453a ams: turn on debugmode by default. 2018-12-07 17:23:20 -08:00
Michael Scire
aca8f53050 Merge branch 'master' into debugger_dev 2018-12-07 14:55:28 -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
cdb7ce3dec ams: turn on debugmode by default. 2018-12-07 03:32:24 -08:00
Michael Scire
49d1e65496 tma: Fix nn.tma.PmModuleThread priority 2018-12-07 03:26:06 -08:00
Michael Scire
29153af2bc tma.tio: Improve read/write bounding. 2018-12-06 23:25:16 -08:00
Michael Scire
f79f4d175b tma: add more dmnt wrapper commands 2018-12-06 20:21:15 -08:00
Michael Scire
600ad660a6 tma: First pass at tio file read/write 2018-12-06 15:32:27 -08:00
Michael Scire
efcce68a56 tma: Correct JSON to work as non-kip 2018-12-06 13:55:02 -08:00
Michael Scire
6b04c937e6 dmnt: Add remaining TargetIO_File* funcs 2018-12-06 13:39:27 -08:00
Michael Scire
46c50f2cbe dmnt: Add TargetIO_Open/Close/Read/Write funcs. 2018-12-06 13:16:33 -08:00
Michael Scire
d452d6f89d exo: Correct seal key source 2018-12-06 09:29:09 -08:00
Michael Scire
eb6ab2ba62 dmnt: Implement three more easy commands 2018-12-05 23:57:35 -08:00
Michael Scire
8a92a63a64 pm: Don't launch titles twice due to boot2.flag 2018-12-05 23:44:11 -08:00
Michael Scire
907f6fa72d stratosphere: make tma non-kip, add to build system 2018-12-05 23:36:12 -08:00
Michael Scire
94e527e763 dmnt: Skeleton real process implementation. 2018-12-05 23:35:09 -08:00
Michael Scire
588315f877 dmnt: Create Makefile/Process folder. 2018-12-05 21:08:04 -08:00
Michael Scire
d1985fe77e tma: better GetSettingsTask output 2018-12-05 13:21:21 -08:00
Michael Scire
61ad4e0991 tma: Implement example set:sys getter service 2018-12-05 13:18:31 -08:00
Michael Scire
24be9ffc57 tma: Add working AtmosphereTestService (echoes As) 2018-12-05 08:33:56 -08:00
Michael Scire
d875d84d2d tma: Fix sleep/wake semantics, now tested on hardware. 2018-12-05 07:11:06 -08:00
Michael Scire
9fe8b22269 Merge branch 'master' into debugger_dev 2018-12-05 05:44:58 -08:00
Michael Scire
37e5a8544b tma: Add target initialization/power management logic 2018-12-05 05:31:45 -08:00
Michael Scire
bf7dc84893 tma: first pass at TmaServiceManager 2018-12-05 04:16:48 -08:00
Michael Scire
bb48e33074 tma: Skeleton Service/Task/TaskList classes. 2018-12-05 02:11:20 -08:00
Michael Scire
a51d355707 exo: there's no reason to not always init uart to be safe, actually 2018-12-04 16:01:26 -08:00
Michael Scire
a79f4cf6f6 exosphere: fix sleep mode when debugmode is enabled 2018-12-04 15:59:30 -08: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
bbed78149c fs.mitm: Hog less CPU time if SD card not inserted 2018-12-01 19:07:25 -08:00
Michael Scire
3fa973f430 fatal/set_mitm: Support 1.0.0 kernel. 2018-12-01 19:07:05 -08:00
Michael Scire
bd76e73b25 fusee: fix configuration typo 2018-12-01 13:58:09 -08:00
Michael Scire
fc426a06b2 exo: fix vaddr/paddr confusion in rcm reboot code 2018-12-01 13:56:13 -08:00
Michael Scire
2572ae8378 tma: impl helper services, cleanup hostside packets 2018-11-30 18:18:04 -08:00
Michael Scire
46001263f8 tma: impl helper services, cleanup hostside packets 2018-11-30 18:18:04 -08:00
Michael Scire
ec8523af7c tma: Implement USB packet rw. 2018-11-30 18:18:03 -08:00
Michael Scire
2708de3876 debug-kit: Implement tma.stub 2018-11-30 18:18:03 -08:00
Michael Scire
ef17dc16fa Bump version to 0.8.1 2018-11-30 13:39:07 -08:00
Michael Scire
ed4a999caa fix flag docs typo 2018-11-30 13:24:39 -08:00
Michael Scire
6b3662d047 Add documentation for supported flags. 2018-11-30 13:23:53 -08:00
Michael Scire
33b7e227d4 fusee: do PMC reboots, not CAR reboots. 2018-11-30 06:34:20 -08:00
Michael Scire
be5b58d033 fatal: Reboot to RCM if VOL is pressed instead of PWR. 2018-11-30 05:33:35 -08:00
Michael Scire
8d3b8354c3 Exosphere: Add extension to perform a reboot to rcm. 2018-11-30 04:57:17 -08:00
Michael Scire
25956c4fa1 fatal: Print special message for version mistmatch. 2018-11-30 04:51:27 -08:00
Michael Scire
5201803685 fusee: auto-apply nogc if fuses say we should. 2018-11-30 04:36:29 -08:00
Michael Scire
c6003ff530 ams: update default BCT.ini 2018-11-30 04:13:06 -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
Michael Scire
49ad66e478 stratosphere: Fix fs.mitm bis_protect race condition. 2018-11-30 02:42:48 -08:00
Michael Scire
bcdfc53d7d Bump version to 0.8.0 2018-11-29 15:32:19 -08:00
hexkyz
ed37706915 fusee: Add full 6.2.0 support via SMMU virtualization. 2018-11-29 23:32:31 +00:00
Michael Scire
e321f0ac04 Fix libstratosphere update 2018-11-29 12:51:22 -08:00
Michael Scire
87c0c8b83e Update libstratosphere 2018-11-29 12:48:40 -08:00
Michael Scire
7bc95f35d7 Merge branch 'bis_protect' 2018-11-29 12:48:20 -08:00
Michael Scire
ae4d29a49f fs.mitm: add flag support for writing bis/reading cal0 2018-11-29 12:30:32 -08:00
Michael Scire
67ff4fe913 fs.mitm: tweak conditions a little more. 2018-11-29 12:20:08 -08:00
Michael Scire
dd255df90d Change mitm conditions due to sleep mode issue 2018-11-29 12:13:57 -08: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
a71d98d78b exosphere: Implement optional 6.2.0+ keygen 2018-11-25 17:11:21 -08:00
Michael Scire
c3569ec5e2 fusee: support getting old tsec key from new tsec fw. 2018-11-25 16:22:47 -08:00
Michael Scire
eab5e0df9b exosphere: add EXOSPHERE_TARGET_FIRMWARE_620 2018-11-25 16:06:46 -08:00
Michael Scire
e214f4d325 exosphere: update for new master key 2018-11-25 15:51:04 -08:00
hexkyz
982797df31
fusee: Fix custom splash screen loading. 2018-11-19 20:05:47 +00:00
hexkyz
77bbb0ef78
Merge pull request #270 from misson20000/docs-ldr-ecs
add docs for SetExternalContentSource
2018-11-19 18:43:31 +00:00
misson20000
13aa774d7a add docs for SetExternalContentSource 2018-11-18 17:01:24 -08:00
hexkyz
6e7eb47d33 fusee: Minor hardware configuration fixes. 2018-11-17 21:50:31 +00:00
Michael Scire
a07e37121d fs.mitm: loosen boot0 write restrictions, protect keyblobs. 2018-11-15 18:25:11 -08:00
Michael Scire
d88fd04c73 fs.mitm: fix set:sys race condition. 2018-11-15 17:23:05 -08:00
Michael Scire
abde50f162 fs.mitm: wipe CAL0 backup from memory when done. 2018-11-15 15:58:31 -08:00
Michael Scire
2b4e6bf25d fs.mitm: just intercept literally everything 2018-11-15 15:46:05 -08:00
Michael Scire
ff09efb1bf fs.mitm: Prevent non-sysmodules from reading CAL0. 2018-11-15 15:29:02 -08:00
Michael Scire
cff283f77d fs.mitm: Protect the CAL0 backup from being read. 2018-11-15 15:27:01 -08:00
Michael Scire
e0c7bfc93d fs.mitm: Always mitm non-sysmodules. 2018-11-15 14:59:47 -08:00
Michael Scire
ac391d9c5e Loader: always redirect sysmodules. 2018-11-15 14:48:18 -08:00
Michael Scire
46cc08160d mitm: Improve session acquire semantics. 2018-11-15 14:19:34 -08:00
hexkyz
7e3b5c37d0
exosphere: Add missing register write. 2018-11-15 21:38:32 +00:00
Michael Scire
a00e120bf7 fs.mitm: Make PRODINFO always read-only. 2018-11-15 06:23:44 -08:00
Michael Scire
1932662b4c fs.mitm: improve backup path name again 2018-11-15 04:54:07 -08:00
Michael Scire
b4781b8a4f fs.mitm: improve backup path name 2018-11-15 04:52:55 -08:00
Michael Scire
83644692fe fs.mitm: Automatically backup PRODINFO on boot. 2018-11-15 04:44:13 -08:00
Michael Scire
420361597e all: Change flagging location. Support (but deprecate) old location. 2018-11-15 04:26:40 -08:00
Michael Scire
05187502b3 fs.mitm: Implement basic boot0 protection against writes/pubk writes. 2018-11-15 03:57:55 -08:00
Michael Scire
878ac59aae fs.mitm: skeleton logic for protecting autorcm. 2018-11-14 19:49:12 -08:00
Michael Scire
e1cc1b8d29 fs.mitm: Make accesses to Boot0 sectored 2018-11-14 19:40:46 -08:00
Michael Scire
d95fc102db fs.mitm: Intercept OpenBisStorage calls. 2018-11-14 18:39:48 -08:00
Michael Scire
66da896347 sm: Disable smhax, it interferes with functionality. 2018-11-14 18:39:11 -08:00
SciresM
c530bb8910
Merge branch 'master' into fatal 2018-11-14 14:15:01 -08:00
Michael Scire
8054b2d219 Fatal: save auto-debug info to SD card. 2018-11-14 14:13:31 -08:00
hexkyz
7c61e935ee exosphere: Fix virtual mapping of MC_SECURITY_CFG3.
Allow DRAM magic test value to be written on < 4.0.0.
2018-11-14 21:12:36 +00: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
962fa0a690 fatal: automatically collect backtrace for callers. 2018-11-14 03:23:28 -08:00
Michael Scire
9714db14d2 fatal/creport: Add cpu context. 2018-11-13 20:22:54 -08:00
Michael Scire
50c65ea7e1 fatal: monospace start address 2018-11-13 19:33:21 -08:00
Michael Scire
98bdb2a7a3 fatal: Add fake monospace for hex output 2018-11-13 19:30:40 -08:00
Michael Scire
d4ee772714 fatal: Display start instead of bt if size = 0 2018-11-13 18:11:08 -08:00
Michael Scire
fa9d7f40fc fatal: Reorder error message lines. 2018-11-13 18:07:27 -08:00
Michael Scire
20026587fd fatal: Draw GPRs + Backtrace to screen. 2018-11-13 17:53:26 -08:00
Michael Scire
f16423c413 fatal: Add font scaling support 2018-11-13 14:32:50 -08:00
Michael Scire
1bface09d5 fatal: add line spacing func, improve 565->888 for blending 2018-11-13 13:28:05 -08:00
Michael Scire
560d899a9b Improve text rendering API, add ams version. 2018-11-13 13:11:41 -08:00
Michael Scire
2838e41819 Add defines for atmosphere git revision. 2018-11-13 12:42:35 -08:00
Michael Scire
8550f722ca fatal: Implement basic text rendering. 2018-11-13 06:03:30 -08:00
Michael Scire
9f6ff2ed6e Fatal: Implement basic background drawing. 2018-11-12 22:26:13 -08:00
Michael Scire
164fb96da0 Update changelog.md for 0.7.5 2018-11-11 20:14:20 -08:00
Michael Scire
31c1338dba Bump version number to 0.7.5 2018-11-11 20:04:18 -08:00
Michael Scire
7d729e1836 creport: Add another code region locating improvement. 2018-11-11 20:00:04 -08:00
Michael Scire
36530a5501 creport: Improve code region list (as N did in 6.1.0) 2018-11-11 19:52:19 -08:00
hexkyz
1aba87ef76
Update README.md 2018-11-12 01:56:33 +00: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
caf9d11c8c fatal: Finish CheckRepairStatus 2018-11-10 13:38:17 -08:00
Michael Scire
f7a7ce1847 fatal: Fix FatalType_ErrorReport fallthrough 2018-11-10 13:17:13 -08:00
Michael Scire
893bad0db2 fatal: Mostly implement CheckRepairStatus 2018-11-10 13:15:48 -08:00
Michael Scire
29833539bb fatal: Split out fatal from User, stub CheckRepairStatus 2018-11-10 12:56:43 -08:00
Michael Scire
f914edeebd fatal: Implement configuration based on settings 2018-11-10 12:38:24 -08:00
Michael Scire
5f3187300d fatal: Skeleton ScreenDrawing code 2018-11-10 11:59:55 -08:00
Michael Scire
5d5f8ad3d5 fatal: Finish StopSoundTask 2018-11-10 04:07:26 -08:00
Michael Scire
f8abd2b402 fatal: Implement the first half of StopSoundTask 2018-11-10 03:51:19 -08:00
Michael Scire
6335d21901 fatal: SleepThread takes ns, not ticks 2018-11-10 03:22:21 -08:00
Michael Scire
5649b6d63f fatal: Implement BacklightControlTask 2018-11-10 03:16:13 -08:00
Michael Scire
e96eaa3d7c fatal: Implement AdjustClockTask 2018-11-10 03:05:14 -08:00
Michael Scire
aa86d1abfa fatal: Implement PowerControlTask 2018-11-10 02:42:07 -08:00
Michael Scire
1228cd6903 fatal: misc cleanup, verified to reboot on hardware 2018-11-10 02:21:29 -08:00
Michael Scire
6f240b1665 fatal: Add missing bpcInitialize() call. 2018-11-10 01:47:02 -08:00
Michael Scire
13e5043d64 fatal: Implement PowerButtonObserveTask 2018-11-10 01:41:47 -08:00
Michael Scire
b771c42f7f fatal: Implement StateTransitionStopTask 2018-11-10 01:19:52 -08:00
Michael Scire
4d1481e2eb fatal: Write ErrorReportTask 2018-11-10 01:04:40 -08:00
Michael Scire
21b0f228b6 fatal: Skeleton tasks, write ThrowFatalImpl. 2018-11-10 00:54:12 -08:00
Michael Scire
b9091e9466 fatal: Implement fatal:p, fatal:u stub. 2018-11-10 00:11:38 -08:00
SciresM
a520481168
Merge pull request #261 from HylianMedia/master
Update Changelog for 0.7.4
2018-11-09 18:14:17 -08:00
Hylian
8daa2da97c
Update Changelog for 0.7.4 2018-11-09 11:26:04 -06:00
Michael Scire
bb29a2458f Bump version to 0.7.4 2018-11-08 16:36:22 -08:00
Michael Scire
ce1a6a68bf fs.mitm/loader: Fix crashes when launching too many processes. 2018-11-08 16:02:04 -08:00
Michael Scire
cf510ad9bf pm: Only register privileged processes with FS as needed 2018-11-08 05:28:52 -08:00
Michael Scire
9898a01d3b Add current branch to make dist zip name 2018-11-08 01:27:36 -08:00
Michael Scire
54a22797a7 Make libstratosphere a submodule 2018-11-08 01:24:40 -08:00
Michael Scire
5ef01edab5 Delete libstratosphere in prep for submodule 2018-11-08 01:12:30 -08:00
Michael Scire
3b8bb325e8 pm: Use non-system event for process tracking. 2018-11-07 23:43:59 -08:00
Michael Scire
6538554485 libstratosphere: add ReadOnlySystemEvent helper 2018-11-07 23:25:16 -08:00
Michael Scire
9b1a2451b0 libstratosphere: Add thread primitive, WaitableManager->RequestStop() 2018-11-07 23:25:11 -08:00
Michael Scire
e65bee0d6a libstratosphere: Implement message queues 2018-11-07 23:25:00 -08:00
Michael Scire
8426a4dc77 libstrat: Use iterators when looping deferred waitables 2018-11-07 22:59:30 -08:00
Michael Scire
147f3c690a libstrat: Significantly cleanup waitable manager result handling. 2018-11-07 22:40:19 -08:00
Michael Scire
bac81f4ccc libstrat: fix potential oob deref in WaitableManager (closes #256) 2018-11-07 19:10:04 -08:00
Michael Scire
2894989eb7 libstrat: improve waitable manager cancelsync semantics 2018-11-07 12:42:06 -08:00
Michael Scire
952ee4227d libstrat: update curthreadhandle for libnx 1.5.0 2018-11-05 22:56:04 -08:00
Michael Scire
9142e90a04 libstratosphere: Use intraprocess event signaling for new waitable management 2018-11-05 18:35:21 -08:00
Michael Scire
3ed239296a libstrat: Allow nullptr buffers if 0 size. (closes #255) 2018-11-04 21:52:53 -08:00
Michael Scire
78a47dba6d fs.mitm: Cache IStorageInterfaces, store meta on SD instead of memory. 2018-11-04 13:56:07 -08:00
Michael Scire
5d0aabaa44 fs.mitm: Fix romfs detection on SD 2018-11-04 12:48:14 -08:00
Michael Scire
e786bc7e9a fs.mitm: Only create storage interface when needed. 2018-11-04 12:45:29 -08:00
Michael Scire
158f7224a7 set.mitm: fixup NPDM json. 2018-10-31 02:07:35 -07:00
SciresM
865ca76772
Merge pull request #215 from npdmfixup/npdmfixup
Use new npdm-json format
2018-10-31 18:03:32 +09:00
SciresM
b8f93562c0
Merge branch 'master' into npdmfixup 2018-10-31 18:02:07 +09:00
Michael Scire
ef5c7d6bab Fix make dist zip to launch set_mitm. (Thanks @bakugo). 2018-10-30 16:39:20 -07:00
Michael Scire
be044e691c libstrat: delete old ipc templating. 2018-10-30 15:57:15 -07:00
TuxSH
536b89efae Add boost as submodule 2018-10-30 23:49:26 +01:00
Michael Scire
44175058f6 libstrat: mark ServiceObjectHolder functions const 2018-10-31 05:04:00 +09:00
Michael Scire
7309c7f358 atmosphere: improve makefile dependencies 2018-10-31 05:04:00 +09:00
Michael Scire
6336089b63 libstrat: remove unused struct in serializer 2018-10-31 05:04:00 +09:00
Michael Scire
6ef34d80a0 libstrat: automatically detect+format rawdata structs correctly. 2018-10-31 05:04:00 +09:00
Michael Scire
2f7224edce fs.mitm: increase thread count back to 5. 2018-10-31 05:04:00 +09:00
Michael Scire
c49cfbd6af loader: update for libstratosphere refactor 2018-10-31 05:04:00 +09:00
Michael Scire
8b71378920 atmosphere: add set.mitm to make dist target 2018-10-31 05:04:00 +09:00
Michael Scire
bbffbd654f set.mitm: Split out from fs.mitm 2018-10-31 05:04:00 +09:00
Michael Scire
4cdd9aa8f1 libstratosphere: Fix uninitialized memory bug. 2018-10-31 05:04:00 +09:00
Michael Scire
23a85a7c24 fs.mitm: split out set.mitm 2018-10-31 05:04:00 +09:00
Michael Scire
3dc679215b fs.mitm: Remove debugging options 2018-10-31 05:04:00 +09:00
Michael Scire
aef7d36300 fs.mitm: update for libstratosphere refactor 2018-10-31 05:04:00 +09:00
Michael Scire
887b4e0275 pm: update for libstratosphere refactor 2018-10-31 05:04:00 +09:00
Michael Scire
9a8c70ed68 sm: Update for libstratosphere refactor 2018-10-31 05:04:00 +09:00
Michael Scire
058f735031 libstratosphere: refactor everything 2018-10-31 05:04:00 +09:00
misson20000
5c147e5188 loader: add SetExternalContentSource extension 2018-10-29 07:11:16 +09:00
misson20000
18f51e9b2e loader: add NpdmUtils function for invalidating the cache for a specific title 2018-10-29 07:11:16 +09:00
misson20000
376feb63bd loader: make ShouldOverrideContents take a tid argument 2018-10-29 07:11:16 +09:00
Michael Scire
a502d31cd1 Add Question Issue Template 2018-10-25 13:52:55 -07:00
Michael Scire
afbf57c222 Add Feature Request Issue Template 2018-10-25 13:47:13 -07:00
Michael Scire
b62329bd5b Add bug report issue template 2018-10-25 13:42:39 -07:00
Hylian
de688ee17a Update changelog.md 2018-10-25 06:58:29 +09:00
roblabla
0938057d67 Use new npdm-json format 2018-09-29 02:37:25 +00:00
4418 changed files with 563836 additions and 155853 deletions

14
.gitattributes vendored Normal file
View File

@ -0,0 +1,14 @@
config_templates/hbl_html/accessible-urls/accessible-urls.txt text eol=lf
# Mark C++ "include" files as C++
*.inc linguist-language=C++
# Mark RapidJSON include as vendored
libraries/include/stratosphere/rapidjson/** linguist-vendored
# Mark emummc as vendored
emummc/** linguist-vendored
# Mark fatfs as vendored
exosphere/mariko_fatal/source/fatfs/** linguist-vendored
fusee/program/source/fatfs/** linguist-vendored

58
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,58 @@
---
name: Bug Report
about: Something doesn't work correctly in Atmosphère.
#assignees:
---
## Bug Report
[ If any section does not apply, replace its contents with "N/A". ]</br>
[ Lines between [ ] (square brackets) should be removed before posting. ]</br>
[ * ]</br>
[ Note: If the bug or crash you encountered is related to; ]</br>
[ - software used to make "backups", ]</br>
[ - software explicitly distributed for piracy, etc ]</br>
[ then contributors will not provide support for your issue and your issue will be closed. ]</br>
### What's the issue you encountered?
[ Describe the issue in detail and what you were doing beforehand. ]</br>
[ Did you make any changes related to Atmosphère itself? ]</br>
[ If so, make sure to include details relating to what exactly you changed. ]</br>
### How can the issue be reproduced?
[ * ]</br>
[ Include a detailed step by step process for recreating your issue. ]</br>
### Crash Report
[ Crash reports can be found under ``/atmosphere/crash_reports``. ]</br>
[ If your issue caused Atmosphère to crash, include the crash report(s) by creating a [gist](https://gist.github.com/) and pasting the link here. ]</br>
[ If you don't include a crash report in instances of crash related issues, we will ask you one to provide one. ]</br>
### System Firmware Version
X.X.X</br>
[ Replace X's with system firmware version at time of crash. ]</br>
[ You can find your firmware version in the Settings -> System, under "System Update". ]</br>
[ If it says "Update Pending", you can clear the pending update by rebooting to Maintenance Mode. ]</br>
### Environment?
- What bootloader (fusèe, hekate, etc) was Atmosphère launched by:
- Official release or unofficial build:
- [ Official release version x.x.x (or) unofficial build ]
- [ If using an unofficial build, include details on where/how you acquired the build. ]
- [ Ex: Self-compilation ]
- [ Ex: Kosmos' distribution of Atmosphère ]
- Do you have additional kips or sysmodules you're loading:
- Homebrew software installed: [ * ]
- EmuMMC or SysNAND:
- [ If using an EmuMMC, include whether it's partition-based or file-based. ]
### Additional context?
- Additional info about your environment:
- [ Any other information relevant to your issue. ]

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: ReSwitched Discord
url: https://discordapp.com/invite/DThbZ7z
about: Please ask questions here, instead of making GitHub issues.

View File

@ -0,0 +1,48 @@
---
name: Feature Request
about: Suggest a new feature for Atmosphère.
#assignees:
---
## Feature Request
[ If any section does not apply, replace its contents with "N/A". ]</br>
[ If you do not have the information needed for a section, replace its contents with "Unknown". ]</br>
[ Lines between [ ] (square brackets) are to be removed before posting. ]
[ Please search for existing [feature requests](https://github.com/Atmosphere-NX/Atmosphere/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22features%2Ffeature-request%22) before you make your own request. ]</br>
[ Duplicate requests will be marked as such and you will be referred to the original request. ]
### What feature are you suggesting?
#### Overview:
- [ Include the basic, high-level concepts for this feature here. ]</br>
#### Smaller Details:
- [ These may include specific methods of implementation etc. ]</br>
#### Nature of Request:
[ Remove all that do not apply to your request. ]
- Addition
- [ Ex: Addition of certain original features or features from other community projects. ]
- [ If you are suggesting porting features or including features from other projects, include what license they are distributed under and what, if any libraries those project use. ]
- Change
- Removal
- [Ex: Removal of certain features or implementation due to a specific issue/bug or because of low quality code, etc.]
### What component do you feel this would best fit within?
- [Fusée](https://github.com/Atmosphere-NX/Atmosphere#components)</br>
- Atmosphère's custom bootloader.</br>
- [Exosphère](https://github.com/Atmosphere-NX/Atmosphere#components)</br>
- Fully-featured custom secure monitor.</br>
- [Stratosphère](https://github.com/Atmosphere-NX/Atmosphere#components)</br>
- Custom system modules.</br>
- [**Thermosphère**](https://github.com/Atmosphere-NX/Atmosphere#components)</br>
- Atmosphère's emuNAND implementation.</br>
- [**Troposphère**](https://github.com/Atmosphere-NX/Atmosphere#components)</br>
- Application-level patches to the Horizon OS.</br>
[ Note: **Bolded components are not implemented** or are still at the prototyping phase. ]
### Why would this feature be useful?
[ If this is a feature for an end-user, how does it benefit the end-user? ]</br>
[ If this feature is for developers, what does it add to Atmosphère that did not already exist? ]</br>

36
.gitignore vendored
View File

@ -31,12 +31,16 @@
# Executables
*.exe
*.lz4
*.out
*.app
*.i*86
*.x86_64
*.hex
# Deko3d shaders
*.dksh
# Switch Executables
*.nso
*.nro
@ -64,11 +68,43 @@ dkms.conf
# Distribution files
*.tgz
*.zip
*.bz2
# IDA binaries
*.id0
*.id1
*.id2
*.idb
*.i64
*.nam
*.til
# Compiled python files.
*.pyc
.**/
# macOS horseshittery
.DS_Store
# NOTE: make sure to make exceptions to this pattern when needed!
*.bin
*.enc
**/out
**/build
**/lib
**/build_nintendo_nx_arm64
**/build_nintendo_nx_arm64_armv8a
**/build_nintendo_nx_arm
**/build_nintendo_nx_arm_armv8a
**/build_nintendo_nx_arm_armv7a
**/build_nintendo_nx_arm_armv4t
**/build_nintendo_nx_x64
**/build_nintendo_nx_x86
tools/*/
package3
stratosphere/test/

0
.gitmodules vendored Normal file
View File

View File

@ -1,45 +1,42 @@
TOPTARGETS := all clean dist
AMSREV := $(shell git rev-parse --short HEAD)
ifneq (, $(strip $(shell git status --porcelain 2>/dev/null)))
AMSREV := $(AMSREV)-dirty
endif
ATMOSPHERE_BUILD_CONFIGS :=
all: nx_release
clean: clean-nx_release
all: fusee creport
fusee:
$(MAKE) -C $@ all
THIS_MAKEFILE := $(abspath $(lastword $(MAKEFILE_LIST)))
CURRENT_DIRECTORY := $(abspath $(dir $(THIS_MAKEFILE)))
creport:
$(MAKE) -C stratosphere/creport all
define ATMOSPHERE_ADD_TARGET
clean:
$(MAKE) -C fusee clean
rm -rf out
dist: fusee creport
$(eval MAJORVER = $(shell grep '\ATMOSPHERE_RELEASE_VERSION_MAJOR\b' common/include/atmosphere/version.h \
| tr -s [:blank:] \
| cut -d' ' -f3))
$(eval MINORVER = $(shell grep '\ATMOSPHERE_RELEASE_VERSION_MINOR\b' common/include/atmosphere/version.h \
| tr -s [:blank:] \
| cut -d' ' -f3))
$(eval MICROVER = $(shell grep '\ATMOSPHERE_RELEASE_VERSION_MICRO\b' common/include/atmosphere/version.h \
| tr -s [:blank:] \
| cut -d' ' -f3))
$(eval AMSVER = $(MAJORVER).$(MINORVER).$(MICROVER)-$(AMSREV))
rm -rf atmosphere-$(AMSVER)
rm -rf out
mkdir atmosphere-$(AMSVER)
mkdir atmosphere-$(AMSVER)/atmosphere
mkdir -p atmosphere-$(AMSVER)/atmosphere/titles/0100000000000036
cp fusee/fusee-secondary/fusee-secondary.bin atmosphere-$(AMSVER)/fusee-secondary.bin
cp common/defaults/BCT.ini atmosphere-$(AMSVER)/BCT.ini
cp common/defaults/loader.ini atmosphere-$(AMSVER)/atmosphere/loader.ini
cp stratosphere/creport/creport.nsp atmosphere-$(AMSVER)/atmosphere/titles/0100000000000036/exefs.nsp
cd atmosphere-$(AMSVER); zip -r ../atmosphere-$(AMSVER).zip ./*; cd ../;
rm -r atmosphere-$(AMSVER)
mkdir out
mv atmosphere-$(AMSVER).zip out/atmosphere-$(AMSVER).zip
cp fusee/fusee-primary/fusee-primary.bin out/fusee-primary.bin
ATMOSPHERE_BUILD_CONFIGS += $(strip $1)
.PHONY: $(TOPTARGETS) fusee
$(strip $1):
@echo "Building $(strip $1)"
@$$(MAKE) -f $(CURRENT_DIRECTORY)/atmosphere.mk ATMOSPHERE_MAKEFILE_TARGET="$(strip $1)" ATMOSPHERE_BUILD_NAME="$(strip $2)" ATMOSPHERE_BOARD="$(strip $3)" ATMOSPHERE_CPU="$(strip $4)" $(strip $5)
clean-$(strip $1):
@echo "Cleaning $(strip $1)"
@$$(MAKE) -f $(CURRENT_DIRECTORY)/atmosphere.mk clean ATMOSPHERE_MAKEFILE_TARGET="$(strip $1)" ATMOSPHERE_BUILD_NAME="$(strip $2)" ATMOSPHERE_BOARD="$(strip $3)" ATMOSPHERE_CPU="$(strip $4)" $(strip $5)
endef
define ATMOSPHERE_ADD_TARGETS
$(eval $(call ATMOSPHERE_ADD_TARGET, $(strip $1)_release, release, $(strip $2), $(strip $3), \
ATMOSPHERE_BUILD_SETTINGS="$(strip $4)" \
))
$(eval $(call ATMOSPHERE_ADD_TARGET, $(strip $1)_debug, debug, $(strip $2), $(strip $3), \
ATMOSPHERE_BUILD_SETTINGS="$(strip $4) -DAMS_BUILD_FOR_DEBUGGING" ATMOSPHERE_BUILD_FOR_DEBUGGING=1 \
))
$(eval $(call ATMOSPHERE_ADD_TARGET, $(strip $1)_audit, audit, $(strip $2), $(strip $3), \
ATMOSPHERE_BUILD_SETTINGS="$(strip $4) -DAMS_BUILD_FOR_AUDITING" ATMOSPHERE_BUILD_FOR_DEBUGGING=1 ATMOSPHERE_BUILD_FOR_AUDITING=1 \
))
endef
$(eval $(call ATMOSPHERE_ADD_TARGETS, nx, nx-hac-001, arm-cortex-a57,))
clean-all: $(foreach config,$(ATMOSPHERE_BUILD_CONFIGS),clean-$(config))
.PHONY: all clean clean-all $(foreach config,$(ATMOSPHERE_BUILD_CONFIGS), $(config) clean-$(config))

View File

@ -3,6 +3,8 @@
=====
![License](https://img.shields.io/badge/License-GPLv2-blue.svg)
[![Chat on Discord](https://img.shields.io/badge/Discord-5865f2?logo=discord&logoColor=white)](https://discordapp.com/invite/ZdqEhed)
![Made with Notepad++](img/np++.png?raw=true)
Atmosphère is a work-in-progress customized firmware for the Nintendo Switch.
@ -17,19 +19,30 @@ Atmosphère consists of multiple components, each of which replaces/modifies a d
* Stratosphère: Custom Sysmodule(s), both Rosalina style to extend the kernel/provide new features, and of the loader reimplementation style to hook important system actions
* Troposphère: Application-level Horizon OS patches, used to implement desirable CFW features
Licensing
=====
This software is licensed under the terms of the GPLv2, with exemptions for specific projects noted below.
You can find a copy of the license in the [LICENSE file](LICENSE).
Exemptions:
* [Nintendo](https://github.com/Nintendo) is exempt from GPLv2 licensing and may (at its option) instead license any source code authored for the Atmosphère project under the Zero-Clause BSD license.
Credits
=====
Atmosphère is currently being developed and maintained by __SciresM__, __TuxSH__ and __hexkyz__.<br>
Atmosphère is currently being developed and maintained by __SciresM__, __TuxSH__, __hexkyz__, and __fincs__.<br>
In no particular order, we credit the following for their invaluable contributions:
* __switchbrew__ for the [libnx](https://github.com/switchbrew/libnx) project and the extensive [documentation, research and tool development](http://switchbrew.org) pertaining to the Nintendo Switch.
* __devkitPro__ for the [devkitA64](https://devkitpro.org/) toolchain and libnx support.
* __ReSwitched Team__ for additional [documentation, research and tool development](https://reswitched.tech/) pertaining to the Nintendo Switch.
* __ReSwitched Team__ for additional [documentation, research and tool development](https://reswitched.github.io/) pertaining to the Nintendo Switch.
* __ChaN__ for the [FatFs](http://elm-chan.org/fsw/ff/00index_e.html) module.
* __Marcus Geelnard__ for the [bcl-1.2.0](https://sourceforge.net/projects/bcl/files/bcl/bcl-1.2.0) library.
* __naehrwert__ and __st4rk__ for the original [hekate](https://github.com/nwert/hekate) project and its hwinit code base.
* __CTCaer__ for the continued [hekate](https://github.com/CTCaer/hekate) project's fork.
* __CTCaer__ for the continued [hekate](https://github.com/CTCaer/hekate) project's fork and the [minerva_tc](https://github.com/CTCaer/minerva_tc) project.
* __m4xw__ for development of the [emuMMC](https://github.com/m4xw/emummc) project.
* __Riley__ for suggesting "Atmosphere" as a Horizon OS reimplementation+customization project name.
* __hedgeberg__ for research and hardware testing.
* __lioncash__ for code cleanup and general improvements.

173
atmosphere.mk Normal file
View File

@ -0,0 +1,173 @@
#---------------------------------------------------------------------------------
# pull in common atmosphere configuration
#---------------------------------------------------------------------------------
THIS_MAKEFILE := $(abspath $(lastword $(MAKEFILE_LIST)))
CURRENT_DIRECTORY := $(abspath $(dir $(THIS_MAKEFILE)))
include $(CURRENT_DIRECTORY)/libraries/config/common.mk
# Get Atmosphere version fields
ATMOSPHERE_MAJOR_VERSION := $(shell grep 'define ATMOSPHERE_RELEASE_VERSION_MAJOR\b' $(ATMOSPHERE_LIBRARIES_DIR)/libvapours/include/vapours/ams/ams_api_version.h | tr -s [:blank:] | cut -d' ' -f3)
ATMOSPHERE_MINOR_VERSION := $(shell grep 'define ATMOSPHERE_RELEASE_VERSION_MINOR\b' $(ATMOSPHERE_LIBRARIES_DIR)/libvapours/include/vapours/ams/ams_api_version.h | tr -s [:blank:] | cut -d' ' -f3)
ATMOSPHERE_MICRO_VERSION := $(shell grep 'define ATMOSPHERE_RELEASE_VERSION_MICRO\b' $(ATMOSPHERE_LIBRARIES_DIR)/libvapours/include/vapours/ams/ams_api_version.h | tr -s [:blank:] | cut -d' ' -f3)
ATMOSPHERE_SUPPORTED_HOS_MAJOR_VERSION := $(shell grep 'define ATMOSPHERE_SUPPORTED_HOS_VERSION_MAJOR\b' $(ATMOSPHERE_LIBRARIES_DIR)/libvapours/include/vapours/ams/ams_api_version.h | tr -s [:blank:] | cut -d' ' -f3)
ATMOSPHERE_SUPPORTED_HOS_MINOR_VERSION := $(shell grep 'define ATMOSPHERE_SUPPORTED_HOS_VERSION_MINOR\b' $(ATMOSPHERE_LIBRARIES_DIR)/libvapours/include/vapours/ams/ams_api_version.h | tr -s [:blank:] | cut -d' ' -f3)
ATMOSPHERE_SUPPORTED_HOS_MICRO_VERSION := $(shell grep 'define ATMOSPHERE_SUPPORTED_HOS_VERSION_MICRO\b' $(ATMOSPHERE_LIBRARIES_DIR)/libvapours/include/vapours/ams/ams_api_version.h | tr -s [:blank:] | cut -d' ' -f3)
ATMOSPHERE_VERSION := $(ATMOSPHERE_MAJOR_VERSION).$(ATMOSPHERE_MINOR_VERSION).$(ATMOSPHERE_MICRO_VERSION)-$(ATMOSPHERE_GIT_REVISION)
dist: dist-no-debug
$(eval DIST_DIR = $(CURRENT_DIRECTORY)/$(ATMOSPHERE_OUT_DIR)/atmosphere-$(ATMOSPHERE_VERSION)-debug)
rm -rf $(DIST_DIR)
mkdir $(DIST_DIR)
cp $(CURRENT_DIRECTORY)/fusee/loader_stub/$(ATMOSPHERE_BOOT_OUT_DIR)/loader_stub.elf $(DIST_DIR)/fusee-loader-stub.elf
cp $(CURRENT_DIRECTORY)/fusee/program/$(ATMOSPHERE_BOOT_OUT_DIR)/program.elf $(DIST_DIR)/fusee-program.elf
cp $(CURRENT_DIRECTORY)/exosphere/loader_stub/$(ATMOSPHERE_OUT_DIR)/loader_stub.elf $(DIST_DIR)/exosphere-loader-stub.elf
cp $(CURRENT_DIRECTORY)/exosphere/program/$(ATMOSPHERE_OUT_DIR)/program.elf $(DIST_DIR)/exosphere-program.elf
cp $(CURRENT_DIRECTORY)/exosphere/warmboot/$(ATMOSPHERE_BOOT_OUT_DIR)/warmboot.elf $(DIST_DIR)/exosphere-warmboot.elf
cp $(CURRENT_DIRECTORY)/exosphere/mariko_fatal/$(ATMOSPHERE_OUT_DIR)/mariko_fatal.elf $(DIST_DIR)/exosphere-mariko-fatal.elf
cp $(CURRENT_DIRECTORY)/exosphere/program/sc7fw/$(ATMOSPHERE_BOOT_OUT_DIR)/sc7fw.elf $(DIST_DIR)/exosphere-sc7fw.elf
cp $(CURRENT_DIRECTORY)/exosphere/program/rebootstub/$(ATMOSPHERE_BOOT_OUT_DIR)/rebootstub.elf $(DIST_DIR)/exosphere-rebootstub.elf
cp $(CURRENT_DIRECTORY)/mesosphere/kernel_ldr/$(ATMOSPHERE_OUT_DIR)/kernel_ldr.elf $(DIST_DIR)/kernel_ldr.elf
cp $(CURRENT_DIRECTORY)/mesosphere/kernel/$(ATMOSPHERE_OUT_DIR)/kernel.elf $(DIST_DIR)/kernel.elf
cp $(CURRENT_DIRECTORY)/stratosphere/ams_mitm/$(ATMOSPHERE_OUT_DIR)/ams_mitm.elf $(DIST_DIR)/ams_mitm.elf
cp $(CURRENT_DIRECTORY)/stratosphere/boot/$(ATMOSPHERE_OUT_DIR)/boot.elf $(DIST_DIR)/boot.elf
cp $(CURRENT_DIRECTORY)/stratosphere/boot2/$(ATMOSPHERE_OUT_DIR)/boot2.elf $(DIST_DIR)/boot2.elf
cp $(CURRENT_DIRECTORY)/stratosphere/creport/$(ATMOSPHERE_OUT_DIR)/creport.elf $(DIST_DIR)/creport.elf
cp $(CURRENT_DIRECTORY)/stratosphere/cs/$(ATMOSPHERE_OUT_DIR)/cs.elf $(DIST_DIR)/cs.elf
cp $(CURRENT_DIRECTORY)/stratosphere/dmnt/$(ATMOSPHERE_OUT_DIR)/dmnt.elf $(DIST_DIR)/dmnt.elf
cp $(CURRENT_DIRECTORY)/stratosphere/dmnt.gen2/$(ATMOSPHERE_OUT_DIR)/dmnt.gen2.elf $(DIST_DIR)/dmnt.gen2.elf
cp $(CURRENT_DIRECTORY)/stratosphere/eclct.stub/$(ATMOSPHERE_OUT_DIR)/eclct.stub.elf $(DIST_DIR)/eclct.stub.elf
cp $(CURRENT_DIRECTORY)/stratosphere/erpt/$(ATMOSPHERE_OUT_DIR)/erpt.elf $(DIST_DIR)/erpt.elf
cp $(CURRENT_DIRECTORY)/stratosphere/fatal/$(ATMOSPHERE_OUT_DIR)/fatal.elf $(DIST_DIR)/fatal.elf
cp $(CURRENT_DIRECTORY)/stratosphere/htc/$(ATMOSPHERE_OUT_DIR)/htc.elf $(DIST_DIR)/htc.elf
cp $(CURRENT_DIRECTORY)/stratosphere/jpegdec/$(ATMOSPHERE_OUT_DIR)/jpegdec.elf $(DIST_DIR)/jpegdec.elf
cp $(CURRENT_DIRECTORY)/stratosphere/loader/$(ATMOSPHERE_OUT_DIR)/loader.elf $(DIST_DIR)/loader.elf
cp $(CURRENT_DIRECTORY)/stratosphere/LogManager/$(ATMOSPHERE_OUT_DIR)/LogManager.elf $(DIST_DIR)/LogManager.elf
cp $(CURRENT_DIRECTORY)/stratosphere/ncm/$(ATMOSPHERE_OUT_DIR)/ncm.elf $(DIST_DIR)/ncm.elf
cp $(CURRENT_DIRECTORY)/stratosphere/pgl/$(ATMOSPHERE_OUT_DIR)/pgl.elf $(DIST_DIR)/pgl.elf
cp $(CURRENT_DIRECTORY)/stratosphere/pm/$(ATMOSPHERE_OUT_DIR)/pm.elf $(DIST_DIR)/pm.elf
cp $(CURRENT_DIRECTORY)/stratosphere/ro/$(ATMOSPHERE_OUT_DIR)/ro.elf $(DIST_DIR)/ro.elf
cp $(CURRENT_DIRECTORY)/stratosphere/sm/$(ATMOSPHERE_OUT_DIR)/sm.elf $(DIST_DIR)/sm.elf
cp $(CURRENT_DIRECTORY)/stratosphere/spl/$(ATMOSPHERE_OUT_DIR)/spl.elf $(DIST_DIR)/spl.elf
cp $(CURRENT_DIRECTORY)/stratosphere/TioServer/$(ATMOSPHERE_OUT_DIR)/TioServer.elf $(DIST_DIR)/TioServer.elf
cp $(CURRENT_DIRECTORY)/stratosphere/memlet/$(ATMOSPHERE_OUT_DIR)/memlet.elf $(DIST_DIR)/memlet.elf
cp $(CURRENT_DIRECTORY)/troposphere/daybreak/daybreak.elf $(DIST_DIR)/daybreak.elf
cp $(CURRENT_DIRECTORY)/troposphere/haze/haze.elf $(DIST_DIR)/haze.elf
cp $(CURRENT_DIRECTORY)/troposphere/reboot_to_payload/reboot_to_payload.elf $(DIST_DIR)/reboot_to_payload.elf
cd $(DIST_DIR); zip -r ../atmosphere-$(ATMOSPHERE_VERSION)-debug.zip ./*; cd ../;
rm -rf $(DIST_DIR)
dist-no-debug: package3 $(CURRENT_DIRECTORY)/$(ATMOSPHERE_OUT_DIR)
$(eval DIST_DIR = $(CURRENT_DIRECTORY)/$(ATMOSPHERE_OUT_DIR)/atmosphere-$(ATMOSPHERE_VERSION))
rm -rf $(CURRENT_DIRECTORY)/$(ATMOSPHERE_OUT_DIR)/*
rm -rf $(DIST_DIR)
mkdir $(DIST_DIR)
mkdir $(DIST_DIR)/atmosphere
mkdir $(DIST_DIR)/switch
mkdir -p $(DIST_DIR)/atmosphere/fatal_errors
mkdir -p $(DIST_DIR)/atmosphere/config_templates
mkdir -p $(DIST_DIR)/atmosphere/config
mkdir -p $(DIST_DIR)/atmosphere/flags
cp fusee/$(ATMOSPHERE_BOOT_OUT_DIR)/fusee.bin $(DIST_DIR)/atmosphere/reboot_payload.bin
cp fusee/$(ATMOSPHERE_BOOT_OUT_DIR)/package3 $(DIST_DIR)/atmosphere/package3
cp config_templates/stratosphere.ini $(DIST_DIR)/atmosphere/config_templates/stratosphere.ini
cp config_templates/override_config.ini $(DIST_DIR)/atmosphere/config_templates/override_config.ini
cp config_templates/system_settings.ini $(DIST_DIR)/atmosphere/config_templates/system_settings.ini
cp config_templates/exosphere.ini $(DIST_DIR)/atmosphere/config_templates/exosphere.ini
mkdir -p config_templates/kip_patches
cp -r config_templates/kip_patches $(DIST_DIR)/atmosphere/kip_patches
cp -r config_templates/hbl_html $(DIST_DIR)/atmosphere/hbl_html
mkdir -p $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/0100000000000008
mkdir -p $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/010000000000000d
mkdir -p $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/0100000000000017
mkdir -p $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/010000000000002b
mkdir -p $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/0100000000000032
mkdir -p $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/0100000000000034
mkdir -p $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/0100000000000036
mkdir -p $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/0100000000000037
#mkdir -p $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/010000000000003c
mkdir -p $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/0100000000000042
mkdir -p $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/0100000000000420
mkdir -p $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/0100000000000421
mkdir -p $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/010000000000b240
mkdir -p $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/010000000000d609
mkdir -p $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/010000000000d623
cp stratosphere/boot2/$(ATMOSPHERE_OUT_DIR)/boot2.nsp $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/0100000000000008/exefs.nsp
cp stratosphere/dmnt/$(ATMOSPHERE_OUT_DIR)/dmnt.nsp $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/010000000000000d/exefs.nsp
cp stratosphere/cs/$(ATMOSPHERE_OUT_DIR)/cs.nsp $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/0100000000000017/exefs.nsp
cp stratosphere/erpt/$(ATMOSPHERE_OUT_DIR)/erpt.nsp $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/010000000000002b/exefs.nsp
cp stratosphere/eclct.stub/$(ATMOSPHERE_OUT_DIR)/eclct.stub.nsp $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/0100000000000032/exefs.nsp
cp stratosphere/fatal/$(ATMOSPHERE_OUT_DIR)/fatal.nsp $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/0100000000000034/exefs.nsp
cp stratosphere/creport/$(ATMOSPHERE_OUT_DIR)/creport.nsp $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/0100000000000036/exefs.nsp
cp stratosphere/ro/$(ATMOSPHERE_OUT_DIR)/ro.nsp $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/0100000000000037/exefs.nsp
#cp stratosphere/jpegdec/$(ATMOSPHERE_OUT_DIR)/jpegdec.nsp $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/010000000000003c/exefs.nsp
cp stratosphere/pgl/$(ATMOSPHERE_OUT_DIR)/pgl.nsp $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/0100000000000042/exefs.nsp
cp stratosphere/LogManager/$(ATMOSPHERE_OUT_DIR)/LogManager.nsp $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/0100000000000420/exefs.nsp
cp stratosphere/htc/$(ATMOSPHERE_OUT_DIR)/htc.nsp $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/010000000000b240/exefs.nsp
cp stratosphere/dmnt.gen2/$(ATMOSPHERE_OUT_DIR)/dmnt.gen2.nsp $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/010000000000d609/exefs.nsp
cp stratosphere/TioServer/$(ATMOSPHERE_OUT_DIR)/TioServer.nsp $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/010000000000d623/exefs.nsp
cp stratosphere/memlet/$(ATMOSPHERE_OUT_DIR)/memlet.nsp $(DIST_DIR)/stratosphere_romfs/atmosphere/contents/0100000000000421/exefs.nsp
@build_romfs $(DIST_DIR)/stratosphere_romfs $(DIST_DIR)/atmosphere/stratosphere.romfs
rm -r $(DIST_DIR)/stratosphere_romfs
cp troposphere/reboot_to_payload/reboot_to_payload.nro $(DIST_DIR)/switch/reboot_to_payload.nro
cp troposphere/daybreak/daybreak.nro $(DIST_DIR)/switch/daybreak.nro
cp troposphere/haze/haze.nro $(DIST_DIR)/switch/haze.nro
cd $(DIST_DIR); zip -r ../atmosphere-$(ATMOSPHERE_VERSION).zip ./*; cd ../;
rm -rf $(DIST_DIR)
cp fusee/$(ATMOSPHERE_BOOT_OUT_DIR)/fusee.bin $(CURRENT_DIRECTORY)/$(ATMOSPHERE_OUT_DIR)/fusee.bin
package3: emummc fusee stratosphere mesosphere exosphere troposphere
@python fusee/build_package3.py $(CURRENT_DIRECTORY) $(ATMOSPHERE_OUT_DIR) $(ATMOSPHERE_BOOT_OUT_DIR) $(ATMOSPHERE_GIT_HASH) $(ATMOSPHERE_MAJOR_VERSION) $(ATMOSPHERE_MINOR_VERSION) $(ATMOSPHERE_MICRO_VERSION) 0 $(ATMOSPHERE_SUPPORTED_HOS_MAJOR_VERSION) $(ATMOSPHERE_SUPPORTED_HOS_MINOR_VERSION) $(ATMOSPHERE_SUPPORTED_HOS_MICRO_VERSION) 0
@echo "Built package3!"
emummc:
$(MAKE) -C $(CURRENT_DIRECTORY)/emummc all
fusee: libexosphere_boot
@$(MAKE) --no-print-directory -C $(CURRENT_DIRECTORY)/fusee -f $(CURRENT_DIRECTORY)/fusee/fusee.mk ATMOSPHERE_CPU="$(strip $(ATMOSPHERE_BOOT_CPU))"
exosphere: libexosphere libexosphere_boot
@$(MAKE) --no-print-directory -C $(CURRENT_DIRECTORY)/exosphere -f $(CURRENT_DIRECTORY)/exosphere/exosphere.mk ATMOSPHERE_CHECKED_LIBEXOSPHERE=1 ATMOSPHERE_CHECKED_BOOT_LIBEXOSPHERE=1
stratosphere: fusee libstratosphere
@$(MAKE) --no-print-directory -C $(CURRENT_DIRECTORY)/stratosphere -f $(CURRENT_DIRECTORY)/stratosphere/stratosphere.mk ATMOSPHERE_CHECKED_LIBSTRATOSPHERE=1 ATMOSPHERE_CHECKED_FUSEE=1
mesosphere: libmesosphere
@$(MAKE) --no-print-directory -C $(CURRENT_DIRECTORY)/mesosphere -f $(CURRENT_DIRECTORY)/mesosphere/mesosphere.mk ATMOSPHERE_CHECKED_LIBMESOSPHERE=1
troposphere:
$(MAKE) -C $(CURRENT_DIRECTORY)/troposphere all
libexosphere:
@$(MAKE) --no-print-directory -C $(ATMOSPHERE_LIBRARIES_DIR)/libexosphere -f $(ATMOSPHERE_LIBRARIES_DIR)/libexosphere/libexosphere.mk
ifneq ($(strip $(ATMOSPHERE_LIBRARY_DIR)),$(strip $(ATMOSPHERE_BOOT_LIBRARY_DIR)))
libexosphere_boot:
@$(MAKE) --no-print-directory -C $(ATMOSPHERE_LIBRARIES_DIR)/libexosphere -f $(ATMOSPHERE_LIBRARIES_DIR)/libexosphere/libexosphere.mk ATMOSPHERE_CPU="$(strip $(ATMOSPHERE_BOOT_CPU))"
else
libexosphere_boot: libexosphere
endif
libmesosphere:
@$(MAKE) --no-print-directory -C $(ATMOSPHERE_LIBRARIES_DIR)/libmesosphere -f $(ATMOSPHERE_LIBRARIES_DIR)/libmesosphere/libmesosphere.mk
libstratosphere:
@$(MAKE) --no-print-directory -C $(ATMOSPHERE_LIBRARIES_DIR)/libstratosphere -f $(ATMOSPHERE_LIBRARIES_DIR)/libstratosphere/libstratosphere.mk
clean:
$(MAKE) -C $(CURRENT_DIRECTORY)/fusee -f $(CURRENT_DIRECTORY)/fusee/fusee.mk clean ATMOSPHERE_CPU="$(strip $(ATMOSPHERE_BOOT_CPU))"
$(MAKE) -C $(CURRENT_DIRECTORY)/emummc clean
$(MAKE) -C $(CURRENT_DIRECTORY)/exosphere -f $(CURRENT_DIRECTORY)/exosphere/exosphere.mk clean
$(MAKE) -C $(CURRENT_DIRECTORY)/mesosphere -f $(CURRENT_DIRECTORY)/mesosphere/mesosphere.mk clean
$(MAKE) -C $(CURRENT_DIRECTORY)/stratosphere -f $(CURRENT_DIRECTORY)/stratosphere/stratosphere.mk clean
$(MAKE) -C $(CURRENT_DIRECTORY)/troposphere clean
$(MAKE) -C $(ATMOSPHERE_LIBRARIES_DIR)/libstratosphere -f $(ATMOSPHERE_LIBRARIES_DIR)/libstratosphere/libstratosphere.mk clean
$(MAKE) -C $(ATMOSPHERE_LIBRARIES_DIR)/libmesosphere -f $(ATMOSPHERE_LIBRARIES_DIR)/libmesosphere/libmesosphere.mk clean
$(MAKE) -C $(ATMOSPHERE_LIBRARIES_DIR)/libexosphere -f $(ATMOSPHERE_LIBRARIES_DIR)/libexosphere/libexosphere.mk clean
$(MAKE) -C $(ATMOSPHERE_LIBRARIES_DIR)/libexosphere -f $(ATMOSPHERE_LIBRARIES_DIR)/libexosphere/libexosphere.mk clean ATMOSPHERE_CPU="$(strip $(ATMOSPHERE_BOOT_CPU))"
rm -rf $(CURRENT_DIRECTORY)/$(ATMOSPHERE_OUT_DIR)
$(CURRENT_DIRECTORY)/$(ATMOSPHERE_OUT_DIR) $(CURRENT_DIRECTORY)/$(ATMOSPHERE_BUILD_DIR):
@[ -d $@ ] || mkdir -p $@
.PHONY: dist dist-no-debug clean package3 emummc fusee stratosphere mesosphere exosphere troposphere

View File

@ -1,5 +0,0 @@
BCT0
[stage1]
stage2_path = fusee-secondary.bin
stage2_addr = 0xF0000000
stage2_entrypoint = 0xF0000000

View File

@ -1,4 +0,0 @@
[config]
hbl_tid=010000000000100D
hbl_path=atmosphere/hbl.nsp
override_key=!R

View File

@ -1,24 +0,0 @@
/*
* Copyright (c) 2018 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ATMOSPHERE_VERSION_H
#define ATMOSPHERE_VERSION_H
#define ATMOSPHERE_RELEASE_VERSION_MAJOR 0
#define ATMOSPHERE_RELEASE_VERSION_MINOR 7
#define ATMOSPHERE_RELEASE_VERSION_MICRO 3
#endif

View File

@ -0,0 +1,59 @@
# Key: debugmode, default: 1.
# Desc: Controls whether kernel is debug mode.
# Disabling this will break Atmosphere.
# Key: debugmode_user, default: 0.
# Desc: Controls whether userland is debug mode.
# Key: disable_user_exception_handlers, default: 0.
# Desc: Controls whether user exception handlers are executed on error.
# NOTE: This will cause atmosphere to not fail gracefully.
# Support may not be provided to users tho disable these.
# If you do not know what you are doing, leave them on.
# Key: enable_user_pmu_access, default: 0.
# Desc: Controls whether userland has access to the PMU registers.
# NOTE: It is unknown what effects this has on official code.
# Key: blank_prodinfo_sysmmc, default: 0.
# Desc: Controls whether PRODINFO should be blanked in sysmmc.
# This will cause the system to see dummied out keys and
# serial number information.
# NOTE: This is not known to be safe, as data may be
# cached elsewhere in the system. Usage is not encouraged.
# Key: blank_prodinfo_emummc, default: 0.
# Desc: Controls whether PRODINFO should be blanked in emummc.
# NOTE: This is not known to be safe, as data may be
# cached elsewhere in the system. Usage is not encouraged.
# Key: allow_writing_to_cal_sysmmc, default: 0.
# Desc: Controls whether PRODINFO can be written by homebrew in sysmmc.
# NOTE: Usage of this setting is strongly discouraged without
# a safe backup elsewhere. Turning this on will also cause Atmosphere
# to ensure a safe backup of calibration data is stored in unused
# mmc space, encrypted to prevent detection. This backup can be used
# to prevent unrecoverable edits in emergencies.
# Key: log_port, default: 0.
# Desc: Controls what uart port exosphere will set up for logging.
# NOTE: 0 = UART-A, 1 = UART-B, 2 = UART-C, 3 = UART-D
# Key: log_baud_rate, default: 115200
# Desc: Controls the baud rate exosphere will set up for logging.
# NOTE: 0 is treated as equivalent to 115200.
# Key: log_inverted, default: 0.
# Desc: Controls whether the logging uart port is inverted.
[exosphere]
debugmode=1
debugmode_user=0
disable_user_exception_handlers=0
enable_user_pmu_access=0
blank_prodinfo_sysmmc=0
blank_prodinfo_emummc=0
allow_writing_to_cal_sysmmc=0
log_port=0
log_baud_rate=115200
log_inverted=0

View File

@ -0,0 +1 @@
^http*

View File

@ -0,0 +1,21 @@
[hbl_config]
; Program Specific Config
; Up to 8 program-specific configurations can be set.
; These use `program_id_#`, `override_address_space_#`, and `override_key_#`
; where # is in range [0,7].
; program_id_0=010000000000100D
; override_address_space=39_bit
; override_key_0=!R
; Any Application Config
; Note that this will only apply to program IDs that
; are both applications and not specified above
; by a program specific config.
; override_any_app=true
; override_any_app_key=R
; override_any_app_address_space=39_bit
; path=atmosphere/hbl.nsp
[default_config]
; override_key=!L
; cheat_enable_key=!L

View File

@ -0,0 +1,4 @@
[stratosphere]
; To force-enable nogc, add nogc = 1
; To force-disable nogc, add nogc = 0

View File

@ -0,0 +1,82 @@
[eupld]
; Disable uploading error reports to Nintendo
; upload_enabled = u8!0x0
[usb]
; Enable USB 3.0 superspeed for homebrew
; 0 = USB 3.0 support is system default (usually disabled), 1 = USB 3.0 support is enabled.
; usb30_force_enabled = u8!0x0
[ro]
; Control whether RO should ease its validation of NROs.
; (note: this is normally not necessary, and ips patches can be used.)
; ease_nro_restriction = u8!0x1
[lm]
; Control whether lm should log to the SD card.
; Note that this setting does nothing when log manager is not enabled.
; enable_sd_card_logging = u8!0x1
; Control the output directory for SD card logs.
; Note that this setting does nothing when log manager is not enabled/sd card logging is not enabled.
; sd_card_log_output_directory = str!atmosphere/binlogs
; Atmosphere custom settings
[erpt]
; Control whether erpt reports should always be preserved, instead of automatically cleaning periodically.
; disable_automatic_report_cleanup = u8!0x0
[atmosphere]
; Reboot from fatal automatically after some number of milliseconds.
; If field is not present or 0, fatal will wait indefinitely for user input.
; fatal_auto_reboot_interval = u64!0x0
; Make the power menu's "reboot" button reboot to payload.
; Set to "normal" for normal reboot, "rcm" for rcm reboot.
; power_menu_reboot_function = str!payload
; Controls whether dmnt cheats should be toggled on or off by
; default. 1 = toggled on by default, 0 = toggled off by default.
; dmnt_cheats_enabled_by_default = u8!0x1
; Controls whether dmnt should always save cheat toggle state
; for restoration on new game launch. 1 = always save toggles,
; 0 = only save toggles if toggle file exists.
; dmnt_always_save_cheat_toggles = u8!0x0
; Enable writing to BIS partitions for HBL.
; This is probably undesirable for normal usage.
; enable_hbl_bis_write = u8!0x0
; Enable reading the CAL0 partition for HBL.
; This is probably undesirable for normal usage.
; enable_hbl_cal_read = u8!0x0
; Controls whether fs.mitm should redirect save files
; to directories on the sd card.
; 0 = Do not redirect, 1 = Redirect.
; NOTE: EXPERIMENTAL
; If you do not know what you are doing, do not touch this yet.
; fsmitm_redirect_saves_to_sd = u8!0x0
; Controls whether am sees system settings "DebugModeFlag" as
; enabled or disabled.
; 0 = Disabled (not debug mode), 1 = Enabled (debug mode)
; enable_am_debug_mode = u8!0x0
; Controls whether dns.mitm is enabled
; 0 = Disabled, 1 = Enabled
; enable_dns_mitm = u8!0x1
; Controls whether dns.mitm uses the default redirections in addition to
; whatever is specified in the user's hosts file.
; 0 = Disabled (use hosts file contents), 1 = Enabled (use defaults and hosts file contents)
; add_defaults_to_dns_hosts = u8!0x1
; Controls whether dns.mitm logs to the sd card for debugging
; 0 = Disabled, 1 = Enabled
; enable_dns_mitm_debug_log = u8!0x0
; Controls whether htc is enabled
; 0 = Disabled, 1 = Enabled
; enable_htc = u8!0x0
; Controls whether atmosphere's log manager is enabled
; Note that this setting is ignored (and treated as 1) when htc is enabled.
; 0 = Disabled, 1 = Enabled
; enable_log_manager = u8!0x0
; Controls whether the bluetooth pairing database is redirected to the SD card (shared across sysmmc/all emummcs)
; NOTE: On <13.0.0, the database size was 10 instead of 20; booting pre-13.0.0 will truncate the database.
; 0 = Disabled, 1 = Enabled
; enable_external_bluetooth_db = u8!0x0
[hbloader]
; Controls the size of the homebrew heap when running as applet.
; If set to zero, all available applet memory is used as heap.
; The default is zero.
; applet_heap_size = u64!0x0
; Controls the amount of memory to reserve when running as applet
; for usage by other applets. This setting has no effect if
; applet_heap_size is non-zero. The default is 0x8600000.
; applet_heap_reservation_size = u64!0x8600000

View File

@ -1,6 +1,26 @@
# Building Atmosphère
The process for building Atmosphère is similar to building Fusée Gelée payloads and other Switch apps.
Building Atmosphère is a very straightforward process that relies almost exclusively on tools provided by the [devkitPro](https://devkitpro.org) organization.
In order to build Atmosphère you must have devkitARM and devkitA64 installed on your computer. You can find instructions on how to install and setup devkitARM and devkitA64 on various OSes [here](https://devkitpro.org/wiki/Getting_Started).
## Dependencies
+ [devkitA64](https://devkitpro.org)
+ [devkitARM](https://devkitpro.org)
+ [Python 2](https://www.python.org) (Python 3 may work as well, but this is not guaranteed)
+ [LZ4](https://pypi.org/project/lz4)
+ [PyCryptodome](https://pypi.org/project/pycryptodome) (optional)
+ [hactool](https://github.com/SciresM/hactool)
Once you have finished installing devkitARM and devkitA64, simply clone the Atmosphère repo, change to it and run `make`.
## Instructions
1. Follow the guide located [here](https://devkitpro.org/wiki/Getting_Started) to install and configure all the tools necessary for the build process.
2. Install the following packages via (dkp-)pacman:
+ `switch-dev`
+ `switch-glm`
+ `switch-libjpeg-turbo`
+ `devkitARM`
+ `devkitarm-rules`
+ `hactool`
3. Install the following library via python's package manager `pip`, required by [exosphere](components/exosphere.md):
+ `lz4`
4. Finally, clone the Atmosphère repository and run `make` under its root directory.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,103 @@
exosphere, storage requirements:
Nonvolatile memory:
0xE000
Volatile memory: 0x2000
Physical Address Space:
-0x7C010000-0x7C012000 - boot code/volatile memory
-0x7C012000-0x7C01E000 - program region
-0x7C01E000-0x7C01F000 - global data/context
-0x7C01F000-0x7C020000 - L2/L3 page table
-0x7C020000-0x7C040000 - Mariko-only program region
-0x7C040000-0x7C048000 - Mariko-only program stack
-0x7C048000-0x7C050000 - Reserved Mariko TZRAM (SE context carveouts, etc)
Virtual Address Space:
L1: 0x40 bytes.
L1 Entries:
-0 (0x000000000-0x040000000): Empty
-1 (0x040000000-0x080000000): Identity Mapping/Empty
-2 (0x080000000-0x0C0000000): DRAM Mapping/Empty
-3 (0x0C0000000-0x100000000): DRAM Mapping/Empty
-4 (0x100000000-0x140000000): Empty
-5 (0x140000000-0x180000000): Empty
-6 (0x180000000-0x1C0000000): Empty
-7 (0x1C0000000-0x200000000): Virtual Region
L2 Page and L3 page are both0x7C01F000
L2 Entries:
-0x040000000 (Identity IRAM Table)
- Entry Used: 0x000
-0x07C000000 (Identity TZRAM Table)
- Entry Used: 0x1E0
-0x1F0000000 (Virtual Region Table)
- Entry Used: 0x180
L3 Entries:
- Identity TZRAM mapping (0x7C010000-0x7C020000)
- Entry Used: 0x010-0x01F
- Identity IRAM mapping (0x40020000-0x40040000)
- Entry Used: 0x020-0x03F
- Virtual Device region (0x1F0040000-0x1F0080000)
- Entry Used: 0x040-0x07F
- Read Only TZRAM Alias (0x1F00A0000-0x1F00B0000)
- Entry Used: 0x0A0-0x0AF
- Program region (0x1F00C0000-0x1F00CC000)
- Entry Used: 0x0C0-0x0CB
- Mariko Program region (0x1F00D0000-0x1F00F0000)
- Entry Used: 0x0D0-0x0EF
- Mariko Program stack (0x1F00F4000-0x1F00FC000)
- Entry Used: 0x0F4-0x0FB
- Secure DRAM Storage (0x1F0100000-0x1F0110000)
- Entry Used: 0x100-0x10F
- Debug DRAM Storage (0x1F0110000-0x1F0114000)
- Entry Used: 0x110-0x113
- SC7 IRAM Work Space (0x1F0120000-0x1F0130000)
- Entry Used: 0x120-0x12F
- SC7 IRAM Firmware (0x1F0140000-0x1F0141000)
- Entry Used: 0x140-0x140
- Debug Code (0x1F0150000-0x1F0154000)
- Entry Used: 0x150-0x153
- Reserved For Debug (0x1F0160000-0x1F0170000)
- Entry Used: 0x160-0x16F
- Boot Code (0x1F01C0000-0x1F01C2000)
- Entry Used: 0x1C0-0x1C1
- AMS IRAM Page (0x1F01F2000-0x1F01F2000)
- Entry Used: 0x1F2-0x1F2
- AMS User Page (0x1F01F4000-0x1F01F4000)
- Entry Used: 0x1F4-0x1F4
- SMC User Page (0x1F01F6000-0x1F01F6000)
- Entry Used: 0x1F6-0x1F6
- Volatile (Data) (0x1F01F8000-0x1F01F9000)
- Entry Used: 0x1F8-0x1F8
- Volatile (Stacks) (0x1F01FA000-0x1F01FB000)
- Entry Used: 0x1FA-0x1FA
- Global Data (0x1F01FC000-0x1F01FD000)
NV Global Data needs:
Exosphere + Emummc Config (<=0x200)
Boot Config[0x400]
RSA Context(0x100)
Old Device Keys[0x20][0x10];
Old Master Keys[0x20][0x10];
Imported Rsa Keys[4][0x200];
CPU Ctx[4][0x100];
Total: 0x1700
Global Data Page (accessible via X18):
0x000-0x200: Exosphere Config
0x200-0x400: Emummc Config
0x400-0x800: Sealed AES Keys
0x800-0xC00: Boot Config
0xC00-0xFFF: CPU contexts. Can be replaced, but this fits exactly so minimizes program space waste.
Volatile Global Data needs:
Random Cache 0x400 bytes

View File

@ -0,0 +1,4 @@
# emummc
emummc is a collaborative project that provides eMMC storage emulation.
Please refer to the project's repository [here](https://github.com/m4xw/emuMMC) for detailed instructions and documentation.

View File

@ -1,10 +1,76 @@
# Exosphère
Exosphère is a reimplementation of Arm's TrustZone (TZ), also known as Secure Monitor (Secure_Monitor.bin). It has the highest privilege mode available on the Switchs processor, and has access to everything on the console.
Exosphère will potentially play a big role in Jamais Vu and Déja Vu, which are upcoming software exploits for the Switch, allowing one to launch Atmosphère on a Fusée-Gélee patched (ipatched) Switch console, and will also enable one to launch into CFW directly from the Switch itself without the use of any sort of external device, such as a computer or RCM jig, provided they are on a low enough system firmware.
## TrustZone/Secure Monitor
TrustZone is responsible for all the cryptographic operations on the Switch. The idea behind the way it operates is that all the keys stay in the TrustZone, and userspace only gets "handles" to them. This would make sure that keydata never leaks and is kept secure. It also has a few more responsibilities, such as power management, providing a source of random numbers, and providing access to various pieces of information that are stored in the fuses.
# exosphère
exosphère is a customized reimplementation of the Horizon OS's Secure Monitor.
The Secure Monitor follows the same design principle as Arm's TrustZone and both terms can be used interchangeably in this context. It runs at the highest privilege mode (EL3) available to the main processor and is responsible for all the sensitive cryptographic operations needed by the system as well as power management for each CPU.
## Extensions
Exosphère currently only contains one extension, an SMC allowing homebrew to find which version of Atmosphère is currently running, in order to find out what extensions are allowed to be used.
exosphère expands the original Secure Monitor design by providing custom SMCs (Secure Monitor Calls) necessary to the homebrew ecosystem. Currently, these are:
```
uint32_t smc_ams_iram_copy(smc_args_t *args);
uint32_t smc_ams_write_address(smc_args_t *args);
uint32_t smc_ams_get_emummc_config(smc_args_t *args);
```
Additionally, exosphère expands the functionality of two SMCs provided by the Horizon OS for getting/setting configuration items. The following custom configuration items are provided by exosphère:
```
CONFIGITEM_EXOSPHERE_VERSION = 65000,
CONFIGITEM_NEEDS_REBOOT = 65001,
CONFIGITEM_NEEDS_SHUTDOWN = 65002,
CONFIGITEM_EXOSPHERE_VERHASH = 65003,
CONFIGITEM_HAS_RCM_BUG_PATCH = 65004,
CONFIGITEM_SHOULD_BLANK_PRODINFO = 65005,
CONFIGITEM_ALLOW_CAL_WRITES = 65006,
```
### smc_ams_iram_copy
This function implements a copy of up to one page between DRAM and IRAM. Its arguments are:
```
args->X[1] = DRAM address (translated by kernel), must be 4-byte aligned.
args->X[2] = IRAM address, must be 4-byte aligned.
args->X[3] = Size (must be <= 0x1000 and 4-byte aligned).
args->X[4] = 0 for read, 1 for write.
```
### smc_ams_write_address
This function implements a write to a DRAM page. Its arguments are:
```
args->X[1] = Virtual address, must be size-bytes aligned and readable by EL0.
args->X[2] = Value.
args->X[3] = Size (must be 1, 2, 4, or 8).
```
### smc_ams_get_emummc_config
This function retrieves configuration for the current [emummc](emummc.md) context. Its arguments are:
```
args->X[1] = MMC id, must be size-bytes aligned and readable by EL0.
args->X[2] = Pointer to output (for paths for filebased + nintendo dir), must be at least 0x100 bytes.
```
### CONFIGITEM_EXOSPHERE_VERSION
This custom configuration item gets information about the current exosphere version.
### CONFIGITEM_NEEDS_REBOOT
This custom configuration item is used to issue a system reboot into RCM or into a warmboot payload leveraging a secondary vulnerability to achieve code execution from warm booting.
### CONFIGITEM_NEEDS_SHUTDOWN
This custom configuration item is used to issue a system shutdown with a warmboot payload leveraging a secondary vulnerability to achieve code execution from warm booting.
### CONFIGITEM_EXOSPHERE_VERHASH
This custom configuration item gets information about the current exosphere git commit hash.
### CONFIGITEM_HAS_RCM_BUG_PATCH
This custom configuration item gets whether the unit has the CVE-2018-6242 vulnerability patched.
### CONFIGITEM_SHOULD_BLANK_PRODINFO
This custom configuration item gets whether the unit should simulate a "blanked" PRODINFO. See [here](../features/configurations.md) for more information.
### CONFIGITEM_ALLOW_CAL_WRITES
This custom configuration item gets whether the unit should allow writing to the calibration partition.
## lp0fw
This is a small, built-in payload that is responsible for waking up the system during a warm boot.
## sc7fw
This is a small, built-in payload that is responsible for putting the system to sleep during a warm boot.
## rebootstub
This is a small, built-in payload that provides functionality to reboot the system into any payload of choice.

8
docs/components/fusee.md Normal file
View File

@ -0,0 +1,8 @@
# fusée
fusée is a custom bootloader used to start the Atmosphère environment.
## fusée
fusée is the first piece of Atmosphère's code that runs on the hardware.
It is distributed as a standalone payload designed to be launched via RCM by abusing the CVE-2018-6242 vulnerability.
This payload is responsible for all the low-level hardware initialization required by the Nintendo Switch, setting up the cryptosystem, mounting/emulating the eMMC, injecting/patching system modules, and launching the exosphère component.

View File

@ -1,26 +0,0 @@
# BCT.ini
BCT.ini is the configuration file used by fusée-primary and fusée-secondary. It is read by fusee-primary.bin to setup and boot fusee-secondary.bin and is also read by fusee-secondary.bin to configure Exosphère or to specify the environment it should boot.
## Configuration
This file is located at the root of your SD.
```
BCT0
[stage1]
stage2_path = fusee-secondary.bin
stage2_addr = 0xF0000000
stage2_entrypoint = 0xF0000000
```
Add the following lines and replace the `X` according to the following list if you have trouble booting past the firmware version detection.
`target_firmware` is the OFW major version.
```
[exosphere]
target_firmware = X
```
```
1.0.0 = 1
2.X.X = 2
3.X.X = 3
4.X.X = 4
5.X.X = 5
6.0.0 = 6
```

View File

@ -1,20 +0,0 @@
# Fusée
Fusée (not to be confused with Fusée Gelée) is a custom bootloader needed to start Atmosphère and replaces Nintendo's Package1loader/bootloader. It currently utilizes the [Tegra X1 RCM Vulnerability](https://nvidia.custhelp.com/app/answers/detail/a_id/4660/~/security-notice%3A-nvidia-tegra-rcm-vulnerability) in order to function.
Fusée is split into two separate parts: fusée-primary and fusée-secondary. This is due to the RCM Vulnerability only allowing payloads of a limited filesize to be sent to the device.
As of June 2018, there are new Switch systems being sold that prevent Fusée (or any payload that requires the Fusée Gelée exploit) from working due to having an ipatched bootrom. All ipatched systems share the HAC-S-JXE-C3 product code. While Fusée cannot work on these ipatched units, they still come on firmware 4.1.0, which is vulnerable to the upcoming Déja Vu software exploit. Note that if you update past 4.1.0 on one of these ipatched units, your odds of being able to install Atmosphère or run any homebrew become practically non-existent.
Additionally, a hardware revision of the Switch known as “Mariko” is believed to be in development. No such units have been seen in stores yet, but it is expected Nintendo will roll them out silently. The Mariko units will most likely patch the bootrom vulnerability Fusée Gelée, which is currently used to access CFW, and will likely have their own proprietary bootloader.
## Fusée-Primary
Fusée-primary is the payload file (fusee-primary.bin) sent to the Switch from an external device. Once sent, fusée-primary makes initial preparations before loading fusée-secondary from the Switchs SD Card.
Fusée-primary can be configured via the [BCT.ini](../fusee/BCT.md) file located on the Switchs SD card.
## Fusée-Secondary
Fusée-secondary is a payload file that stays on the root of the Switchs SD Card (fusee-secondary.bin). It is automatically launched once fusée-primary has finished, and is responsible for preparing the Switchs hardware for future running environments, such as the homebrew menu. Fusée-secondary is also responsible for validating and launching Exosphère.
Fusée-secondary contains various [.kip modules](/docs/main.md#modules). These modules modify existing features in the OS, and can also add new ones.
Fusée is also capable of chainloading other payloads such as Linux.

View File

@ -0,0 +1,11 @@
# libraries
This is a collection of libraries for doing operating system development for the Nintendo Switch.
## libmesosphere
libmesosphere is a work-in-progress C++ library implementing functionality for the Horizon Kernel.
## libstratosphere
libstratosphere is a work-in-progress C++ library for development of system modules for the Nintendo Switch.
## libvapours
Common boilerplate code for various purposes.

View File

@ -0,0 +1,3 @@
# mesosphère
mesosphère is a work in progress customized kernel reimplementation.
The Horizon OS's kernel follows microkernel design principles and runs at the EL1 level. It is currently subdivided into a loader (kernel_ldr) and the main kernel code.

View File

@ -0,0 +1,40 @@
# ams_mitm
This module provides methods to intercept services provided by other system modules. It is further sub-divided according to the service it targets.
## bpc_mitm
bpc_mitm enables intercepting requests to power control services. It currently intercepts:
+ `am` system module (to intercept the Reboot/Power buttons in the overlay menu)
+ `fatal` system module (to simplify payload reboot logic significantly)
+ [nx-hbloader](https://github.com/switchbrew/nx-hbloader) (to allow homebrew to take advantage of the feature)
## fs_mitm
fs_mitm enables intercepting file system operations. It can deny, delay, replace, or redirect any request made to the file system. It enables LayeredFS to function, which allows for replacement of game assets.
## hid_mitm
hid_mitm enables intercepting requests to controller device services. It is currently disabled by default. If enabled, it intercepts:
+ [nx-hbloader](https://github.com/switchbrew/nx-hbloader) (to help homebrew not need to be recompiled due to a breaking change introduced in the past)
Note that hid_mitm is currently deprecated and might be removed entirely in the future.
## ns_mitm
ns_mitm enables intercepting requests to application control services. It currently intercepts:
+ Web Applets (to facilitate nx-hbloader web browser launching)
## set_mitm
set_mitm enables intercepting requests to the system settings service. It currently intercepts:
+ `ns` system module and games (to allow for overriding game locales)
+ All firmware debug settings requests (to allow modification of system settings not directly exposed to the user)
### Firmware Version
set_mitm intercepts the `GetFirmwareVersion` command, if the requester is `qlaunch` or `maintenance`.
It modifies the `display_version` field of the returned system version, causing the version to display
in settings as `#.#.#|AMS #.#.#|?` with `? = S` when running under system eMMC or `? = E` when running under emulated eMMC. This allows users to easily verify what version of Atmosphère and what eMMC environment they are running.
### System Settings
set_mitm intercepts the `GetSettingsItemValueSize` and `GetSettingsItemValue` commands for all requesters.
It does so in order to enable user configuration of system settings, which are parsed from `/atmosphere/system_settings.ini` on boot. See [here](../../features/configurations.md) for more information on the system settings format.
## dns_mitm
dns_mitm enables intercepting requests to dns resolution services, to enable redirecting requests for specified hostnames.
For documentation, see [here](../../features/dns_mitm.md).

View File

@ -0,0 +1,4 @@
# boot
This module is a reimplementation of the Horizon OS's `boot` system module, which is responsible for initializing and configuring hardware.
Atmosphère's reimplementation displays its own black and white splash screen and battery icons as replacements for the original assets used during display initialization.

View File

@ -0,0 +1,4 @@
# boot2
This module is a reimplementation of the Horizon OS's `boot2` system module, which is responsible for launching all the other necessary system modules.
Atmosphère's reimplementation allows launching user provided system modules from the SD card. See [here](../../features/configurations.md) for more information.

View File

@ -0,0 +1,4 @@
# creport
This module is a reimplementation of the Horizon OS's `creport` system module, which is responsible for managing crash reports.
Atmosphère's reimplementation redirects writing of generated crash reports to the SD card under the folder `/atmosphere/crash_reports/`. It also prevents the automatic uploading of said crash reports.

View File

@ -0,0 +1,42 @@
# dmnt
This module is a reimplementation of the Horizon OS's `dmnt` system module, which provides a debug monitor.
## Extensions
Atmosphère implements an extension to provide cheat code functionality.
### Cheat Service
A HIPC service API is provided for interacting with the cheat code manager through the service `dmnt:cht`. See [here](../../features/cheats.md) for more information on the cheat code format.
The SwIPC definition for `dmnt:cht` follows:
```
interface ams::dmnt::cheat::CheatService is dmnt:cht {
[65000] HasCheatProcess() -> sf::Out<bool> out;
[65001] GetCheatProcessEvent() -> sf::OutCopyHandle out_event;
[65002] GetCheatProcessMetadata() -> sf::Out<CheatProcessMetadata> out_metadata;
[65003] ForceOpenCheatProcess();
[65004] PauseCheatProcess();
[65005] ResumeCheatProcess();
[65100] GetCheatProcessMappingCount() -> sf::Out<u64> out_count;
[65101] GetCheatProcessMappings(u64 offset) -> sf::OutArray<MemoryInfo> &mappings, sf::Out<u64> out_count;
[65102] ReadCheatProcessMemory(u64 address, u64 out_size) -> sf::OutBuffer &buffer;
[65103] WriteCheatProcessMemory(sf::InBuffer &buffer, u64 address, u64 in_size);
[65104] QueryCheatProcessMemory(u64 address) -> sf::Out<MemoryInfo> mapping;
[65200] GetCheatCount() -> sf::Out<u64> out_count;
[65201] GetCheats(u64 offset) -> sf::OutArray<CheatEntry> &cheats, sf::Out<u64> out_count;
[65202] GetCheatById(u32 cheat_id) -> sf::Out<CheatEntry> cheat;
[65203] ToggleCheat(u32 cheat_id);
[65204] AddCheat(CheatDefinition &cheat, bool enabled) -> sf::Out<u32> out_cheat_id;
[65205] RemoveCheat(u32 cheat_id);
[65206] ReadStaticRegister(u8 which) -> sf::Out<u64> out;
[65207] WriteStaticRegister(u8 which, u64 value);
[65208] ResetStaticRegisters();
[65300] GetFrozenAddressCount() -> sf::Out<u64> out_count;
[65301] GetFrozenAddresses(u64 offset) ->sf::OutArray<FrozenAddressEntry> &addresses, sf::Out<u64> out_count;
[65302] GetFrozenAddress(u64 address) -> sf::Out<FrozenAddressEntry> entry;
[65303] EnableFrozenAddress(u64 address, u64 width) -> sf::Out<u64> out_value;
[65304] DisableFrozenAddress(u64 address);
}
```

View File

@ -0,0 +1,4 @@
# eclct.stub
This module is a reimplementation of the Horizon OS's `eclct` system module, which collects error reports.
Atmosphère's reimplementation is a stub to remove any and all functionality pertaining to error report collection.

View File

@ -0,0 +1,4 @@
# erpt
This module is a reimplementation of the Horizon OS's `erpt` system module, which is responsible for managing error reports.
Atmosphère's reimplementation redirects writing of generated error reports to the SD card under the folder `/atmosphere/erpt_reports/`.

View File

@ -0,0 +1,4 @@
# fatal
This module is a reimplementation of the Horizon OS's `fatal` system module, which is responsible for managing fatal reports.
Atmosphère's reimplementation prevents error report creation and draws a custom error screen, showing registers and a backtrace. It also attempts to gather debugging info for any and all crashes and tries to save reports to the SD card under the folder `/atmosphere/fatal_reports/`.

View File

@ -0,0 +1,4 @@
# jpegdec
This module is a reimplementation of the Horizon OS's `jpegdec` system module, which is responsible for JPEG format decoding.
Atmosphère's reimplementation allows two sessions instead of 1, so homebrew can use it for software JPEG decoding in addition to the OS itself.

View File

@ -0,0 +1,106 @@
# loader
This module is a reimplementation of the Horizon OS's `ldr` system module, which is responsible for creating processes from executable NSO images and registering their access control.
## Extensions
Atmosphère extends this module to allow executables to be replaced or patched by files stored on the SD card. Note that a few services are required for SD card access and therefore cannot be replaced or patched in this manner.
### Exefs Replacement
Atmosphère's reimplementation allows replacing executable files in the file system.
#### Partition Replacement
It is possible to replace the full exefs partition at once with a PFS0 file. In that case, Atmosphère will load the following file:
```
/atmosphere/contents/<program id>/exefs.nsp
```
#### File Replacement
When a process is created, loader will search for several NSO filenames in the program's exefs directory.
These filenames are, in this order:
- rtld
- main
- subsdk0
- subsdk1
- ...
- subsdk9
- sdk
Each NSO that is found will be loaded into the process contiguously. The process's entrypoint is at the first NSO to be loaded, usually `rtld` or `main`.
Additionally, when a process is loaded, loader will search for a `main.npdm` file in the exefs directory specifying the program's permissions.
Atmosphère extends this functionality by also searching for these files on the SD card. When searching for a file, loader will first check if it exists on the SD card. If it does, that file will be used instead. Otherwise, it will use the copy located in the exefs, if that is present. The following directory will be searched:
```
/atmosphere/contents/<program id>/exefs/
```
This allows the replacement of applets, system modules, or even games with homebrew versions.
##### File Stubbing
In order to prevent an NSO from being loaded even if it exists in the exefs, loader will also check if a stub file exists. If such a file exists, the NSO will not be loaded. The files should be named like `rtld.stub`, `main.stub`, etc. and may be empty.
##### Technical Semantics
loader's semantics for content override can (as you may observe from reading the above) be complicated to understand. The following is an abbreviated description of the very technical semantics by which loader decides what content to read when trying to read a file for a program id.
* If an external content filesystem exists for the program id, the external content filesystem is used directly with no further redirection.
* Otherwise, if the program ID is being overridden with [nx-hbloader](https://github.com/switchbrew/nx-hbloader/releases) (see Homebrew Support below), the nsp filesystem for hbl is used directly with no further redirection.
* Otherwise, if content redirection is enabled for the program ID (controlled by a configurable button combination) and a loose file exists on the SD card, the loose file is used.
* Otherwise, if a stub file exists, a "Not Found" error is returned.
* Otherwise, if an SD card executable filesystem ("exefs.nsp") exists, it is used without further redirection.
* Finally, the "real"/base code file system is used without further redirection.
In addition, there are a few other technical details relevant to Atmosphere's redirection:
* When overriding with nx-hbloader, the real code filesystem must exist. When "main.npdm" (a program capabilities descriptor file) is read, the content from the real code filesystem is read in order to determine whether an applet or an application is being overridden. This allows nx-hbloader to automatically support both applet and application environments.
* When overriding applications, the real code filesystem must exist and contain valid content. This is required to perform accurate-to-Nintendo content verification procedures.
* When programs are launched, both a program id and a "storage id" are specified by the launch requester. When the storage id specified is "none" (normally always invalid), Atmosphere assumes that a custom system module is attempting to be launched. This removes the aforementioned requirement on base content validity; the above procedure is still used to determine how to redirect content, however reads to the "real"/base code file system may return "Not Found" errors if the real/base code file system does not exist.
### NSO Patching
When an NSO is loaded, Atmosphère's reimplementation will search for IPS patch files on the SD card in the following locations.
```
/atmosphere/exefs_patches/<patchset name>/<nso build id>.ips
```
This organization allows patch sets affecting multiple NSOs to be distributed as a single directory and also allows patches from multiple patch sets to be stacked. Patches will be searched for in each patch set directory. The name of each patch file should match the hexadecimal build ID of the NSO to affect, except that trailing zero bytes may be left off. Because the NSO build ID is unique for every NSO, this means patches will only apply to the files they are meant to apply to.
Patch files are accepted in either IPS format or IPS32 format.
Because NSO files are compressed, patch files are not made between the original version of a compressed NSO and the modified version of such an NSO. Instead, they are made between the uncompressed version of an NSO and the modified (and still uncompressed) version of that NSO. This also means that a patch file cannot be manually applied to the compressed version of an NSO; it must be applied to the uncompressed version. Atmosphère's reimplementation will correctly apply these patches while loading the process regardless of whether the NSO it finds is compressed or not.
When authoring patches, [hactool](https://github.com/SciresM/hactool) can be used to find an NSO's build ID and to uncompress NSOs. Recent versions of the [ReSwitched IDA loaders](https://github.com/reswitched/loaders) can be used to load uncompressed NSOs into IDA in such a way that you can [apply patches to the input file](https://www.hex-rays.com/products/ida/support/idadoc/1618.shtml). From there, any IPS tool can be used to create the patch between the original NSO and the patched NSO. Note that if the NSO you are patching is larger than 16 MiB, you will have to use a tool that supports IPS32.
### Homebrew Support
Atmosphère provides first class support for [nx-hbloader](https://github.com/switchbrew/nx-hbloader/releases) and [nx-hbmenu](https://github.com/switchbrew/nx-hbmenu/releases).
Launching of the nx-hbloader process is controlled by configurable button inputs. See [here](../../features/configurations.md) for more detailed information.
In addition, loader has extensions to enable homebrew to launch web applets. This normally requires the application launching the applet to have HTML Manual content inside an installed NCA. Atmosphère's reimplementation will automatically ensure that the commands used to check this succeed, and will redirect the relevant file system to the `/atmosphere/hbl_html/` subdirectory.
### IPC Commands
Atmosphère's reimplementation extends the HIPC loader services' API with several custom commands.
The SwIPC definition for the `ldr:pm` extension commands follows:
```
interface ams::ldr::pm::ProcessManagerInterface is ldr:pm {
...
[65000] AtmosphereHasLaunchedProgram(ncm::ProgramId program_id) -> sf::Out<bool> out;
[65001] AtmosphereGetProgramInfo(ncm::ProgramLocation &loc) -> sf::Out<ProgramInfo> out_program_info, sf::Out<cfg::OverrideStatus> out_status;
[65002] AtmospherePinProgram(ncm::ProgramLocation &loc, cfg::OverrideStatus &override_status) -> sf::Out<PinId> out_id;
}
```
The SwIPC definition for the `ldr:dmnt` extension commands follows:
```
interface ams::ldr::dmnt::DebugMonitorInterface is ldr:dmnt {
...
[65000] AtmosphereHasLaunchedProgram(ncm::ProgramId program_id) -> sf::Out<bool> out;
}
```
The SwIPC definition for the `ldr:shel` extension commands follows:
```
interface ams::ldr::shell::ShellInterface is ldr:shel {
...
[65000] AtmosphereRegisterExternalCode(ncm::ProgramId program_id) -> sf::OutMoveHandle out;
[65001] AtmosphereUnregisterExternalCode(ncm::ProgramId program_id);
}
```

View File

@ -0,0 +1,4 @@
# ncm
This module is a reimplementation of the Horizon OS's `ncm` system module, which is responsible for content management.
Atmosphère's reimplementation is currently opt-in only. See [here](../../features/configurations.md) for more information.

View File

@ -0,0 +1,4 @@
# pgl
This module is a reimplementation of the Horizon OS's `pgl` system module, which is responsible for launching programs and was introduced by firmware version `10.0.0`.
Currently, Atmosphère's reimplementation doesn't backport this module's functionalities to firmware versions lower than `10.0.0`.

View File

@ -0,0 +1,30 @@
# pm
This module is a reimplementation of the Horizon OS's `pm` system module, which is responsible for tracking running processes on the system, and managing resource limits.
## Extensions
Atmosphère extends this module with extra IPC commands and memory restriction changes.
### IPC Commands
Atmosphère's reimplementation extends the HIPC loader services' API with several custom commands.
The SwIPC definition for the `pm:dmnt` extension commands follows:
```
interface ams::pm::dmnt::DebugMonitorServiceBase is pm:dmnt {
...
[65000] AtmosphereGetProcessInfo(os::ProcessId process_id) -> sf::OutCopyHandle out_process_handle, sf::Out<ncm::ProgramLocation> out_loc, sf::Out<cfg::OverrideStatus> out_status;
[65001] AtmosphereGetCurrentLimitInfo(u32 group, u32 resource) -> sf::Out<s64> out_cur_val, sf::Out<s64> out_lim_val;
}
```
The SwIPC definition for the `pm:info` extension commands follows:
```
interface ams::pm::info::InformationService is pm:info {
...
[65000] AtmosphereGetProcessId(ncm::ProgramId program_id) -> sf::Out<os::ProcessId> out;
[65001] AtmosphereHasLaunchedProgram(ncm::ProgramId program_id) -> sf::Out<bool> out;
[65002] AtmosphereGetProcessInfo(os::ProcessId process_id) -> sf::Out<ncm::ProgramLocation> out_loc, sf::Out<cfg::OverrideStatus> out_status;
}
```
### Extra System Memory
Atmosphère's reimplementation shrinks the APPLET memory pool by 24 MiB by default, giving this memory to the SYSTEM pool. This allows custom system modules to use more memory without hitting the SYSTEM memory limit.

View File

@ -0,0 +1,16 @@
# ro
This module is a reimplementation of the Horizon OS's `ro` system module, which is responsible for loading dynamic libraries and was introduced by firmware version `3.0.0`.
Atmosphère's reimplementation backports this module's functionalities to firmware versions lower than `3.0.0` where said functionalities were provided by the `ldr` system module instead.
## Extensions
Atmosphère extends this module to allow libraries to be patched by files stored on the SD card.
### NRO Patching
When an NRO is loaded, Atmosphère's reimplementation will search for IPS patch files on the SD card in the following locations.
```
/atmosphere/nro_patches/<patchset name>/<nro build id>.ips
```
This organization allows patch sets affecting multiple NROs to be distributed as a single directory. Patches will be searched for in each patch set directory. The name of each patch file should match the hexadecimal build ID of the NRO to affect, except that trailing zero bytes may be left off. Because the NRO build ID is unique for every NRO, this means patches will only apply to the files they are meant to apply to.
Patch files are accepted in either IPS format or IPS32 format.

View File

@ -0,0 +1,47 @@
# sm
This module is a reimplementation of the Horizon OS's `sm` system module, which is responsible for service management.
## Extensions
Atmosphère extends this module with extra IPC commands and new services.
### Debug Monitor
Atmosphère's reimplementation provides an interface `sm:dmnt` to allow a debug monitor to query the service manager's state.
The SwIPC definition for `sm:dmnt` follows:
```
interface ams::sm::DmntService is sm:dmnt {
[65000] AtmosphereGetRecord(ServiceName service) -> sf::Out<ServiceRecord> record;
[65001] AtmosphereListRecords(u64 offset) -> sf::OutArray<ServiceRecord> &records, sf::Out<u64> out_count;
[65002] AtmosphereGetRecordSize() -> sf::Out<u64> record_size;
}
```
### IPC Commands
Atmosphère's reimplementation extends the HIPC loader services' API with several custom commands.
The SwIPC definition for the `sm:` extension commands follows:
```
interface ams::sm::UserService is sm: {
...
[65000] AtmosphereInstallMitm(ServiceName service) -> sf::OutMoveHandle srv_h, sf::OutMoveHandle qry_h;
[65001] AtmosphereUninstallMitm(ServiceName service);
[65002] Deprecated_AtmosphereAssociatePidTidForMitm();
[65003] AtmosphereAcknowledgeMitmSession(ServiceName service) -> sf::Out<MitmProcessInfo> client_info, sf::OutMoveHandle fwd_h;
[65004] AtmosphereHasMitm(ServiceName service) -> sf::Out<bool> out;
[65005] AtmosphereWaitMitm(ServiceName service);
[65006] AtmosphereDeclareFutureMitm(ServiceName service);
[65100] AtmosphereHasService(ServiceName service) -> sf::Out<bool> out;
[65101] AtmosphereWaitService(ServiceName service);
}
```
The SwIPC definition for the `sm:m` extension commands follows:
```
interface ams::sm::ManagerService is sm:m {
...
[65000] AtmosphereEndInitDefers(os::ProcessId process_id, sf::InBuffer &acid_sac, sf::InBuffer &aci_sac);
[65001] AtmosphereHasMitm(ServiceName service) -> sf::Out<bool> out;
[65002] AtmosphereRegisterProcess(os::ProcessId process_id, ncm::ProgramId program_id, cfg::OverrideStatus override_status, sf::InBuffer &acid_sac, sf::InBuffer &aci_sac);
}
```

View File

@ -0,0 +1,2 @@
# spl
This module is a reimplementation of the Horizon OS's `spl` system module, which is responsible for providing secure platform services such as cryptographic operations.

View File

@ -1,10 +1,21 @@
# Stratosphère
Stratosphère allows customization of the Horizon OS and Switch kernel. It includes custom sysmodules that extend the kernel and provide new features. It also includes a reimplementation of the loader sysmodules to hook important system actions.
# stratosphère
stratosphère provides customization of the Horizon OS at the system level. This includes a reimplementation of several system modules and additional, custom system modules that extend or add a variety of features.
The sysmodules that Stratosphère includes are:
+ [boot](../modules/boot.md): This module boots the system and initalizes hardware.
+ [creport](../modules/creport.md): Reimplementation of Nintendos crash report system. Dumps all error logs to the SD card instead of saving them to the NAND and sending them to Nintendo.
+ [fs_mitm](../modules/fs_mitm.md): This module can log, deny, delay, replace, and redirect any request made to the File System.
+ [loader](../modules/loader.md): Enables modifying the code of binaries that are not stored inside the kernel.
+ [pm](../modules/pm.md): Reimplementation of Nintendos Process Manager.
+ [sm](../modules/sm.md): Reimplementation of Nintendos Service Manager.
## Modules
The modules currently provided by stratosphère are:
+ [ams_mitm](modules/ams_mitm.md)
+ [boot](modules/boot.md)
+ [boot2](modules/boot2.md)
+ [creport](modules/creport.md)
+ [dmnt](modules/dmnt.md)
+ [eclct.stub](modules/eclct.stub.md)
+ [erpt](modules/erpt.md)
+ [fatal](modules/fatal.md)
+ [jpegdec](modules/jpegdec.md)
+ [loader](modules/loader.md)
+ [ncm](modules/ncm.md)
+ [pgl](modules/pgl.md)
+ [pm](modules/pm.md)
+ [ro](modules/ro.md)
+ [sm](modules/sm.md)
+ [spl](modules/spl.md)

View File

@ -1,6 +1,3 @@
# Thermosphère
Thermosphère is a hypervisor based implementation of emuNAND. An emuNAND is a copy of the firmware on the Switchs internal memory (sysNAND), and is typically installed on an external SD Card.
An emuNAND operates completely independently of the sysNAND. This allows one to make or test various modifications and homebrew safely without needing to restore their NAND backup afterwards by testing things on the emuNAND, and switching back to the sysNAND when finished. In the case of past Nintendo systems such as the 3DS, an emuNAND could also be used to update your system to the latest firmware while keeping your sysNAND on a lower version, however this may be more difficult to do on the Switch due to Nintendo using efuse technology for major system updates.
Thermosphère is currently planned to be included in the 1.0 release of Atmosphère.
# thermosphère
thermosphère is a work in progress hypervisor implementation.
This aims to provide functionality at the EL2 level which remains unused by the Horizon OS.

View File

@ -1,2 +1,5 @@
# Troposphère
Troposphère contains various application-level modifications to the OS, such as launching homebrew directly from the homemenu or executing cheat/gameshark codes, similar to Luma3DS. Troposphère is not yet implemented in Atmosphère.
# troposphère
troposphère provides customization of the Horizon OS at the application level.
## reboot_to_payload
Sample application to perform a system reboot into a payload of choice.

18
docs/faq.md Normal file
View File

@ -0,0 +1,18 @@
# Frequently Asked Questions
This document serves as a place to store answers for common questions received about Atmosphère.
## What does "June 15th" mean?
When Atmosphère began development in February 2018, "June 15" was given as the estimate/target date for a first release, to coincide with the planned disclosure of a vulnerability.
This deadline was missed, hard.
People made rather a lot of fun of me (SciresM) for this.
Several months later, when the first Atmosphère release occurred, I captioned it "Happy June 15th!" and pretended like I hadn't missed the first deadline.
This amused me a lot, and so the practice has been kept up for every single release since.
Depending on who you ask, you may be told that this is a dumb joke and it is not funny.
This is incorrect. It is definitely a dumb joke, but it is also hilarious.

512
docs/features/cheats.md Normal file
View File

@ -0,0 +1,512 @@
# Cheats
Atmosphère supports Action-Replay style cheat codes, with cheats loaded off of the SD card.
## Cheat Loading Process
By default, Atmosphère will do the following when deciding whether to attach to a new application process:
+ Retrieve information about the new application process from `pm` and `loader`.
+ Check whether a user-defined key combination is held, and stop if not.
+ This defaults to "L is not held", but can be configured with override keys.
+ The ini key to configure this is `cheat_enable_key`.
+ Check whether the process is a real application, and stop if not.
+ This guards against applying cheat codes to the Homebrew Loader.
+ Attempt to load cheats from `/atmosphere/contents/<program_id>/cheats/<build_id>.txt`, where `build_id` is the hexadecimal representation of the first 8 bytes of the application's main executable's build id.
+ If no cheats are found, then the cheat manager will stop.
+ Open a kernel debug session for the new application process.
+ Signal to a system event that a new cheat process has been attached to.
This behavior ensures that cheat codes are only loaded when the user would want them to.
In cases where `dmnt` has not activated the cheat manager, but the user wants to make it do so anyway, the cheat manager's service API provides a `ForceOpenCheatProcess` command that homebrew can use. This command will cause the cheat manager to try to force itself to attach to the process.
In cases where `dmnt` has activated the cheat manager, but the user wants to use an alternate debugger, the cheat manager's service API provides a `ForceCloseCheatProcess` command that homebrew can use. This command will cause the cheat manager to detach itself from the process.
By default, all cheat codes listed in the loaded .txt file will be toggled on. This is configurable by the user by editing the `atmosphere!dmnt_cheats_enabled_by_default` [system setting](configurations.md).
Users may use homebrew programs to toggle cheats on and off at runtime via the cheat manager's service API.
## Cheat Code Compatibility
Atmosphère manages cheat code through the execution of a small, custom virtual machine. Care has been taken to ensure that Atmosphère's cheat code format is fully backwards compatible with the pre-existing cheat code format, though new features have been added and bugs in the pre-existing cheat code applier have been fixed. Here is a short summary of the changes from the pre-existing format:
+ A number of bugs were fixed in the processing of conditional instructions.
+ The pre-existing implementation was fundamentally broken, and checked for the wrong value when detecting the end of a conditional block.
+ The pre-existing implementation also did not properly decode instructions, and instead linearly scanned for the terminator value. This caused problems if an instruction happened to encode a terminator inside its immediate values.
+ The pre-existing implementation did not bounds check, and thus certain conditional cheat codes could cause it to read out-of-bounds memory, and potentially crash due to a data abort.
+ Support was added for nesting conditional blocks.
+ An instruction was added to perform much more complex arbitrary arithmetic on two registers.
+ An instruction was added to allow writing the contents of register to a memory address specified by another register.
+ The pre-existing implementation did not correctly synchronize with the application process, and thus would cause heavy lag under certain circumstances (especially around loading screens). This has been fixed in Atmosphère's implementation.
## Cheat Code Format
The following provides documentation of the instruction format for the virtual machine used to manage cheat codes.
Typically, instruction type is encoded in the upper nybble of the first instruction u32.
### Code Type 0x0: Store Static Value to Memory
Code type 0x0 allows writing a static value to a memory address.
#### Encoding
`0TMR00AA AAAAAAAA VVVVVVVV (VVVVVVVV)`
+ T: Width of memory write (1, 2, 4, or 8 bytes).
+ M: Memory region to write to (0 = Main NSO, 1 = Heap, 2 = Alias, 3 = Aslr, 4 = non-relative).
+ R: Register to use as an offset from memory region base.
+ A: Immediate offset to use from memory region base.
+ V: Value to write.
---
### Code Type 0x1: Begin Conditional Block
Code type 0x1 performs a comparison of the contents of memory to a static value.
If the condition is not met, all instructions until the appropriate End or Else conditional block terminator are skipped.
#### Encoding
`1TMCXrAA AAAAAAAA VVVVVVVV (VVVVVVVV)`
+ T: Width of memory read (1, 2, 4, or 8 bytes).
+ M: Memory region to read from (0 = Main NSO, 1 = Heap, 2 = Alias, 3 = Aslr, 4 = non-relative).
+ C: Condition to use, see below.
+ X: Operand Type, see below.
+ r: Offset Register (operand types 1).
+ A: Immediate offset to use from memory region base.
+ V: Value to compare to.
#### Conditions
+ 1: >
+ 2: >=
+ 3: <
+ 4: <=
+ 5: ==
+ 6: !=
#### Operand Type
+ 0: Memory Base + Relative Offset
+ 1: Memory Base + Offset Register + Relative Offset
---
### Code Type 0x2: End Conditional Block
Code type 0x2 marks the end of a conditional block (started by Code Type 0x1 or Code Type 0x8).
When an Else is executed, all instructions until the appropriate End conditional block terminator are skipped.
#### Encoding
`2X000000`
+ X: End type (0 = End, 1 = Else).
---
### Code Type 0x3: Start/End Loop
Code type 0x3 allows for iterating in a loop a fixed number of times.
#### Start Loop Encoding
`300R0000 VVVVVVVV`
+ R: Register to use as loop counter.
+ V: Number of iterations to loop.
#### End Loop Encoding
`310R0000`
+ R: Register to use as loop counter.
---
### Code Type 0x4: Load Register with Static Value
Code type 0x4 allows setting a register to a constant value.
#### Encoding
`400R0000 VVVVVVVV VVVVVVVV`
+ R: Register to use.
+ V: Value to load.
---
### Code Type 0x5: Load Register with Memory Value
Code type 0x5 allows loading a value from memory into a register, either using a fixed address or by dereferencing the destination register.
#### Load From Fixed Address Encoding
`5TMR00AA AAAAAAAA`
+ T: Width of memory read (1, 2, 4, or 8 bytes).
+ M: Memory region to write to (0 = Main NSO, 1 = Heap, 2 = Alias, 3 = Aslr, 4 = non-relative).
+ R: Register to load value into.
+ A: Immediate offset to use from memory region base.
#### Load from Register Address Encoding
`5T0R10AA AAAAAAAA`
+ T: Width of memory read (1, 2, 4, or 8 bytes).
+ R: Register to load value into. (This register is also used as the base memory address).
+ A: Immediate offset to use from register R.
#### Load from Register Address Encoding
`5T0R2SAA AAAAAAAA`
+ T: Width of memory read (1, 2, 4, or 8 bytes).
+ R: Register to load value into.
+ S: Register to use as the base memory address.
+ A: Immediate offset to use from register R.
#### Load From Fixed Address Encoding with offset register
`5TMR3SAA AAAAAAAA`
+ T: Width of memory read (1, 2, 4, or 8 bytes).
+ M: Memory region to write to (0 = Main NSO, 1 = Heap, 2 = Alias, 3 = Aslr, 4 = non-relative).
+ R: Register to load value into.
+ S: Register to use as offset register.
+ A: Immediate offset to use from memory region base.
---
### Code Type 0x6: Store Static Value to Register Memory Address
Code type 0x6 allows writing a fixed value to a memory address specified by a register.
#### Encoding
`6T0RIor0 VVVVVVVV VVVVVVVV`
+ T: Width of memory write (1, 2, 4, or 8 bytes).
+ R: Register used as base memory address.
+ I: Increment register flag (0 = do not increment R, 1 = increment R by T).
+ o: Offset register enable flag (0 = do not add r to address, 1 = add r to address).
+ r: Register used as offset when o is 1.
+ V: Value to write to memory.
---
### Code Type 0x7: Legacy Arithmetic
Code type 0x7 allows performing arithmetic on registers.
However, it has been deprecated by Code type 0x9, and is only kept for backwards compatibility.
#### Encoding
`7T0RC000 VVVVVVVV`
+ T: Width of arithmetic operation (1, 2, 4, or 8 bytes).
+ R: Register to apply arithmetic to.
+ C: Arithmetic operation to apply, see below.
+ V: Value to use for arithmetic operation.
#### Arithmetic Types
+ 0: Addition
+ 1: Subtraction
+ 2: Multiplication
+ 3: Left Shift
+ 4: Right Shift
---
### Code Type 0x8: Begin Keypress Conditional Block
Code type 0x8 enters or skips a conditional block based on whether a key combination is pressed.
#### Encoding
`8kkkkkkk`
+ k: Keypad mask to check against, see below.
Note that for multiple button combinations, the bitmasks should be ORd together.
#### Keypad Values
Note: This is the direct output of `hidKeysDown()`.
+ 0000001: A
+ 0000002: B
+ 0000004: X
+ 0000008: Y
+ 0000010: Left Stick Pressed
+ 0000020: Right Stick Pressed
+ 0000040: L
+ 0000080: R
+ 0000100: ZL
+ 0000200: ZR
+ 0000400: Plus
+ 0000800: Minus
+ 0001000: Left
+ 0002000: Up
+ 0004000: Right
+ 0008000: Down
+ 0010000: Left Stick Left
+ 0020000: Left Stick Up
+ 0040000: Left Stick Right
+ 0080000: Left Stick Down
+ 0100000: Right Stick Left
+ 0200000: Right Stick Up
+ 0400000: Right Stick Right
+ 0800000: Right Stick Down
+ 1000000: SL
+ 2000000: SR
---
### Code Type 0x9: Perform Arithmetic
Code type 0x9 allows performing arithmetic on registers.
#### Register Arithmetic Encoding
`9TCRS0s0`
+ T: Width of arithmetic operation (1, 2, 4, or 8 bytes).
+ C: Arithmetic operation to apply, see below.
+ R: Register to store result in.
+ S: Register to use as left-hand operand.
+ s: Register to use as right-hand operand.
#### Immediate Value Arithmetic Encoding
`9TCRS100 VVVVVVVV (VVVVVVVV)`
+ T: Width of arithmetic operation (1, 2, 4, or 8 bytes).
+ C: Arithmetic operation to apply, see below.
+ R: Register to store result in.
+ S: Register to use as left-hand operand.
+ V: Value to use as right-hand operand.
#### Arithmetic Types
+ 0: Addition
+ 1: Subtraction
+ 2: Multiplication
+ 3: Left Shift
+ 4: Right Shift
+ 5: Logical And
+ 6: Logical Or
+ 7: Logical Not (discards right-hand operand)
+ 8: Logical Xor
+ 9: None/Move (discards right-hand operand)
+ 10: Float Addition, T==4 single T==8 double
+ 11: Float Subtraction, T==4 single T==8 double
+ 12: Float Multiplication, T==4 single T==8 double
+ 13: Float Division, T==4 single T==8 double
---
### Code Type 0xA: Store Register to Memory Address
Code type 0xA allows writing a register to memory.
#### Encoding
`ATSRIOxa (aaaaaaaa)`
+ T: Width of memory write (1, 2, 4, or 8 bytes).
+ S: Register to write to memory.
+ R: Register to use as base address.
+ I: Increment register flag (0 = do not increment R, 1 = increment R by T).
+ O: Offset type, see below.
+ x: Register used as offset when O is 1, Memory type when O is 3, 4 or 5.
+ a: Value used as offset when O is 2, 4 or 5.
#### Offset Types
+ 0: No Offset
+ 1: Use Offset Register
+ 2: Use Fixed Offset
+ 3: Memory Region + Base Register
+ 4: Memory Region + Relative Address (ignore address register)
+ 5: Memory Region + Relative Address + Offset Register
---
### Code Type 0xB: Reserved
Code Type 0xB is currently reserved for future use.
---
### Code Type 0xC-0xF: Extended-Width Instruction
Code Types 0xC-0xF signal to the VM to treat the upper two nybbles of the first dword as instruction type, instead of just the upper nybble.
This reserves an additional 64 opcodes for future use.
---
### Code Type 0xC0: Begin Register Conditional Block
Code type 0xC0 performs a comparison of the contents of a register and another value. This code support multiple operand types, see below.
If the condition is not met, all instructions until the appropriate conditional block terminator are skipped.
#### Encoding
```
C0TcSX##
C0TcS0Ma aaaaaaaa
C0TcS1Mr
C0TcS2Ra aaaaaaaa
C0TcS3Rr
C0TcS400 VVVVVVVV (VVVVVVVV)
C0TcS5X0
```
+ T: Width of memory write (1, 2, 4, or 8 bytes).
+ c: Condition to use, see below.
+ S: Source Register.
+ X: Operand Type, see below.
+ M: Memory Type (operand types 0 and 1).
+ R: Address Register (operand types 2 and 3).
+ a: Relative Address (operand types 0 and 2).
+ r: Offset Register (operand types 1 and 3).
+ X: Other Register (operand type 5).
+ V: Value to compare to (operand type 4).
#### Operand Type
+ 0: Memory Base + Relative Offset
+ 1: Memory Base + Offset Register
+ 2: Register + Relative Offset
+ 3: Register + Offset Register
+ 4: Static Value
+ 5: Other Register
#### Conditions
+ 1: >
+ 2: >=
+ 3: <
+ 4: <=
+ 5: ==
+ 6: !=
---
### Code Type 0xC1: Save or Restore Register
Code type 0xC1 performs saving or restoring of registers.
#### Encoding
`C10D0Sx0`
+ D: Destination index.
+ S: Source index.
+ x: Operand Type, see below.
#### Operand Type
+ 0: Restore register
+ 1: Save register
+ 2: Clear saved value
+ 3: Clear register
---
### Code Type 0xC2: Save or Restore Register with Mask
Code type 0xC2 performs saving or restoring of multiple registers using a bitmask.
#### Encoding
`C2x0XXXX`
+ x: Operand Type, see below.
+ X: 16-bit bitmask, bit i == save or restore register i.
#### Operand Type
+ 0: Restore register
+ 1: Save register
+ 2: Clear saved value
+ 3: Clear register
---
### Code Type 0xC3: Read or Write Static Register
Code type 0xC3 reads or writes a static register with a given register.
#### Encoding
`C3000XXx`
+ XX: Static register index, 0x00 to 0x7F for reading or 0x80 to 0xFF for writing.
+ x: Register index.
---
### Code Type 0xC4: Begin Extended Keypress Conditional Block
Code type 0xC4 enters or skips a conditional block based on whether a key combination is pressed.
#### Encoding
`C4r00000 kkkkkkkk kkkkkkkk`
+ r: Auto-repeat, see below.
+ kkkkkkkkkk: Keypad mask to check against output of `hidKeysDown()`.
Note that for multiple button combinations, the bitmasks should be OR'd together.
#### Auto-repeat
+ 0: The conditional block executes only once when the keypad mask matches. The mask must stop matching to reset for the next trigger.
+ 1: The conditional block executes as long as the keypad mask matches.
#### Keypad Values
Note: This is the direct output of `hidKeysDown()`.
+ 00000000 00000001: A
+ 00000000 00000002: B
+ 00000000 00000004: X
+ 00000000 00000008: Y
+ 00000000 00000010: Left Stick Pressed
+ 00000000 00000020: Right Stick Pressed
+ 00000000 00000040: L
+ 00000000 00000080: R
+ 00000000 00000100: ZL
+ 00000000 00000200: ZR
+ 00000000 00000400: Plus
+ 00000000 00000800: Minus
+ 00000000 00001000: Left
+ 00000000 00002000: Up
+ 00000000 00004000: Right
+ 00000000 00008000: Down
+ 00000000 00010000: Left Stick Left
+ 00000000 00020000: Left Stick Up
+ 00000000 00040000: Left Stick Right
+ 00000000 00080000: Left Stick Down
+ 00000000 00100000: Right Stick Left
+ 00000000 00200000: Right Stick Up
+ 00000000 00400000: Right Stick Right
+ 00000000 00800000: Right Stick Down
+ 00000000 01000000: SL Left Joy-Con
+ 00000000 02000000: SR Left Joy-Con
+ 00000000 04000000: SL Right Joy-Con
+ 00000000 08000000: SR Right Joy-Con
+ 00000000 10000000: Top button on Poké Ball Plus (Palma) controller
+ 00000000 20000000: Verification
+ 00000000 40000000: B button on Left NES/HVC controller in Handheld mode
+ 00000000 80000000: Left C button in N64 controller
+ 00000001 00000000: Up C button in N64 controller
+ 00000002 00000000: Right C button in N64 controller
+ 00000004 00000000: Down C button in N64 controller
### Code Type 0xF0: Double Extended-Width Instruction
Code Type 0xF0 signals to the VM to treat the upper three nybbles of the first dword as instruction type, instead of just the upper nybble.
This reserves an additional 16 opcodes for future use.
---
### Code Type 0xFF0: Pause Process
Code type 0xFF0 pauses the current process.
#### Encoding
`FF0?????`
---
### Code Type 0xFF1: Resume Process
Code type 0xFF1 resumes the current process.
#### Encoding
`FF1?????`
---
### Code Type 0xFFF: Debug Log
Code type 0xFFF writes a debug log to the SD card under the folder `/atmosphere/cheat_vm_logs/`.
#### Encoding
```
FFFTIX##
FFFTI0Ma aaaaaaaa
FFFTI1Mr
FFFTI2Ra aaaaaaaa
FFFTI3Rr
FFFTI4X0
```
+ T: Width of memory write (1, 2, 4, or 8 bytes).
+ I: Log id.
+ X: Operand Type, see below.
+ M: Memory Type (operand types 0 and 1).
+ R: Address Register (operand types 2 and 3).
+ a: Relative Address (operand types 0 and 2).
+ r: Offset Register (operand types 1 and 3).
+ X: Value Register (operand type 4).
#### Operand Type
+ 0: Memory Base + Relative Offset
+ 1: Memory Base + Offset Register
+ 2: Register + Relative Offset
+ 3: Register + Offset Register
+ 4: Register Value

View File

@ -0,0 +1,125 @@
# Configurations
Atmosphère provides a variety of customizable configurations to better adjust to users' needs.
## stratosphere.ini
This is the configuration file used by fusée for configuring user-space system modules.
This file is located under the `/atmosphere/config/` folder on your SD card and a default template can be found inside the `/atmosphere/config_templates/` folder.
### Configuring "nogc" Protection
"nogc" is a feature provided by fusée-secondary which disables the Nintendo Switch's Game Card reader. Its purpose is to prevent the reader from being updated when the console has been updated, without burning fuses, from a lower firmware version. More specifically, from firmware versions 4.0.0 or 9.0.0 which introduced updates to the Game Card reader's firmware. By default, Atmosphère will protect the Game Card reader automatically, but you are free to change it.
To change its functionality, add the following line to the `stratosphere` section and change the value of `X` according to the following list:
```
[stratosphere]
nogc = X
```
```
1 = force-enable nogc, so Atmosphère will always disable the Game Card reader.
0 = force-disable nogc, so Atmosphère will always enable the Game Card reader.
```
## Adding a Custom Boot Splashscreen
Atmosphère provides its own default splashscreen which is displayed at boot time. However, this can be replaced at will.
Boot splash screens must be 1280x720 resolution.
A script can be found inside the source tree (`/utilities/insert_splash_screen.py`) for inserting a custom splash screen into a release binary.
To do so, execute the following command on the script:
`python insert_splash_screen.py <path to your splash screen image> <path to /atmosphere/package3 on your SD card>`
## emummc.ini
This is the configuration file used for the [emummc](../components/emummc.md) component.
This file is located under the `/emuMMC/` folder on your SD card.
Please refer to the project's repository [here](https://github.com/m4xw/emuMMC) for detailed instructions and documentation.
## exosphere.ini
This is the configuration file used by exosphère.
This file is located in the root of your SD card and a default template can be found inside the `/atmosphere/config_templates/` folder.
### Configuring Debugging Modes
By default, Atmosphère signals to the Horizon kernel that debugging is enabled while leaving usermode debugging disabled, but this can cause undesirable side-effects. If you wish to change this behavior, go to the `exosphere` section and change the value of `X` according to the following list.
```
[exosphere]
debugmode = X
debugmode_user = X
```
```
1 = enable
0 = disable
```
### Blanking PRODINFO
Atmosphère provides a way for users to blank their factory installed calibration data (known as PRODINFO) in either emulated or system eMMC environments. You can find more detailed information on this inside the respective template file. Usage of this configuration is not encouraged.
## override_config.ini
This file is located under the `/atmosphere/config/` folder on your SD card and a default template can be found inside the `/atmosphere/config_templates/` folder.
### Overrides Format
Overrides are parsed from the `/atmosphere/config/override_config.ini` file during the boot process.
By default `override_config.ini` is not configured. It can be used to select the behavior of certain buttons and bind them to functionalities such as launching the Homebrew Menu or enabling the cheat code manager.
You can modify the override_key entries in `override_config.ini` with this list of valid buttons:
| Formal Name | .ini Name |
| ----------- | --------- |
| A Button | A |
| B Button | B |
| X Button | X |
| Y Button | Y |
| Left Stick | LS |
| Right Stick | RS |
| L Button | L |
| R Button | R |
| ZL Button | ZL |
| ZR Button | ZR |
| + Button | PLUS |
| - Button | MINUS |
| Left Dpad | DLEFT |
| Up Dpad | DUP |
| Right Dpad | DRIGHT |
| Down Dpad | DDOWN |
| SL Button | SL |
| SR Button | SR |
To invert the behavior of the override key, place an exclamation point in front of whatever button you wish to use. It will launch the actual game while holding down that button, instead of going into the Homebrew Menu. For example, `override_key=!R` will run the game only while holding down R when launching it, otherwise it will boot into the Homebrew Menu. Afterwards you may reinsert your SD card into your Switch and boot into Atmosphère as you normally would. You should now be able to boot into the Homebrew Menu by launching your designated program of choice.
## system_settings.ini
This file is located under the `/atmosphere/config/` folder on your SD card and a default template can be found inside the `/atmosphere/config_templates/` folder.
### Settings Format
Atmosphère provides a way to override the firmware debug settings used by the system. These can be parsed from the `/atmosphere/config/system_settings.ini` file during the boot process. This file is a normal ini file, with some specific interpretations.
The standard representation of a setting's identifier takes the form `name!key`. This is represented within `system_settings.ini` as a section `name`, with an entry `key`. For example:
```
[name]
key = ...
```
Settings can have variable types (strings, integral values, byte arrays, etc). To accommodate this, `system_settings.ini` must store values as a `type_identifier!value_store` pair. A number of different types are supported, with identifiers detailed below.
Please note that a malformed value string will cause a fatal error to occur on boot. A full example of a custom setting is given below (setting `eupld!upload_enabled = 0`), for posterity:
```
[eupld]
upload_enabled = u8!0x0
```
#### Supported Types
* Strings
* Type identifiers: `str`, `string`
* The value string is used directly as the setting, with null terminator appended.
* Integral types
* Type identifiers: `u8`, `u16`, `u32`, `u64`
* The value string is parsed via a call to `strtoul(value, NULL, 0)`.
* Setting bitwidth is determined by the identifier (8 for 1 byte, 16 for 2 bytes, and so on).
* Raw bytes
* Type identifiers: `hex`, `bytes`
* The value string is parsed as a hexadecimal string.
* The value string must be of even length, or a fatal error will be thrown on parse.
## Content Specific Flags
Atmosphère supports customizing CFW behavior based on the presence of `flags` on the SD card.
The following flags are supported on a per-program basis, by placing `<flag_name>.flag` inside `/atmosphere/contents/<program_id>/flags/`:
+ `boot2`, which indicates that the program should be launched during the `boot2` process.
+ `redirect_save`, which indicates that the program wants its savedata to be redirected to the SD card.

53
docs/features/dns_mitm.md Normal file
View File

@ -0,0 +1,53 @@
# DNS.mitm
As of 0.18.0, atmosphère provides a mechanism for redirecting DNS resolution requests.
By default, atmosphère redirects resolution requests for official telemetry servers, redirecting them to a loopback address.
## Hosts files
DNS.mitm can be configured through the usage of a slightly-extended `hosts` file format, which is parsed only once on system startup.
In particular, hosts files parsed by DNS.mitm have the following extensions to the usual format:
+ `*` is treated as a wildcard character, matching any collection of 0 or more characters wherever it occurs in a hostname.
+ `%` is treated as a stand-in for the value of `nsd!environment_identifier`. This is always `lp1`, on production devices.
If multiple entries in a host file match a domain, the last-defined match is used.
Please note that homebrew may trigger a hosts file re-parse by sending the extension IPC command 65000 ("AtmosphereReloadHostsFile") to a connected `sfdnsres` session.
### Hosts file selection
Atmosphère will try to read hosts from the following file paths, in order, stopping once it successfully performs a file read:
+ (emummc only) `/atmosphere/hosts/emummc_%04lx.txt`, formatted with the emummc's id number (see `emummc.ini`).
+ (emummc only) `/atmosphere/hosts/emummc.txt`.
+ (sysmmc only) `/atmosphere/hosts/sysmmc.txt`.
+ `/atmosphere/hosts/default.txt`
If `/atmosphere/hosts/default.txt` does not exist, atmosphère will create it to contain the defaults.
### Atmosphère defaults
By default, atmosphère's default redirections are parsed **in addition to** the contents of the loaded hosts file.
This is equivalent to thinking of the loaded hosts file as having the atmosphère defaults prepended to it.
This setting is considered desirable, because it minimizes the telemetry risks if a user forgets to update a custom hosts file on a system update which changes the telemetry servers.
This behavior can be opted-out from by setting `atmosphere!add_defaults_to_dns_hosts = u8!0x0` in `system_settings.ini`.
The current default redirections are:
```
# Nintendo telemetry servers
127.0.0.1 receive-%.dg.srv.nintendo.net receive-%.er.srv.nintendo.net
```
## Debugging
On startup (or on hosts file re-parse), DNS.mitm will log both what hosts file it selected and the contents of all redirections it parses to `/atmosphere/logs/dns_mitm_startup.log`.
In addition, if the user sets `atmosphere!enable_dns_mitm_debug_log = u8!0x1` in `system_settings.ini`, DNS.mitm will log all requests to GetHostByName/GetAddrInfo to `/atmosphere/logs/dns_mitm_debug.log`. All redirections will be noted when they occur.
## Opting-out of DNS.mitm entirely
If you wish to disable DNS.mitm entirely, `system_settings.ini` can be edited to set `atmosphere!enable_dns_mitm = u8!0x0`.

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Atmosphère-NX
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,29 +1,32 @@
# Atmosphère
Atmosphère is a work-in-progress customized firmware for the Nintendo Switch. Atmosphère consists of several different components, each in charge of performing different system functions of the Nintendo Switch.
Atmosphère is a work-in-progress customized firmware for the Nintendo Switch. Its design principle consists of a multi-layered approach where each layer replaces/modifies a different component of the Nintendo Switch's system.
The components of Atmosphère are:
+ [Fusée](../docs/components/fusee/fusee.md), a custom bootloader.
+ [Exosphère](../docs/components/exosphere.md), a fully-featured custom secure monitor.
+ [Stratosphère](../docs/components/stratosphere.md), a set of custom system modules.
+ [Thermosphère](../docs/components/thermosphere.md), a hypervisor-based emuNAND implementation. This component has not been implemented yet.
+ [Troposphère](../docs/components/troposphere.md), Application-level patches to the Horizon OS. This component has also not been implemented yet.
## Components
Atmosphère provides six core components, mimicking to some degree the various layers of the Earth's atmosphere:
+ [fusée](components/fusee.md)
+ [exosphère](components/exosphere.md)
+ [thermosphère](components/thermosphere.md)
+ [mesosphère](components/mesosphere.md)
+ [stratosphère](components/stratosphere.md)
+ [troposphère](components/troposphere.md)
### Modules
The Stratosphère component of Atmosphère contains various modules. These have a `.kip` extension. They provide custom features, extend existing features, or replace Nintendo sysmodules.
Additionally, Atmosphère also provides the following secondary components:
+ [emummc](components/emummc.md)
+ [libraries](components/libraries.md)
Stratosphère's modules include:
+ [boot](../docs/modules/boot.md)
+ [creport](../docs/modules/creport.md)
+ [fs_mitm](../docs/modules/fs_mitm.md)
+ [loader](../docs/modules/loader.md)
+ [pm](../docs/modules/pm.md)
+ [sm](../docs/modules/sm.md)
## Features
Atmosphère provides several original features which add or expand functionalities for the customized firmware environment:
+ [Cheats](features/cheats.md)
+ [Configurations](features/configurations.md)
### Building Atmosphère
A guide to building Atmosphère can be found [here](../docs/building.md).
## Building Atmosphère
A guide to building Atmosphère can be found [here](building.md).
### Upcoming Features
A list of planned features for Atmosphère can be found [here](../docs/roadmap.md).
## Upcoming Features
A list of planned features for Atmosphère can be found [here](roadmap.md).
### Release History
A changelog of previous versions of Atmosphère can be found [here](../docs/changelog.md).
## Release History
A changelog of previous versions of Atmosphère can be found [here](changelog.md).
## Frequently Asked Questions
Answers to one or more frequently asked questions may be found [here](faq.md).

View File

@ -1,2 +0,0 @@
# boot
The boot module is responsible for booting the system and initalizing hardware. A second boot module known as boot2 is integrated with the [pm (process manager)](../modules/pm.md) sysmodule in Atmosphère, and launches other processes.

View File

@ -1,2 +0,0 @@
# creport
creport is a reimplementation of Nintendo's crash reporter. Atmosphère's creport catches all error logs that would have been saved to the NAND and instead saves them to the SD card for debugging purposes. This is helpful because the errors no longer go to Nintendo and developers of homebrew can still see the errors to help with the debugging process. creport catches system errors, game crashes, and homebrew crashes.

View File

@ -1,2 +0,0 @@
# fs_mitm
fs_mitm is a sysmodule that enables intercepting file system operations. This module can log, deny, delay, replace, or redirect any request made to the filesystem. It enables LayeredFS to function, which allows for game mods.

View File

@ -1,68 +0,0 @@
# loader
loader is a reimplementation of the loader sysmodule. This module is responsible for creating processes from executable NSO images and registering their access control with the kernel, sm, and fs.
## Atmosphère Extensions
Atmosphère extends this module to allow executables to be replaced or patched by files stored on the SD card. Note that a few services are required for SD card access and therefore cannot be replaced or patched in this manner. This includes psc, bus, and pcv.
### Exefs Replacement
TODO: details on buttons affecting this.
When a process is created, loader will search for several NSO filenames in the title's exefs directory.
These filenames are, in this order:
- rtld
- main
- subsdk0
- subsdk1
- ...
- subsdk9
- sdk
Each NSO that is found will be loaded into the process contiguously. The process's entrypoint is at the first NSO to be loaded, usually `rtld` or `main`.
Additionally, when a process is loaded, loader will search for a `main.npdm` file in the exefs directory specifying the title's permissions.
Atmosphère extends this functionality by also searching for these files on the SD card. When searching for a file, loader will first check if it exists on the SD card. If it does, that file will be used instead. Otherwise, it will use the copy located in the exefs, if that is present. The following directory will be searched.
```
sdmc:/atmosphere/titles/<title id>/exefs/
```
This allows the replacement of applets, sysmodules, or even games with homebrew versions.
In order to prevent an NSO from being loaded even if it exists in the exefs, loader will also check if a stub file exists. If such a file exists, the NSO will not be loaded. The files should be named like `rtld.stub`, `main.stub`, etc. and may be empty.
### NSO Patching
TODO: details on buttons affecting this.
When an NSO is loaded, the stratosphere implementatin of loader will search for IPS patch files on the SD card in the following locations.
```
sdmc:/atmosphere/exefs_patches/<patchset name>/<nso build id>.ips
```
This organization allows patchsets affecting multiple NSOs to be distributed as a single directory. Patches will be searched for in each patchset directory. The name of each patch file should match the hexadecimal build ID of the NSO to affect, except that trailing zero bytes may be left off. Because the NSO build ID is unique for every NSO, this means patches will only apply to the files they are meant to apply to.
Patch files are accepted in either IPS format or IPS32 format.
Because NSO files are compressed, patch files are not made between the original version of a compressed NSO and the modified version of such an NSO. Instead, they are made between the uncompressed version of an NSO and the modified (and still uncompressed) version of that NSO. This also means that a patch file cannot be manually applied to the compressed version of an NSO; it must be applied to the uncompressed version. The Stratosphere implementation of loader will correctly apply these patches while loading the process regardless of whether the NSO it finds is compressed or not.
When authoring patches, [hactool](https://github.com/SciresM/hactool) can be used to find an NSO's build ID and to uncompress NSOs. Recent versions of the [ReSwitched IDA loaders](https://github.com/reswitched/loaders) can be used to load uncompressed NSOs into IDA in such a way that you can [apply patches to the input file](https://www.hex-rays.com/products/ida/support/idadoc/1618.shtml). From there, any IPS tool can be used to create the patch between the original NSO and the patched NSO. Note that if the NSO you are patching is larger than 16 MiB, you will have to use a tool that supports IPS32.
### HBL Support
Atmosphère can use the loader module in order to turn any game on your Switch's home menu into a launchpoint for the Homebrew Menu, rather than launching it through the album applet. This allows one to launch the Homebrew Menu with access to the ~3.2GB of RAM that the Switch reserves for games and applications, as opposed to the 442MB of RAM we are limited to when launching the Homebrew Menu from the album. This also means that it is no longer necessary to install homebrew as `.nsp` files on your Switch so long as you are using this method, as the only reason to do so is to allow the homebrew to access all of the Switch's available memory.
In order to setup this method you will need the latest release of [hbmenu](https://github.com/switchbrew/nx-hbmenu/releases), and the latest release of [hbloader](https://github.com/switchbrew/nx-hbloader/releases). Place `hbmenu.nro` on the root of your Switch's SD Card, and place `hbl.nsp` in the atmosphere folder. From there, simply configure `loader.ini` in the atmosphere folder by replacing the Title ID in the ini (hbl_tid) (it is the Title ID for the album by default) with the Title ID of whatever game you wish to use to launch the Homebrew Menu. A list of Title IDs for Switch Games can be found [here](https://switchbrew.org/wiki/Title_list/Games). Afterwards you may reinsert your SD Card into your Switch and boot into Atmosphère as you normally would. You should now be able to boot into the Homebrew Menu by launching your designated game of choice.
### Button Overrides
By default `loader.ini` is configured to launch the Homebrew Menu when launching the game normally, and launching the game when selecting the game while holding down R. If you wish to change this, you can modify the override_key section of `loader.ini`. Placing an exclamation point in front of whatever button you wish to use will make it so that you will only launch the actual game while holding down that button, otherwise you will go into the Homebrew Menu. Removing the exclamation point will reverse this, meaning that you will boot into the Homebrew Menu only while holding down the assigned button when launching the game.
For example, `override_key=!R` will run the game only while holding down R when launching it, otherwise it will boot into the Homebrew Menu. `override_key=R` will only boot into the Homebrew Menu while holding down R when launching the game, otherwise it will launch the game as normal.
### SM MITM Integration
When the Stratosphere implementation of loader creates a new process, it notifies [sm](sm.md) through the `AtmosphereAssociatePidTidForMitm` command to notify any MITM services of new processes' identities.

View File

@ -1,23 +0,0 @@
# pm
pm is a reimplementation of Nintendo's process manager. This module is responsible for tracking running processes on the system, and managing resource limits. pm is also required to create and manage processes for homebrew applications.
## Atmosphère Extensions
There are a few ways in which the Stratosphere implementation of pm differs intentionally from the stock pm.
### IPC: AtmosphereGetProcessHandle
The Stratosphere implementation of pm adds an additional command to the [`pm:dmnt`](https://reswitched.github.io/SwIPC/ifaces.html#nn::pm::detail::IDebugMonitorInterface) interface, called `AtmosphereGetProcessHandle`. Its command ID is `65000` on all system firmware versions. It takes a `u64 process_id` and returns a process handle for the specified process, if that process is known. Notable exceptions include KIPs, which are not known to pm. If the specified process cannot be found, error code 0x20F is returned.
The SwIPC definition for this command follows.
```
interface nn::pm::detail::IDebugMonitorInterface is pm:dmnt {
...
[65000] AtmosphereGetProcessHandle(u64 pid) -> handle<copy, process> process_handle;
}
```
### Extra System Memory for Sysmodules
The Stratosphere implementation of pm shrinks the APPLET memory pool by 24 MiB by default, giving this memory to the SYSTEM pool. This allows custom sysmodules to use more memory without hitting the SYSTEM memory limit.

View File

@ -1,69 +0,0 @@
# sm
sm is a reimplementation of Nintendo's service manager. It allows Atmosphère to add or remove process handle limits, add new services, or intercept service calls. This allows high-level intercepting of Horizon OS functionality.
## Atmosphère Extensions
There are a few ways in which the Stratosphere implementation of sm differs intentionally from the stock sm.
### IPC: MITM Commands
The Stratosphere implementation of sm adds a few additional commands to the [`sm:`](https://reswitched.github.io/SwIPC/ifaces.html#nn::sm::detail::IUserInterface) port session.
Their SwIPC definitions follow.
```
interface nn::sm::detail::IUserInterface is sm: {
...
[65000] AtmosphereInstallMitm(ServiceName service) -> handle<port, move> service, handle<server_session, move> query;
[65001] AtmosphereUninstallMitm(ServiceName service);
[65002] AtmosphereAssociatePidTidForMitm(u64 pid, u64 tid);
}
```
#### AtmosphereInstallMitm
This command alters the registration for the named service, in order to allow services to intercept communication between client processes and their intended services. It is used by [fs_mitm](fs_mitm.md).
It takes the name of the service to install an MITM for, and returns two handles. The first is a port handle, similar to those returned from the [RegisterService](https://reswitched.github.io/SwIPC/ifaces.html#nn::sm::detail::IUserInterface(2)) command. The second is the server side of a session, called the query session. This session will used by sm to determine whether or not a new session should be intercepted, and to inform the MITM service of the identity of new processes.
The query session is expected to implement the following interface.
```
interface MitmQueryService {
[65000] ShouldMitm(u64 pid) -> u64 should_mitm;
[65001] AssociatePidTid(u64 pid, u64 tid);
}
```
The `ShouldMitm` command is invoked whenever a process attempts to make a new connection to the MITM'd service. It should return `0` if the process's connection should not be intercepted. Any other value will cause the process's connection to be intercepted. If the command returns an error code, the process's connection will not be intercepted.
The `AssociatePidTid` command is invoked on all MITM query sessions whenever a new process is created, in order to inform those services of the identity of a newly created process before it attempts to connect to any services.
If the process that installed the MITM attempts to connect to the service, it will always connect to the original service.
This command requires that the session be initialized, returning error code 0x415 if it is not.
If the given service name is invalid, error code 0xC15 is returned.
If the user does not have service registration permission for the named service, error code 0x1015 is returned.
If the service has not yet been registered, error code 0xE15 is returned.
If the service already has an MITM installed, error code 0x815 is returned.
#### AtmosphereUninstallMitm
Removes any installed MITM for the named service.
This command requires that the session be initialized, returning error code 0x415 if it is not.
#### AtmosphereAssociatePidTidForMitm
This command is used internally by the Stratosphere implementation of the [loader](loader.md) sysmodule, when a new process is created. It will call the `AssociatePidTid` command on every registered MITM query session.
If the given process ID refers to a kernel internal process, error code 0x1015 is returned. This command requires that the session be initialized, returning error code 0x415 if it is not.
### Minimum Session Limit
When a service is registered, the sysmodule registering it must specify a limit on the number of sessions that are allowed to be active for that service at a time. This is used to ensure that services like `fs-pr`, `fs-ldr`, and `ldr:pm` can only be connected to once, adding an additional layer of safety over the regular service verification to ensure that those services are only connected to by the highly priveleged process they are intended to be used by.
By default, the Stratosphere implementation of PM will raise any session limits to at least 8, meaning that for services like `fs-pr` and those mentioned above, up to 8 processes will be able to connect to those sessions, leaving 7 sessions for homebrew to use.
### Weak Service Verification
In system firmware versions before 3.0.1, if a process did not call the [Initialize](https://reswitched.github.io/SwIPC/ifaces.html#nn::sm::detail::IUserInterface(0)) command on its `sm:` session, normally used to inform sm of the process's identity, sm would assume that the process was a kernel internal process and skip any service registration or access checks. The Stratosphere implementation of sm reimplements this vulnerability, allowing homebrew processes to skip service registration and access checks.

View File

@ -1,16 +1,60 @@
# Planned Features
The following features are planned to be added in future versions of Atmosphère:
+ Thermosphère, a hypervisor-based emunand implementation.
+ A feature-rich debugging toolset (a component of Stratosphère).
+ A custom debug monitor system module, providing an API for debugging Switch's processes. This may not be a reimplementation of Nintendo's own debug monitor.
+ This should include a gdbstub implementation, possibly borrowing from Luma3DS's.
+ This API should be additionally usable for RAM Editing/"Cheat Engine" purposes.
+ A custom shell system module, providing an means for users to perform various RPC (with support for common/interesting functionality) on their Switch remotely. This may not be a reimplementation of Nintendo's own shell.
+ This should support client connections over both Wi-Fi and USB.
+ A custom logging system module, providing a means for other Atmosphère components (and possibly Nintendo's own system modules) to log debug output.
+ This should support logging to the SD card, over Wi-Fi, and over USB.
+ An application-level plugin system.
+ This will, ideally, work somewhat like NTR-CFW's plugin system on the 3DS, allowing users to run their own code in a game's process in their own thread.
+ An AR Code/Gameshark analog implementation, allowing for easy sharing/development of cheat codes to run on device.
+ Further extensions to existing Atmosphère components.
+ General system stability improvements to enhance the user's experience.
atmosphère has a number of features that are either works-in-progress or planned. Please note that while time-estimates are given, they are loose, and things may be completed sooner or later than advertised.
The following descriptions were last updated on January 14th, 2021
## tma reimplementation
* **Description** tma ("target manager agent") is a system module that manages communication between the Switch and a client PC. Atmosphere's implementation will allow homebrew on the switch to communicate with a connected PC to do various operations such as exchanging data or interacting with files. It will also serve as the communicator for Atmosphère's planned debugger. This will also include PC-side software for interacting with the Switch.
* **Development Status**: Planned. Switch-side code is fully implemented but needs heavy refactoring/rebasing, as the code was originally authored in 2018.
* **Estimated Time**: 2021-2022.
## dmnt.gen2 reimplementation
* **Description**: A reimplementation of the Switch's debug monitor, dmnt will provide an interface for debugging applications or system modules running on the Switch. This will include a gdbstub for debugging actively-running system components or applications.
* **Development Status**: Planned
* **Estimated Time**: 2021-2022
## fs reimplementation
* **Description**: Following mesosphère's completion, atmosphère will have reimplemented all components of the BootImagePackage firmware except for the filesystem services system module. Reimplementing fs will allow for fixing Nintendo bugs (such as corruption when using exFAT filesystems and encoding inconsistencies with UTF-8 and Shift-JIS).
* **Development Status**: Planned.
* **Estimated Time**: 2021-2022.
## settings reimplementation
* **Description**: A planned reimplementation of the settings system module, and with it a removal of the settings mitm. This will greatly simplify atmosphère's boot process, and will allow much more flexible control over the various system settings.
* **Development Status**: Pending development by Adubbz.
* **Estimated Time**: Unclear, pending developer availability.
## thermosphère
* **Description**: A general-purpose hypervisor, thermosphère will enable the virtualization of the Switch's operating system; this is planned to enable debugging of the Switch's kernel.
* **Development Status**: Pending development by TuxSH.
* **Estimated Time**: Unclear, pending developer availability.
## other planned features
* **Description**: General system stability improvements to enhance the user's experience.
* **Development Status**: Undergoing active development by all members of the atmosphère team.
* **Estimated Time**: June 15th.
# Completed features
The following features were previously included under the planned features section and are now complete.
Please note that this is not an exhaustive list of features present in atmosphère, and only serves to indicate what from the above has been completed.
## system updater homebrew
* **Description**: A user homebrew making use of the new system updater api, so that users can actually use the new api in practice.
* **Completion Time**: July 2020
## system updater api
* **Description**: A planned extension api for stratosphere (tenatively `ams:su`), this will provide an interface for homebrew to safely install system upgrades or downgrades. This will allow for much more easily transitioning safely between different versions of the operating system.
* **Completion Time**: June 2020
## exosphere re-write
* **Description**: exosphère, atmosphère's reimplementation of Horizon's Secure Monitor, was the first component authored for the project in early 2018. It is written in C, and in a style very different from the rest of atmosphère's code. In addition, exosphère was written to conform to constraints that no longer apply in an environment where it is not launched from the web browser, and where using a custom firmware image to orchestrate wake-from-sleep is possible. exosphère currently uses all but 1 KB of the space available to it, putting it at risk of breaking as future firmware updates are supported. A re-write will solve these issues.
* **Completion Time**: June 2020
## mesosphere
* **Description**: mesosphère is a reimplementation of the Horizon operating system's Kernel. It aims to provide an open-source reference for Nintendo's code.
* **Estimated Time**: September 2020
## ams-on-mariko
* **Description**: Atmosphere cannot run as-is on Mariko hardware. A large number of changes are needed in many components. Although secure monitor support is complete in exosphere, additional work is needed on the bootloader and stratosphere sides as well. Mariko support will also require further design thought; atmosphere's debugging design heavily relies on reboot-to-payload and (more generally) the ability to perform warmboot bootrom hax at will. This is not possible on Mariko, and will require a new design/software support for whatever solution is chosen.
* **Completion Time**: January 2021

9
emummc/.gitignore vendored Normal file
View File

@ -0,0 +1,9 @@
*.kip
*.data
*.elf
build
.vscode/ipch
.vscode/settings.json
*.exe
*.kip*
emummc.caps

12
emummc/.gitrepo vendored Normal file
View File

@ -0,0 +1,12 @@
; DO NOT EDIT (unless you know what you are doing)
;
; This subdirectory is a git "subrepo", and this file is maintained by the
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
;
[subrepo]
remote = https://github.com/m4xw/emummc
branch = develop
commit = a8e5f1a184aeb8ba884166a1e4f386088d4a6cf1
parent = 409c3cf9e190dbb65fe76570954939cbe8a5eca0
method = merge
cmdver = 0.4.1

35
emummc/.vscode/c_cpp_properties.json vendored Normal file
View File

@ -0,0 +1,35 @@
{
"configurations": [
{
"name": "Switch",
"includePath": [
"/opt/devkitpro/devkitA64/aarch64-none-elf/include",
"/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.3.0/include",
"${workspaceFolder}/libnx-patched/nx/include",
"/opt/devkitpro/portlibs/switch/include",
"/opt/devkitpro/portlibs/switch/include/freetype2",
"${workspaceFolder}/source",
"${workspaceFolder}/source/emmc",
"${workspaceFolder}/source/libs/fatfs",
"${workspaceFolder}/source/power",
"${workspaceFolder}/source/soc",
"${workspaceFolder}/source/utils",
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE",
"__aarch64__",
"__SWITCH__",
"INNER_HEAP_SIZE=0x80000"
],
"windowsSdkVersion": "10.0.17763.0",
"compilerPath": "/opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc",
"cStandard": "c11",
"cppStandard": "c++11",
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}

339
emummc/LICENSE vendored Normal file
View File

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

118
emummc/Makefile vendored Normal file
View File

@ -0,0 +1,118 @@
.SUFFIXES:
ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>/devkitpro")
endif
TARGET := emummc
BUILD := build
SOURCES := source/nx source source/utils source/emmc source/soc source/power source/emuMMC source/FS source/libs/fatfs
DATA := data
INCLUDES := include
EXEFS_SRC := exefs_src
ifneq ($(BUILD),$(notdir $(CURDIR)))
EMUMMCDIR ?= $(CURDIR)
else
EMUMMCDIR ?= $(CURDIR)/../
endif
include $(DEVKITPRO)/libnx/switch_rules
ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE
# Current max usage is 0x4600. (512 * 34 FatFS file objects + 1 fsync buffer).
DEFINES := -DINNER_HEAP_SIZE=0x8000
CFLAGS := -Wall -O2 -ffunction-sections -fdata-sections -Wno-unused-function \
$(ARCH) $(DEFINES)
CFLAGS += $(INCLUDE) -D__SWITCH__
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++17
ASFLAGS := -g $(ARCH)
LDFLAGS = -specs=$(EMUMMCDIR)/emummc.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
ifneq ($(BUILD),$(notdir $(CURDIR)))
export OUTPUT := $(CURDIR)/$(TARGET)
export TOPDIR := $(EMUMMCDIR)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
export DEPSDIR := $(CURDIR)/$(BUILD)
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
ifeq ($(strip $(CPPFILES)),)
export LD := $(CC)
else
export LD := $(CXX)
endif
export OFILES_BIN := $(addsuffix .o,$(BINFILES))
export OFILES_SRC := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
export OFILES := $(OFILES_BIN) $(OFILES_SRC)
export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES)))
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
-I$(CURDIR)/$(BUILD)
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
export BUILD_EXEFS_SRC := $(TOPDIR)/$(EXEFS_SRC)
ifeq ($(strip $(CONFIG_JSON)),)
jsons := $(wildcard *.json)
ifneq (,$(findstring $(TARGET).json,$(jsons)))
export APP_JSON := $(TOPDIR)/$(TARGET).json
else
ifneq (,$(findstring config.json,$(jsons)))
export APP_JSON := $(TOPDIR)/config.json
endif
endif
else
export APP_JSON := $(TOPDIR)/$(CONFIG_JSON)
endif
.PHONY: $(BUILD) clean all
all: $(BUILD)
$(BUILD):
@[ -d $@ ] || mkdir -p $@
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
clean:
@echo clean ...
@rm -fr $(BUILD) $(TARGET).elf $(TARGET).kip
else
.PHONY: all
DEPENDS := $(OFILES:.o=.d)
all : $(OUTPUT)_unpacked.kip
$(OUTPUT)_unpacked.kip : $(OUTPUT).kip
@hactool -t kip --uncompressed=$(OUTPUT)_unpacked.kip $(OUTPUT).kip
$(OUTPUT).kip : $(OUTPUT).elf
$(OUTPUT).elf : $(OFILES)
$(OFILES_SRC) : $(HFILES_BIN)
%.bin.o %_bin.h : %.bin
@echo $(notdir $<)
@$(bin2o)
-include $(DEPENDS)
endif

36
emummc/README.md vendored Normal file
View File

@ -0,0 +1,36 @@
# emuMMC
*A SDMMC driver replacement for Nintendo's Filesystem Services, by **m4xw***
### Supported Horizon Versions
**1.0.0 - 20.1.0**
## Features
* Arbitrary SDMMC backend selection
**This allows loading eMMC from SD or even SD from eMMC**
* On the fly hooking / patching, fully self-infesting
**Only one payload required for all versions!**
* File-based SDMMC backend support (from SD)
**This allows loading eMMC images from hekate-backups (split or not)**
* SDMMC device based sector offset (*currently eMMC only*)
**Raw partition support for eMMC from SD with less performance overhead**
* Full support for `/Nintendo` folder redirection to a arbitrary path
**No 8 char length restriction!**
* exosphere based context configuration
**This includes full support for multiple emuMMC images**
## Compiling
### hekate
Run `./build.sh` and copy the produced kipm (Kernel Initial Process Modification) file to `/bootloader/sys/`
### Atmosphere
Run `make`, the resulting kip can be used for code injection via fusee (place at `/atmosphere/emummc.kip`)
## License
**emuMMC is released as GPLv2**
## Credits
* **CTCaer** - The CTCaer hekate fork, file-based emuMMC support, SDMMC driver fixes among other things
* **SciresM, hexkyz** - The Atmosphere project, FS offsets, additional research related to newer FS versions
* **naehrwert** - The hekate project, its SDMMC driver and being very helpful in the early research phase
* **jakibaki** - KIP Inject PoC, used in the early dev phase
* **switchbrew/devkitPro** - devkitA64 and libnx sources

9
emummc/build.sh vendored Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
set -e
make clean
make -j
./hactool.exe -t kip emummc.kip --uncompressed emummc_unpacked.kip
python2.7 tools/kip1converter.py emummc_unpacked.kip emummc.data
cat emummc.caps emummc.data > emummc.kipm

137
emummc/emummc.json vendored Normal file
View File

@ -0,0 +1,137 @@
{
"name": "FS",
"title_id": "0x0100000000000000",
"main_thread_stack_size": "0x00008000",
"main_thread_priority": 45,
"default_cpu_id": 3,
"process_category": 1,
"kernel_capabilities": [
{
"type": "map_page",
"value": "0x60006000"
},
{
"type": "map",
"value": {
"address": "0x6000D000",
"size": "0x1000",
"is_ro": false,
"is_io": true
}
},
{
"type": "map",
"value": {
"address": "0x700b0000",
"is_ro": false,
"size": "0x00005000",
"is_io": true
}
},
{
"type": "map",
"value": {
"address": "0x7000C000",
"is_ro": false,
"size": "0x00002000",
"is_io": true
}
},
{
"type": "map",
"value": {
"address": "0x70000000",
"is_ro": false,
"size": "0x00004000",
"is_io": true
}
},
{
"type": "handle_table_size",
"value": 256
},
{
"type": "irq_pair",
"value": [
46,
47
]
},
{
"type": "irq_pair",
"value": [
51,
63
]
},
{
"type": "syscalls",
"value": {
"svcSetHeapSize": "0x01",
"svcSetMemoryPermission": "0x02",
"svcSetMemoryAttribute": "0x03",
"svcMapMemory": "0x04",
"svcUnmapMemory": "0x05",
"svcQueryMemory": "0x06",
"svcExitProcess": "0x07",
"svcCreateThread": "0x08",
"svcStartThread": "0x09",
"svcExitThread": "0x0a",
"svcSleepThread": "0x0b",
"svcGetThreadPriority": "0x0c",
"svcSetThreadPriority": "0x0d",
"svcGetThreadCoreMask": "0x0e",
"svcSetThreadCoreMask": "0x0f",
"svcGetCurrentProcessorNumber": "0x10",
"svcSignalEvent": "0x11",
"svcClearEvent": "0x12",
"svcMapSharedMemory": "0x13",
"svcUnmapSharedMemory": "0x14",
"svcCreateTransferMemory": "0x15",
"svcCloseHandle": "0x16",
"svcResetSignal": "0x17",
"svcWaitSynchronization": "0x18",
"svcCancelSynchronization": "0x19",
"svcArbitrateLock": "0x1a",
"svcArbitrateUnlock": "0x1b",
"svcWaitProcessWideKeyAtomic": "0x1c",
"svcSignalProcessWideKey": "0x1d",
"svcGetSystemTick": "0x1e",
"svcConnectToNamedPort": "0x1f",
"svcSendSyncRequestLight": "0x20",
"svcSendSyncRequest": "0x21",
"svcSendSyncRequestWithUserBuffer": "0x22",
"svcSendAsyncRequestWithUserBuffer": "0x23",
"svcGetProcessId": "0x24",
"svcGetThreadId": "0x25",
"svcBreak": "0x26",
"svcOutputDebugString": "0x27",
"svcReturnFromException": "0x28",
"svcGetInfo": "0x29",
"svcWaitForAddress": "0x34",
"svcSignalToAddress": "0x35",
"svcCreateSession": "0x40",
"svcAcceptSession": "0x41",
"svcReplyAndReceiveLight": "0x42",
"svcReplyAndReceive": "0x43",
"svcReplyAndReceiveWithUserBuffer": "0x44",
"svcCreateEvent": "0x45",
"svcReadWriteRegister": "0x4E",
"svcMapTransferMemory": "0x51",
"svcUnmapTransferMemory": "0x52",
"svcCreateInterruptEvent": "0x53",
"svcQueryIoMapping": "0x55",
"svcCreateDeviceAddressSpace": "0x56",
"svcAttachDeviceAddressSpace": "0x57",
"svcDetachDeviceAddressSpace": "0x58",
"svcMapDeviceAddressSpaceAligned": "0x5a",
"svcUnmapDeviceAddressSpace": "0x5c",
"svcGetSystemInfo": "0x6f",
"svcSetProcessMemoryPermission": "0x73",
"svcMapProcessMemory": "0x74",
"svcUnmapProcessMemory": "0x75",
"svcCallSecureMonitor": "0x7f"
}
}
]
}

201
emummc/emummc.ld vendored Normal file
View File

@ -0,0 +1,201 @@
OUTPUT_ARCH(aarch64)
ENTRY(_start)
PHDRS
{
code PT_LOAD FLAGS(5) /* Read | Execute */;
rodata PT_LOAD FLAGS(4) /* Read */;
data PT_LOAD FLAGS(6) /* Read | Write */;
dyn PT_DYNAMIC;
}
SECTIONS
{
/* =========== CODE section =========== */
PROVIDE(__start__ = 0x0);
. = __start__;
__code_start = . ;
.crt0 :
{
KEEP (*(.crt0))
. = ALIGN(8);
} :code
.init :
{
KEEP( *(.init) )
. = ALIGN(8);
} :code
.plt :
{
*(.plt)
*(.iplt)
. = ALIGN(8);
} :code
.text :
{
*(.text.unlikely .text.*_unlikely .text.unlikely.*)
*(.text.exit .text.exit.*)
*(.text.startup .text.startup.*)
*(.text.hot .text.hot.*)
*(.text .stub .text.* .gnu.linkonce.t.*)
. = ALIGN(8);
} :code
.fini :
{
KEEP( *(.fini) )
. = ALIGN(8);
} :code
/* =========== RODATA section =========== */
. = ALIGN(0x1000);
__rodata_start = . ;
.nx-module-name : { KEEP (*(.nx-module-name)) } :rodata
.rodata :
{
*(.rodata .rodata.* .gnu.linkonce.r.*)
. = ALIGN(8);
} :rodata
.eh_frame_hdr : { __eh_frame_hdr_start = .; *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) __eh_frame_hdr_end = .; } :rodata
.eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } :rodata
.gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } :rodata
.gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } : rodata
.dynamic : { *(.dynamic) } :rodata :dyn
.dynsym : { *(.dynsym) } :rodata
.dynstr : { *(.dynstr) } :rodata
.rela.dyn : { *(.rela.*) } :rodata
.interp : { *(.interp) } :rodata
.hash : { *(.hash) } :rodata
.gnu.hash : { *(.gnu.hash) } :rodata
.gnu.version : { *(.gnu.version) } :rodata
.gnu.version_d : { *(.gnu.version_d) } :rodata
.gnu.version_r : { *(.gnu.version_r) } :rodata
.note.gnu.build-id : { *(.note.gnu.build-id) } :rodata
/* =========== DATA section =========== */
. = ALIGN(0x1000);
__data_start = . ;
.eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } :data
.gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } :data
.gnu_extab : ONLY_IF_RW { *(.gnu_extab*) } : data
.exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } :data
.tdata ALIGN(8) :
{
__tdata_lma = .;
*(.tdata .tdata.* .gnu.linkonce.td.*)
. = ALIGN(8);
__tdata_lma_end = .;
} :data
.tbss ALIGN(8) :
{
*(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
. = ALIGN(8);
} :data
.preinit_array ALIGN(8) :
{
PROVIDE (__preinit_array_start = .);
KEEP (*(.preinit_array))
PROVIDE (__preinit_array_end = .);
} :data
.init_array ALIGN(8) :
{
PROVIDE (__init_array_start = .);
KEEP( *(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)) )
KEEP( *(.init_array .ctors) )
PROVIDE (__init_array_end = .);
} :data
.fini_array ALIGN(8) :
{
PROVIDE (__fini_array_start = .);
KEEP( *(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)) )
KEEP( *(.fini_array .dtors) )
PROVIDE (__fini_array_end = .);
} :data
__got_start__ = .;
.got : { *(.got) *(.igot) } :data
.got.plt : { *(.got.plt) *(.igot.plt) } :data
__got_end__ = .;
.data ALIGN(8) :
{
*(.data .data.* .gnu.linkonce.d.*)
SORT(CONSTRUCTORS)
} :data
__bss_start__ = .;
.bss ALIGN(8) :
{
*(.dynbss)
*(.bss .bss.* .gnu.linkonce.b.*)
*(COMMON)
. = ALIGN(8);
/* Reserve space for the TLS segment of the main thread */
__tls_start = .;
. += + SIZEOF(.tdata) + SIZEOF(.tbss);
__tls_end = .;
} : data
__bss_end__ = .;
__end__ = ABSOLUTE(.) ;
. = ALIGN(0x1000);
__argdata__ = ABSOLUTE(.) ;
/* ==================
==== Metadata ====
================== */
/* Discard sections that difficult post-processing */
/DISCARD/ : { *(.group .comment .note) }
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
}

8
emummc/emummc.specs vendored Normal file
View File

@ -0,0 +1,8 @@
%rename link old_link
*link:
%(old_link) -T %:getenv(TOPDIR /emummc.ld) -pie --no-dynamic-linker --spare-dynamic-tags=0 --gc-sections -z text -z nodynamic-undefined-weak --build-id=sha1 --nx-module-name
*startfile:
crti%O%s crtbegin%O%s

51
emummc/source/FS/FS.h vendored Normal file
View File

@ -0,0 +1,51 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_H__
#define __FS_H__
// TODO
#include "../emmc/sdmmc_t210.h"
#include "FS_versions.h"
#include "FS_offsets.h"
#include "FS_structs.h"
#define FS_SDMMC_EMMC 0
#define FS_SDMMC_SD 1
#define FS_SDMMC_GC 2
#define FS_EMMC_PARTITION_GPP 0
#define FS_EMMC_PARTITION_BOOT0 1
#define FS_EMMC_PARTITION_BOOT1 2
#define FS_EMMC_PARTITION_INVALID 3
#define BOOT_PARTITION_SIZE 0x2000
#define FS_READ_WRITE_ERROR 1048
#define NAND_PATROL_SECTOR 0xC20
#define NAND_PATROL_OFFSET 0x184000
typedef struct _fs_nand_patrol_t
{
uint8_t hmac[0x20];
unsigned int offset;
unsigned int count;
uint8_t rsvd[0x1D8];
} fs_nand_patrol_t;
#endif /* __FS_H__ */

304
emummc/source/FS/FS_offsets.c vendored Normal file
View File

@ -0,0 +1,304 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "FS_offsets.h"
#include "offsets/100.h"
#include "offsets/200.h"
#include "offsets/200_exfat.h"
#include "offsets/210.h"
#include "offsets/210_exfat.h"
#include "offsets/300.h"
#include "offsets/300_exfat.h"
#include "offsets/301.h"
#include "offsets/301_exfat.h"
#include "offsets/400.h"
#include "offsets/400_exfat.h"
#include "offsets/410.h"
#include "offsets/410_exfat.h"
#include "offsets/500.h"
#include "offsets/500_exfat.h"
#include "offsets/510.h"
#include "offsets/510_exfat.h"
#include "offsets/600.h"
#include "offsets/600_exfat.h"
#include "offsets/700.h"
#include "offsets/700_exfat.h"
#include "offsets/800.h"
#include "offsets/800_exfat.h"
#include "offsets/810.h"
#include "offsets/810_exfat.h"
#include "offsets/900.h"
#include "offsets/900_exfat.h"
#include "offsets/910.h"
#include "offsets/910_exfat.h"
#include "offsets/1000.h"
#include "offsets/1000_exfat.h"
#include "offsets/1020.h"
#include "offsets/1020_exfat.h"
#include "offsets/1100.h"
#include "offsets/1100_exfat.h"
#include "offsets/1200.h"
#include "offsets/1200_exfat.h"
#include "offsets/1203.h"
#include "offsets/1203_exfat.h"
#include "offsets/1300.h"
#include "offsets/1300_exfat.h"
#include "offsets/1310.h"
#include "offsets/1310_exfat.h"
#include "offsets/1400.h"
#include "offsets/1400_exfat.h"
#include "offsets/1500.h"
#include "offsets/1500_exfat.h"
#include "offsets/1600.h"
#include "offsets/1600_exfat.h"
#include "offsets/1603.h"
#include "offsets/1603_exfat.h"
#include "offsets/1700.h"
#include "offsets/1700_exfat.h"
#include "offsets/1800.h"
#include "offsets/1800_exfat.h"
#include "offsets/1810.h"
#include "offsets/1810_exfat.h"
#include "offsets/1900.h"
#include "offsets/1900_exfat.h"
#include "offsets/2000.h"
#include "offsets/2000_exfat.h"
#include "offsets/2010.h"
#include "offsets/2010_exfat.h"
#include "../utils/fatal.h"
#define GET_OFFSET_STRUCT_NAME(vers) g_offsets##vers
#define DEFINE_OFFSET_STRUCT(vers) \
static const fs_offsets_t GET_OFFSET_STRUCT_NAME(vers) = { \
.sdmmc_accessor_gc = FS_OFFSET##vers##_SDMMC_ACCESSOR_GC, \
.sdmmc_accessor_sd = FS_OFFSET##vers##_SDMMC_ACCESSOR_SD, \
.sdmmc_accessor_nand = FS_OFFSET##vers##_SDMMC_ACCESSOR_NAND, \
.sdmmc_wrapper_read = FS_OFFSET##vers##_SDMMC_WRAPPER_READ, \
.sdmmc_wrapper_write = FS_OFFSET##vers##_SDMMC_WRAPPER_WRITE, \
.clkrst_set_min_v_clock_rate = FS_OFFSET##vers##_CLKRST_SET_MIN_V_CLK_RATE, \
.rtld = FS_OFFSET##vers##_RTLD, \
.rtld_destination = FS_OFFSET##vers##_RTLD_DESTINATION, \
.lock_mutex = FS_OFFSET##vers##_LOCK_MUTEX, \
.unlock_mutex = FS_OFFSET##vers##_UNLOCK_MUTEX, \
.sd_mutex = FS_OFFSET##vers##_SD_MUTEX, \
.nand_mutex = FS_OFFSET##vers##_NAND_MUTEX, \
.active_partition = FS_OFFSET##vers##_ACTIVE_PARTITION, \
.sdmmc_das_handle = FS_OFFSET##vers##_SDMMC_DAS_HANDLE, \
.sdmmc_accessor_controller_open = FS_OFFSET##vers##_SDMMC_WRAPPER_CONTROLLER_OPEN, \
.sdmmc_accessor_controller_close = FS_OFFSET##vers##_SDMMC_WRAPPER_CONTROLLER_CLOSE, \
.sd_das_init = FS_OFFSET##vers##_SD_DAS_INIT, \
.nintendo_paths = FS_OFFSET##vers##_NINTENDO_PATHS, \
}
// Actually define offset structs
DEFINE_OFFSET_STRUCT(_100);
DEFINE_OFFSET_STRUCT(_200);
DEFINE_OFFSET_STRUCT(_200_EXFAT);
DEFINE_OFFSET_STRUCT(_210);
DEFINE_OFFSET_STRUCT(_210_EXFAT);
DEFINE_OFFSET_STRUCT(_300);
DEFINE_OFFSET_STRUCT(_300_EXFAT);
DEFINE_OFFSET_STRUCT(_301);
DEFINE_OFFSET_STRUCT(_301_EXFAT);
DEFINE_OFFSET_STRUCT(_400);
DEFINE_OFFSET_STRUCT(_400_EXFAT);
DEFINE_OFFSET_STRUCT(_410);
DEFINE_OFFSET_STRUCT(_410_EXFAT);
DEFINE_OFFSET_STRUCT(_500);
DEFINE_OFFSET_STRUCT(_500_EXFAT);
DEFINE_OFFSET_STRUCT(_510);
DEFINE_OFFSET_STRUCT(_510_EXFAT);
DEFINE_OFFSET_STRUCT(_600);
DEFINE_OFFSET_STRUCT(_600_EXFAT);
DEFINE_OFFSET_STRUCT(_700);
DEFINE_OFFSET_STRUCT(_700_EXFAT);
DEFINE_OFFSET_STRUCT(_800);
DEFINE_OFFSET_STRUCT(_800_EXFAT);
DEFINE_OFFSET_STRUCT(_810);
DEFINE_OFFSET_STRUCT(_810_EXFAT);
DEFINE_OFFSET_STRUCT(_900);
DEFINE_OFFSET_STRUCT(_900_EXFAT);
DEFINE_OFFSET_STRUCT(_910);
DEFINE_OFFSET_STRUCT(_910_EXFAT);
DEFINE_OFFSET_STRUCT(_1000);
DEFINE_OFFSET_STRUCT(_1000_EXFAT);
DEFINE_OFFSET_STRUCT(_1020);
DEFINE_OFFSET_STRUCT(_1020_EXFAT);
DEFINE_OFFSET_STRUCT(_1100);
DEFINE_OFFSET_STRUCT(_1100_EXFAT);
DEFINE_OFFSET_STRUCT(_1200);
DEFINE_OFFSET_STRUCT(_1200_EXFAT);
DEFINE_OFFSET_STRUCT(_1203);
DEFINE_OFFSET_STRUCT(_1203_EXFAT);
DEFINE_OFFSET_STRUCT(_1300);
DEFINE_OFFSET_STRUCT(_1300_EXFAT);
DEFINE_OFFSET_STRUCT(_1310);
DEFINE_OFFSET_STRUCT(_1310_EXFAT);
DEFINE_OFFSET_STRUCT(_1400);
DEFINE_OFFSET_STRUCT(_1400_EXFAT);
DEFINE_OFFSET_STRUCT(_1500);
DEFINE_OFFSET_STRUCT(_1500_EXFAT);
DEFINE_OFFSET_STRUCT(_1600);
DEFINE_OFFSET_STRUCT(_1600_EXFAT);
DEFINE_OFFSET_STRUCT(_1603);
DEFINE_OFFSET_STRUCT(_1603_EXFAT);
DEFINE_OFFSET_STRUCT(_1700);
DEFINE_OFFSET_STRUCT(_1700_EXFAT);
DEFINE_OFFSET_STRUCT(_1800);
DEFINE_OFFSET_STRUCT(_1800_EXFAT);
DEFINE_OFFSET_STRUCT(_1810);
DEFINE_OFFSET_STRUCT(_1810_EXFAT);
DEFINE_OFFSET_STRUCT(_1900);
DEFINE_OFFSET_STRUCT(_1900_EXFAT);
DEFINE_OFFSET_STRUCT(_2000);
DEFINE_OFFSET_STRUCT(_2000_EXFAT);
DEFINE_OFFSET_STRUCT(_2010);
DEFINE_OFFSET_STRUCT(_2010_EXFAT);
const fs_offsets_t *get_fs_offsets(enum FS_VER version) {
switch (version) {
case FS_VER_1_0_0:
return &(GET_OFFSET_STRUCT_NAME(_100));
case FS_VER_2_0_0:
return &(GET_OFFSET_STRUCT_NAME(_200));
case FS_VER_2_0_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_200_EXFAT));
case FS_VER_2_1_0:
return &(GET_OFFSET_STRUCT_NAME(_210));
case FS_VER_2_1_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_210_EXFAT));
case FS_VER_3_0_0:
return &(GET_OFFSET_STRUCT_NAME(_300));
case FS_VER_3_0_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_300_EXFAT));
case FS_VER_3_0_1:
return &(GET_OFFSET_STRUCT_NAME(_301));
case FS_VER_3_0_1_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_301_EXFAT));
case FS_VER_4_0_0:
return &(GET_OFFSET_STRUCT_NAME(_400));
case FS_VER_4_0_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_400_EXFAT));
case FS_VER_4_1_0:
return &(GET_OFFSET_STRUCT_NAME(_410));
case FS_VER_4_1_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_410_EXFAT));
case FS_VER_5_0_0:
return &(GET_OFFSET_STRUCT_NAME(_500));
case FS_VER_5_0_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_500_EXFAT));
case FS_VER_5_1_0:
return &(GET_OFFSET_STRUCT_NAME(_510));
case FS_VER_5_1_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_510_EXFAT));
case FS_VER_6_0_0:
return &(GET_OFFSET_STRUCT_NAME(_600));
case FS_VER_6_0_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_600_EXFAT));
case FS_VER_7_0_0:
return &(GET_OFFSET_STRUCT_NAME(_700));
case FS_VER_7_0_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_700_EXFAT));
case FS_VER_8_0_0:
return &(GET_OFFSET_STRUCT_NAME(_800));
case FS_VER_8_0_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_800_EXFAT));
case FS_VER_8_1_0:
return &(GET_OFFSET_STRUCT_NAME(_810));
case FS_VER_8_1_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_810_EXFAT));
case FS_VER_9_0_0:
return &(GET_OFFSET_STRUCT_NAME(_900));
case FS_VER_9_0_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_900_EXFAT));
case FS_VER_9_1_0:
return &(GET_OFFSET_STRUCT_NAME(_910));
case FS_VER_9_1_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_910_EXFAT));
case FS_VER_10_0_0:
return &(GET_OFFSET_STRUCT_NAME(_1000));
case FS_VER_10_0_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_1000_EXFAT));
case FS_VER_10_2_0:
return &(GET_OFFSET_STRUCT_NAME(_1020));
case FS_VER_10_2_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_1020_EXFAT));
case FS_VER_11_0_0:
return &(GET_OFFSET_STRUCT_NAME(_1100));
case FS_VER_11_0_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_1100_EXFAT));
case FS_VER_12_0_0:
return &(GET_OFFSET_STRUCT_NAME(_1200));
case FS_VER_12_0_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_1200_EXFAT));
case FS_VER_12_0_3:
return &(GET_OFFSET_STRUCT_NAME(_1203));
case FS_VER_12_0_3_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_1203_EXFAT));
case FS_VER_13_0_0:
return &(GET_OFFSET_STRUCT_NAME(_1300));
case FS_VER_13_0_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_1300_EXFAT));
case FS_VER_13_1_0:
return &(GET_OFFSET_STRUCT_NAME(_1310));
case FS_VER_13_1_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_1310_EXFAT));
case FS_VER_14_0_0:
return &(GET_OFFSET_STRUCT_NAME(_1400));
case FS_VER_14_0_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_1400_EXFAT));
case FS_VER_15_0_0:
return &(GET_OFFSET_STRUCT_NAME(_1500));
case FS_VER_15_0_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_1500_EXFAT));
case FS_VER_16_0_0:
return &(GET_OFFSET_STRUCT_NAME(_1600));
case FS_VER_16_0_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_1600_EXFAT));
case FS_VER_16_0_3:
return &(GET_OFFSET_STRUCT_NAME(_1603));
case FS_VER_16_0_3_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_1603_EXFAT));
case FS_VER_17_0_0:
return &(GET_OFFSET_STRUCT_NAME(_1700));
case FS_VER_17_0_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_1700_EXFAT));
case FS_VER_18_0_0:
return &(GET_OFFSET_STRUCT_NAME(_1800));
case FS_VER_18_0_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_1800_EXFAT));
case FS_VER_18_1_0:
return &(GET_OFFSET_STRUCT_NAME(_1810));
case FS_VER_18_1_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_1810_EXFAT));
case FS_VER_19_0_0:
return &(GET_OFFSET_STRUCT_NAME(_1900));
case FS_VER_19_0_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_1900_EXFAT));
case FS_VER_20_0_0:
return &(GET_OFFSET_STRUCT_NAME(_2000));
case FS_VER_20_0_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_2000_EXFAT));
case FS_VER_20_1_0:
return &(GET_OFFSET_STRUCT_NAME(_2010));
case FS_VER_20_1_0_EXFAT:
return &(GET_OFFSET_STRUCT_NAME(_2010_EXFAT));
default:
fatal_abort(Fatal_UnknownVersion);
}
}

59
emummc/source/FS/FS_offsets.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_OFFSETS_H__
#define __FS_OFFSETS_H__
#include <stdint.h>
#include "FS_versions.h"
typedef struct {
int opcode_reg;
uint32_t adrp_offset;
uint32_t add_rel_offset;
} fs_offsets_nintendo_path_t;
typedef struct {
// Accessor vtable getters
uintptr_t sdmmc_accessor_gc;
uintptr_t sdmmc_accessor_sd;
uintptr_t sdmmc_accessor_nand;
// Hooks
uintptr_t sdmmc_wrapper_read;
uintptr_t sdmmc_wrapper_write;
uintptr_t rtld;
uintptr_t rtld_destination;
uintptr_t clkrst_set_min_v_clock_rate;
// Misc funcs
uintptr_t lock_mutex;
uintptr_t unlock_mutex;
uintptr_t sdmmc_accessor_controller_open;
uintptr_t sdmmc_accessor_controller_close;
// Misc data
uintptr_t sd_mutex;
uintptr_t nand_mutex;
uintptr_t active_partition;
uintptr_t sdmmc_das_handle;
// NOPs
uintptr_t sd_das_init;
// Nintendo Paths
fs_offsets_nintendo_path_t nintendo_paths[];
} fs_offsets_t;
const fs_offsets_t *get_fs_offsets(enum FS_VER version);
#endif // __FS_OFFSETS_H__

61
emummc/source/FS/FS_structs.h vendored Normal file
View File

@ -0,0 +1,61 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_STRUCTS_H__
#define __FS_STRUCTS_H__
#include "../utils/types.h"
typedef struct
{
char *device_addr_buffer;
uint64_t device_addr_buffer_size;
char *device_addr_buffer_masked;
} sdmmc_dma_buffer_t;
_Static_assert(__alignof(sdmmc_dma_buffer_t) == 8, "sdmmc_dma_buffer_t definition");
typedef struct sdmmc_accessor_vt
{
void *ctor;
void *dtor;
void *map_device_addr_space;
void *unmap_device_addr_space;
uint64_t (*sdmmc_accessor_controller_open)(void *);
uint64_t (*sdmmc_accessor_controller_close)(void *);
uint64_t (*read_write)(void *, uint64_t, uint64_t, void *, uint64_t, uint64_t);
// More not included because we don't use it.
} sdmmc_accessor_vt_t;
_Static_assert(__alignof(sdmmc_accessor_vt_t) == 8, "sdmmc_accessor_vt_t definition");
typedef struct
{
void *vtab;
t210_sdmmc_t *io_map;
sdmmc_dma_buffer_t dmaBuffers[3];
// More not included because we don't use it.
} mmc_obj_t;
typedef struct
{
sdmmc_accessor_vt_t *vtab;
mmc_obj_t *parent;
// More not included because we don't use it.
} sdmmc_accessor_t;
#endif // __FS_STRUCTS_H__

122
emummc/source/FS/FS_versions.h vendored Normal file
View File

@ -0,0 +1,122 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_VERSIONS_H__
#define __FS_VERSIONS_H__
// FS Version enum
enum FS_VER
{
FS_VER_1_0_0 = 0,
FS_VER_2_0_0,
FS_VER_2_0_0_EXFAT,
FS_VER_2_1_0,
FS_VER_2_1_0_EXFAT,
FS_VER_3_0_0,
FS_VER_3_0_0_EXFAT,
FS_VER_3_0_1,
FS_VER_3_0_1_EXFAT,
FS_VER_4_0_0,
FS_VER_4_0_0_EXFAT,
FS_VER_4_1_0,
FS_VER_4_1_0_EXFAT,
FS_VER_5_0_0,
FS_VER_5_0_0_EXFAT,
FS_VER_5_1_0,
FS_VER_5_1_0_EXFAT,
FS_VER_6_0_0,
FS_VER_6_0_0_EXFAT,
FS_VER_7_0_0,
FS_VER_7_0_0_EXFAT,
FS_VER_8_0_0,
FS_VER_8_0_0_EXFAT,
FS_VER_8_1_0,
FS_VER_8_1_0_EXFAT,
FS_VER_9_0_0,
FS_VER_9_0_0_EXFAT,
FS_VER_9_1_0,
FS_VER_9_1_0_EXFAT,
FS_VER_10_0_0,
FS_VER_10_0_0_EXFAT,
FS_VER_10_2_0,
FS_VER_10_2_0_EXFAT,
FS_VER_11_0_0,
FS_VER_11_0_0_EXFAT,
FS_VER_12_0_0,
FS_VER_12_0_0_EXFAT,
FS_VER_12_0_3,
FS_VER_12_0_3_EXFAT,
FS_VER_13_0_0,
FS_VER_13_0_0_EXFAT,
FS_VER_13_1_0,
FS_VER_13_1_0_EXFAT,
FS_VER_14_0_0,
FS_VER_14_0_0_EXFAT,
FS_VER_15_0_0,
FS_VER_15_0_0_EXFAT,
FS_VER_16_0_0,
FS_VER_16_0_0_EXFAT,
FS_VER_16_0_3,
FS_VER_16_0_3_EXFAT,
FS_VER_17_0_0,
FS_VER_17_0_0_EXFAT,
FS_VER_18_0_0,
FS_VER_18_0_0_EXFAT,
FS_VER_18_1_0,
FS_VER_18_1_0_EXFAT,
FS_VER_19_0_0,
FS_VER_19_0_0_EXFAT,
FS_VER_20_0_0,
FS_VER_20_0_0_EXFAT,
FS_VER_20_1_0,
FS_VER_20_1_0_EXFAT,
FS_VER_MAX,
};
#endif // __FS_VERSIONS_H__

57
emummc/source/FS/offsets/100.h vendored Normal file
View File

@ -0,0 +1,57 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_100_H__
#define __FS_100_H__
// Accessor vtable getters
#define FS_OFFSET_100_SDMMC_ACCESSOR_GC 0x6F850
#define FS_OFFSET_100_SDMMC_ACCESSOR_SD 0x6F65C
#define FS_OFFSET_100_SDMMC_ACCESSOR_NAND 0x6F230
// Hooks
#define FS_OFFSET_100_SDMMC_WRAPPER_READ 0x6A930
#define FS_OFFSET_100_SDMMC_WRAPPER_WRITE 0x6A9F0
#define FS_OFFSET_100_RTLD 0x534
#define FS_OFFSET_100_RTLD_DESTINATION 0xA0
#define FS_OFFSET_100_CLKRST_SET_MIN_V_CLK_RATE 0x0
// Misc funcs
#define FS_OFFSET_100_LOCK_MUTEX 0x2884
#define FS_OFFSET_100_UNLOCK_MUTEX 0x28F0
#define FS_OFFSET_100_SDMMC_WRAPPER_CONTROLLER_OPEN 0
#define FS_OFFSET_100_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x6A8AC
// Misc Data
#define FS_OFFSET_100_SD_MUTEX 0xE36058
#define FS_OFFSET_100_NAND_MUTEX 0xE30610
#define FS_OFFSET_100_ACTIVE_PARTITION 0xE30650
#define FS_OFFSET_100_SDMMC_DAS_HANDLE 0xE2F730
// NOPs
#define FS_OFFSET_100_SD_DAS_INIT 0x0
// Nintendo Paths
#define FS_OFFSET_100_NINTENDO_PATHS \
{ \
{.opcode_reg = 8, .adrp_offset = 0x00032C58, .add_rel_offset = 8}, \
{.opcode_reg = 9, .adrp_offset = 0x00032F40, .add_rel_offset = 8}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_100_H__

59
emummc/source/FS/offsets/1000.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1000_H__
#define __FS_1000_H__
// Accessor vtable getters
#define FS_OFFSET_1000_SDMMC_ACCESSOR_GC 0x14DC90
#define FS_OFFSET_1000_SDMMC_ACCESSOR_SD 0x14BDA0
#define FS_OFFSET_1000_SDMMC_ACCESSOR_NAND 0x146C20
// Hooks
#define FS_OFFSET_1000_SDMMC_WRAPPER_READ 0x142380
#define FS_OFFSET_1000_SDMMC_WRAPPER_WRITE 0x142460
#define FS_OFFSET_1000_RTLD 0x634
#define FS_OFFSET_1000_RTLD_DESTINATION 0x9C
#define FS_OFFSET_1000_CLKRST_SET_MIN_V_CLK_RATE 0x1415A0
// Misc funcs
#define FS_OFFSET_1000_LOCK_MUTEX 0x28910
#define FS_OFFSET_1000_UNLOCK_MUTEX 0x28960
#define FS_OFFSET_1000_SDMMC_WRAPPER_CONTROLLER_OPEN 0
#define FS_OFFSET_1000_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x1422E0
// Misc Data
#define FS_OFFSET_1000_SD_MUTEX 0xE273E8
#define FS_OFFSET_1000_NAND_MUTEX 0xE22DA0
#define FS_OFFSET_1000_ACTIVE_PARTITION 0xE22DE0
#define FS_OFFSET_1000_SDMMC_DAS_HANDLE 0xE0AB90
// NOPs
#define FS_OFFSET_1000_SD_DAS_INIT 0x151CEC
// Nintendo Paths
#define FS_OFFSET_1000_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x0006BBA4, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x00078520, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0007ED0C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0009115C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1000_H__

59
emummc/source/FS/offsets/1000_exfat.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1000_EXFAT_H__
#define __FS_1000_EXFAT_H__
// Accessor vtable getters
#define FS_OFFSET_1000_EXFAT_SDMMC_ACCESSOR_GC 0x14DC90
#define FS_OFFSET_1000_EXFAT_SDMMC_ACCESSOR_SD 0x14BDA0
#define FS_OFFSET_1000_EXFAT_SDMMC_ACCESSOR_NAND 0x146C20
// Hooks
#define FS_OFFSET_1000_EXFAT_SDMMC_WRAPPER_READ 0x142380
#define FS_OFFSET_1000_EXFAT_SDMMC_WRAPPER_WRITE 0x142460
#define FS_OFFSET_1000_EXFAT_RTLD 0x634
#define FS_OFFSET_1000_EXFAT_RTLD_DESTINATION 0x9C
#define FS_OFFSET_1000_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x1415A0
// Misc funcs
#define FS_OFFSET_1000_EXFAT_LOCK_MUTEX 0x28910
#define FS_OFFSET_1000_EXFAT_UNLOCK_MUTEX 0x28960
#define FS_OFFSET_1000_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0
#define FS_OFFSET_1000_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x1422E0
// Misc Data
#define FS_OFFSET_1000_EXFAT_SD_MUTEX 0xE353E8
#define FS_OFFSET_1000_EXFAT_NAND_MUTEX 0xE30DA0
#define FS_OFFSET_1000_EXFAT_ACTIVE_PARTITION 0xE30DE0
#define FS_OFFSET_1000_EXFAT_SDMMC_DAS_HANDLE 0xE18B90
// NOPs
#define FS_OFFSET_1000_EXFAT_SD_DAS_INIT 0x151CEC
// Nintendo Paths
#define FS_OFFSET_1000_EXFAT_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x0006BBA4, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x00078520, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0007ED0C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0009115C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1000_EXFAT_H__

59
emummc/source/FS/offsets/1020.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1020_H__
#define __FS_1020_H__
// Accessor vtable getters
#define FS_OFFSET_1020_SDMMC_ACCESSOR_GC 0x14E0F0
#define FS_OFFSET_1020_SDMMC_ACCESSOR_SD 0x14C200
#define FS_OFFSET_1020_SDMMC_ACCESSOR_NAND 0x147080
// Hooks
#define FS_OFFSET_1020_SDMMC_WRAPPER_READ 0x1427E0
#define FS_OFFSET_1020_SDMMC_WRAPPER_WRITE 0x1428C0
#define FS_OFFSET_1020_RTLD 0x634
#define FS_OFFSET_1020_RTLD_DESTINATION 0x9C
#define FS_OFFSET_1020_CLKRST_SET_MIN_V_CLK_RATE 0x141A00
// Misc funcs
#define FS_OFFSET_1020_LOCK_MUTEX 0x28910
#define FS_OFFSET_1020_UNLOCK_MUTEX 0x28960
#define FS_OFFSET_1020_SDMMC_WRAPPER_CONTROLLER_OPEN 0
#define FS_OFFSET_1020_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x142740
// Misc Data
#define FS_OFFSET_1020_SD_MUTEX 0xE273E8
#define FS_OFFSET_1020_NAND_MUTEX 0xE22DA0
#define FS_OFFSET_1020_ACTIVE_PARTITION 0xE22DE0
#define FS_OFFSET_1020_SDMMC_DAS_HANDLE 0xE0AB90
// NOPs
#define FS_OFFSET_1020_SD_DAS_INIT 0x15214C
// Nintendo Paths
#define FS_OFFSET_1020_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x0006BBA4, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x00078520, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0007ED0C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0009115C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1020_H__

59
emummc/source/FS/offsets/1020_exfat.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1020_EXFAT_H__
#define __FS_1020_EXFAT_H__
// Accessor vtable getters
#define FS_OFFSET_1020_EXFAT_SDMMC_ACCESSOR_GC 0x14E0F0
#define FS_OFFSET_1020_EXFAT_SDMMC_ACCESSOR_SD 0x14C200
#define FS_OFFSET_1020_EXFAT_SDMMC_ACCESSOR_NAND 0x147080
// Hooks
#define FS_OFFSET_1020_EXFAT_SDMMC_WRAPPER_READ 0x1427E0
#define FS_OFFSET_1020_EXFAT_SDMMC_WRAPPER_WRITE 0x1428C0
#define FS_OFFSET_1020_EXFAT_RTLD 0x634
#define FS_OFFSET_1020_EXFAT_RTLD_DESTINATION 0x9C
#define FS_OFFSET_1020_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x141A00
// Misc funcs
#define FS_OFFSET_1020_EXFAT_LOCK_MUTEX 0x28910
#define FS_OFFSET_1020_EXFAT_UNLOCK_MUTEX 0x28960
#define FS_OFFSET_1020_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0
#define FS_OFFSET_1020_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x142740
// Misc Data
#define FS_OFFSET_1020_EXFAT_SD_MUTEX 0xE353E8
#define FS_OFFSET_1020_EXFAT_NAND_MUTEX 0xE30DA0
#define FS_OFFSET_1020_EXFAT_ACTIVE_PARTITION 0xE30DE0
#define FS_OFFSET_1020_EXFAT_SDMMC_DAS_HANDLE 0xE18B90
// NOPs
#define FS_OFFSET_1020_EXFAT_SD_DAS_INIT 0x15214C
// Nintendo Paths
#define FS_OFFSET_1020_EXFAT_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x0006BBA4, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x00078520, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0007ED0C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0009115C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1020_EXFAT_H__

59
emummc/source/FS/offsets/1100.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1100_H__
#define __FS_1100_H__
// Accessor vtable getters
#define FS_OFFSET_1100_SDMMC_ACCESSOR_GC 0x156D90
#define FS_OFFSET_1100_SDMMC_ACCESSOR_SD 0x154F40
#define FS_OFFSET_1100_SDMMC_ACCESSOR_NAND 0x1500F0
// Hooks
#define FS_OFFSET_1100_SDMMC_WRAPPER_READ 0x14B990
#define FS_OFFSET_1100_SDMMC_WRAPPER_WRITE 0x14BA70
#define FS_OFFSET_1100_RTLD 0x688
#define FS_OFFSET_1100_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1100_CLKRST_SET_MIN_V_CLK_RATE 0x14AC40
// Misc funcs
#define FS_OFFSET_1100_LOCK_MUTEX 0x28FF0
#define FS_OFFSET_1100_UNLOCK_MUTEX 0x29040
#define FS_OFFSET_1100_SDMMC_WRAPPER_CONTROLLER_OPEN 0x14B840
#define FS_OFFSET_1100_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x14B8F0
// Misc Data
#define FS_OFFSET_1100_SD_MUTEX 0xE323E8
#define FS_OFFSET_1100_NAND_MUTEX 0xE2D338
#define FS_OFFSET_1100_ACTIVE_PARTITION 0xE2D378
#define FS_OFFSET_1100_SDMMC_DAS_HANDLE 0xE15D40
// NOPs
#define FS_OFFSET_1100_SD_DAS_INIT 0x273B4
// Nintendo Paths
#define FS_OFFSET_1100_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x0006D944, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0007A3C0, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x00080708, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x00092198, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1100_H__

59
emummc/source/FS/offsets/1100_exfat.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1100_EXFAT_H__
#define __FS_1100_EXFAT_H__
// Accessor vtable getters
#define FS_OFFSET_1100_EXFAT_SDMMC_ACCESSOR_GC 0x156D90
#define FS_OFFSET_1100_EXFAT_SDMMC_ACCESSOR_SD 0x154F40
#define FS_OFFSET_1100_EXFAT_SDMMC_ACCESSOR_NAND 0x1500F0
// Hooks
#define FS_OFFSET_1100_EXFAT_SDMMC_WRAPPER_READ 0x14B990
#define FS_OFFSET_1100_EXFAT_SDMMC_WRAPPER_WRITE 0x14BA70
#define FS_OFFSET_1100_EXFAT_RTLD 0x688
#define FS_OFFSET_1100_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1100_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x14AC40
// Misc funcs
#define FS_OFFSET_1100_EXFAT_LOCK_MUTEX 0x28FF0
#define FS_OFFSET_1100_EXFAT_UNLOCK_MUTEX 0x29040
#define FS_OFFSET_1100_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x14B840
#define FS_OFFSET_1100_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x14B8F0
// Misc Data
#define FS_OFFSET_1100_EXFAT_SD_MUTEX 0xE403E8
#define FS_OFFSET_1100_EXFAT_NAND_MUTEX 0xE3B338
#define FS_OFFSET_1100_EXFAT_ACTIVE_PARTITION 0xE3B378
#define FS_OFFSET_1100_EXFAT_SDMMC_DAS_HANDLE 0xE23D40
// NOPs
#define FS_OFFSET_1100_EXFAT_SD_DAS_INIT 0x273B4
// Nintendo Paths
#define FS_OFFSET_1100_EXFAT_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x0006D944, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0007A3C0, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x00080708, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x00092198, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1100_EXFAT_H__

59
emummc/source/FS/offsets/1200.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1200_H__
#define __FS_1200_H__
// Accessor vtable getters
#define FS_OFFSET_1200_SDMMC_ACCESSOR_GC 0x154FD0
#define FS_OFFSET_1200_SDMMC_ACCESSOR_SD 0x156DE0
#define FS_OFFSET_1200_SDMMC_ACCESSOR_NAND 0x155500
// Hooks
#define FS_OFFSET_1200_SDMMC_WRAPPER_READ 0x150970
#define FS_OFFSET_1200_SDMMC_WRAPPER_WRITE 0x150A30
#define FS_OFFSET_1200_RTLD 0x688
#define FS_OFFSET_1200_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1200_CLKRST_SET_MIN_V_CLK_RATE 0x14FCC0
// Misc funcs
#define FS_OFFSET_1200_LOCK_MUTEX 0x29350
#define FS_OFFSET_1200_UNLOCK_MUTEX 0x293A0
#define FS_OFFSET_1200_SDMMC_WRAPPER_CONTROLLER_OPEN 0x150850
#define FS_OFFSET_1200_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x1508E0
// Misc Data
#define FS_OFFSET_1200_SD_MUTEX 0xE3D3E8
#define FS_OFFSET_1200_NAND_MUTEX 0xE38768
#define FS_OFFSET_1200_ACTIVE_PARTITION 0xE387A8
#define FS_OFFSET_1200_SDMMC_DAS_HANDLE 0xE20DB0
// NOPs
#define FS_OFFSET_1200_SD_DAS_INIT 0x27244
// Nintendo Paths
#define FS_OFFSET_1200_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x0006E810, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0007AEC0, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x00081254, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x00092850, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1200_H__

59
emummc/source/FS/offsets/1200_exfat.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1200_EXFAT_H__
#define __FS_1200_EXFAT_H__
// Accessor vtable getters
#define FS_OFFSET_1200_EXFAT_SDMMC_ACCESSOR_GC 0x154FD0
#define FS_OFFSET_1200_EXFAT_SDMMC_ACCESSOR_SD 0x156DE0
#define FS_OFFSET_1200_EXFAT_SDMMC_ACCESSOR_NAND 0x155500
// Hooks
#define FS_OFFSET_1200_EXFAT_SDMMC_WRAPPER_READ 0x150970
#define FS_OFFSET_1200_EXFAT_SDMMC_WRAPPER_WRITE 0x150A30
#define FS_OFFSET_1200_EXFAT_RTLD 0x688
#define FS_OFFSET_1200_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1200_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x14FCC0
// Misc funcs
#define FS_OFFSET_1200_EXFAT_LOCK_MUTEX 0x29350
#define FS_OFFSET_1200_EXFAT_UNLOCK_MUTEX 0x293A0
#define FS_OFFSET_1200_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x150850
#define FS_OFFSET_1200_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x1508E0
// Misc Data
#define FS_OFFSET_1200_EXFAT_SD_MUTEX 0xE4B3E8
#define FS_OFFSET_1200_EXFAT_NAND_MUTEX 0xE46768
#define FS_OFFSET_1200_EXFAT_ACTIVE_PARTITION 0xE467A8
#define FS_OFFSET_1200_EXFAT_SDMMC_DAS_HANDLE 0xE2EDB0
// NOPs
#define FS_OFFSET_1200_EXFAT_SD_DAS_INIT 0x27244
// Nintendo Paths
#define FS_OFFSET_1200_EXFAT_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x0006E810, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0007AEC0, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x00081254, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x00092850, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1200_EXFAT_H__

60
emummc/source/FS/offsets/1203.h vendored Normal file
View File

@ -0,0 +1,60 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
* Copyright (c) 2021 CTCaer
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1203_H__
#define __FS_1203_H__
// Accessor vtable getters
#define FS_OFFSET_1203_SDMMC_ACCESSOR_GC 0x1550E0
#define FS_OFFSET_1203_SDMMC_ACCESSOR_SD 0x156EF0
#define FS_OFFSET_1203_SDMMC_ACCESSOR_NAND 0x155610
// Hooks
#define FS_OFFSET_1203_SDMMC_WRAPPER_READ 0x150A80
#define FS_OFFSET_1203_SDMMC_WRAPPER_WRITE 0x150B40
#define FS_OFFSET_1203_RTLD 0x688
#define FS_OFFSET_1203_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1203_CLKRST_SET_MIN_V_CLK_RATE 0x14FDD0
// Misc funcs
#define FS_OFFSET_1203_LOCK_MUTEX 0x29350
#define FS_OFFSET_1203_UNLOCK_MUTEX 0x293A0
#define FS_OFFSET_1203_SDMMC_WRAPPER_CONTROLLER_OPEN 0x150960
#define FS_OFFSET_1203_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x1509F0
// Misc Data
#define FS_OFFSET_1203_SD_MUTEX 0xE3D3E8
#define FS_OFFSET_1203_NAND_MUTEX 0xE38768
#define FS_OFFSET_1203_ACTIVE_PARTITION 0xE387A8
#define FS_OFFSET_1203_SDMMC_DAS_HANDLE 0xE20DB0
// NOPs
#define FS_OFFSET_1203_SD_DAS_INIT 0x27244
// Nintendo Paths
#define FS_OFFSET_1203_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x0006E920, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0007AFD0, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x00081364, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x00092960, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1203_H__

60
emummc/source/FS/offsets/1203_exfat.h vendored Normal file
View File

@ -0,0 +1,60 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
* Copyright (c) 2021 CTCaer
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1203_EXFAT_H__
#define __FS_1203_EXFAT_H__
// Accessor vtable getters
#define FS_OFFSET_1203_EXFAT_SDMMC_ACCESSOR_GC 0x1550E0
#define FS_OFFSET_1203_EXFAT_SDMMC_ACCESSOR_SD 0x156EF0
#define FS_OFFSET_1203_EXFAT_SDMMC_ACCESSOR_NAND 0x155610
// Hooks
#define FS_OFFSET_1203_EXFAT_SDMMC_WRAPPER_READ 0x150A80
#define FS_OFFSET_1203_EXFAT_SDMMC_WRAPPER_WRITE 0x150B40
#define FS_OFFSET_1203_EXFAT_RTLD 0x688
#define FS_OFFSET_1203_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1203_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x14FDD0
// Misc funcs
#define FS_OFFSET_1203_EXFAT_LOCK_MUTEX 0x29350
#define FS_OFFSET_1203_EXFAT_UNLOCK_MUTEX 0x293A0
#define FS_OFFSET_1203_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x150960
#define FS_OFFSET_1203_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x1509F0
// Misc Data
#define FS_OFFSET_1203_EXFAT_SD_MUTEX 0xE4B3E8
#define FS_OFFSET_1203_EXFAT_NAND_MUTEX 0xE46768
#define FS_OFFSET_1203_EXFAT_ACTIVE_PARTITION 0xE467A8
#define FS_OFFSET_1203_EXFAT_SDMMC_DAS_HANDLE 0xE2EDB0
// NOPs
#define FS_OFFSET_1203_EXFAT_SD_DAS_INIT 0x27244
// Nintendo Paths
#define FS_OFFSET_1203_EXFAT_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x0006E920, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0007AFD0, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x00081364, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x00092960, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1203_EXFAT_H__

59
emummc/source/FS/offsets/1300.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1300_H__
#define __FS_1300_H__
// Accessor vtable getters
#define FS_OFFSET_1300_SDMMC_ACCESSOR_GC 0x158C80
#define FS_OFFSET_1300_SDMMC_ACCESSOR_SD 0x15AA90
#define FS_OFFSET_1300_SDMMC_ACCESSOR_NAND 0x1591B0
// Hooks
#define FS_OFFSET_1300_SDMMC_WRAPPER_READ 0x154620
#define FS_OFFSET_1300_SDMMC_WRAPPER_WRITE 0x1546E0
#define FS_OFFSET_1300_RTLD 0x688
#define FS_OFFSET_1300_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1300_CLKRST_SET_MIN_V_CLK_RATE 0x153820
// Misc funcs
#define FS_OFFSET_1300_LOCK_MUTEX 0x29690
#define FS_OFFSET_1300_UNLOCK_MUTEX 0x296E0
#define FS_OFFSET_1300_SDMMC_WRAPPER_CONTROLLER_OPEN 0x154500
#define FS_OFFSET_1300_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x154590
// Misc Data
#define FS_OFFSET_1300_SD_MUTEX 0xE133E8
#define FS_OFFSET_1300_NAND_MUTEX 0xE0E768
#define FS_OFFSET_1300_ACTIVE_PARTITION 0xE0E7A8
#define FS_OFFSET_1300_SDMMC_DAS_HANDLE 0xDF6E18
// NOPs
#define FS_OFFSET_1300_SD_DAS_INIT 0x27744
// Nintendo Paths
#define FS_OFFSET_1300_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x0006EBE0, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0007BEEC, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x00082294, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0009422C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1300_H__

59
emummc/source/FS/offsets/1300_exfat.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1300_EXFAT_H__
#define __FS_1300_EXFAT_H__
// Accessor vtable getters
#define FS_OFFSET_1300_EXFAT_SDMMC_ACCESSOR_GC 0x158C80
#define FS_OFFSET_1300_EXFAT_SDMMC_ACCESSOR_SD 0x15AA90
#define FS_OFFSET_1300_EXFAT_SDMMC_ACCESSOR_NAND 0x1591B0
// Hooks
#define FS_OFFSET_1300_EXFAT_SDMMC_WRAPPER_READ 0x154620
#define FS_OFFSET_1300_EXFAT_SDMMC_WRAPPER_WRITE 0x1546E0
#define FS_OFFSET_1300_EXFAT_RTLD 0x688
#define FS_OFFSET_1300_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1300_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x153820
// Misc funcs
#define FS_OFFSET_1300_EXFAT_LOCK_MUTEX 0x29690
#define FS_OFFSET_1300_EXFAT_UNLOCK_MUTEX 0x296E0
#define FS_OFFSET_1300_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x154500
#define FS_OFFSET_1300_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x154590
// Misc Data
#define FS_OFFSET_1300_EXFAT_SD_MUTEX 0xE203E8
#define FS_OFFSET_1300_EXFAT_NAND_MUTEX 0xE1B768
#define FS_OFFSET_1300_EXFAT_ACTIVE_PARTITION 0xE1B7A8
#define FS_OFFSET_1300_EXFAT_SDMMC_DAS_HANDLE 0xE03E18
// NOPs
#define FS_OFFSET_1300_EXFAT_SD_DAS_INIT 0x27744
// Nintendo Paths
#define FS_OFFSET_1300_EXFAT_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x0006EBE0, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0007BEEC, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x00082294, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0009422C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1300_EXFAT_H__

59
emummc/source/FS/offsets/1310.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1310_H__
#define __FS_1310_H__
// Accessor vtable getters
#define FS_OFFSET_1310_SDMMC_ACCESSOR_GC 0x158C20
#define FS_OFFSET_1310_SDMMC_ACCESSOR_SD 0x15AA30
#define FS_OFFSET_1310_SDMMC_ACCESSOR_NAND 0x159150
// Hooks
#define FS_OFFSET_1310_SDMMC_WRAPPER_READ 0x1545C0
#define FS_OFFSET_1310_SDMMC_WRAPPER_WRITE 0x154680
#define FS_OFFSET_1310_RTLD 0x688
#define FS_OFFSET_1310_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1310_CLKRST_SET_MIN_V_CLK_RATE 0x1537C0
// Misc funcs
#define FS_OFFSET_1310_LOCK_MUTEX 0x29690
#define FS_OFFSET_1310_UNLOCK_MUTEX 0x296E0
#define FS_OFFSET_1310_SDMMC_WRAPPER_CONTROLLER_OPEN 0x1544A0
#define FS_OFFSET_1310_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x154530
// Misc Data
#define FS_OFFSET_1310_SD_MUTEX 0xE133E8
#define FS_OFFSET_1310_NAND_MUTEX 0xE0E768
#define FS_OFFSET_1310_ACTIVE_PARTITION 0xE0E7A8
#define FS_OFFSET_1310_SDMMC_DAS_HANDLE 0xDF6E18
// NOPs
#define FS_OFFSET_1310_SD_DAS_INIT 0x27744
// Nintendo Paths
#define FS_OFFSET_1310_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x0006EBE0, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0007BEEC, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x00082294, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0009422C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1310_H__

59
emummc/source/FS/offsets/1310_exfat.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1310_EXFAT_H__
#define __FS_1310_EXFAT_H__
// Accessor vtable getters
#define FS_OFFSET_1310_EXFAT_SDMMC_ACCESSOR_GC 0x158C20
#define FS_OFFSET_1310_EXFAT_SDMMC_ACCESSOR_SD 0x15AA30
#define FS_OFFSET_1310_EXFAT_SDMMC_ACCESSOR_NAND 0x159150
// Hooks
#define FS_OFFSET_1310_EXFAT_SDMMC_WRAPPER_READ 0x1545C0
#define FS_OFFSET_1310_EXFAT_SDMMC_WRAPPER_WRITE 0x154680
#define FS_OFFSET_1310_EXFAT_RTLD 0x688
#define FS_OFFSET_1310_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1310_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x1537C0
// Misc funcs
#define FS_OFFSET_1310_EXFAT_LOCK_MUTEX 0x29690
#define FS_OFFSET_1310_EXFAT_UNLOCK_MUTEX 0x296E0
#define FS_OFFSET_1310_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x1544A0
#define FS_OFFSET_1310_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x154530
// Misc Data
#define FS_OFFSET_1310_EXFAT_SD_MUTEX 0xE203E8
#define FS_OFFSET_1310_EXFAT_NAND_MUTEX 0xE1B768
#define FS_OFFSET_1310_EXFAT_ACTIVE_PARTITION 0xE1B7A8
#define FS_OFFSET_1310_EXFAT_SDMMC_DAS_HANDLE 0xE03E18
// NOPs
#define FS_OFFSET_1310_EXFAT_SD_DAS_INIT 0x27744
// Nintendo Paths
#define FS_OFFSET_1310_EXFAT_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x0006EBE0, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0007BEEC, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x00082294, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0009422C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1310_EXFAT_H__

59
emummc/source/FS/offsets/1400.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1400_H__
#define __FS_1400_H__
// Accessor vtable getters
#define FS_OFFSET_1400_SDMMC_ACCESSOR_GC 0x189F50
#define FS_OFFSET_1400_SDMMC_ACCESSOR_SD 0x18BD60
#define FS_OFFSET_1400_SDMMC_ACCESSOR_NAND 0x18A480
// Hooks
#define FS_OFFSET_1400_SDMMC_WRAPPER_READ 0x185AF0
#define FS_OFFSET_1400_SDMMC_WRAPPER_WRITE 0x185B50
#define FS_OFFSET_1400_RTLD 0x282B8
#define FS_OFFSET_1400_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1400_CLKRST_SET_MIN_V_CLK_RATE 0x1A5D90
// Misc funcs
#define FS_OFFSET_1400_LOCK_MUTEX 0x17E9F0
#define FS_OFFSET_1400_UNLOCK_MUTEX 0x17EA40
#define FS_OFFSET_1400_SDMMC_WRAPPER_CONTROLLER_OPEN 0x185AA0
#define FS_OFFSET_1400_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x185AD0
// Misc Data
#define FS_OFFSET_1400_SD_MUTEX 0xF2E3F0
#define FS_OFFSET_1400_NAND_MUTEX 0xF292F8
#define FS_OFFSET_1400_ACTIVE_PARTITION 0xF29338
#define FS_OFFSET_1400_SDMMC_DAS_HANDLE 0xDFE9C8
// NOPs
#define FS_OFFSET_1400_SD_DAS_INIT 0x27004
// Nintendo Paths
#define FS_OFFSET_1400_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x0006D9C0, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0007AC24, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x000813E8, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0009387C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1400_H__

59
emummc/source/FS/offsets/1400_exfat.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1400_EXFAT_H__
#define __FS_1400_EXFAT_H__
// Accessor vtable getters
#define FS_OFFSET_1400_EXFAT_SDMMC_ACCESSOR_GC 0x1952D0
#define FS_OFFSET_1400_EXFAT_SDMMC_ACCESSOR_SD 0x1970E0
#define FS_OFFSET_1400_EXFAT_SDMMC_ACCESSOR_NAND 0x195800
// Hooks
#define FS_OFFSET_1400_EXFAT_SDMMC_WRAPPER_READ 0x190E70
#define FS_OFFSET_1400_EXFAT_SDMMC_WRAPPER_WRITE 0x190ED0
#define FS_OFFSET_1400_EXFAT_RTLD 0x282B8
#define FS_OFFSET_1400_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1400_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x1B1110
// Misc funcs
#define FS_OFFSET_1400_EXFAT_LOCK_MUTEX 0x189D70
#define FS_OFFSET_1400_EXFAT_UNLOCK_MUTEX 0x189DC0
#define FS_OFFSET_1400_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x190E20
#define FS_OFFSET_1400_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x190E50
// Misc Data
#define FS_OFFSET_1400_EXFAT_SD_MUTEX 0x10123F0
#define FS_OFFSET_1400_EXFAT_NAND_MUTEX 0x100D2F8
#define FS_OFFSET_1400_EXFAT_ACTIVE_PARTITION 0x100D338
#define FS_OFFSET_1400_EXFAT_SDMMC_DAS_HANDLE 0xE0B9C8
// NOPs
#define FS_OFFSET_1400_EXFAT_SD_DAS_INIT 0x27004
// Nintendo Paths
#define FS_OFFSET_1400_EXFAT_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x0006D9C0, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0007AC24, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x000813E8, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0009387C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1400_EXFAT_H__

59
emummc/source/FS/offsets/1500.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1500_H__
#define __FS_1500_H__
// Accessor vtable getters
#define FS_OFFSET_1500_SDMMC_ACCESSOR_GC 0x183E20
#define FS_OFFSET_1500_SDMMC_ACCESSOR_SD 0x185AA0
#define FS_OFFSET_1500_SDMMC_ACCESSOR_NAND 0x1842E0
// Hooks
#define FS_OFFSET_1500_SDMMC_WRAPPER_READ 0x17FCF0
#define FS_OFFSET_1500_SDMMC_WRAPPER_WRITE 0x17FD50
#define FS_OFFSET_1500_RTLD 0x26518
#define FS_OFFSET_1500_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1500_CLKRST_SET_MIN_V_CLK_RATE 0x1A0870
// Misc funcs
#define FS_OFFSET_1500_LOCK_MUTEX 0x1791A0
#define FS_OFFSET_1500_UNLOCK_MUTEX 0x1791F0
#define FS_OFFSET_1500_SDMMC_WRAPPER_CONTROLLER_OPEN 0x17FCB0
#define FS_OFFSET_1500_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x17FCD0
// Misc Data
#define FS_OFFSET_1500_SD_MUTEX 0xFF33F0
#define FS_OFFSET_1500_NAND_MUTEX 0xFEE2E8
#define FS_OFFSET_1500_ACTIVE_PARTITION 0xFEE328
#define FS_OFFSET_1500_SDMMC_DAS_HANDLE 0xFD38D8
// NOPs
#define FS_OFFSET_1500_SD_DAS_INIT 0x25454
// Nintendo Paths
#define FS_OFFSET_1500_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x00063050, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0006FDE8, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x000768D4, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x00089364, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1500_H__

59
emummc/source/FS/offsets/1500_exfat.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1500_EXFAT_H__
#define __FS_1500_EXFAT_H__
// Accessor vtable getters
#define FS_OFFSET_1500_EXFAT_SDMMC_ACCESSOR_GC 0x18EDB0
#define FS_OFFSET_1500_EXFAT_SDMMC_ACCESSOR_SD 0x190A30
#define FS_OFFSET_1500_EXFAT_SDMMC_ACCESSOR_NAND 0x18F270
// Hooks
#define FS_OFFSET_1500_EXFAT_SDMMC_WRAPPER_READ 0x18AC80
#define FS_OFFSET_1500_EXFAT_SDMMC_WRAPPER_WRITE 0x18ACE0
#define FS_OFFSET_1500_EXFAT_RTLD 0x26518
#define FS_OFFSET_1500_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1500_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x1AB800
// Misc funcs
#define FS_OFFSET_1500_EXFAT_LOCK_MUTEX 0x184130
#define FS_OFFSET_1500_EXFAT_UNLOCK_MUTEX 0x184180
#define FS_OFFSET_1500_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x18AC40
#define FS_OFFSET_1500_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x18AC60
// Misc Data
#define FS_OFFSET_1500_EXFAT_SD_MUTEX 0x10053F0
#define FS_OFFSET_1500_EXFAT_NAND_MUTEX 0x10002E8
#define FS_OFFSET_1500_EXFAT_ACTIVE_PARTITION 0x1000328
#define FS_OFFSET_1500_EXFAT_SDMMC_DAS_HANDLE 0xFE08D8
// NOPs
#define FS_OFFSET_1500_EXFAT_SD_DAS_INIT 0x25454
// Nintendo Paths
#define FS_OFFSET_1500_EXFAT_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x00063050, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0006FDE8, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x000768D4, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x00089364, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1500_EXFAT_H__

59
emummc/source/FS/offsets/1600.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1600_H__
#define __FS_1600_H__
// Accessor vtable getters
#define FS_OFFSET_1600_SDMMC_ACCESSOR_GC 0x1862A0
#define FS_OFFSET_1600_SDMMC_ACCESSOR_SD 0x187F20
#define FS_OFFSET_1600_SDMMC_ACCESSOR_NAND 0x186760
// Hooks
#define FS_OFFSET_1600_SDMMC_WRAPPER_READ 0x1821F0
#define FS_OFFSET_1600_SDMMC_WRAPPER_WRITE 0x182250
#define FS_OFFSET_1600_RTLD 0x269B0
#define FS_OFFSET_1600_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1600_CLKRST_SET_MIN_V_CLK_RATE 0x1A2D30
// Misc funcs
#define FS_OFFSET_1600_LOCK_MUTEX 0x17B730
#define FS_OFFSET_1600_UNLOCK_MUTEX 0x17B780
#define FS_OFFSET_1600_SDMMC_WRAPPER_CONTROLLER_OPEN 0x1821B0
#define FS_OFFSET_1600_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x1821D0
// Misc Data
#define FS_OFFSET_1600_SD_MUTEX 0xFFB3F0
#define FS_OFFSET_1600_NAND_MUTEX 0xFF6B58
#define FS_OFFSET_1600_ACTIVE_PARTITION 0xFF6B98
#define FS_OFFSET_1600_SDMMC_DAS_HANDLE 0xFDC8B0
// NOPs
#define FS_OFFSET_1600_SD_DAS_INIT 0x258D4
// Nintendo Paths
#define FS_OFFSET_1600_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x00063B48, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x00070D6C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0007790C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0008A754, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1600_H__

59
emummc/source/FS/offsets/1600_exfat.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1600_EXFAT_H__
#define __FS_1600_EXFAT_H__
// Accessor vtable getters
#define FS_OFFSET_1600_EXFAT_SDMMC_ACCESSOR_GC 0x190F80
#define FS_OFFSET_1600_EXFAT_SDMMC_ACCESSOR_SD 0x192C00
#define FS_OFFSET_1600_EXFAT_SDMMC_ACCESSOR_NAND 0x191440
// Hooks
#define FS_OFFSET_1600_EXFAT_SDMMC_WRAPPER_READ 0x18CED0
#define FS_OFFSET_1600_EXFAT_SDMMC_WRAPPER_WRITE 0x18CF30
#define FS_OFFSET_1600_EXFAT_RTLD 0x269B0
#define FS_OFFSET_1600_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1600_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x1ADA10
// Misc funcs
#define FS_OFFSET_1600_EXFAT_LOCK_MUTEX 0x186410
#define FS_OFFSET_1600_EXFAT_UNLOCK_MUTEX 0x186460
#define FS_OFFSET_1600_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x18CE90
#define FS_OFFSET_1600_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x18CEB0
// Misc Data
#define FS_OFFSET_1600_EXFAT_SD_MUTEX 0x100D3F0
#define FS_OFFSET_1600_EXFAT_NAND_MUTEX 0x1008B58
#define FS_OFFSET_1600_EXFAT_ACTIVE_PARTITION 0x1008B98
#define FS_OFFSET_1600_EXFAT_SDMMC_DAS_HANDLE 0xFE98B0
// NOPs
#define FS_OFFSET_1600_EXFAT_SD_DAS_INIT 0x258D4
// Nintendo Paths
#define FS_OFFSET_1600_EXFAT_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x00063B48, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x00070D6C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0007790C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0008A754, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1600_EXFAT_H__

59
emummc/source/FS/offsets/1603.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1603_H__
#define __FS_1603_H__
// Accessor vtable getters
#define FS_OFFSET_1603_SDMMC_ACCESSOR_GC 0x1862F0
#define FS_OFFSET_1603_SDMMC_ACCESSOR_SD 0x187F70
#define FS_OFFSET_1603_SDMMC_ACCESSOR_NAND 0x1867B0
// Hooks
#define FS_OFFSET_1603_SDMMC_WRAPPER_READ 0x182240
#define FS_OFFSET_1603_SDMMC_WRAPPER_WRITE 0x1822A0
#define FS_OFFSET_1603_RTLD 0x269B0
#define FS_OFFSET_1603_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1603_CLKRST_SET_MIN_V_CLK_RATE 0x1A2D80
// Misc funcs
#define FS_OFFSET_1603_LOCK_MUTEX 0x17B780
#define FS_OFFSET_1603_UNLOCK_MUTEX 0x17B7D0
#define FS_OFFSET_1603_SDMMC_WRAPPER_CONTROLLER_OPEN 0x182200
#define FS_OFFSET_1603_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x182220
// Misc Data
#define FS_OFFSET_1603_SD_MUTEX 0xFFB3F0
#define FS_OFFSET_1603_NAND_MUTEX 0xFF6B58
#define FS_OFFSET_1603_ACTIVE_PARTITION 0xFF6B98
#define FS_OFFSET_1603_SDMMC_DAS_HANDLE 0xFDC8B0
// NOPs
#define FS_OFFSET_1603_SD_DAS_INIT 0x258D4
// Nintendo Paths
#define FS_OFFSET_1603_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x00063B98, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x00070DBC, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0007795C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0008A7A4, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1603_H__

59
emummc/source/FS/offsets/1603_exfat.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1603_EXFAT_H__
#define __FS_1603_EXFAT_H__
// Accessor vtable getters
#define FS_OFFSET_1603_EXFAT_SDMMC_ACCESSOR_GC 0x190FD0
#define FS_OFFSET_1603_EXFAT_SDMMC_ACCESSOR_SD 0x192C50
#define FS_OFFSET_1603_EXFAT_SDMMC_ACCESSOR_NAND 0x191490
// Hooks
#define FS_OFFSET_1603_EXFAT_SDMMC_WRAPPER_READ 0x18CF20
#define FS_OFFSET_1603_EXFAT_SDMMC_WRAPPER_WRITE 0x18CF80
#define FS_OFFSET_1603_EXFAT_RTLD 0x269B0
#define FS_OFFSET_1603_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1603_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x1ADA60
// Misc funcs
#define FS_OFFSET_1603_EXFAT_LOCK_MUTEX 0x186460
#define FS_OFFSET_1603_EXFAT_UNLOCK_MUTEX 0x1864B0
#define FS_OFFSET_1603_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x18CEE0
#define FS_OFFSET_1603_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x18CF00
// Misc Data
#define FS_OFFSET_1603_EXFAT_SD_MUTEX 0x100D3F0
#define FS_OFFSET_1603_EXFAT_NAND_MUTEX 0x1008B58
#define FS_OFFSET_1603_EXFAT_ACTIVE_PARTITION 0x1008B98
#define FS_OFFSET_1603_EXFAT_SDMMC_DAS_HANDLE 0xFE98B0
// NOPs
#define FS_OFFSET_1603_EXFAT_SD_DAS_INIT 0x258D4
// Nintendo Paths
#define FS_OFFSET_1603_EXFAT_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x00063B98, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x00070DBC, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0007795C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0008A7A4, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1603_EXFAT_H__

59
emummc/source/FS/offsets/1700.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1700_H__
#define __FS_1700_H__
// Accessor vtable getters
#define FS_OFFSET_1700_SDMMC_ACCESSOR_GC 0x18AD00
#define FS_OFFSET_1700_SDMMC_ACCESSOR_SD 0x18C9D0
#define FS_OFFSET_1700_SDMMC_ACCESSOR_NAND 0x18B1D0
// Hooks
#define FS_OFFSET_1700_SDMMC_WRAPPER_READ 0x186BC0
#define FS_OFFSET_1700_SDMMC_WRAPPER_WRITE 0x186C20
#define FS_OFFSET_1700_RTLD 0x29D10
#define FS_OFFSET_1700_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1700_CLKRST_SET_MIN_V_CLK_RATE 0x1A7B60
// Misc funcs
#define FS_OFFSET_1700_LOCK_MUTEX 0x17FEA0
#define FS_OFFSET_1700_UNLOCK_MUTEX 0x17FEF0
#define FS_OFFSET_1700_SDMMC_WRAPPER_CONTROLLER_OPEN 0x186B80
#define FS_OFFSET_1700_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x186BA0
// Misc Data
#define FS_OFFSET_1700_SD_MUTEX 0xFCE3F0
#define FS_OFFSET_1700_NAND_MUTEX 0xFC9B78
#define FS_OFFSET_1700_ACTIVE_PARTITION 0xFC9BB8
#define FS_OFFSET_1700_SDMMC_DAS_HANDLE 0xFAF840
// NOPs
#define FS_OFFSET_1700_SD_DAS_INIT 0x28C64
// Nintendo Paths
#define FS_OFFSET_1700_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x00068068, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0007510C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0007BEAC, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0008F674, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1700_H__

59
emummc/source/FS/offsets/1700_exfat.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1700_EXFAT_H__
#define __FS_1700_EXFAT_H__
// Accessor vtable getters
#define FS_OFFSET_1700_EXFAT_SDMMC_ACCESSOR_GC 0x195B60
#define FS_OFFSET_1700_EXFAT_SDMMC_ACCESSOR_SD 0x197830
#define FS_OFFSET_1700_EXFAT_SDMMC_ACCESSOR_NAND 0x196030
// Hooks
#define FS_OFFSET_1700_EXFAT_SDMMC_WRAPPER_READ 0x191A20
#define FS_OFFSET_1700_EXFAT_SDMMC_WRAPPER_WRITE 0x191A80
#define FS_OFFSET_1700_EXFAT_RTLD 0x29D10
#define FS_OFFSET_1700_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C)))
#define FS_OFFSET_1700_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x1B29C0
// Misc funcs
#define FS_OFFSET_1700_EXFAT_LOCK_MUTEX 0x18AD00
#define FS_OFFSET_1700_EXFAT_UNLOCK_MUTEX 0x18AD50
#define FS_OFFSET_1700_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x1919E0
#define FS_OFFSET_1700_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x191A00
// Misc Data
#define FS_OFFSET_1700_EXFAT_SD_MUTEX 0xFE03F0
#define FS_OFFSET_1700_EXFAT_NAND_MUTEX 0xFDBB78
#define FS_OFFSET_1700_EXFAT_ACTIVE_PARTITION 0xFDBBB8
#define FS_OFFSET_1700_EXFAT_SDMMC_DAS_HANDLE 0xFBC840
// NOPs
#define FS_OFFSET_1700_EXFAT_SD_DAS_INIT 0x28C64
// Nintendo Paths
#define FS_OFFSET_1700_EXFAT_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x00068068, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x0007510C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0007BEAC, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0008F674, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1700_EXFAT_H__

59
emummc/source/FS/offsets/1800.h vendored Normal file
View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
* Copyright (c) 2019 Atmosphere-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FS_1800_H__
#define __FS_1800_H__
// Accessor vtable getters
#define FS_OFFSET_1800_SDMMC_ACCESSOR_GC 0x18AB00
#define FS_OFFSET_1800_SDMMC_ACCESSOR_SD 0x18C800
#define FS_OFFSET_1800_SDMMC_ACCESSOR_NAND 0x18AFE0
// Hooks
#define FS_OFFSET_1800_SDMMC_WRAPPER_READ 0x186A50
#define FS_OFFSET_1800_SDMMC_WRAPPER_WRITE 0x186AB0
#define FS_OFFSET_1800_RTLD 0x2A3A4
#define FS_OFFSET_1800_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x44)))
#define FS_OFFSET_1800_CLKRST_SET_MIN_V_CLK_RATE 0x1A77D0
// Misc funcs
#define FS_OFFSET_1800_LOCK_MUTEX 0x17FCC0
#define FS_OFFSET_1800_UNLOCK_MUTEX 0x17FD10
#define FS_OFFSET_1800_SDMMC_WRAPPER_CONTROLLER_OPEN 0x186A10
#define FS_OFFSET_1800_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x186A30
// Misc Data
#define FS_OFFSET_1800_SD_MUTEX 0xFD13F0
#define FS_OFFSET_1800_NAND_MUTEX 0xFCCB28
#define FS_OFFSET_1800_ACTIVE_PARTITION 0xFCCB68
#define FS_OFFSET_1800_SDMMC_DAS_HANDLE 0xFB1950
// NOPs
#define FS_OFFSET_1800_SD_DAS_INIT 0x28F24
// Nintendo Paths
#define FS_OFFSET_1800_NINTENDO_PATHS \
{ \
{.opcode_reg = 3, .adrp_offset = 0x00068B08, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 3, .adrp_offset = 0x000758DC, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x0007C77C, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 4, .adrp_offset = 0x000905C4, .add_rel_offset = 0x00000004}, \
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
}
#endif // __FS_1800_H__

Some files were not shown because too many files have changed in this diff Show More