Commit Graph

127 Commits

Author SHA1 Message Date
Michael Scire
7f3ccf945a kern: refactor FindFreeArea region search logic per 20.0.0 changes 2025-05-09 12:10:07 -07:00
Michael Scire
0d0f533805 kern: update instruction cache invalidation logic in KPageTableBase to reflect 20.0.0 changes 2025-05-09 12:10:07 -07:00
Michael Scire
73dd0b5019 kern: update KAddressSpaceInfo to reflect 20.0.0 changes 2025-05-09 12:10:04 -07:00
Michael Scire
28ad01341a kern: specify allowable ipc client memory attr via inverted-whitelist, not blacklist 2024-10-15 21:51:40 -07:00
Michael Scire
b70e367745 kern/ldr: add support for --x executables 2024-10-15 21:51:39 -07:00
Michael Scire
49f2449073 kern/strat: update for new DebugFlags capability semantics 2024-10-15 21:51:38 -07:00
Michael Scire
989b494a86 kern: eliminate use of KMemoryInfo, shuffle KMemoryBlock fields 2024-10-15 21:51:36 -07:00
Michael Scire
7be7c1ba7c kern: KAddressSpaceInfo now takes CreateProcessFlags in getters 2024-10-15 21:51:35 -07:00
Michael Scire
d7867cccd7 kern: fix whoops in new page table logic 2024-03-29 02:55:06 -07:00
Michael Scire
6571df6cbc kern: implement new attr tracking for memory range/traversal context 2024-03-29 02:55:04 -07:00
Michael Scire
5f4f668d97 kern: simplify size calculations in KPageTableBase::Read/WriteDebugIoMemory 2024-03-29 02:55:04 -07:00
Michael Scire
7ef8ee44f8 kern: pass properties directly to KPageTableBase::AllocateAndMapPagesImpl 2024-03-29 02:55:03 -07:00
Michael Scire
1e2dc76755 kern: take alignment argument in KMemoryManager::AllocateAndOpen 2024-03-29 02:55:03 -07:00
Michael Scire
60e3c8a4cc kern/os: support CreateProcessFlag_EnableAliasRegionExtraSize 2024-03-29 02:55:02 -07:00
Michael Scire
8af707b13f kern: revise KPageTableBase region layout logic to match 18.0.0 changes 2024-03-29 02:55:02 -07:00
Michael Scire
e015f83806 kern: fix various comment/style hygiene issues (thanks @liamwhite) 2024-03-29 02:54:55 -07:00
Michael Scire
43b8461b5f kern/svc: fix query/insecure names 2023-11-16 16:25:26 -07:00
Michael Scire
74d96b5fea kern: fix minor sin 2023-10-16 12:30:43 -07:00
Michael Scire
e07b0a924d kern: Add special-case for InvalidateProcessDataCache on current process 2023-10-12 09:22:26 -07:00
Michael Scire
6dcf506423 kern: KPageTable: remove MapFirst operation, replace with MapFirstGroup 2023-10-12 09:22:25 -07:00
Michael Scire
15ca0c1b10 kern: implement PermissionLock, update KPageTableBase attribute/alignment checks 2023-10-12 09:22:24 -07:00
Michael Scire
d4319842a9 kern: KPageTableBase::CheckMemoryState now invokes a helper 2023-10-12 09:22:23 -07:00
Michael Scire
c8f04e21e5 kern: update KMemoryState, remove bijection (separate IoRegister/IoMemory) 2023-10-12 09:22:23 -07:00
Michael Scire
2db2e41398 kern: track heap in KPageTableBase::MemoryRange 2023-05-08 18:06:06 -07:00
Michael Scire
8afa5a9057 kern: update for new ChangePermissions page table operation 2023-02-23 09:00:30 -07:00
Michael Scire
07213a23fb kern: update UnmapIoRegion for new Mapping_Memory handling 2023-02-23 09:00:28 -07:00
Michael Scire
22a4a85fb2 kern: implement Svc(Un)MapInsecureMemory 2022-10-12 09:15:50 -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
8ca94db643 kern: implement K(Secure)SystemResource 2022-10-12 09:15:48 -07:00
Michael Scire
52e51c0634 kern: implement additional randomness in KPageHeap allocations 2022-03-23 09:16:05 -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
SciresM
823c0df6b9 kern: avoid constexpr init for many objects (avoids unnecessary memory clear) (#1668) 2021-10-26 01:11:13 -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
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
22bb619873 kern: add new KMemoryState 2021-09-19 10:35:37 -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
3ebf91304e kern: update Initialize0 for new changes 2021-04-11 03:59:15 -07:00
Michael Scire
2b10401498 kern: if a page table region is zero-size, nothing overlaps it 2021-04-11 03:59:13 -07:00
Michael Scire
50ce41adf2 kern: use KScopedLightLockPair helper for page table pair-locks 2021-04-11 03:59:12 -07:00
Michael Scire
43900d4765 kern: track mapped ipc server memory in page table 2021-04-11 03:59:12 -07:00
Michael Scire
8df6062a1d kern: add KPageTableBase::Read/WriteDebugIoMemory 2021-04-11 03:59:12 -07:00
Michael Scire
a9f81928f7 kern: flush memory before reading in KPageTableBase::ReadDebugMemory 2021-04-11 03:59:11 -07:00
Michael Scire
6eda131ab6 kern: update KMemoryBlockManagerUpdaterAllocator for new ctor/init semantics 2021-04-11 03:59:11 -07:00
Michael Scire
ca5e69f16d kern: greatly improve codegen for atomics, scheduler 2021-01-13 10:41:26 -08:00