Commit graph

42 commits

Author SHA1 Message Date
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 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 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 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 57c8bc432d sm: reimplement using tipc instead of cmif (probably broken, untested) 2021-04-11 03:42:16 -07:00
Michael Scire 21236020cb sm, spl: update to use new sf semantics 2021-01-20 23:39:31 -08:00
Michael Scire 05832cec73 sm: implement UserService::DetachClient 2020-12-02 06:43:37 -08:00
Michael Scire 909397233c sm: Fix atmosphere-extension interaction with official JIT sysmodule usage 2020-09-17 08:24:47 -07:00
Michael Scire 99b5458539 sm: fix deadlock semantics surrounding mitm installation 2020-09-07 10:40:57 -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
Michael Scire 6ecf04c3b7 find -exec sed -i'' -e 's/2018-2019 Atmo/2018-2020 Atmo/g' {} + 2020-01-24 02:10:40 -08:00
Michael Scire 421324b498 mitm/cfg: pass around override status for decision-making 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 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 c8ed190e5c new-ipc: implement deferral. sm now works. 2019-12-07 12:41:28 -08: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 a9f5b7728b pm: address review comments. 2019-07-11 22:24:59 -07:00
Michael Scire 18ca8aaf5b stratosphere: all in on enum class CommandId 2019-06-27 23:34:53 -07:00
Michael Scire 9217e4c5f9 sm: add HasService/HasMitm, refactor into sts:: 2019-06-24 17:57:49 -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 8e8daa64ba sm: completely rewrite module 2019-06-20 18:23:40 -07:00
Michael Scire dfcba5e6d4 sm: refactor to use R_TRY 2019-06-17 09:17:53 -07:00
Michael Scire 03e176d7f1 atmosphere: current year is 2019 2019-04-07 19:00:49 -07:00
Michael Scire 46cc08160d mitm: Improve session acquire semantics. 2018-11-15 14:19:34 -08:00
Michael Scire 6ef34d80a0 libstrat: automatically detect+format rawdata structs correctly. 2018-10-31 05:04:00 +09:00
Michael Scire 9a8c70ed68 sm: Update for libstratosphere refactor 2018-10-31 05:04:00 +09:00
hexkyz 28e4d4411d Add and fix copyright notices for better GPL compliance (thanks @naehrwert and @CTCaer). 2018-09-07 16:00:13 +01:00
Léo Lam e088a2f414 stratosphere: In-class initialize members
Same thing, less code, less boilerplate.
2018-07-10 09:38:18 -07:00
Michael Scire c2d9ac8f5c fs.mitm: WIP LayeredFS impl (NOTE: UNUSABLE ATM)
Also greatly refactors libstratosphere, and does a lot of other things.
There is a lot of code in this one.
2018-06-14 17:51:18 -06:00
Michael Scire 237ff0d1e7 libstratosphere/fs.mitm: Push WIP support for Domains. Not yet fully working. 2018-06-12 16:01:04 -06:00
Tony Wasserka edc099f026 Use "final" and "override" where appropriate (#117) 2018-06-02 22:46:27 -07:00
Michael Scire 80f40caf67 SM: Add IPC commands for first-class MITM installation. 2018-06-02 23:38:01 -06:00
Michael Scire 674528b246 Stratosphere: Implement support for deferred commands. Finish sm GetService()'s deferred path. 2018-04-22 03:02:19 -06:00
Michael Scire 809090e40d Stratosphere: Fix smhax. 2018-04-22 01:13:36 -06:00
Michael Scire 61cbb0f86e Stratosphere: Implement sm:->Initialize() 2018-04-21 21:40:26 -06:00
Michael Scire d0ef3b1c71 Stratosphere: Skeleton all services for sm. 2018-04-21 21:17:57 -06:00