diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-07-18 03:34:50 +0200 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-08-16 06:03:44 +0200 |
commit | 306408d174377bb9e796e99cd1f383f5fa9b4692 (patch) | |
tree | 47eb7552ea8b8eb538d138fb74a1206a1ec5e909 /src/core/hle/kernel | |
parent | VMManager: Make LogLayout log level configurable as a parameter (diff) | |
download | yuzu-306408d174377bb9e796e99cd1f383f5fa9b4692.tar yuzu-306408d174377bb9e796e99cd1f383f5fa9b4692.tar.gz yuzu-306408d174377bb9e796e99cd1f383f5fa9b4692.tar.bz2 yuzu-306408d174377bb9e796e99cd1f383f5fa9b4692.tar.lz yuzu-306408d174377bb9e796e99cd1f383f5fa9b4692.tar.xz yuzu-306408d174377bb9e796e99cd1f383f5fa9b4692.tar.zst yuzu-306408d174377bb9e796e99cd1f383f5fa9b4692.zip |
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r-- | src/core/hle/kernel/vm_manager.cpp | 9 | ||||
-rw-r--r-- | src/core/hle/kernel/vm_manager.h | 8 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp index adce9a1ee..65395476b 100644 --- a/src/core/hle/kernel/vm_manager.cpp +++ b/src/core/hle/kernel/vm_manager.cpp @@ -167,15 +167,13 @@ ResultVal<VMManager::VMAIter> VMManager::CarveVMA(VAddr base, u32 size) { VMAIter vma_handle = StripIterConstness(FindVMA(base)); if (vma_handle == vma_map.end()) { // Target address is outside the range managed by the kernel - return ResultCode(ErrorDescription::InvalidAddress, ErrorModule::OS, - ErrorSummary::InvalidArgument, ErrorLevel::Usage); // 0xE0E01BF5 + return ERR_INVALID_ADDRESS; } VirtualMemoryArea& vma = vma_handle->second; if (vma.type != VMAType::Free) { // Region is already allocated - return ResultCode(ErrorDescription::InvalidAddress, ErrorModule::OS, - ErrorSummary::InvalidState, ErrorLevel::Usage); // 0xE0A01BF5 + return ERR_INVALID_ADDRESS_STATE; } u32 start_in_vma = base - vma.base; @@ -183,8 +181,7 @@ ResultVal<VMManager::VMAIter> VMManager::CarveVMA(VAddr base, u32 size) { if (end_in_vma > vma.size) { // Requested allocation doesn't fit inside VMA - return ResultCode(ErrorDescription::InvalidAddress, ErrorModule::OS, - ErrorSummary::InvalidState, ErrorLevel::Usage); // 0xE0A01BF5 + return ERR_INVALID_ADDRESS_STATE; } if (end_in_vma != vma.size) { diff --git a/src/core/hle/kernel/vm_manager.h b/src/core/hle/kernel/vm_manager.h index 99cc28689..15c10e413 100644 --- a/src/core/hle/kernel/vm_manager.h +++ b/src/core/hle/kernel/vm_manager.h @@ -14,6 +14,14 @@ namespace Kernel { +const ResultCode ERR_INVALID_ADDRESS{ // 0xE0E01BF5 + ErrorDescription::InvalidAddress, ErrorModule::OS, + ErrorSummary::InvalidArgument, ErrorLevel::Usage}; + +const ResultCode ERR_INVALID_ADDRESS_STATE{ // 0xE0A01BF5 + ErrorDescription::InvalidAddress, ErrorModule::OS, + ErrorSummary::InvalidState, ErrorLevel::Usage}; + enum class VMAType : u8 { /// VMA represents an unmapped region of the address space. Free, |