Commit Graph

56 Commits

Author SHA1 Message Date
Michael Scire
5d1a1eca26 kern: support reboot to fatal error on mariko 2024-10-15 21:51:46 -07:00
Michael Scire
98d2aae984 kern: move KTargetSystem into .rodata, split init/verify 2024-10-15 21:51:38 -07:00
Michael Scire
e0998df82e kern: refactor smc helpers to share more common logic 2024-03-29 02:55:05 -07:00
Michael Scire
8ccd35988a kern: 16.x web applet crashes on exit with 48 MB stolen (rip) 2023-02-23 09:00:36 -07:00
Michael Scire
429f3aa49d kern: better divide non-secure size, don't waste fatal memory unless necessary 2023-02-23 09:00:33 -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
2a651f73c9 kern: adjust pool allocations 2023-02-23 09:00:29 -07:00
Michael Scire
5f3af914d8 kern/pm: only steal 8 MB from applet.
WebApplet crashes on exit with 16 more MB stolen, apparently.
2023-02-23 09:00:25 -07:00
Michael Scire
be7700023b romfs: thank you fire emblem, very cool (closes #2021) 2023-01-24 14:39:20 -07:00
Michael Scire
9fc57cbbbb kern: move SecureAppletMemory/KPageBuffer heap into the ResourceRegion 2022-10-12 09:15:50 -07:00
Michael Scire
8bbfe8d277 kern: enforce maximum secure region size 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
Michael Scire
d3ad53a525 kern: devirtualize remaining vcall for class token/dyncast 2021-10-26 01:11:13 -07:00
SciresM
823c0df6b9 kern: avoid constexpr init for many objects (avoids unnecessary memory clear) (#1668) 2021-10-26 01:11:13 -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
3e328eae72 kern: update Initialize0 for new arguments/randomization semantics 2021-09-19 10:35:38 -07:00
Michael Scire
f103b6876b kern: KMemoryManager/KPageGroup use physical addresses instead of virtual, now 2021-09-19 10:35:38 -07:00
Michael Scire
1ac249dd13 kern: support dynamic resource expansion for system heaps/events/sessions. 2021-09-19 10:35:38 -07:00
Michael Scire
400137d06b kern: reallocate pool distributions for 8GB units 2021-04-11 03:59:16 -07:00
Michael Scire
0357a98972 kern: simplify global rng initialization 2021-04-11 03:59:15 -07:00
Michael Scire
cf19a7b64d kern: load initial process binary from user pool, rather than from pt heap 2021-04-11 03:59:15 -07:00
Michael Scire
c766cc8347 kern: Increase reserved system memory, require mesosphere for htc/tma 2021-04-11 03:58:54 -07:00
Michael Scire
a8d1eab91a meso: update for new fatal encoding 2021-02-02 12:16:29 -08:00
Michael Scire
3355f97275 exo/meso/fusee: support dynamic control of log port/baud rate 2020-12-11 03:48:58 -08:00
Michael Scire
9c3e45a856 kern: fix reboot to fatal error 2020-12-03 12:48:16 -08:00
Michael Scire
7abc665807 kern: fix copy/paste error 2020-12-02 06:53:19 -08:00
Michael Scire
0eb6e0a963 kern: add new overflow checks on KMemoryRegions 2020-12-02 06:53:17 -08:00
Michael Scire
b0c96b3bb6 kern: fix race-crash on interrupt controller save, improve fatal output 2020-12-02 06:53:13 -08:00
Michael Scire
396dc066e9 kern: KMemoryManager::Allocate -> AllocateAndOpen 2020-12-02 06:53:09 -08:00
Michael Scire
10e9e0e8f9 docs/fatal error: update for 0.15.0 2020-10-26 16:03:09 -07:00
Michael Scire
dbbf26f03c ams: expose reboot payload for kernel panic 2020-10-26 16:03:06 -07:00
Michael Scire
ba45f73e40 kern: generate fatal error on panic 2020-09-17 08:34:22 -07:00
Michael Scire
22f2946671 kern: begin 1.0.0 backwards compat changes (kips run, full boot fails) 2020-09-07 10:51:50 -07:00
Michael Scire
1aedaa0f91 kern: support 2-pool layout on 2.x-4.x instead of modern 4-pool layout 2020-09-07 10:51:50 -07:00
Michael Scire
00a43ac776 kern: revamp KMemoryRegionType to better encode derivation hierarchies 2020-09-07 10:51:49 -07:00
Michael Scire
ae14cf51b5 kern: PMC must be user-mappable for 1.0.0 compat 2020-09-07 10:51:48 -07:00
Michael Scire
959122a849 kern: resolve NonSecure definition TODO 2020-09-07 10:51:44 -07:00
Michael Scire
f0b455de83 kern: refactor KMemoryLayout 2020-09-07 10:51:39 -07:00
Michael Scire
db93ab974d kern: SvcChangeKernelTraceState 2020-09-07 10:51:37 -07:00
Michael Scire
9f7bc49438 ams: avoid UB infinite loops 2020-08-14 17:36:37 -07:00
Michael Scire
b2af44006f kern: Implement SecureMemory (system resource) 2020-08-01 15:31:30 -07:00
Michael Scire
a22d1d04f2 kern: implement SvcSleepSystem 2020-08-01 15:31:30 -07:00
Michael Scire
4d03635829 kern: fix bugs in interrupt permittance, DpcManager init 2020-08-01 15:31:26 -07:00
Michael Scire
8cad49ee02 kern: add KProcess::Initialize (for non-kip processes) 2020-08-01 15:31:25 -07:00
Michael Scire
e1f094d49e kern: add SvcReadWriteRegister 2020-08-01 15:31:16 -07:00
Michael Scire
191e233745 kern: implement SvcUnmapMemory, more of SvcGetInfo 2020-08-01 15:31:00 -07:00
Michael Scire
08b4ed8daf kern: Update init to reflect 10.0.0 changes 2020-04-24 17:29:09 -07:00