@ -730,6 +730,9 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, u64 ha
PrivilegedProcessId = 19 ,
PrivilegedProcessId = 19 ,
// 5.0.0+
// 5.0.0+
UserExceptionContextAddr = 20 ,
UserExceptionContextAddr = 20 ,
// 6.0.0+
TotalPhysicalMemoryAvailableWithoutMmHeap = 21 ,
TotalPhysicalMemoryUsedWithoutMmHeap = 22 ,
} ;
} ;
const auto info_id_type = static_cast < GetInfoType > ( info_id ) ;
const auto info_id_type = static_cast < GetInfoType > ( info_id ) ;
@ -750,7 +753,9 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, u64 ha
case GetInfoType : : IsVirtualAddressMemoryEnabled :
case GetInfoType : : IsVirtualAddressMemoryEnabled :
case GetInfoType : : PersonalMmHeapUsage :
case GetInfoType : : PersonalMmHeapUsage :
case GetInfoType : : TitleId :
case GetInfoType : : TitleId :
case GetInfoType : : UserExceptionContextAddr : {
case GetInfoType : : UserExceptionContextAddr :
case GetInfoType : : TotalPhysicalMemoryAvailableWithoutMmHeap :
case GetInfoType : : TotalPhysicalMemoryUsedWithoutMmHeap : {
if ( info_sub_id ! = 0 ) {
if ( info_sub_id ! = 0 ) {
return ERR_INVALID_ENUM_VALUE ;
return ERR_INVALID_ENUM_VALUE ;
}
}
@ -804,7 +809,7 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, u64 ha
return RESULT_SUCCESS ;
return RESULT_SUCCESS ;
case GetInfoType : : TotalPhysicalMemoryAvailable :
case GetInfoType : : TotalPhysicalMemoryAvailable :
* result = process - > VMManager ( ) . GetTotalPhysicalMemoryAvailable ( ) ;
* result = process - > GetTotalPhysicalMemoryAvailable ( ) ;
return RESULT_SUCCESS ;
return RESULT_SUCCESS ;
case GetInfoType : : TotalPhysicalMemoryUsed :
case GetInfoType : : TotalPhysicalMemoryUsed :
@ -825,6 +830,14 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, u64 ha
* result = 0 ;
* result = 0 ;
return RESULT_SUCCESS ;
return RESULT_SUCCESS ;
case GetInfoType : : TotalPhysicalMemoryAvailableWithoutMmHeap :
* result = process - > GetTotalPhysicalMemoryAvailable ( ) ;
return RESULT_SUCCESS ;
case GetInfoType : : TotalPhysicalMemoryUsedWithoutMmHeap :
* result = process - > GetTotalPhysicalMemoryUsedWithoutMmHeap ( ) ;
return RESULT_SUCCESS ;
default :
default :
break ;
break ;
}
}