Commit Graph

1331 Commits

Author SHA1 Message Date
74ff1db758 kernel: Account for system resource size for memory usage
GetTotalPhysicalMemoryAvailableWithoutSystemResource & GetTotalPhysicalMemoryUsedWithoutSystemResource seem to subtract the resource size from the usage.
2020-06-10 14:49:00 +10:00
c0d2e3212f Downgrade "handle not signaled" error to trace
clogs logs quite a bit
2020-06-04 22:27:15 +10:00
1121960f0e Merge pull request #3879 from lioncash/global2
hle_ipc: Eliminate core memory globals
2020-05-07 19:13:34 -04:00
88141bb2d4 Merge pull request #3881 from lioncash/mem-warning
kernel/memory: Resolve several compiler warnings
2020-05-05 15:41:18 -04:00
4620580245 kernel/memory: Remove #pragma once within cpp file
This isn't necessary in a cpp file and will cause warnings on clang.
2020-05-03 13:42:07 -04:00
1ecaa86a52 kernel/memory: Remove unused includes
Prevents header churn and needing to recompile these files if these
headers are ever changed in the future.
2020-05-03 13:41:18 -04:00
a2e61e6542 kernel/memory: Remove unused variables in memory_block_manager
Prevents unused variable warnings.
2020-05-03 13:36:20 -04:00
26aee55aef kernel/memory: Make use of std::array consistently in address_space_info
This allows tuning standard library implementations to enable or disable
range checks at runtime, which is nicer for debugging.
2020-05-03 13:34:24 -04:00
dfa582169b kernel/memory: Resolve -Wshadow warnings
Prevents variable name clashing.
2020-05-03 13:29:42 -04:00
93c083aef1 kernel/memory: Amend potential encoding warnings
While èis generally representable in some language encodings, in some
it isn't and will result in compilation warnings occurring. To remain
friendly with other language's codepages on Windows, we normalize it to
an ASCII e.
2020-05-03 13:01:03 -04:00
0ec07e8763 hle_ipc: Eliminate core memory globals
We can just pass the required instances into the constructor of the
request, eliminating all usages of the global system accessor.
2020-05-03 12:57:40 -04:00
aabf5b2059 readable_event: Remove unnecessary semicolon in Signal()
Resolves a -Wextra-semi warning.

While we're at it, we can invert the branch to form a guard clause,
unindenting all of the contained code.
2020-05-02 14:07:31 -04:00
b6538c3e7c kernel: Don't fail silently 2020-04-29 14:53:53 +10:00
5cb531b6cf Merge pull request #3783 from lioncash/pointer
physical_core: Make use of std::make_unique instead of std::make_shared in ctor
2020-04-28 21:38:02 -04:00
2261cf24af kernel: Bad GetInfo ids should not be marked as stubs
As we currently match hardware and don't return a successful result, these should be marked as errors instead of warnings and as stubs.
2020-04-29 01:17:59 +10:00
d1e7cf3bdc Merge pull request #3780 from lioncash/process
svc: Re-add MapProcessCodeMemory/UnmapProcessCodeMemory
2020-04-24 23:22:26 -04:00
cc84b48ce5 physical_core: Make use of std::make_unique instead of std::make_shared in ctor
We can also allow unicorn to be constructed in 32-bit mode or 64-bit
mode to satisfy the need for both interpreter instances.

Allows this code to compile successfully of non x86-64 architectures.
2020-04-24 00:20:58 -04:00
f24c67877b Merge pull request #3777 from lioncash/warn
page_table: Remove unused captures
2020-04-23 21:47:54 -03:00
db3dcb2f64 Merge pull request #3778 from lioncash/unused-var
svc: Remove unused variable
2020-04-23 21:47:24 -03:00
ce7c02735e shared_memory: Amend doxygen reference
Amends the parameter to match the documentation reference.

