diff options
author | Merry <git@mary.rs> | 2023-02-21 22:36:20 +0100 |
---|---|---|
committer | Merry <git@mary.rs> | 2023-02-21 22:39:17 +0100 |
commit | c9678bda2440423ec55d420aedd9a11d79834649 (patch) | |
tree | a08342651979d1eb652053efe35faa0136fbfab0 /src/core/hle/kernel/svc/svc_device_address_space.cpp | |
parent | Merge pull request #9834 from german77/reverted (diff) | |
download | yuzu-c9678bda2440423ec55d420aedd9a11d79834649.tar yuzu-c9678bda2440423ec55d420aedd9a11d79834649.tar.gz yuzu-c9678bda2440423ec55d420aedd9a11d79834649.tar.bz2 yuzu-c9678bda2440423ec55d420aedd9a11d79834649.tar.lz yuzu-c9678bda2440423ec55d420aedd9a11d79834649.tar.xz yuzu-c9678bda2440423ec55d420aedd9a11d79834649.tar.zst yuzu-c9678bda2440423ec55d420aedd9a11d79834649.zip |
Diffstat (limited to 'src/core/hle/kernel/svc/svc_device_address_space.cpp')
-rw-r--r-- | src/core/hle/kernel/svc/svc_device_address_space.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/hle/kernel/svc/svc_device_address_space.cpp b/src/core/hle/kernel/svc/svc_device_address_space.cpp index f68c0e6a9..ec3143e67 100644 --- a/src/core/hle/kernel/svc/svc_device_address_space.cpp +++ b/src/core/hle/kernel/svc/svc_device_address_space.cpp @@ -76,8 +76,8 @@ constexpr bool IsValidDeviceMemoryPermission(MemoryPermission device_perm) { } Result MapDeviceAddressSpaceByForce(Core::System& system, Handle das_handle, Handle process_handle, - uint64_t process_address, size_t size, uint64_t device_address, - u32 option) { + uint64_t process_address, uint64_t size, + uint64_t device_address, u32 option) { // Decode the option. const MapDeviceAddressSpaceOption option_pack{option}; const auto device_perm = option_pack.permission; @@ -90,7 +90,7 @@ Result MapDeviceAddressSpaceByForce(Core::System& system, Handle das_handle, Han R_UNLESS(size > 0, ResultInvalidSize); R_UNLESS((process_address < process_address + size), ResultInvalidCurrentMemory); R_UNLESS((device_address < device_address + size), ResultInvalidMemoryRegion); - R_UNLESS((process_address == static_cast<uintptr_t>(process_address)), + R_UNLESS((process_address == static_cast<uint64_t>(process_address)), ResultInvalidCurrentMemory); R_UNLESS(IsValidDeviceMemoryPermission(device_perm), ResultInvalidNewMemoryPermission); R_UNLESS(reserved == 0, ResultInvalidEnumValue); @@ -116,8 +116,8 @@ Result MapDeviceAddressSpaceByForce(Core::System& system, Handle das_handle, Han } Result MapDeviceAddressSpaceAligned(Core::System& system, Handle das_handle, Handle process_handle, - uint64_t process_address, size_t size, uint64_t device_address, - u32 option) { + uint64_t process_address, uint64_t size, + uint64_t device_address, u32 option) { // Decode the option. const MapDeviceAddressSpaceOption option_pack{option}; const auto device_perm = option_pack.permission; @@ -131,7 +131,7 @@ Result MapDeviceAddressSpaceAligned(Core::System& system, Handle das_handle, Han R_UNLESS(size > 0, ResultInvalidSize); R_UNLESS((process_address < process_address + size), ResultInvalidCurrentMemory); R_UNLESS((device_address < device_address + size), ResultInvalidMemoryRegion); - R_UNLESS((process_address == static_cast<uintptr_t>(process_address)), + R_UNLESS((process_address == static_cast<uint64_t>(process_address)), ResultInvalidCurrentMemory); R_UNLESS(IsValidDeviceMemoryPermission(device_perm), ResultInvalidNewMemoryPermission); R_UNLESS(reserved == 0, ResultInvalidEnumValue); @@ -157,7 +157,7 @@ Result MapDeviceAddressSpaceAligned(Core::System& system, Handle das_handle, Han } Result UnmapDeviceAddressSpace(Core::System& system, Handle das_handle, Handle process_handle, - uint64_t process_address, size_t size, uint64_t device_address) { + uint64_t process_address, uint64_t size, uint64_t device_address) { // Validate input. R_UNLESS(Common::IsAligned(process_address, PageSize), ResultInvalidAddress); R_UNLESS(Common::IsAligned(device_address, PageSize), ResultInvalidAddress); @@ -165,7 +165,7 @@ Result UnmapDeviceAddressSpace(Core::System& system, Handle das_handle, Handle p R_UNLESS(size > 0, ResultInvalidSize); R_UNLESS((process_address < process_address + size), ResultInvalidCurrentMemory); R_UNLESS((device_address < device_address + size), ResultInvalidMemoryRegion); - R_UNLESS((process_address == static_cast<uintptr_t>(process_address)), + R_UNLESS((process_address == static_cast<uint64_t>(process_address)), ResultInvalidCurrentMemory); // Get the device address space. |