summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_page_table.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-11-10kernel: add KPageTableBaseLiam1-3519/+0
Co-authored-by: Kelebek1 <eeeedddccc@hotmail.co.uk>
2023-10-22kernel: update KProcessLiam1-7/+7
2023-10-20k_page_table: add MapFirstGroupLiam1-29/+39
2023-10-20k_page_table: implement PermissionLockedLiam1-18/+36
2023-10-20k_page_table: add new CheckMemoryState helperLiam1-12/+33
2023-10-20kernel: split Io memory state, add PermissionLocked attributeLiam1-74/+73
2023-10-12k_page_table: add missing page group open when locking memoryLiam1-0/+5
2023-10-05kernel: implement transfer memoryLiam1-0/+17
2023-10-02k_page_table: skip page table clearing on finalizationLiam1-4/+8
2023-08-08core: remove ResultVal typeLiam1-1/+1
2023-03-24memory: rename global memory references to application memoryLiam1-26/+28
2023-03-22kernel: use KTypedAddress for addressesLiam1-184/+208
2023-02-14remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistencyarades791-2/+2
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14add static lifetime to constexpr values to force compile time evaluation where possiblearades791-2/+2
Signed-off-by: arades79 <scravers@protonmail.com>
2023-01-26kernel: unbreak min/max template deduction on Apple ClangLiam1-2/+2
2023-01-22kernel: KPageTable: updateLiam1-169/+375
2023-01-08Revert "Revert "k_page_group: synchronize""bunnei1-72/+70
2022-12-29Revert "k_page_group: synchronize"gidoly1-70/+72
2022-12-25k_page_table: remove HACK_OpenPages/ClosePagesLiam1-54/+53
2022-12-25k_page_group: synchronizeLiam1-20/+19
2022-11-14Add break for default casesKyle Kienapfel1-0/+3
Visual Studio has an option to search all files in a solution, so I did a search in there for "default:" looking for any missing break statements. I've left out default statements that return something, and that throw something, even if via ThrowInvalidType. UNREACHABLE leads towards throw R_THROW macro leads towards a return
2022-11-10kernel/svc_types: refreshLiam1-7/+7
2022-11-04core: hle: kernel: k_page_table: Remove unnecessary casts.bunnei1-17/+8
2022-11-04core: hle: kernel: k_page_table: Manually open/close pages for IPC methods.bunnei1-0/+18
2022-11-04core: hle: kernel: k_page_table: Implement IPC memory methods.bunnei1-3/+809
2022-11-04core: hle: kernel: k_memory_manager: Refresh.bunnei1-166/+128
2022-11-04core: hle: kernel: Integrate system KSystemResource.bunnei1-4/+8
2022-10-19core: hle: kernel: Use result macros for new/changed code.bunnei1-61/+50
2022-10-19core: hle: kernel: k_process: Improve management of page table & cleanup.bunnei1-9/+14
2022-10-19core: hle: kernel: k_page_table: Impl. LockForUn/MapDeviceAddressSpace, cleanup.bunnei1-405/+476
2022-10-19core: hle: kernel: k_page_table: Update, and integrate with new KMemoryBlockManager/SlabManager.bunnei1-240/+379
2022-10-19core: device_memory: Templatize GetPointer(..).bunnei1-3/+3
2022-06-27core: kernel: Replace instances of KPageLinkedList with KPageGroupgerman771-24/+24
2022-06-27core: Replace all instances of ResultCode with Resultgerman771-78/+75
2022-06-22KPageTable: Remove extraneous assertMorph1-1/+0
Since start is always 0 and VAddr is unsigned, we can safely remove this assert.
2022-06-14common: Change semantics of UNREACHABLE to unconditionally crashLiam1-10/+6
2022-06-09kernel: fix KCodeMemory initializationLiam1-11/+100
2022-04-23general: Convert source file copyright comments over to SPDXMorph1-3/+2
This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-04-09hle: kernel: Invalidate entire icache in UnmapProcessMemory and UnmapCodeMemory (fixes #8174)tech-ticks1-2/+9
2022-03-26hle: kernel: k_page_table: Fix implementations of LockForCodeMemory & UnlockForCodeMemory.bunnei1-48/+12
2022-03-26hle: kernel: k_page_table: Implement LockMemoryAndOpen & UnlockMemory.bunnei1-0/+105
2022-03-26hle: kernel: k_page_table: Implement MakeAndOpenPageGroup & MakePageGroup.bunnei1-0/+77
2022-03-15core: hle: kernel: k_page_table: Add implementations of MapPages, UnmapPages, and FindFreeArea for TLS.bunnei1-0/+126
2022-03-08hle: kernel: KPageTable: Improve implementations of MapCodeMemory and UnmapCodeMemory.bunnei1-45/+114
- This makes these functions more accurate to the real HOS implementations. - Fixes memory access issues in Super Smash Bros. Ultimate that occur when un/mapping NROs.
2022-02-28hle: kernel: k_memory_manager: Rework for latest kernel behavior.bunnei1-16/+30
- Updates the KMemoryManager implementation against latest documentation. - Reworks KMemoryLayout to be accessed throughout the kernel. - Fixes an issue with pool sizes being incorrectly reported.
2022-02-27hle: kernel: k_page_heap: Remove superfluous consexpr.bunnei1-2/+2
2022-02-19fixup! core: hle: kernel: KPageTable: Improve Un/MapPhysicalMemory.bunnei1-22/+2
2022-02-19core: hle: kernel: KPageTable: Fix UnmapPages.bunnei1-3/+2
- Fixes a logic bug in KPageTable::UnmapPages.
2022-02-19core: hle: kernel: KPageTable: Improve Un/MapPhysicalMemory.bunnei1-107/+432
- Improves the implementations of MapPhysicalMemory and UnmapPhysicalMemory to more closely reflect latest HOS.
2022-02-02general: Replace NonCopyable struct with equivalentsLioncash1-0/+2
2022-02-02hle: kernel: KPageTable: Migrate locks to KScopedLightLock.bunnei1-28/+37
- More accurately reflects real kernel behavior by using guest locks.
2022-01-23core: hle: kernel: KPageTable: Various improvements to MapPages and UnmapPages.bunnei1-22/+25
2022-01-23core: hle: kernel: KPageTable: MapProcessCode: Various cleanup.bunnei1-11/+12
2022-01-23core: hle: kernel: KPageTable: ReserveTransferMemory: Various cleanup.bunnei1-6/+6
2022-01-23core: hle: kernel: KPageTable: ResetTransferMemory: Various cleanup.bunnei1-6/+5
2022-01-23core: hle: kernel: KPageTable: SetMemoryAttribute: Various cleanup.bunnei1-2/+3
2022-01-22core: hle: kernel: KPageTable: Operate: Assert lock ownership.bunnei1-2/+2
2022-01-22core: hle: kernel: KPageTable: SetHeapSize: Cleanup & take physical memory lock.bunnei1-4/+7
2022-01-22core: hle: kernel: Refactor Un/MapPhysicalMemory to remove unnecessary methods.bunnei1-49/+38
2022-01-22core: hle: kernel: Rename Un/Map to Un/MapMeory.bunnei1-2/+2
2022-01-15hle: kernel: k_memory_manager: Clear pages on allocation & free.bunnei1-8/+9
- Heap pages should be zero'd. - Also explicitly passed along heap allocation option.
2022-01-12hle: kernel: k_page_table: Update SetProcessMemoryPermission.bunnei1-31/+42
2022-01-12hle: kernel: k_page_table: ReadAndWrite -> UserReadWrite.bunnei1-14/+14
2022-01-12hle: kernel: k_page_table: Rename *ProcessCodeMemory -> *CodeMemory.bunnei1-2/+2
2022-01-08core: hle: kernel: svc: Updates to SetMemoryAttribute and SetMemoryPermission.bunnei1-13/+25
2022-01-08core: hle: kernel: k_page_table: Update CheckMemoryState.bunnei1-97/+104
2021-12-28core: hle: kernel: Updated implementation of svcSetHeapSize.bunnei1-52/+115
- Updates our svcSetHeapSize with latest HOS, furthermore allowing heap size to properly be extended/shrunk. - Validated with tests https://github.com/Atmosphere-NX/Atmosphere/blob/master/tests/TestSvc/source/test_set_heap_size.cpp.
2021-12-23core: hle: kernel: Implement SetMemoryPermission.bunnei1-0/+27
- Not seen in any games yet, but validated with kernel tests.
2021-12-06fix formattingitsmeft241-4/+1
2021-12-05kernel: svc: Implement Map/UnmapProcessMemory and Create/ControlCodeMemoryitsmeft241-1/+123
Used by Skyline modding framework
2021-11-21kernel: KPageTable: Rename SetCodeMemoryPermission to SetProcessMemoryPermissionMorph1-2/+2
2021-11-02general: Remove MakeResult helpersMorph1-2/+2
This is made obsolete by the presence of implicit constructors.
2021-10-13KPageTable: Perform ranged invalidation when unmapping code memoryMorph1-0/+2
Co-Authored-By: Fernando S. <1731197+FernandoS27@users.noreply.github.com>
2021-06-24common: Replace common_sizes into user-literalsWunkolo1-1/+4
Removes common_sizes.h in favor of having `_KiB`, `_MiB`, `_GiB`, etc user-literals within literals.h. To keep the global namespace clean, users will have to use: ``` using namespace Common::Literals; ``` to access these literals.
2021-06-02general: Replace RESULT_SUCCESS with ResultSuccessMorph1-30/+30
Transition to PascalCase for result names.
2021-05-16core: Make variable shadowing a compile-time errorLioncash1-5/+5
Now that we have most of core free of shadowing, we can enable the warning as an error to catch anything that may be remaining and also eliminate this class of logic bug entirely.
2021-05-06hle: kernel: KPageTable: CanContain should not be constexpr.bunnei1-1/+1
2021-05-06hle: kernel: Improve MapSharedMemory and implement UnmapSharedMemory.bunnei1-0/+39
2021-05-06hle: kernel: Rename Process to KProcess.bunnei1-1/+1
2021-05-06hle: kernel: svc_results: Update naming..bunnei1-3/+3
2021-02-19hle: kernel: Migrate PageHeap/PageTable to KPageHeap/KPageTable.bunnei1-61/+62
2021-02-19hle: kernel: Migrate MemoryManager to KMemoryManager.bunnei1-1/+1
2021-02-19hle: kernel: Migrate PageLinkedList to KPageLinkedList.bunnei1-15/+15
2021-02-19hle: kernel: Migrate to KMemoryBlock, KMemoryBlockManager, and others.bunnei1-226/+230
2021-02-19hle: kernel: Migrate AddressSpaceInfo to KAddressSpaceInfo.bunnei1-17/+17
2021-02-19hle: kernel: KSystemControl does not belong in Memory namespace.bunnei1-5/+6
2021-02-13kernel: KScopedReservation implementationameerj1-16/+21
This implements KScopedReservation, allowing resource limit reservations to be more HW accurate, and release upon failure without requiring too many conditionals.
2021-02-13kernel: Unify result codes (#5890)Chloe1-24/+24
* 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-03Simplify limitableresource namesChloe Marcec1-6/+5
2021-01-30kernel: Rewrite resource limit to be more accurateChloe Marcec1-6/+7
Matches closer to hardware
2021-01-02general: Fix various spelling errorsMorph1-6/+6
2020-12-30core/memory: Read and write page table atomicallyReinUsesLisp1-1/+1
Squash attributes into the pointer's integer, making them an uintptr_t pair containing 2 bits at the bottom and then the pointer. These bits are currently unused thanks to alignment requirements. Configure Dynarmic to mask out these bits on pointer reads. While we are at it, remove some unused attributes carried over from Citra. Read/Write and other hot functions use a two step unpacking process that is less readable to stop MSVC from emitting an extra AND instruction in the hot path: mov rdi,rcx shr rdx,0Ch mov r8,qword ptr [rax+8] mov rax,qword ptr [r8+rdx*8] mov rdx,rax -and al,3 and rdx,0FFFFFFFFFFFFFFFCh je Core::Memory::Memory::Impl::Read<unsigned char> mov rax,qword ptr [vaddr] movzx eax,byte ptr [rdx+rax]
2020-11-29core: arm: Implement InvalidateCacheRange for CPU cache invalidation.bunnei1-0/+5
2020-10-21Revert "core: Fix clang build"bunnei1-4/+2
2020-10-18core: Fix clang buildLioncash1-2/+4
Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
2020-08-13General: Tidy up clang-format warnings part 2Lioncash1-10/+12
2020-08-05kernel: Remove unused variablesLioncash1-1/+0
Resolves a few compiler warnings.
2020-05-03kernel/memory: Remove unused includesLioncash1-1/+0
Prevents header churn and needing to recompile these files if these headers are ever changed in the future.
2020-04-23page_table: Remove unused capturesLioncash1-2/+2
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-23kernel: memory: Improve implementation of device shared memory. (#3707)bunnei1-0/+44
* 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-17core: hle: Address various feedback & code cleanup.bunnei1-178/+78
- Should be no functional changes.
2020-04-17kernel: memory: page_table: Simplify GetPhysicalAddr impl.bunnei1-4/+0
2020-04-17core: system: Rename GetDeviceManager -> DeviceManager.bunnei1-1/+1
- More consistent with other system components.
2020-04-17kernel: memory: Add PageTable class, to manage process address space.bunnei1-0/+1234