Resolves a -Wdocumentation warning with clang.
2020-04-23 18:42:14 -04:00
4730347f8e svc: Re-add MapProcessCodeMemory/UnmapProcessCodeMemory
These were lost in the re-implementation of the virtual memory manager.
2020-04-23 18:12:04 -04:00
bed4865981 svc: Remove unused variable
Since the VMM refactor, this is no longer used or needed.
2020-04-23 17:53:26 -04:00
f77b5dfe81 page_table: Remove unused captures
Any time the lambda function is called, the permission being used in the
capture would be passed in as an argument to the lambda, so the capture
is unnecessary.
2020-04-23 17:33:08 -04:00
ff0c49e1ce kernel: memory: Improve implementation of device shared memory. (#3707)
* kernel: memory: Improve implementation of device shared memory.

* fixup! kernel: memory: Improve implementation of device shared memory.

* fixup! kernel: memory: Improve implementation of device shared memory.
2020-04-23 11:37:12 -04:00
bee2c64b34 Merge pull request #3725 from MerryMage/fpcr
thread: FPCR.FZ is likely not 1 (and FPCR.RMode = TieAway and FPCR.DN = 0)
2020-04-22 19:49:13 -04:00
10fb26f69c Merge pull request #3696 from lioncash/cast-size
hle_ipc: Remove std::size_t casts where applicable
2020-04-19 14:24:15 -04:00
2bfac7b61d thread: FPCR.FZ is likely not 1 2020-04-19 08:37:20 +01:00
7e585bce28 memory/slab_heap: Make use of static_cast over reinterpret_cast
Casting from void* with static_cast is permitted by the standard, so we
can just make use of that instead.
2020-04-17 19:38:59 -04:00
8bbe74a8dc core: hle: Address various feedback & code cleanup.
- Should be no functional changes.
2020-04-17 00:59:36 -04:00
6f3266e98b memory: Add copyright notice for Atmosphere where applicable. 2020-04-17 00:59:35 -04:00
02547a0cb4 kernel: Remove old VMManager class. 2020-04-17 00:59:35 -04:00
a8292f6cd9 kernel: memory: page_table: Simplify GetPhysicalAddr impl. 2020-04-17 00:59:35 -04:00
c629e544a7 kernel: svc: Updates for new VMM.
- Includes removing some SVC impls. that are untested.
2020-04-17 00:59:34 -04:00
108564df57 kernel: process: Updates for new VMM. 2020-04-17 00:59:33 -04:00
fc61cb44ee kernel: resource_limit: Reserve physical memory. 2020-04-17 00:59:32 -04:00
8f75524e55 kernel: Initialize memory layout for new VMM. 2020-04-17 00:59:32 -04:00
11c02a50e9 core: system: Rename GetDeviceManager -> DeviceManager.
- More consistent with other system components.
2020-04-17 00:59:32 -04:00
3fcc4cab4f kernel: transfer_memory: Refactor for new VMM. 2020-04-17 00:59:32 -04:00
d0162fc3d7 kernel: shared_memory: Refactor for new VMM. 2020-04-17 00:59:32 -04:00
a238d08f71 kernel: errors: Add ERR_OUT_OF_RESOURCES. 2020-04-17 00:59:31 -04:00
ffc3de762b kernel: process_capability: Update to use Memory::PageTable. 2020-04-17 00:59:31 -04:00
84f1b6d530 kernel: memory: Add PageTable class, to manage process address space. 2020-04-17 00:59:31 -04:00
cfae8a1c1a kernel: memory: Add MemoryLayout class, to build physical memory layout. 2020-04-17 00:59:31 -04:00
5d6e8a5b44 kernel: memory: Add MemoryManager class, to manage page heaps. 2020-04-17 00:59:30 -04:00
548ef190ab kernel: memory: Add MemoryBlockManager class, to manage memory blocks. 2020-04-17 00:59:30 -04:00
3927012734 kernel: memory: Add PageHeap class, to manage a heap of pages. 2020-04-17 00:59:30 -04:00
dc720311cc kernel: memory: Add PageLinkedList class, to manage a list of pages. 2020-04-17 00:59:30 -04:00
81cb4d3c7f kernel: memory: Add system_control code, which will be used for ASLR support. 2020-04-17 00:59:30 -04:00
fc040b5b70 physical_memory: Add missing include for <vector>. 2020-04-17 00:59:30 -04:00
c2f4dcb1e3 kernel: memory: Add MemoryBlock class, for managing memory blocks and their state. 2020-04-17 00:59:29 -04:00