Add additional missing format.

This commit is contained in:
Michael Scire 2018-06-21 21:09:51 -06:00
parent 08d454e30d
commit 5f8aa02584
2 changed files with 27 additions and 21 deletions

View file

@ -717,8 +717,9 @@ static ResultCode WaitForAddress(VAddr address, u32 type, s32 value, s64 timeout
// Signals to an address (via Address Arbiter) // Signals to an address (via Address Arbiter)
static ResultCode SignalToAddress(VAddr address, u32 type, s32 value, s32 num_to_wake) { static ResultCode SignalToAddress(VAddr address, u32 type, s32 value, s32 num_to_wake) {
NGLOG_WARNING(Kernel_SVC, "called, address=0x{:X}, type=0x{:X}, value=0x{:X}, num_to_wake=0x{:X}", NGLOG_WARNING(Kernel_SVC,
address, type, value, num_to_wake); "called, address=0x{:X}, type=0x{:X}, value=0x{:X}, num_to_wake=0x{:X}", address,
type, value, num_to_wake);
// If the passed address is a kernel virtual address, return invalid memory state. // If the passed address is a kernel virtual address, return invalid memory state.
if ((address + 0x8000000000LL) < 0x7FFFE00000LL) { if ((address + 0x8000000000LL) < 0x7FFFE00000LL) {
return ERR_INVALID_ADDRESS_STATE; return ERR_INVALID_ADDRESS_STATE;
@ -734,7 +735,8 @@ static ResultCode SignalToAddress(VAddr address, u32 type, s32 value, s32 num_to
case AddressArbiter::SignalType::IncrementAndSignalIfEqual: case AddressArbiter::SignalType::IncrementAndSignalIfEqual:
return AddressArbiter::IncrementAndSignalToAddressIfEqual(address, value, num_to_wake); return AddressArbiter::IncrementAndSignalToAddressIfEqual(address, value, num_to_wake);
case AddressArbiter::SignalType::ModifyByWaitingCountAndSignalIfEqual: case AddressArbiter::SignalType::ModifyByWaitingCountAndSignalIfEqual:
return AddressArbiter::ModifyByWaitingCountAndSignalToAddressIfEqual(address, value, num_to_wake); return AddressArbiter::ModifyByWaitingCountAndSignalToAddressIfEqual(address, value,
num_to_wake);
default: default:
return ERR_INVALID_ENUM_VALUE; return ERR_INVALID_ENUM_VALUE;
} }

View file

@ -181,12 +181,16 @@ void SvcWrap() {
template <ResultCode func(u64, u32, s32, s64)> template <ResultCode func(u64, u32, s32, s64)>
void SvcWrap() { void SvcWrap() {
FuncReturn(func(PARAM(0), (u32)(PARAM(1) & 0xFFFFFFFF), (s32)(PARAM(2) & 0xFFFFFFFF), (s64)PARAM(3)).raw); FuncReturn(
func(PARAM(0), (u32)(PARAM(1) & 0xFFFFFFFF), (s32)(PARAM(2) & 0xFFFFFFFF), (s64)PARAM(3))
.raw);
} }
template <ResultCode func(u64, u32, s32, s32)> template <ResultCode func(u64, u32, s32, s32)>
void SvcWrap() { void SvcWrap() {
FuncReturn(func(PARAM(0), (u32)(PARAM(1) & 0xFFFFFFFF), (s32)(PARAM(2) & 0xFFFFFFFF), (s32)(PARAM(3) & 0xFFFFFFFF)).raw); FuncReturn(func(PARAM(0), (u32)(PARAM(1) & 0xFFFFFFFF), (s32)(PARAM(2) & 0xFFFFFFFF),
(s32)(PARAM(3) & 0xFFFFFFFF))
.raw);
} }
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////