Commit Graph

165 Commits

Author SHA1 Message Date
Michael Scire
43b8461b5f kern/svc: fix query/insecure names 2023-11-16 16:25:26 -07:00
Michael Scire
e07b0a924d kern: Add special-case for InvalidateProcessDataCache on current process 2023-10-12 09:22:26 -07:00
Michael Scire
15ca0c1b10 kern: implement PermissionLock, update KPageTableBase attribute/alignment checks 2023-10-12 09:22:24 -07:00
Michael Scire
c8f04e21e5 kern: update KMemoryState, remove bijection (separate IoRegister/IoMemory) 2023-10-12 09:22:23 -07:00
Michael Scire
5d883f22c8 ams: fix compilation with gcc 13 2023-05-08 18:06:07 -07:00
Michael Scire
2db2e41398 kern: track heap in KPageTableBase::MemoryRange 2023-05-08 18:06:06 -07:00
Michael Scire
7451d0c8ab kern: add InfoType_IoRegionHint 2023-02-23 09:00:32 -07:00
Michael Scire
2840e2c958 kern: allow QueryIoMapping to find Static mappings 2023-02-23 09:00:29 -07:00
Michael Scire
9ca1336762 kern: fix GetProcessId wrong result on invalid parameter 2023-01-24 14:39:16 -07:00
Michael Scire
22a4a85fb2 kern: implement Svc(Un)MapInsecureMemory 2022-10-12 09:15:50 -07:00
Michael Scire
cfe81a7eb3 kern: update for new device map semantics 2022-10-12 09:15:49 -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
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
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
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
3304c91dae kern: add (and use) generic KSystemControlBase 2021-10-26 01:11:18 -07:00
Michael Scire
1713d12946 kern: devirtualize KReadableEvent::Reset, KWorkerTask::DoWorkerTask 2021-10-26 01:11:15 -07:00
Michael Scire
390ce66da1 svc: refactor/rename MemoryInfo fields 2021-10-07 23:06:28 -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
993ffbfdcd kern: unify all waiting semantics to use single api 2021-09-19 10:35:39 -07:00
Michael Scire
ecb607bade kern/svc: implement IoPool/Region svc support 2021-09-19 10:35:39 -07:00
Michael Scire
b579a6d75e svc/kern/dd: remove MapDeviceAddressSpace() 2021-09-19 10:35:39 -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
5a41163576 kern: improve kdebug attach semantics 2021-09-19 10:35:38 -07:00
Michael Scire
62655a9e3b kern: optimize logging for release kernel strings (saves printf space in .text) 2021-09-19 10:35:37 -07:00
Michael Scire
2913096bc4 kern: kill the interrupt task manager thread 2021-09-19 10:35:36 -07:00
Michael Scire
2361bee5fe kern: delete KWritableEvent, devirtualize KReadableEvent Signal/Clear 2021-09-19 10:35:36 -07:00
Michael Scire
cbec3828bf kern: KConditionVariable arbiter functions now static 2021-09-19 10:35:36 -07:00
Michael Scire
b4c67d9c3b kern: update GetInfo logic for tick count InfoTypes 2021-09-19 10:35:35 -07:00
Michael Scire
33d58424c7 kern: add hardware single step extension 2021-09-19 10:35:28 -07:00
Michael Scire
e9d44eb71a kern: fuck the KPolice^H^H^H^H^H^HPageGroups 2021-04-11 03:59:20 -07:00
Michael Scire
40f3724891 kern: simplify handle table registration for port/session 2021-04-11 03:59:18 -07:00
Michael Scire
7c35303c62 kern: KAutoObject destruction is now scheduled for next dpc-time 2021-04-11 03:59:16 -07:00
Michael Scire
ec7e3fb07f kern: update process/thread for new running/termination semantics 2021-04-11 03:59:10 -07:00
Michael Scire
e40ccfb4ca kern: add new checks to SetThreadPriority/CoreMask 2021-04-11 03:59:08 -07:00
Michael Scire
f09107ff50 kern: add extension InfoType for retrieving current process handle. 2021-04-11 03:59:01 -07:00
Michael Scire
832f0f441d kern: fix support for virtual core IDs 2021-02-15 19:51:57 -08:00
Michael Scire
514756094b kern: fix svc bounds checking for main memory size 4GB -> 8GB (closes #1320) 2021-01-13 10:41:26 -08:00
Michael Scire
02453fc15f kern: add page table contents debug 2020-12-19 10:21:46 -08:00
Michael Scire
eb621c6aae kern: implement memory debug 2020-12-11 03:49:02 -08:00
Michael Scire
7519d17941 kern: add kernel object debug 2020-12-11 03:49:01 -08:00
Michael Scire
4c0b780017 kern: implement port debug 2020-12-11 03:49:01 -08:00
Michael Scire
f3882fa0f7 kern: add handle table/process/suspend/resume debug 2020-12-11 03:49:01 -08:00
Michael Scire
9784530bcf kern: implement thread call stack debug 2020-12-11 03:49:00 -08:00
Michael Scire
a7b7dd1257 kern: add debug thread dump 2020-12-11 03:49:00 -08:00
Michael Scire
ccd1f3b982 kern: add support for InfoType_FreeThreadCount 2020-12-11 03:48:56 -08:00