bunnei
74f0ee726c
hle: kernel: KMemoryManager: Add CalculateManagementOverheadSize.
2021-03-21 14:45:02 -07:00
bunnei
693f08cd8b
hle: kernel: KMemoryManager: Add aliases.
2021-03-21 14:45:02 -07:00
bunnei
d25a181956
hle: kernel: Add architecture and board specific memory regions.
2021-03-21 14:45:02 -07:00
bunnei
0f5efc8f29
hle: kernel: KMemoryRegion: Derive region values.
2021-03-21 14:45:02 -07:00
bunnei
0aac780e5d
hle: kernel: Migrate some code from Common::SpinLock to KSpinLock.
2021-03-21 14:45:02 -07:00
bunnei
bbc5e3a0aa
hle: kernel: Add initial KMemoryRegionType module.
2021-03-21 14:45:02 -07:00
bunnei
3000ebbf08
hle: kernel: Move KMemoryRegion to its own module and update.
2021-03-21 14:45:02 -07:00
bunnei
e4b692bd16
common: Fiber: use a reference for YieldTo.
...
- Fixes another small leak.
2021-03-07 13:46:53 -08:00
bunnei
75519d107f
hle: kernel: KThread: Rework dummy threads & fix memory leak.
...
- Dummy threads are created on thread local storage for all host threads.
- Fixes a leak by removing creation of fibers, which are not applicable here.
2021-03-05 17:10:57 -08:00
bunnei
845a217d5e
Revert "core: Switch to unique_ptr for usage of Common::Fiber."
2021-03-05 17:08:17 -08:00
bunnei
3322f10f84
core: Switch to unique_ptr for usage of Common::Fiber.
...
- With using unique_ptr instead of shared_ptr, we have more explicit ownership of the context.
- Fixes a memory leak due to circular reference of the shared pointer.
2021-02-27 11:56:04 -08:00
bunnei
cfe967f1ac
Merge pull request #5953 from bunnei/memory-refactor-1
...
Kernel Rework: Memory updates and refactoring (Part 1)
2021-02-27 12:48:35 -07:00
ameerj
0d9fb9ca27
kernel: Fix resource release exception on exit
...
After rewriting the resource limit, objects releasing reserved resources require a live kernel instance.
This commit fixes exceptions that occur due to the kernel being destroyed before some objects released their resources, allowing for a graceful exit.
2021-02-20 20:51:11 -05:00
bunnei
5dbcaa2970
hle: kernel: Migrate PageHeap/PageTable to KPageHeap/KPageTable.
2021-02-18 16:16:25 -08:00
bunnei
c21aa2479a
hle: kernel: Migrate MemoryManager to KMemoryManager.
2021-02-18 16:16:25 -08:00
bunnei
21a22af0c5
hle: kernel: Migrate PageLinkedList to KPageLinkedList.
2021-02-18 16:16:25 -08:00
bunnei
a4c5e6d964
hle: kernel: Migrate to KMemoryBlock, KMemoryBlockManager, and others.
2021-02-18 16:16:25 -08:00
bunnei
5702047b65
hle: kernel: Migrate SlabHeap to KSlabHeap.
2021-02-18 16:16:25 -08:00
bunnei
8c9e87ab66
hle: kernel: Migrate MemoryLayout to KMemoryLayout.
2021-02-18 16:16:25 -08:00
bunnei
867294d639
hle: kernel: Migrate AddressSpaceInfo to KAddressSpaceInfo.
2021-02-18 16:16:25 -08:00
bunnei
921fd4932f
hle: kernel: memory_manager: Rename AllocateContinuous to AllocateContinuous.
2021-02-18 16:16:24 -08:00
bunnei
f82b15089b
hle: kernel: KSystemControl does not belong in Memory namespace.
2021-02-18 16:16:24 -08:00
bunnei
5a1fe8c70a
hle: kernel: memory: PageHeap: Migrate to KPageBitmap class.
2021-02-18 16:16:24 -08:00
bunnei
cafc6c3707
hle: kernel: Add KPageBitmap class.
2021-02-18 16:16:24 -08:00
bunnei
d072e9b977
hle: kernel: system_control: Add function GenerateRandomU64.
2021-02-18 16:16:24 -08:00
bunnei
c51da1b0d5
hle: kernel: Add KSpinLock implementation.
2021-02-18 16:16:24 -08:00
bunnei
f8d8755776
hle: kernel: Rename SharedMemory to KSharedMemory.
2021-02-18 16:16:12 -08:00
ameerj
faae6b5595
kernel: More accurately reserve and release resources
2021-02-12 19:05:24 -05:00
ameerj
48b09cc56d
kernel: KScopedReservation implementation
...
This implements KScopedReservation, allowing resource limit reservations to be more HW accurate, and release upon failure without requiring too many conditionals.
2021-02-12 18:57:34 -05:00
Chloe
e62886ead0
kernel: Unify result codes ( #5890 )
...
* kernel: Unify result codes
Drop the usage of ERR_NAME convention in kernel for ResultName. Removed seperation between svc_results.h & errors.h as we mainly include both most of the time anyways.
* oops
* rename errors to svc_results
2021-02-12 15:43:01 -08:00
Chloe
a5dd2bb598
Merge pull request #5872 from lioncash/svc-error
...
svc: Provide more detailed error logs for svc functions
2021-02-08 12:27:36 +11:00
Lioncash
6764c7ce52
k_address_arbiter: Unfold R_UNLESS macros
...
Allows for more descriptive error messages and also doesn't hide
control-path exit returns from the reader.
2021-02-06 04:08:27 -05:00
Lioncash
8884e73c8b
k_address_arbiter: Remove unnecessary usages of std::addressof
...
This is a useful function in a generic context or with types that
overload unary operator&. However, primitives and pointers will never do
this, so we can opt for a more straightforward syntax.
2021-02-06 04:06:33 -05:00
Lioncash
c8cc1c301e
k_address_arbiter: Remove dead code
...
This code is never used, so we can remove it. It's in version control,
so it can always be brought back when needed.
2021-02-06 04:06:33 -05:00
Lioncash
8618ac9b8b
svc: Provide more detailed error logs for svc functions
...
Allows SVC calls to have much more informative information during error
cases. This also doesn't hide control flow returns from the reader.
2021-02-06 02:03:40 -05:00
bunnei
4e7b713922
Merge pull request #5862 from bunnei/kevent
...
Kernel Rework: Refactor KEvent/KReadableEvent/KWritableEvent
2021-02-05 23:00:43 -08:00
bunnei
c48847e7d6
Merge pull request #5875 from lioncash/identifier
...
k_priority_queue: Minor cleanup
2021-02-05 17:02:13 -08:00
bunnei
7126a200c4
hle: kernel: Drop R_UNLESS_NOLOG in favor of expanded if-statement.
2021-02-05 14:03:36 -08:00
bunnei
308995e446
hle: kernel: KAddressArbiter: Remove noisy error log.
2021-02-05 14:03:36 -08:00
bunnei
9c2719d86f
hle: kernel: svc: Cleanup KEvent/KReadableEvent/KWritableEvent SVCs.
2021-02-05 14:03:36 -08:00
bunnei
0508831455
hle: kernel: Reimplement KReadableEvent and KWritableEvent.
2021-02-05 14:03:32 -08:00
bunnei
9da7b774ae
hle: kernel: Implement KEvent.
2021-02-05 14:00:36 -08:00
bunnei
80a509355c
hle: kernel: KAddressArbiter: Use R_UNLESS_NOLOG where applicable.
2021-02-05 14:00:36 -08:00
bunnei
80d0eb3bbd
hle: kernel: Rename WritableEvent to KWritableEvent.
2021-02-05 14:00:36 -08:00
bunnei
284a4d9283
hle: kernel: Rename ReadableEvent to KReadableEvent.
2021-02-05 14:00:36 -08:00
Lioncash
7da83ef6f7
k_affinity_mask: Avoid implicit truncation to bool
...
This can cause compiler warnings. Instead, we can explicitly add a
boolean expression around it to naturally turn the result into a bool.
2021-02-04 15:35:46 -05:00
Lioncash
9fb1a47658
k_priority_queue: Unfold several declval usages
...
Given these are only used as function existence checks, we can simplify
some usages of declval, given they aren't particularly useful here.
Reduces a few template instantiations, which at most reduces compile
times a tiny bit.
2021-02-04 15:18:58 -05:00
Lioncash
8170435ec5
k_priority_queue: Simplify affinity mask type alias
...
We can make use of the _t variants of the templates to cut down on a
little bit of verbosity.
2021-02-04 14:57:41 -05:00
Lioncash
4431b499d0
k_priority_queue: Resolved reserved identifier
...
An identifier containing a starting underscore followed by a capital
letter is reserved by the standard. It's trivial to avoid this by moving
the underscore to the end of the identifier.
While the likelihood of clashing here being minimal, we can turn a
"should not break" scenario into a definitive "will not break" one, so
why not?.
2021-02-04 14:55:08 -05:00
Chloe Marcec
6ff08eb44f
Simplify limitableresource names
2021-02-03 12:55:16 +11:00