1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-22 11:56:40 +00:00
Commit graph

1290 commits

Author SHA1 Message Date
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
592b9c66d1 gdbstub: report architecture tag for ARM targets 2022-06-29 17:28:03 -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
4e112de223 dmnt.gen2: fix gt, optimize 2022-06-08 00:49:47 -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
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
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
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
44d553d12e loader: add usb-3 patch for 14.0.0 2022-03-23 13:45:28 -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
c503629ac8 ams.mitm: fix reboot to payload 2022-03-23 10:17:00 -07:00
Michael Scire
f3e3649bd5 pm: grant access to GetResourceLimitPeakValue 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
e975784179 fatal: update for new 14.0.0 command 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
320a946fc7 ncm: update client code to better reflect latest sysupdate 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
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
Michael Scire
2b6719ec25 ams_mitm: update to use new NcaFileSystemDriver intf 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
36e3519982 strat: add missing semicolon 2022-02-16 22:13:41 -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
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
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
47218f0da8 ams: overhaul fs.mitm romfs ownership, bump to 1.2.4 2021-11-04 13:38:41 -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
258a83684e creport: print symbols if they're present 2021-10-30 14:18:00 -07:00
Michael Scire
6cf5205a28 spl: fix legacy physical keyslot compatibility 2021-10-30 11:21:25 -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
889d843718 ams: improve offsetof style consistency 2021-10-18 00:17:13 -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
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
bd1bcdf52b sf: prevent emitting mitm/defer code unless server in process supports it 2021-10-11 19:01:27 -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
5708bb1557 ams: allow bootloader to merely approximate correct target firmware 2021-10-11 00:54:17 -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
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
1ab0bd1765 ams: replace most remaining operator & with std::addressof 2021-10-09 14:49:53 -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
229651fe72 ams.mitm: avoid using std::unordered_map, it manifests exception code 2021-10-07 22:59:16 -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
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
d0041a33ac strat: prefer os::NativeHandle to Handle/svc::Handle where sensible 2021-10-04 17:12:32 -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
7444a68cd1 os: adopt multiwait naming over waitable 2021-09-30 19:00:47 -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
9b04ff0f54 ams-libs: AMS_ASSERT no longer invokes expression 2021-09-29 21:32:40 -07:00
Michael Scire
c949779b3d stratosphere: grant access to SynchronizePreemptionState 2021-09-29 14:18:03 -07:00
Michael Scire
ab81ed2795 fs.mitm: fix memory leak in romfs build (closes #1031) 2021-09-20 17:53:29 -07:00
Michael Scire
3dc51e164f loader: fix enum cast 2021-09-19 10:42:28 -07:00
Michael Scire
790f7498c1 loader: update for 13.0.0 ncm changes 2021-09-19 10:34:31 -07:00