Commit Graph

465 Commits

Author SHA1 Message Date
Michael Scire
62bdae5b3f kern: devirtualize most things that are free to devirtualize (see #1672) 2021-10-26 01:11:15 -07:00
Michael Scire
6dbdfa0384 kern: use optimized red black tree finds for remaining holdouts 2021-10-26 01:11:14 -07:00
Michael Scire
7749ecabc4 kern: devirtualize several KAutoObject functions 2021-10-26 01:11:14 -07:00
Michael Scire
89f01cb068 kern: KCacheHelper: better reflect nintendo coremask clearing logic 2021-10-26 01:11:14 -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
00353a05e9 kern: use new AtomicRef, use Atomic<bool> 2021-10-26 01:11:13 -07:00
Michael Scire
0d1ec0739f util: better match true std::atomic semantics 2021-10-26 01:11:13 -07:00
Michael Scire
d3b358bbb9 kern/util: use custom atomics wrapper to substantially improve codegen 2021-10-26 01:11:12 -07:00
Michael Scire
6f9d5ecd0d kern: use 13.0.0 revised KLightLock logic 2021-10-26 01:11:12 -07:00
Michael Scire
c77900d598 kern: fix capability check for thread priorities 2021-10-26 01:11:12 -07:00
Michael Scire
573769303b kern: update scheduler for 13.0.0 change, fix some ctz/clz bugs 2021-10-26 01:11:11 -07:00
Michael Scire
2827f6300e kern: fix use of plr vs plr_heap, fix close/unlock order in ArbitrateLock 2021-10-26 01:11:11 -07:00
Michael Scire
960c5c19f9 ams: improve offsetof style consistency 2021-10-26 01:11:10 -07:00
Michael Scire
f8d59254cf kern: devirtualize KAutoObject::DynamicCast<>()
This is an optimization that saves the most common type of virtual call in the kernel (DynamicCast)
by storing class token as a member, rather than getting it via virtual call every time.

This does not currently cost any memory space on 64-bit targets, due to pre-existing padding space.

This optimization can be turned off via a compile-time flag for accuracy.
2021-10-26 01:11:09 -07:00
Michael Scire
05c7ba6439 kern/util: update structure layouts to match Nintendo (saves 0x10 per KThread/KSession) 2021-10-26 01:11:09 -07:00
Michael Scire
65e89cf1b8 kern: fix some lingering non-m_ member variables 2021-10-15 23:54:35 -07:00
Michael Scire
3b5f56ab9f ams: replace most remaining operator & with std::addressof 2021-10-15 23:54:34 -07:00
Michael Scire
5c32ec11ea strat: refactor address taking of form &var[...] 2021-10-15 23:54:34 -07:00
Michael Scire
390ce66da1 svc: refactor/rename MemoryInfo fields 2021-10-07 23:06:28 -07:00
Michael Scire
782e449543 strat: remove map namespace, svc: add address space defs 2021-10-07 23:06:27 -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
204b389252 kern: devirtualize page table operations 2021-09-24 09:17:11 -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
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
5a41163576 kern: improve kdebug attach semantics 2021-09-19 10:35:38 -07:00
Michael Scire
ccdee05857 kern: update KPageTable::Unmap block closing logic 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
22bb619873 kern: add new KMemoryState 2021-09-19 10:35:37 -07:00
Michael Scire
010fb5986e kern: KWorkerTaskManager no longer tracks id 2021-09-19 10:35:37 -07:00
Michael Scire
99e78d285b kern: KSchedulerInterruptTask -> KSchedulerInterruptHandler 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
ccbca5fb57 kern: remove per-KInterruptEventTask locks 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
8939693d33 kern: optimize handle table layout 2021-09-19 10:35:35 -07:00
Michael Scire
b4c67d9c3b kern: update GetInfo logic for tick count InfoTypes 2021-09-19 10:35:35 -07:00
Michael Scire
b375041d9a kern: port limit is now 0x180 2021-09-19 10:35:35 -07:00
Michael Scire
0a262ed268 kern: improve single-step around user-exception entry 2021-09-19 10:35:29 -07:00
Michael Scire
2b91674b42 kern: fix spsr register in RestoreContext 2021-09-19 10:35:29 -07:00
Michael Scire
e9a80d95e7 kern: optimize hw-single-step management 2021-09-19 10:35:29 -07:00
Michael Scire
33d58424c7 kern: add hardware single step extension 2021-09-19 10:35:28 -07:00
Michael Scire
42ef588bf4 kern: improve some debug output 2021-08-20 13:34:02 -07:00
Michael Scire
d81e2f981e kern: fix same is_current check in GetThreadContext 2021-08-20 13:34:02 -07:00
Michael Scire
4e0670485b kern: fix check for thread-is-current in KDebugBase::SetThreadContext 2021-08-20 13:34:01 -07:00
Michael Scire
d264381030 kern: remove firmare-specific SignalAndModify impl
Nintendo made this breaking change because there was zero official software relying on it,
so it's safe for us to make the same change.
2021-08-20 13:34:01 -07:00