bunnei
aee4fd29c9
Merge pull request #6099 from bunnei/derive-mem
...
Kernel Rework: Derive memory regions from board layout.
2021-04-10 00:02:52 -07:00
ameerj
c7a0ebbba7
kernel: Increase event and session counts
...
12.x increased the number of available sessions and event resource counts
2021-04-07 01:01:05 -04:00
bunnei
e8dd3eca47
hle: kernel: Initialize preemption task after schedulers.
...
- Fixes a startup crash that occurs if CoreTiming tries to preempt before kernel initialization completes.
2021-03-27 10:04:13 -07:00
bunnei
50cdb650af
hle: kernel: Breakup InitializeMemoryLayout.
2021-03-23 18:47:16 -07:00
bunnei
9fe89ad30d
common: common_sizes: Move sizes to the Common namespace.
2021-03-23 18:31:46 -07:00
bunnei
dc2507fce2
hle: kernel: Remove unused variable.
2021-03-21 15:47:24 -07:00
bunnei
79ca47ab3a
hle: kernel: k_memory_layout: Derive memory regions based on board layout.
2021-03-21 14:45:13 -07:00
bunnei
3000ebbf08
hle: kernel: Move KMemoryRegion to its own module and update.
2021-03-21 14:45:02 -07: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
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
c21aa2479a
hle: kernel: Migrate MemoryManager to KMemoryManager.
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
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
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 Marcec
6ff08eb44f
Simplify limitableresource names
2021-02-03 12:55:16 +11:00
Chloe Marcec
68a52e9050
kernel: Rewrite resource limit to be more accurate
...
Matches closer to hardware
2021-01-30 20:40:49 +11:00
bunnei
1a1bef5154
hle: kernel: threading: Fix bug with host thread naming.
2021-01-28 21:42:26 -08:00
bunnei
cf3a05cf8c
hle: kernel: Allocate a dummy KThread for each host thread, and use it for scheduling.
2021-01-28 21:42:26 -08:00
bunnei
67d28075dd
kernel: Fix build errors.
2021-01-28 21:42:26 -08:00
bunnei
f34dd04d09
hle: kernel: Recode implementation of KThread to be more accurate.
2021-01-28 21:42:26 -08:00
bunnei
4440a59cb6
kernel: k_light_lock: Simplify EmuThreadHandle implementation.
2021-01-28 21:42:26 -08:00
bunnei
eb396cd021
hle: kernel: KThread: Fix ThreadType definition.
2021-01-28 21:42:25 -08:00
bunnei
d49e29d866
hle: kernel: Move single core "phantom mode" out of KThread.
...
- This is a workaround that does not belong in a kernel primitive.
2021-01-28 21:42:25 -08:00
bunnei
e74f682506
hle: kernel: KThread: Remove thread types that do not exist.
2021-01-28 21:42:25 -08:00
bunnei
3d70b4a4ea
core: hle: kernel: Rename Thread to KThread.
2021-01-28 21:42:25 -08:00
bunnei
e89be18c79
hle: kernel: thread: Preserve thread wait reason for debugging only.
...
- This is decoupled from core functionality and used for debugging only.
2021-01-11 14:23:17 -08:00
bunnei
818ff3901a
hle: kernel: Rename thread "status" to "state".
2021-01-11 14:23:16 -08:00
bunnei
9744afa8b1
hle: kernel: thread: Replace ThreadStatus/ThreadSchedStatus with a single ThreadState.
...
- This is how the real kernel works, and is more accurate and simpler.
2021-01-11 14:23:16 -08:00
bunnei
2feb4d56e9
core: hle: kernel: Update KSynchronizationObject.
2021-01-11 14:23:16 -08:00
bunnei
407d3b7374
hle: kernel: Manage service threads on another thread.
...
- This is to allow service threads to defer destruction of themselves.
2020-12-29 16:46:29 -08:00
bunnei
127bb064f7
hle: kernel: Manage host thread IDs using TLS.
...
- Avoids the need to have a large map of host to guest thread IDs.
2020-12-29 15:55:30 -08:00
bunnei
67051cf10c
hle: kernel: Move ServiceThread ownership to KernelCore.
...
- Fixes a circular dependency which prevented threads from being released on shutdown.
2020-12-29 01:12:39 -08:00
bunnei
5d4fa58af2
core: hle: kernel: Clear process list on boot.
2020-12-28 21:33:34 -08:00
bunnei
838c266e82
core: kernel: Clear process list earlier.
2020-12-28 16:33:48 -08:00
bunnei
56be5d7ba9
core: hle: server_session: Use separate threads for each service connection.
2020-12-28 16:33:47 -08:00
bunnei
de522657dd
hle: kernel: Migrate to KScopedSchedulerLock.
2020-12-06 00:03:24 -08:00
bunnei
039844bbb9
hle: kernel: Rewrite scheduler implementation based on Mesopshere.
2020-12-06 00:03:24 -08:00
bunnei
a5b73195c9
core: arm: Implement InvalidateCacheRange for CPU cache invalidation.
2020-11-29 01:31:52 -08:00
bunnei
b92d8acd2f
common: fiber: Use boost::context instead of native fibers on Windows.
2020-11-29 01:31:51 -08:00
bunnei
aaffe73f47
hle: kernel: multicore: Replace n-JITs impl. with 4 JITs.
2020-11-29 01:31:51 -08:00
ReinUsesLisp
1a1ca86eb5
hle/kernel: Remove unused registered_core_threads to fix data races
...
This member was only used on asserts and it triggered data races.
Remove it to fix them.
2020-10-27 01:55:39 -03:00
bunnei
deb3536936
Revert "core: Fix clang build"
2020-10-20 19:07:39 -07:00
Lioncash
1367e8fb75
kernel: Fix build with recent compiler flag changes
...
This slipped through the cracks due to another change being merged
before the compiler flag changes.
2020-10-20 20:23:18 -04:00
LC
b02702a86a
Merge pull request #4796 from lioncash/clang
...
core: Fix clang build
2020-10-20 19:19:12 -04:00
Lioncash
18636013c9
core: Fix clang build
...
Recent changes to the build system that made more warnings be flagged as
errors caused building via clang to break.
Fixes #4795
2020-10-17 19:50:39 -04:00
ReinUsesLisp
a13623c68b
kernel: Implement host thread register methods without locking
...
Locks on GetCurrentHostThreadID were causing performance issues
according to Visual Studio's profiler. It was consuming twice the time
as arm_interface.Run(). The cost was not in the function itself but in
the lockinig it required.
Reimplement these functions using atomics and static storage instead of
an unordered_map. This is a side effect to avoid locking and using linked
lists for reads.
Replace unordered_map with a linear search.
2020-10-13 18:00:25 -03:00