Commit Graph

406 Commits

Author SHA1 Message Date
Michael Scire
ce44fe4ea9 fs: revise allocation-fail result names 2022-03-23 09:15:54 -07:00
Michael Scire
0d2e2df552 strat: revise fs unsupported operation results, add overflow utils 2022-03-23 09:15:53 -07:00
Michael Scire
96aa83a60b fs: fix inverted alignment determination in compressed storage 2022-03-23 09:15:53 -07:00
Michael Scire
a759a00e96 fs: fix locking in FileSystemBufferManager 2022-03-23 09:15:53 -07:00
Michael Scire
5febe40d50 fs: fix clang-build, os: StackGuardManager 2022-03-23 09:15:52 -07:00
Michael Scire
8785a53d2b fs: move bitmap classes out of save:: 2022-03-23 09:15:52 -07:00
Michael Scire
b1b21adcb3 fs: fix missing mutex acquire in compressed storage invalidate/find 2022-03-23 09:15:52 -07:00
Michael Scire
a9e2c6a9c0 fs: first pass at compressed storage (works on iridium with wip hac2l code) 2022-03-23 09:15:51 -07:00
Michael Scire
493001fdd7 fssrv: add ExternalKeyManager (rights-id crypto) for hac2l 2022-03-23 09:15:51 -07:00
Michael Scire
1f2822fafe abort/error: print backtrace, abuse templates, overhaul result/diag (macos not done yet) 2022-03-23 09:15:49 -07:00
Michael Scire
7a689dc29e libs: add ongoing work to facilitate hactool rewrite 2022-03-23 09:15:48 -07:00
Michael Scire
78af849848 libs: begin adding capacity for doing crypto on generic os (using externally-preset keys) 2022-03-23 09:15:47 -07:00
Michael Scire
d7a9c7ec4c ams: support building unit test programs on windows/linux/macos 2022-03-23 09:15:46 -07:00
Michael Scire
c5ae3c2449 erpt: add automatic report cleanup mechanism on boot (closes #1795) 2022-03-23 09:15:46 -07:00
Michael Scire
936b36fc6e ams_mitm: update to use new NcaFileSystemDriver intf 2022-03-23 09:15:45 -07:00
Michael Scire
f6a7274b60 fix SubStorage copy ctor/= op for new shared_ptr member 2022-03-23 09:15:45 -07:00
Michael Scire
9b2c279d81 fs: add Sha256HashGenerator, LZ4 decompressor 2022-03-23 09:15:44 -07:00
Michael Scire
cdf7e0cbe5 fs: remove now unused StorageOption 2022-03-23 09:15:44 -07:00
Michael Scire
b37eba086f fs: revise NcaFileSystemDriver for latest semantics 2022-03-23 09:15:44 -07:00
Michael Scire
78797b87d7 fssystem: revise allocator logic for latest semantics 2022-03-23 09:15:44 -07:00
Michael Scire
7407ddaf1e fssrv: flesh out the program registry 2022-03-23 09:15:43 -07:00
Michael Scire
c8621b9a5a fssrv: skeleton more program registry logic 2022-03-23 09:15:43 -07:00
Michael Scire
0e957db878 fssrv: add skeleton getters for service object sf::SharedPointers 2022-03-23 09:15:43 -07:00
Michael Scire
2fd560c7d1 fs: allocations with mutex held must be unsafe 2022-03-23 09:15:42 -07:00
Michael Scire
5b4528214f fs: implement newer allocator templates 2022-03-23 09:15:42 -07:00
Michael Scire
1e98da6d08 fssrv: skeleton server manager setup/registration 2022-03-23 09:15:42 -07:00
Michael Scire
38bdd8279d fssrv: add placeholder for ipc interface 2022-03-23 09:15:41 -07:00
Michael Scire
c9bcd87e73 fs: add skeleton dir for sysmodule code
Please note this isn't likely to immediately be the active ams project.
2022-03-23 09:15:41 -07:00
SciresM
00203fd7c3 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-03-23 09:15:40 -07:00
Michael Scire
0d161b8588 ams: first attempt at 13.2.1 support 2022-01-19 16:28:55 -08:00
Michael Scire
9436b9a555 ams: deduplicate static initialization logic 2022-01-19 16:28:54 -08:00
Michael Scire
a392646aab sf/cmif: optimize dispatch table walk to use binary search over linear search 2022-01-19 16:28:54 -08:00
Michael Scire
b670c079fe ams/hos: add enum support for 13.2.0 2021-11-30 16:34:45 -08:00
Michael Scire
6298a7eb6d sm/tipc: ensure technical-correctness of sins (no page cost) 2021-11-30 16:34:44 -08:00
Michael Scire
93ea593e59 sm: save 0x5000 of memory by sinning 2021-11-30 16:34:43 -08:00
Léo Lam
2916512fb7 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-30 16:34:43 -08:00
Michael Scire
ff28833612 ams: overhaul fs.mitm romfs ownership, bump to 1.2.4 2021-11-04 13:40:36 -07:00
Michael Scire
cfb192e8a2 dmnt: enable experimental standalone usage of gdbstub, while starlink is in dev 2021-11-03 23:59:53 -07:00
Michael Scire
ceff2f3712 spl: fix legacy physical keyslot compatibility 2021-10-30 11:21:36 -07:00
Michael Scire
194e58a3e3 kern/test: add wip qemu-virt board support to mesosphere 2021-10-26 01:11:16 -07:00
Michael Scire
960c5c19f9 ams: improve offsetof style consistency 2021-10-26 01:11:10 -07:00
Michael Scire
21cb300537 constexpr: resign ourselves to gcc dropping void -> T support 2021-10-26 01:11:10 -07:00
Michael Scire
cf765c0946 tipc: implement special-case templating used by 13.0.0 pgl 2021-10-15 23:54:40 -07:00
Michael Scire
0238bdf65b tipc: enable named-thread dispatch 2021-10-15 23:54:40 -07:00
Michael Scire
dbd0b13002 boot: update for 13.0.0/aula parameter changes (closes #1477) 2021-10-15 23:54:40 -07:00
Michael Scire
17bf5ee002 powctl: integrate 13.0.0 changes (aula params not done yet) 2021-10-15 23:54:40 -07:00
Michael Scire
68e9f7c853 strat: fix some mitm server management logic 2021-10-15 23:54:39 -07:00
Michael Scire
56222786c6 tipc/sm: update more fully for 13.0.0 changes 2021-10-15 23:54:39 -07:00
Michael Scire
15f27d59df tipc: add additional logic from 13.0.0 2021-10-15 23:54:39 -07:00
Michael Scire
15b3f9545f sm/tipc: minor cleanup 2021-10-15 23:54:39 -07:00
Michael Scire
a9322a7245 sf: prevent emitting mitm/defer code unless server in process supports it 2021-10-15 23:54:38 -07:00
Michael Scire
3bef5b7d5a ams: allow bootloader to merely approximate correct target firmware 2021-10-15 23:54:37 -07:00
Michael Scire
774622d93f loader: refactor to remove fake namespaces 2021-10-15 23:54:36 -07:00
Michael Scire
3218308524 loader: refactor ro manager/improve accuracy 2021-10-15 23:54:36 -07:00
Michael Scire
0abb1e474e spl: refactor for accuracy/move into libstrat 2021-10-15 23:54:36 -07:00
Michael Scire
11e9dcfe11 os: add FlushDataCache 2021-10-15 23:54:36 -07:00
Michael Scire
3e33fb6361 strat: use m_ for member variables 2021-10-15 23:54:35 -07:00
Michael Scire
3b5f56ab9f ams: replace most remaining operator & with std::addressof 2021-10-15 23:54:34 -07:00
Michael Scire
5c32ec11ea strat: refactor address taking of form &var[...] 2021-10-15 23:54:34 -07:00
Michael Scire
e2df2f98a3 strat: always use explicit result namespacing 2021-10-15 23:54:33 -07:00
Adubbz
ea0bb620f2 settings: implement KeyValueStore (#1659)
* settings: implement KeyValueStore and dependencies

* settings: update KeyValueStore for recent refactoring

* settings: address feedback
2021-10-15 23:54:33 -07:00
Michael Scire
2905319d46 strat: use ams::Main() instead of main(argc, argv) 2021-10-07 23:06:29 -07:00
Michael Scire
8a8631ebcb strat: build sysmodules with -Wextra/-Werror 2021-10-07 23:06:29 -07:00
Michael Scire
843dc8e521 libstrat: fix compilation without pre-compiled header/without lto 2021-10-07 23:06:28 -07:00
Michael Scire
fd1b6d4578 libstrat: enable -Wextra, -Werror
This caught an embarrassingly large number of bugs.
2021-10-07 23:06:28 -07:00
Michael Scire
782e449543 strat: remove map namespace, svc: add address space defs 2021-10-07 23:06:27 -07:00
Michael Scire
4ce6273f2b strat: use sf::NativeHandle for ipc templating 2021-10-07 23:06:27 -07:00
Michael Scire
d4221d822e sf: add NativeHandle type
TODO: figure out how to integrate this into templating...
2021-10-07 23:06:26 -07:00
Michael Scire
612b9e2f01 strat: prefer os::NativeHandle to Handle/svc::Handle where sensible 2021-10-07 23:06:26 -07:00
Michael Scire
09a9fdb2c3 pm: use svc::LimitableResource where relevant 2021-10-07 23:06:26 -07:00
Michael Scire
5a71876ca8 strat: use svc:: over ::svc 2021-10-07 23:06:26 -07:00
Michael Scire
002422d5dc ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-07 23:06:25 -07:00
Michael Scire
304b0f8016 os: remove ManagedHandle, refactor to use NativeHandle typename 2021-10-07 23:06:25 -07:00
Michael Scire
28756234d9 strat: automatic program id detection 2021-10-07 23:06:25 -07:00
Michael Scire
828506218f os: adopt nintendo ReaderWriter naming over ReadWrite 2021-10-07 23:06:24 -07:00
Michael Scire
a582429e6d os: amend io region api 2021-10-07 23:06:24 -07:00
Michael Scire
d1c6b77f13 os: implement SharedMemory, update AslrSpaceManager 2021-10-07 23:06:23 -07:00
Michael Scire
b690bc1472 os: fix AttachTransferMemory return type 2021-10-07 23:06:23 -07:00
Michael Scire
69a0ec03e9 strat: use consistent include style for lib headers 2021-10-07 23:06:23 -07:00
Michael Scire
6125281acd os: adopt multiwait naming over waitable 2021-10-07 23:06:23 -07:00
Michael Scire
fcb34b2c22 os: add IoRegion 2021-10-07 23:06:23 -07:00
Michael Scire
71b389c9e4 os: add tentative IoRegionType 2021-10-07 23:06:22 -07:00
Michael Scire
c68298a00e stratosphere: use SdkMutex/SdkRecursiveMutex over Mutex 2021-10-07 23:06:22 -07:00
Michael Scire
3ef8f0f73f os: implement Barrier 2021-10-07 23:06:21 -07:00
Michael Scire
389018db64 os: implement SdkRecursiveMutex 2021-10-07 23:06:21 -07:00
Michael Scire
94dd4ab3c5 ddsf: We can use LightEvent now 2021-10-07 23:06:20 -07:00
Michael Scire
6f53cbbe79 os: implement LightSemaphore 2021-10-07 23:06:20 -07:00
Michael Scire
41495ef51b os: implement LightMessageQueue 2021-10-07 23:06:19 -07:00
Michael Scire
c00d83204f os: refactor MessageQueue to use new MessageQueueHelper template 2021-10-07 23:06:19 -07:00
Michael Scire
3d6e8d5281 os: implement LightEvent 2021-10-07 23:06:19 -07:00
Michael Scire
57e380b2d6 os: implement ReadWriteBusyMutex 2021-10-07 23:06:18 -07:00
Michael Scire
6c98cd1ce2 os: implement BusyMutex 2021-10-07 23:06:18 -07:00
Michael Scire
b579a6d75e svc/kern/dd: remove MapDeviceAddressSpace() 2021-09-19 10:35:39 -07:00
Adubbz
4afce6965f ncm: updated to 13.0.0 2021-09-19 10:35:35 -07:00
Adubbz
66104b830a ncm: skeleton new commands 2021-09-19 10:35:34 -07:00
Michael Scire
6b66af37cd erpt: skeleton sprofile apis 2021-09-19 10:35:32 -07:00
Michael Scire
a669f3dcfa fusee/exo: update for recognition of 13.0.0 2021-09-19 10:35:31 -07:00
Michael Scire
2ab649f2b0 cs: fix launching of tio server 2021-09-19 10:35:30 -07:00
Michael Scire
ad9c7eb4dd cs: fix screenshot packet semantics 2021-09-19 10:35:30 -07:00
Michael Scire
c53eeb27f3 cs: implement TakeScreenShot command 2021-09-19 10:35:30 -07:00