Commit Graph

9 Commits

Author SHA1 Message Date
Michael Scire
e0998df82e kern: refactor smc helpers to share more common logic 2024-03-29 02:55:05 -07:00
Michael Scire
44d728cc1c kern: pass kernel base from KernelLdr to Kernel 2024-03-29 02:55:01 -07:00
Michael Scire
03d0fd0f62 kern: refactor init (kill identity map, merge cpu on logic) 2023-02-23 09:00:31 -07:00
Michael Scire
913710ddf3 kern: update KSystemControl::InitializePhase1, dynamically scale 39-bit address space regions 2023-02-23 09:00:30 -07:00
Michael Scire
22a4a85fb2 kern: implement Svc(Un)MapInsecureMemory 2022-10-12 09:15:50 -07:00
Michael Scire
692742b434 kern: enforce end of dram == end of partitions (move our probably outdated KTraceBuffer to new location) 2022-03-23 09:16:04 -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
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
3304c91dae kern: add (and use) generic KSystemControlBase 2021-10-26 01:11:18 -07:00