Commit Graph

524 Commits

Author SHA1 Message Date
Michael Scire
c506ac0a6f kern: KConditionVariable::SignalToAddress now emits dmb before userspace write 2023-02-23 09:00:31 -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
0db64c5e6f kern: use variable-count parameter arrays for DebugEvents 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
8afa5a9057 kern: update for new ChangePermissions page table operation 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
2840e2c958 kern: allow QueryIoMapping to find Static mappings 2023-02-23 09:00:29 -07:00
Michael Scire
07213a23fb kern: update UnmapIoRegion for new Mapping_Memory handling 2023-02-23 09:00:28 -07:00
Michael Scire
6bd8bdc020 kern: use tree for IoPool regions instead of list 2023-02-23 09:00:28 -07:00
Michael Scire
a761a80252 kern: optimize userspace access asm to use cheaper instruction in io memory loops 2023-02-23 09:00:27 -07:00
Michael Scire
326f737349 kern: use different psr masks for 64 and 32-bit El0 threads 2023-02-23 09:00:27 -07:00
Michael Scire
f81abe0625 kern: increase stack parameter size by 0x10 2023-02-23 09:00:27 -07:00
Michael Scire
30ecdbcf6a kern: update scheduler for new switch count tracking logic 2023-02-23 09:00:26 -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
9ca1336762 kern: fix GetProcessId wrong result on invalid parameter 2023-01-24 14:39:16 -07:00
Michael Scire
a3cbed96d0 kern: update for new exception flag semantics 2022-10-12 09:15:51 -07:00
Michael Scire
63e9c62380 kern: use slab allocated KSessionRequest dynamic mappings 2022-10-12 09:15:50 -07:00
Michael Scire
22a4a85fb2 kern: implement Svc(Un)MapInsecureMemory 2022-10-12 09:15:50 -07:00
Michael Scire
9fc57cbbbb kern: move SecureAppletMemory/KPageBuffer heap into the ResourceRegion 2022-10-12 09:15:50 -07:00
Michael Scire
5f10b6670d kern: increase stack region size when thread resource limit is increased 2022-10-12 09:15:49 -07:00
Michael Scire
e4825cc879 kern: Implement new PageTable operations/PhysicalMemory reference semantics 2022-10-12 09:15:49 -07:00
Michael Scire
cfe81a7eb3 kern: update for new device map semantics 2022-10-12 09:15:49 -07:00
Michael Scire
4c74021035 kern: merge/simplify KInterruptEventTask into KInterruptEvent 2022-10-12 09:15:48 -07:00
Michael Scire
8ca94db643 kern: implement K(Secure)SystemResource 2022-10-12 09:15:48 -07:00
Michael Scire
dcf2d7ff9b kern: optimize postfix-compare to prefix-compare, result logic is identical but breaks earlier in some paths 2022-10-12 09:15:39 -07:00
Michael Scire
35e1208092 kern: mea culpa (some time since 7.x) 2022-10-12 09:15:39 -07:00
Michael Scire
8022175f5f kern: implement revised IPI/SGI semantics 2022-03-23 09:16:07 -07:00
Michael Scire
d066ac3d69 kern: update for new hw maintenance semantics 2022-03-23 09:16:06 -07:00
Michael Scire
f38d589516 kern: implement new thread context/fpu semantics 2022-03-23 09:16:06 -07:00
Michael Scire
52e51c0634 kern: implement additional randomness in KPageHeap allocations 2022-03-23 09:16:05 -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
Michael Scire
3be59053ca kern: add new KCapability checks before creating process 2022-03-23 09:16:04 -07:00
Michael Scire
a3b74aece9 kern: add InfoType_IsSvcPermitted 2022-03-23 09:16:04 -07:00
Michael Scire
8bbfe8d277 kern: enforce maximum secure region size 2022-03-23 09:16:04 -07:00
Michael Scire
11cedaf353 kern: print kernel backtrace on panic 2022-03-23 09:16:03 -07:00
Michael Scire
ab25a959f2 pm/kern: update for 14.0.0 2022-03-23 09:15:57 -07:00
merry
a2e891d5e8 KThreadContext: Use El0PsrMask constant in GetUserContext 2022-03-23 09:15:46 -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
ee45932d52 kern: add missing debug mode check to WriteDebugProcessMemory 2022-01-19 16:28:54 -08:00
Michael Scire
9436b9a555 ams: deduplicate static initialization logic 2022-01-19 16:28:54 -08:00
Michael Scire
a1b462adda kern: fix vi devicename missing in HsSupported device list 2022-01-19 16:28:54 -08:00
Michael Scire
1271ae28e1 kern: correct TotalUserPhysicalMemorySize (closes #1710) 2021-11-30 16:34:45 -08:00
Michael Scire
2409222dd0 kern: be a little more consistent about pragma GCC location 2021-11-30 16:34:45 -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
24101aaa86 KScheduler big brain strat for mdscr_el1 cfg change 2021-11-30 16:34:43 -08:00
Michael Scire
54783b86f1 dmnt2: detect thread name, add monitor get mapping(s), increase buffer sizes 2021-11-03 23:59:55 -07:00
Michael Scire
1c7ae0d066 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:59:54 -07:00
Michael Scire
17ceca9140 kern: fix minor assembly bugs, avoid unnecessary function call in KScheduler hotloop 2021-10-29 17:47:13 -07:00
Michael Scire
e5756ca0b0 kern: fix 32-bit light ipc svc handler asm
Nintendo used to do what we were doing because the function wasn't directly in the handler table,
but we've always been directly in the handler table, so we were trashing the last four arguments to light ipc
when called from aarch32. Nothing uses this, but needed to be fixed.
2021-10-29 17:47:13 -07:00