Merge pull request #3894 from wwylele/log-finalize

Finalize logging system migration
This commit is contained in:
James Rowe 2018-06-29 17:46:07 -06:00 committed by GitHub
commit f9a89ff410
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
153 changed files with 2131 additions and 2230 deletions

View file

@ -62,7 +62,7 @@ ResultCode Applet::Create(Service::APT::AppletId id,
applets[id] = std::make_shared<Mint>(id, std::move(manager));
break;
default:
NGLOG_ERROR(Service_APT, "Could not create applet {}", static_cast<u32>(id));
LOG_ERROR(Service_APT, "Could not create applet {}", static_cast<u32>(id));
// TODO(Subv): Find the right error code
return ResultCode(ErrorDescription::NotFound, ErrorModule::Applet,
ErrorSummary::NotSupported, ErrorLevel::Permanent);
@ -114,7 +114,7 @@ void Applet::SendParameter(const Service::APT::MessageParameter& parameter) {
if (auto locked = manager.lock()) {
locked->CancelAndSendParameter(parameter);
} else {
NGLOG_ERROR(Service_APT, "called after destructing applet manager");
LOG_ERROR(Service_APT, "called after destructing applet manager");
}
}

View file

@ -11,7 +11,7 @@ namespace Applets {
ResultCode ErrEula::ReceiveParameter(const Service::APT::MessageParameter& parameter) {
if (parameter.signal != Service::APT::SignalType::Request) {
NGLOG_ERROR(Service_APT, "unsupported signal {}", static_cast<u32>(parameter.signal));
LOG_ERROR(Service_APT, "unsupported signal {}", static_cast<u32>(parameter.signal));
UNIMPLEMENTED();
// TODO(Subv): Find the right error code
return ResultCode(-1);

View file

@ -19,7 +19,7 @@ namespace Applets {
ResultCode MiiSelector::ReceiveParameter(const Service::APT::MessageParameter& parameter) {
if (parameter.signal != Service::APT::SignalType::Request) {
NGLOG_ERROR(Service_APT, "unsupported signal {}", static_cast<u32>(parameter.signal));
LOG_ERROR(Service_APT, "unsupported signal {}", static_cast<u32>(parameter.signal));
UNIMPLEMENTED();
// TODO(Subv): Find the right error code
return ResultCode(-1);

View file

@ -11,7 +11,7 @@ namespace Applets {
ResultCode Mint::ReceiveParameter(const Service::APT::MessageParameter& parameter) {
if (parameter.signal != Service::APT::SignalType::Request) {
NGLOG_ERROR(Service_APT, "unsupported signal {}", static_cast<u32>(parameter.signal));
LOG_ERROR(Service_APT, "unsupported signal {}", static_cast<u32>(parameter.signal));
UNIMPLEMENTED();
// TODO(Subv): Find the right error code
return ResultCode(-1);

View file

@ -22,7 +22,7 @@ namespace Applets {
ResultCode SoftwareKeyboard::ReceiveParameter(Service::APT::MessageParameter const& parameter) {
if (parameter.signal != Service::APT::SignalType::Request) {
NGLOG_ERROR(Service_APT, "unsupported signal {}", static_cast<u32>(parameter.signal));
LOG_ERROR(Service_APT, "unsupported signal {}", static_cast<u32>(parameter.signal));
UNIMPLEMENTED();
// TODO(Subv): Find the right error code
return ResultCode(-1);

View file

@ -135,7 +135,7 @@ ResultCode AddressArbiter::ArbitrateAddress(SharedPtr<Thread> thread, Arbitratio
}
default:
NGLOG_ERROR(Kernel, "unknown type={}", static_cast<u32>(type));
LOG_ERROR(Kernel, "unknown type={}", static_cast<u32>(type));
return ERR_INVALID_ENUM_VALUE_FND;
}

View file

@ -25,7 +25,7 @@ ResultVal<Handle> HandleTable::Create(SharedPtr<Object> obj) {
u16 slot = next_free_slot;
if (slot >= generations.size()) {
NGLOG_ERROR(Kernel, "Unable to allocate Handle, too many slots in use.");
LOG_ERROR(Kernel, "Unable to allocate Handle, too many slots in use.");
return ERR_OUT_OF_HANDLES;
}
next_free_slot = generations[slot];
@ -47,7 +47,7 @@ ResultVal<Handle> HandleTable::Create(SharedPtr<Object> obj) {
ResultVal<Handle> HandleTable::Duplicate(Handle handle) {
SharedPtr<Object> object = GetGeneric(handle);
if (object == nullptr) {
NGLOG_ERROR(Kernel, "Tried to duplicate invalid handle: {:08X}", handle);
LOG_ERROR(Kernel, "Tried to duplicate invalid handle: {:08X}", handle);
return ERR_INVALID_HANDLE;
}
return Create(std::move(object));

View file

@ -115,8 +115,8 @@ void HandleSpecialMapping(VMManager& address_space, const AddressMapping& mappin
VAddr mapping_limit = mapping.address + mapping.size;
if (mapping_limit < mapping.address) {
NGLOG_CRITICAL(Loader, "Mapping size overflowed: address=0x{:08X} size=0x{:X}",
mapping.address, mapping.size);
LOG_CRITICAL(Loader, "Mapping size overflowed: address=0x{:08X} size=0x{:X}",
mapping.address, mapping.size);
return;
}
@ -126,17 +126,17 @@ void HandleSpecialMapping(VMManager& address_space, const AddressMapping& mappin
mapping_limit <= area.vaddr_base + area.size;
});
if (area == std::end(memory_areas)) {
NGLOG_ERROR(Loader,
"Unhandled special mapping: address=0x{:08X} size=0x{:X}"
" read_only={} unk_flag={}",
mapping.address, mapping.size, mapping.read_only, mapping.unk_flag);
LOG_ERROR(Loader,
"Unhandled special mapping: address=0x{:08X} size=0x{:X}"
" read_only={} unk_flag={}",
mapping.address, mapping.size, mapping.read_only, mapping.unk_flag);
return;
}
u32 offset_into_region = mapping.address - area->vaddr_base;
if (area->paddr_base == IO_AREA_PADDR) {
NGLOG_ERROR(Loader, "MMIO mappings are not supported yet. phys_addr=0x{:08X}",
area->paddr_base + offset_into_region);
LOG_ERROR(Loader, "MMIO mappings are not supported yet. phys_addr=0x{:08X}",
area->paddr_base + offset_into_region);
return;
}

View file

@ -63,7 +63,7 @@ ResultCode Mutex::Release(Thread* thread) {
// We can only release the mutex if it's held by the calling thread.
if (thread != holding_thread) {
if (holding_thread) {
NGLOG_ERROR(
LOG_ERROR(
Kernel,
"Tried to release a mutex (owned by thread id {}) from a different thread id {}",
holding_thread->thread_id, thread->thread_id);

View file

@ -56,7 +56,7 @@ void Process::ParseKernelCaps(const u32* kernel_caps, size_t len) {
continue;
} else if ((type & 0xF00) == 0xE00) { // 0x0FFF
// Allowed interrupts list
NGLOG_WARNING(Loader, "ExHeader allowed interrupts list ignored");
LOG_WARNING(Loader, "ExHeader allowed interrupts list ignored");
} else if ((type & 0xF80) == 0xF00) { // 0x07FF
// Allowed syscalls mask
unsigned int index = ((descriptor >> 24) & 7) * 24;
@ -76,7 +76,7 @@ void Process::ParseKernelCaps(const u32* kernel_caps, size_t len) {
} else if ((type & 0xFFE) == 0xFF8) { // 0x001F
// Mapped memory range
if (i + 1 >= len || ((kernel_caps[i + 1] >> 20) & 0xFFE) != 0xFF8) {
NGLOG_WARNING(Loader, "Incomplete exheader memory range descriptor ignored.");
LOG_WARNING(Loader, "Incomplete exheader memory range descriptor ignored.");
continue;
}
u32 end_desc = kernel_caps[i + 1];
@ -111,9 +111,9 @@ void Process::ParseKernelCaps(const u32* kernel_caps, size_t len) {
int minor = kernel_version & 0xFF;
int major = (kernel_version >> 8) & 0xFF;
NGLOG_INFO(Loader, "ExHeader kernel version: {}.{}", major, minor);
LOG_INFO(Loader, "ExHeader kernel version: {}.{}", major, minor);
} else {
NGLOG_ERROR(Loader, "Unhandled kernel caps descriptor: 0x{:08X}", descriptor);
LOG_ERROR(Loader, "Unhandled kernel caps descriptor: 0x{:08X}", descriptor);
}
}
}

View file

@ -29,7 +29,7 @@ SharedPtr<ResourceLimit> ResourceLimit::GetForCategory(ResourceLimitCategory cat
case ResourceLimitCategory::OTHER:
return resource_limits[static_cast<u8>(category)];
default:
NGLOG_CRITICAL(Kernel, "Unknown resource limit category");
LOG_CRITICAL(Kernel, "Unknown resource limit category");
UNREACHABLE();
}
}
@ -55,7 +55,7 @@ s32 ResourceLimit::GetCurrentResourceValue(u32 resource) const {
case CPU_TIME:
return current_cpu_time;
default:
NGLOG_ERROR(Kernel, "Unknown resource type={:08X}", resource);
LOG_ERROR(Kernel, "Unknown resource type={:08X}", resource);
UNIMPLEMENTED();
return 0;
}
@ -84,7 +84,7 @@ u32 ResourceLimit::GetMaxResourceValue(u32 resource) const {
case CPU_TIME:
return max_cpu_time;
default:
NGLOG_ERROR(Kernel, "Unknown resource type={:08X}", resource);
LOG_ERROR(Kernel, "Unknown resource type={:08X}", resource);
UNIMPLEMENTED();
return 0;
}

View file

@ -106,23 +106,23 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi
// Error out if the requested permissions don't match what the creator process allows.
if (static_cast<u32>(permissions) & ~static_cast<u32>(own_other_permissions)) {
NGLOG_ERROR(Kernel, "cannot map id={}, address=0x{:08X} name={}, permissions don't match",
GetObjectId(), address, name);
LOG_ERROR(Kernel, "cannot map id={}, address=0x{:08X} name={}, permissions don't match",
GetObjectId(), address, name);
return ERR_INVALID_COMBINATION;
}
// Heap-backed memory blocks can not be mapped with other_permissions = DontCare
if (base_address != 0 && other_permissions == MemoryPermission::DontCare) {
NGLOG_ERROR(Kernel, "cannot map id={}, address=0x{08X} name={}, permissions don't match",
GetObjectId(), address, name);
LOG_ERROR(Kernel, "cannot map id={}, address=0x{08X} name={}, permissions don't match",
GetObjectId(), address, name);
return ERR_INVALID_COMBINATION;
}
// Error out if the provided permissions are not compatible with what the creator process needs.
if (other_permissions != MemoryPermission::DontCare &&
static_cast<u32>(this->permissions) & ~static_cast<u32>(other_permissions)) {
NGLOG_ERROR(Kernel, "cannot map id={}, address=0x{:08X} name={}, permissions don't match",
GetObjectId(), address, name);
LOG_ERROR(Kernel, "cannot map id={}, address=0x{:08X} name={}, permissions don't match",
GetObjectId(), address, name);
return ERR_WRONG_PERMISSION;
}
@ -137,8 +137,8 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi
if (address != 0) {
if (address < Memory::HEAP_VADDR || address + size >= Memory::SHARED_MEMORY_VADDR_END) {
NGLOG_ERROR(Kernel, "cannot map id={}, address=0x{:08X} name={}, invalid address",
GetObjectId(), address, name);
LOG_ERROR(Kernel, "cannot map id={}, address=0x{:08X} name={}, invalid address",
GetObjectId(), address, name);
return ERR_INVALID_ADDRESS;
}
}
@ -154,7 +154,7 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi
auto result = target_process->vm_manager.MapMemoryBlock(
target_address, backing_block, backing_block_offset, size, MemoryState::Shared);
if (result.Failed()) {
NGLOG_ERROR(
LOG_ERROR(
Kernel,
"cannot map id={}, target_address=0x{:08X} name={}, error mapping to virtual memory",
GetObjectId(), target_address, name);

View file

@ -58,10 +58,10 @@ enum ControlMemoryOperation {
/// Map application or GSP heap memory
static ResultCode ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 addr1, u32 size,
u32 permissions) {
NGLOG_DEBUG(Kernel_SVC,
"called operation=0x{:08X}, addr0=0x{:08X}, addr1=0x{:08X}, "
"size=0x{:X}, permissions=0x{:08X}",
operation, addr0, addr1, size, permissions);
LOG_DEBUG(Kernel_SVC,
"called operation=0x{:08X}, addr0=0x{:08X}, addr1=0x{:08X}, "
"size=0x{:X}, permissions=0x{:08X}",
operation, addr0, addr1, size, permissions);
if ((addr0 & Memory::PAGE_MASK) != 0 || (addr1 & Memory::PAGE_MASK) != 0) {
return ERR_MISALIGNED_ADDRESS;
@ -74,8 +74,8 @@ static ResultCode ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 add
operation &= ~MEMOP_REGION_MASK;
if (region != 0) {
NGLOG_WARNING(Kernel_SVC, "ControlMemory with specified region not supported, region={:X}",
region);
LOG_WARNING(Kernel_SVC, "ControlMemory with specified region not supported, region={:X}",
region);
}
if ((permissions & (u32)MemoryPermission::ReadWrite) != permissions) {
@ -135,7 +135,7 @@ static ResultCode ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 add
}
default:
NGLOG_ERROR(Kernel_SVC, "unknown operation=0x{:08X}", operation);
LOG_ERROR(Kernel_SVC, "unknown operation=0x{:08X}", operation);
return ERR_INVALID_COMBINATION;
}
@ -145,7 +145,7 @@ static ResultCode ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 add
}
static void ExitProcess() {
NGLOG_INFO(Kernel_SVC, "Process {} exiting", g_current_process->process_id);
LOG_INFO(Kernel_SVC, "Process {} exiting", g_current_process->process_id);
ASSERT_MSG(g_current_process->status == ProcessStatus::Running, "Process has already exited");
@ -176,10 +176,10 @@ static void ExitProcess() {
/// Maps a memory block to specified address
static ResultCode MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other_permissions) {
NGLOG_TRACE(Kernel_SVC,
"called memblock=0x{:08X}, addr=0x{:08X}, mypermissions=0x{:08X}, "
"otherpermission={}",
handle, addr, permissions, other_permissions);
LOG_TRACE(Kernel_SVC,
"called memblock=0x{:08X}, addr=0x{:08X}, mypermissions=0x{:08X}, "
"otherpermission={}",
handle, addr, permissions, other_permissions);
SharedPtr<SharedMemory> shared_memory = g_handle_table.Get<SharedMemory>(handle);
if (shared_memory == nullptr)
@ -198,14 +198,14 @@ static ResultCode MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 o
return shared_memory->Map(g_current_process.get(), addr, permissions_type,
static_cast<MemoryPermission>(other_permissions));
default:
NGLOG_ERROR(Kernel_SVC, "unknown permissions=0x{:08X}", permissions);
LOG_ERROR(Kernel_SVC, "unknown permissions=0x{:08X}", permissions);
}
return ERR_INVALID_COMBINATION;
}
static ResultCode UnmapMemoryBlock(Handle handle, u32 addr) {
NGLOG_TRACE(Kernel_SVC, "called memblock=0x{:08X}, addr=0x{:08X}", handle, addr);
LOG_TRACE(Kernel_SVC, "called memblock=0x{:08X}, addr=0x{:08X}", handle, addr);
// TODO(Subv): Return E0A01BF5 if the address is not in the application's heap
@ -227,11 +227,11 @@ static ResultCode ConnectToPort(Handle* out_handle, VAddr port_name_address) {
if (port_name.size() > PortNameMaxLength)
return ERR_PORT_NAME_TOO_LONG;
NGLOG_TRACE(Kernel_SVC, "called port_name={}", port_name);
LOG_TRACE(Kernel_SVC, "called port_name={}", port_name);
auto it = Service::g_kernel_named_ports.find(port_name);
if (it == Service::g_kernel_named_ports.end()) {
NGLOG_WARNING(Kernel_SVC, "tried to connect to unknown port: {}", port_name);
LOG_WARNING(Kernel_SVC, "tried to connect to unknown port: {}", port_name);
return ERR_NOT_FOUND;
}
@ -252,7 +252,7 @@ static ResultCode SendSyncRequest(Handle handle) {
return ERR_INVALID_HANDLE;
}
NGLOG_TRACE(Kernel_SVC, "called handle=0x{:08X}({})", handle, session->GetName());
LOG_TRACE(Kernel_SVC, "called handle=0x{:08X}({})", handle, session->GetName());
Core::System::GetInstance().PrepareReschedule();
@ -261,7 +261,7 @@ static ResultCode SendSyncRequest(Handle handle) {
/// Close a handle
static ResultCode CloseHandle(Handle handle) {
NGLOG_TRACE(Kernel_SVC, "Closing handle 0x{:08X}", handle);
LOG_TRACE(Kernel_SVC, "Closing handle 0x{:08X}", handle);
return g_handle_table.Close(handle);
}
@ -273,8 +273,8 @@ static ResultCode WaitSynchronization1(Handle handle, s64 nano_seconds) {
if (object == nullptr)
return ERR_INVALID_HANDLE;
NGLOG_TRACE(Kernel_SVC, "called handle=0x{:08X}({}:{}), nanoseconds={}", handle,
object->GetTypeName(), object->GetName(), nano_seconds);
LOG_TRACE(Kernel_SVC, "called handle=0x{:08X}({}:{}), nanoseconds={}", handle,
object->GetTypeName(), object->GetName(), nano_seconds);
if (object->ShouldWait(thread)) {
@ -617,16 +617,15 @@ static ResultCode ReplyAndReceive(s32* index, VAddr handles_address, s32 handle_
static ResultCode CreateAddressArbiter(Handle* out_handle) {
SharedPtr<AddressArbiter> arbiter = AddressArbiter::Create();
CASCADE_RESULT(*out_handle, g_handle_table.Create(std::move(arbiter)));
NGLOG_TRACE(Kernel_SVC, "returned handle=0x{:08X}", *out_handle);
LOG_TRACE(Kernel_SVC, "returned handle=0x{:08X}", *out_handle);
return RESULT_SUCCESS;
}
/// Arbitrate address
static ResultCode ArbitrateAddress(Handle handle, u32 address, u32 type, u32 value,
s64 nanoseconds) {
NGLOG_TRACE(Kernel_SVC,
"called handle=0x{:08X}, address=0x{:08X}, type=0x{:08X}, value=0x{:08X}", handle,
address, type, value);
LOG_TRACE(Kernel_SVC, "called handle=0x{:08X}, address=0x{:08X}, type=0x{:08X}, value=0x{:08X}",
handle, address, type, value);
SharedPtr<AddressArbiter> arbiter = g_handle_table.Get<AddressArbiter>(handle);
if (arbiter == nullptr)
@ -642,7 +641,7 @@ static ResultCode ArbitrateAddress(Handle handle, u32 address, u32 type, u32 val
}
static void Break(u8 break_reason) {
NGLOG_CRITICAL(Debug_Emulated, "Emulated program broke execution!");
LOG_CRITICAL(Debug_Emulated, "Emulated program broke execution!");
std::string reason_str;
switch (break_reason) {
case 0:
@ -658,19 +657,19 @@ static void Break(u8 break_reason) {
reason_str = "UNKNOWN";
break;
}
NGLOG_CRITICAL(Debug_Emulated, "Break reason: {}", reason_str);
LOG_CRITICAL(Debug_Emulated, "Break reason: {}", reason_str);
}
/// Used to output a message on a debug hardware unit - does nothing on a retail unit
static void OutputDebugString(VAddr address, int len) {
std::string string(len, ' ');
Memory::ReadBlock(address, string.data(), len);
NGLOG_DEBUG(Debug_Emulated, "{}", string);
LOG_DEBUG(Debug_Emulated, "{}", string);
}
/// Get resource limit
static ResultCode GetResourceLimit(Handle* resource_limit, Handle process_handle) {
NGLOG_TRACE(Kernel_SVC, "called process=0x{:08X}", process_handle);
LOG_TRACE(Kernel_SVC, "called process=0x{:08X}", process_handle);
SharedPtr<Process> process = g_handle_table.Get<Process>(process_handle);
if (process == nullptr)
@ -684,8 +683,8 @@ static ResultCode GetResourceLimit(Handle* resource_limit, Handle process_handle
/// Get resource limit current values
static ResultCode GetResourceLimitCurrentValues(VAddr values, Handle resource_limit_handle,
VAddr names, u32 name_count) {
NGLOG_TRACE(Kernel_SVC, "called resource_limit={:08X}, names={:08X}, name_count={}",
resource_limit_handle, names, name_count);
LOG_TRACE(Kernel_SVC, "called resource_limit={:08X}, names={:08X}, name_count={}",
resource_limit_handle, names, name_count);
SharedPtr<ResourceLimit> resource_limit =
g_handle_table.Get<ResourceLimit>(resource_limit_handle);
@ -704,8 +703,8 @@ static ResultCode GetResourceLimitCurrentValues(VAddr values, Handle resource_li
/// Get resource limit max values
static ResultCode GetResourceLimitLimitValues(VAddr values, Handle resource_limit_handle,
VAddr names, u32 name_count) {
NGLOG_TRACE(Kernel_SVC, "called resource_limit={:08X}, names={:08X}, name_count={}",
resource_limit_handle, names, name_count);
LOG_TRACE(Kernel_SVC, "called resource_limit={:08X}, names={:08X}, name_count={}",
resource_limit_handle, names, name_count);
SharedPtr<ResourceLimit> resource_limit =
g_handle_table.Get<ResourceLimit>(resource_limit_handle);
@ -745,12 +744,12 @@ static ResultCode CreateThread(Handle* out_handle, u32 priority, u32 entry_point
case THREADPROCESSORID_0:
break;
case THREADPROCESSORID_ALL:
NGLOG_INFO(Kernel_SVC,
"Newly created thread is allowed to be run in any Core, unimplemented.");
LOG_INFO(Kernel_SVC,
"Newly created thread is allowed to be run in any Core, unimplemented.");
break;
case THREADPROCESSORID_1:
NGLOG_ERROR(Kernel_SVC,
"Newly created thread must run in the SysCore (Core1), unimplemented.");
LOG_ERROR(Kernel_SVC,
"Newly created thread must run in the SysCore (Core1), unimplemented.");
break;
default:
// TODO(bunnei): Implement support for other processor IDs
@ -769,17 +768,17 @@ static ResultCode CreateThread(Handle* out_handle, u32 priority, u32 entry_point
Core::System::GetInstance().PrepareReschedule();
NGLOG_TRACE(Kernel_SVC,
"called entrypoint=0x{:08X} ({}), arg=0x{:08X}, stacktop=0x{:08X}, "
"threadpriority=0x{:08X}, processorid=0x{:08X} : created handle=0x{:08X}",
entry_point, name, arg, stack_top, priority, processor_id, *out_handle);
LOG_TRACE(Kernel_SVC,
"called entrypoint=0x{:08X} ({}), arg=0x{:08X}, stacktop=0x{:08X}, "
"threadpriority=0x{:08X}, processorid=0x{:08X} : created handle=0x{:08X}",
entry_point, name, arg, stack_top, priority, processor_id, *out_handle);
return RESULT_SUCCESS;
}
/// Called when a thread exits
static void ExitThread() {
NGLOG_TRACE(Kernel_SVC, "called, pc=0x{:08X}", Core::CPU().GetPC());
LOG_TRACE(Kernel_SVC, "called, pc=0x{:08X}", Core::CPU().GetPC());
ExitCurrentThread();
Core::System::GetInstance().PrepareReschedule();
@ -829,15 +828,15 @@ static ResultCode CreateMutex(Handle* out_handle, u32 initial_locked) {
mutex->name = Common::StringFromFormat("mutex-%08x", Core::CPU().GetReg(14));
CASCADE_RESULT(*out_handle, g_handle_table.Create(std::move(mutex)));
NGLOG_TRACE(Kernel_SVC, "called initial_locked={} : created handle=0x{:08X}",
initial_locked ? "true" : "false", *out_handle);
LOG_TRACE(Kernel_SVC, "called initial_locked={} : created handle=0x{:08X}",
initial_locked ? "true" : "false", *out_handle);
return RESULT_SUCCESS;
}
/// Release a mutex
static ResultCode ReleaseMutex(Handle handle) {
NGLOG_TRACE(Kernel_SVC, "called handle=0x{:08X}", handle);
LOG_TRACE(Kernel_SVC, "called handle=0x{:08X}", handle);
SharedPtr<Mutex> mutex = g_handle_table.Get<Mutex>(handle);
if (mutex == nullptr)
@ -848,7 +847,7 @@ static ResultCode ReleaseMutex(Handle handle) {
/// Get the ID of the specified process
static ResultCode GetProcessId(u32* process_id, Handle process_handle) {
NGLOG_TRACE(Kernel_SVC, "called process=0x{:08X}", process_handle);
LOG_TRACE(Kernel_SVC, "called process=0x{:08X}", process_handle);
const SharedPtr<Process> process = g_handle_table.Get<Process>(process_handle);
if (process == nullptr)
@ -860,7 +859,7 @@ static ResultCode GetProcessId(u32* process_id, Handle process_handle) {
/// Get the ID of the process that owns the specified thread
static ResultCode GetProcessIdOfThread(u32* process_id, Handle thread_handle) {
NGLOG_TRACE(Kernel_SVC, "called thread=0x{:08X}", thread_handle);
LOG_TRACE(Kernel_SVC, "called thread=0x{:08X}", thread_handle);
const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle);
if (thread == nullptr)
@ -876,7 +875,7 @@ static ResultCode GetProcessIdOfThread(u32* process_id, Handle thread_handle) {
/// Get the ID for the specified thread.
static ResultCode GetThreadId(u32* thread_id, Handle handle) {
NGLOG_TRACE(Kernel_SVC, "called thread=0x{:08X}", handle);
LOG_TRACE(Kernel_SVC, "called thread=0x{:08X}", handle);
const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(handle);
if (thread == nullptr)
@ -892,14 +891,14 @@ static ResultCode CreateSemaphore(Handle* out_handle, s32 initial_count, s32 max
semaphore->name = Common::StringFromFormat("semaphore-%08x", Core::CPU().GetReg(14));
CASCADE_RESULT(*out_handle, g_handle_table.Create(std::move(semaphore)));
NGLOG_TRACE(Kernel_SVC, "called initial_count={}, max_count={}, created handle=0x{:08X}",
initial_count, max_count, *out_handle);
LOG_TRACE(Kernel_SVC, "called initial_count={}, max_count={}, created handle=0x{:08X}",
initial_count, max_count, *out_handle);
return RESULT_SUCCESS;
}
/// Releases a certain number of slots in a semaphore
static ResultCode ReleaseSemaphore(s32* count, Handle handle, s32 release_count) {
NGLOG_TRACE(Kernel_SVC, "called release_count={}, handle=0x{:08X}", release_count, handle);
LOG_TRACE(Kernel_SVC, "called release_count={}, handle=0x{:08X}", release_count, handle);
SharedPtr<Semaphore> semaphore = g_handle_table.Get<Semaphore>(handle);
if (semaphore == nullptr)
@ -928,7 +927,7 @@ static ResultCode QueryProcessMemory(MemoryInfo* memory_info, PageInfo* page_inf
memory_info->state = static_cast<u32>(vma->second.meminfo_state);
page_info->flags = 0;
NGLOG_TRACE(Kernel_SVC, "called process=0x{:08X} addr=0x{:08X}", process_handle, addr);
LOG_TRACE(Kernel_SVC, "called process=0x{:08X} addr=0x{:08X}", process_handle, addr);
return RESULT_SUCCESS;
}
@ -943,21 +942,21 @@ static ResultCode CreateEvent(Handle* out_handle, u32 reset_type) {
evt->name = Common::StringFromFormat("event-%08x", Core::CPU().GetReg(14));
CASCADE_RESULT(*out_handle, g_handle_table.Create(std::move(evt)));
NGLOG_TRACE(Kernel_SVC, "called reset_type=0x{:08X} : created handle=0x{:08X}", reset_type,
*out_handle);
LOG_TRACE(Kernel_SVC, "called reset_type=0x{:08X} : created handle=0x{:08X}", reset_type,
*out_handle);
return RESULT_SUCCESS;
}
/// Duplicates a kernel handle
static ResultCode DuplicateHandle(Handle* out, Handle handle) {
CASCADE_RESULT(*out, g_handle_table.Duplicate(handle));
NGLOG_TRACE(Kernel_SVC, "duplicated 0x{:08X} to 0x{:08X}", handle, *out);
LOG_TRACE(Kernel_SVC, "duplicated 0x{:08X} to 0x{:08X}", handle, *out);
return RESULT_SUCCESS;
}
/// Signals an event
static ResultCode SignalEvent(Handle handle) {
NGLOG_TRACE(Kernel_SVC, "called event=0x{:08X}", handle);
LOG_TRACE(Kernel_SVC, "called event=0x{:08X}", handle);
SharedPtr<Event> evt = g_handle_table.Get<Event>(handle);
if (evt == nullptr)
@ -970,7 +969,7 @@ static ResultCode SignalEvent(Handle handle) {
/// Clears an event
static ResultCode ClearEvent(Handle handle) {
NGLOG_TRACE(Kernel_SVC, "called event=0x{:08X}", handle);
LOG_TRACE(Kernel_SVC, "called event=0x{:08X}", handle);
SharedPtr<Event> evt = g_handle_table.Get<Event>(handle);
if (evt == nullptr)
@ -986,14 +985,14 @@ static ResultCode CreateTimer(Handle* out_handle, u32 reset_type) {
timer->name = Common::StringFromFormat("timer-%08x", Core::CPU().GetReg(14));
CASCADE_RESULT(*out_handle, g_handle_table.Create(std::move(timer)));
NGLOG_TRACE(Kernel_SVC, "called reset_type=0x{:08X} : created handle=0x{:08X}", reset_type,
*out_handle);
LOG_TRACE(Kernel_SVC, "called reset_type=0x{:08X} : created handle=0x{:08X}", reset_type,
*out_handle);
return RESULT_SUCCESS;
}
/// Clears a timer
static ResultCode ClearTimer(Handle handle) {
NGLOG_TRACE(Kernel_SVC, "called timer=0x{:08X}", handle);
LOG_TRACE(Kernel_SVC, "called timer=0x{:08X}", handle);
SharedPtr<Timer> timer = g_handle_table.Get<Timer>(handle);
if (timer == nullptr)
@ -1005,7 +1004,7 @@ static ResultCode ClearTimer(Handle handle) {
/// Starts a timer
static ResultCode SetTimer(Handle handle, s64 initial, s64 interval) {
NGLOG_TRACE(Kernel_SVC, "called timer=0x{:08X}", handle);
LOG_TRACE(Kernel_SVC, "called timer=0x{:08X}", handle);
if (initial < 0 || interval < 0) {
return ERR_OUT_OF_RANGE_KERNEL;
@ -1022,7 +1021,7 @@ static ResultCode SetTimer(Handle handle, s64 initial, s64 interval) {
/// Cancels a timer
static ResultCode CancelTimer(Handle handle) {
NGLOG_TRACE(Kernel_SVC, "called timer=0x{:08X}", handle);
LOG_TRACE(Kernel_SVC, "called timer=0x{:08X}", handle);
SharedPtr<Timer> timer = g_handle_table.Get<Timer>(handle);
if (timer == nullptr)
@ -1035,7 +1034,7 @@ static ResultCode CancelTimer(Handle handle) {
/// Sleep the current thread
static void SleepThread(s64 nanoseconds) {
NGLOG_TRACE(Kernel_SVC, "called nanoseconds={}", nanoseconds);
LOG_TRACE(Kernel_SVC, "called nanoseconds={}", nanoseconds);
// Don't attempt to yield execution if there are no available threads to run,
// this way we avoid a useless reschedule to the idle thread.
@ -1106,7 +1105,7 @@ static ResultCode CreateMemoryBlock(Handle* out_handle, u32 addr, u32 size, u32
static_cast<MemoryPermission>(other_permission), addr, region);
CASCADE_RESULT(*out_handle, g_handle_table.Create(std::move(shared_memory)));
NGLOG_WARNING(Kernel_SVC, "called addr=0x{:08X}", addr);
LOG_WARNING(Kernel_SVC, "called addr=0x{:08X}", addr);
return RESULT_SUCCESS;
}
@ -1123,7 +1122,7 @@ static ResultCode CreatePort(Handle* server_port, Handle* client_port, VAddr nam
CASCADE_RESULT(*server_port,
g_handle_table.Create(std::move(std::get<SharedPtr<ServerPort>>(ports))));
NGLOG_TRACE(Kernel_SVC, "called max_sessions={}", max_sessions);
LOG_TRACE(Kernel_SVC, "called max_sessions={}", max_sessions);
return RESULT_SUCCESS;
}
@ -1146,7 +1145,7 @@ static ResultCode CreateSession(Handle* server_session, Handle* client_session)
auto& client = std::get<SharedPtr<ClientSession>>(sessions);
CASCADE_RESULT(*client_session, g_handle_table.Create(std::move(client)));
NGLOG_TRACE(Kernel_SVC, "called");
LOG_TRACE(Kernel_SVC, "called");
return RESULT_SUCCESS;
}
@ -1161,7 +1160,7 @@ static ResultCode AcceptSession(Handle* out_server_session, Handle server_port_h
}
static ResultCode GetSystemInfo(s64* out, u32 type, s32 param) {
NGLOG_TRACE(Kernel_SVC, "called type={} param={}", type, param);
LOG_TRACE(Kernel_SVC, "called type={} param={}", type, param);
switch ((SystemInfoType)type) {
case SystemInfoType::REGION_MEMORY_USAGE:
@ -1181,20 +1180,20 @@ static ResultCode GetSystemInfo(s64* out, u32 type, s32 param) {
*out = GetMemoryRegion(MemoryRegion::BASE)->used;
break;
default:
NGLOG_ERROR(Kernel_SVC, "unknown GetSystemInfo type=0 region: param={}", param);
LOG_ERROR(Kernel_SVC, "unknown GetSystemInfo type=0 region: param={}", param);
*out = 0;
break;
}
break;
case SystemInfoType::KERNEL_ALLOCATED_PAGES:
NGLOG_ERROR(Kernel_SVC, "unimplemented GetSystemInfo type=2 param={}", param);
LOG_ERROR(Kernel_SVC, "unimplemented GetSystemInfo type=2 param={}", param);
*out = 0;
break;
case SystemInfoType::KERNEL_SPAWNED_PIDS:
*out = 5;
break;
default:
NGLOG_ERROR(Kernel_SVC, "unknown GetSystemInfo type={} param={}", type, param);
LOG_ERROR(Kernel_SVC, "unknown GetSystemInfo type={} param={}", type, param);
*out = 0;
break;
}
@ -1204,7 +1203,7 @@ static ResultCode GetSystemInfo(s64* out, u32 type, s32 param) {
}
static ResultCode GetProcessInfo(s64* out, Handle process_handle, u32 type) {
NGLOG_TRACE(Kernel_SVC, "called process=0x{:08X} type={}", process_handle, type);
LOG_TRACE(Kernel_SVC, "called process=0x{:08X} type={}", process_handle, type);
SharedPtr<Process> process = g_handle_table.Get<Process>(process_handle);
if (process == nullptr)
@ -1217,7 +1216,7 @@ static ResultCode GetProcessInfo(s64* out, Handle process_handle, u32 type) {
// what's the difference between them.
*out = process->heap_used + process->linear_heap_used + process->misc_memory_used;
if (*out % Memory::PAGE_SIZE != 0) {
NGLOG_ERROR(Kernel_SVC, "called, memory size not page-aligned");
LOG_ERROR(Kernel_SVC, "called, memory size not page-aligned");
return ERR_MISALIGNED_SIZE;
}
break;
@ -1229,7 +1228,7 @@ static ResultCode GetProcessInfo(s64* out, Handle process_handle, u32 type) {
case 7:
case 8:
// These are valid, but not implemented yet
NGLOG_ERROR(Kernel_SVC, "unimplemented GetProcessInfo type={}", type);
LOG_ERROR(Kernel_SVC, "unimplemented GetProcessInfo type={}", type);
break;
case 20:
*out = Memory::FCRAM_PADDR - process->GetLinearHeapAreaAddress();
@ -1238,10 +1237,10 @@ static ResultCode GetProcessInfo(s64* out, Handle process_handle, u32 type) {
case 22:
case 23:
// These return a different error value than higher invalid values
NGLOG_ERROR(Kernel_SVC, "unknown GetProcessInfo type={}", type);
LOG_ERROR(Kernel_SVC, "unknown GetProcessInfo type={}", type);
return ERR_NOT_IMPLEMENTED;
default:
NGLOG_ERROR(Kernel_SVC, "unknown GetProcessInfo type={}", type);
LOG_ERROR(Kernel_SVC, "unknown GetProcessInfo type={}", type);
return ERR_INVALID_ENUM_VALUE;
}
@ -1389,7 +1388,7 @@ static const FunctionDef SVC_Table[] = {
static const FunctionDef* GetSVCInfo(u32 func_num) {
if (func_num >= ARRAY_SIZE(SVC_Table)) {
NGLOG_ERROR(Kernel_SVC, "unknown svc=0x{:02X}", func_num);
LOG_ERROR(Kernel_SVC, "unknown svc=0x{:02X}", func_num);
return nullptr;
}
return &SVC_Table[func_num];
@ -1411,7 +1410,7 @@ void CallSVC(u32 immediate) {
if (info->func) {
info->func();
} else {
NGLOG_ERROR(Kernel_SVC, "unimplemented SVC function {}(..)", info->name);
LOG_ERROR(Kernel_SVC, "unimplemented SVC function {}(..)", info->name);
}
}
}

View file

@ -191,7 +191,7 @@ void ExitCurrentThread() {
static void ThreadWakeupCallback(u64 thread_handle, int cycles_late) {
SharedPtr<Thread> thread = wakeup_callback_handle_table.Get<Thread>((Handle)thread_handle);
if (thread == nullptr) {
NGLOG_CRITICAL(Kernel, "Callback fired for invalid thread {:08X}", (Handle)thread_handle);
LOG_CRITICAL(Kernel, "Callback fired for invalid thread {:08X}", (Handle)thread_handle);
return;
}
@ -264,16 +264,16 @@ void Thread::ResumeFromWait() {
static void DebugThreadQueue() {
Thread* thread = GetCurrentThread();
if (!thread) {
NGLOG_DEBUG(Kernel, "Current: NO CURRENT THREAD");
LOG_DEBUG(Kernel, "Current: NO CURRENT THREAD");
} else {
NGLOG_DEBUG(Kernel, "0x{:02X} {} (current)", thread->current_priority,
GetCurrentThread()->GetObjectId());
LOG_DEBUG(Kernel, "0x{:02X} {} (current)", thread->current_priority,
GetCurrentThread()->GetObjectId());
}
for (auto& t : thread_list) {
u32 priority = ready_queue.contains(t.get());
if (priority != -1) {
NGLOG_DEBUG(Kernel, "0x{:02X} {}", priority, t->GetObjectId());
LOG_DEBUG(Kernel, "0x{:02X} {}", priority, t->GetObjectId());
}
}
}
@ -324,19 +324,19 @@ ResultVal<SharedPtr<Thread>> Thread::Create(std::string name, VAddr entry_point,
SharedPtr<Process> owner_process) {
// Check if priority is in ranged. Lowest priority -> highest priority id.
if (priority > THREADPRIO_LOWEST) {
NGLOG_ERROR(Kernel_SVC, "Invalid thread priority: {}", priority);
LOG_ERROR(Kernel_SVC, "Invalid thread priority: {}", priority);
return ERR_OUT_OF_RANGE;
}
if (processor_id > THREADPROCESSORID_MAX) {
NGLOG_ERROR(Kernel_SVC, "Invalid processor id: {}", processor_id);
LOG_ERROR(Kernel_SVC, "Invalid processor id: {}", processor_id);
return ERR_OUT_OF_RANGE_KERNEL;
}
// TODO(yuriks): Other checks, returning 0xD9001BEA
if (!Memory::IsValidVirtualAddress(*owner_process, entry_point)) {
NGLOG_ERROR(Kernel_SVC, "(name={}): invalid entry {:08x}", name, entry_point);
LOG_ERROR(Kernel_SVC, "(name={}): invalid entry {:08x}", name, entry_point);
// TODO: Verify error
return ResultCode(ErrorDescription::InvalidAddress, ErrorModule::Kernel,
ErrorSummary::InvalidArgument, ErrorLevel::Permanent);
@ -375,8 +375,8 @@ ResultVal<SharedPtr<Thread>> Thread::Create(std::string name, VAddr entry_point,
auto& linheap_memory = memory_region->linear_heap_memory;
if (linheap_memory->size() + Memory::PAGE_SIZE > memory_region->size) {
NGLOG_ERROR(Kernel_SVC,
"Not enough space in region to allocate a new TLS page for thread");
LOG_ERROR(Kernel_SVC,
"Not enough space in region to allocate a new TLS page for thread");
return ERR_OUT_OF_MEMORY;
}
@ -469,11 +469,11 @@ void Reschedule() {
Thread* next = PopNextReadyThread();
if (cur && next) {
NGLOG_TRACE(Kernel, "context switch {} -> {}", cur->GetObjectId(), next->GetObjectId());
LOG_TRACE(Kernel, "context switch {} -> {}", cur->GetObjectId(), next->GetObjectId());
} else if (cur) {
NGLOG_TRACE(Kernel, "context switch {} -> idle", cur->GetObjectId());
LOG_TRACE(Kernel, "context switch {} -> idle", cur->GetObjectId());
} else if (next) {
NGLOG_TRACE(Kernel, "context switch idle -> {}", next->GetObjectId());
LOG_TRACE(Kernel, "context switch idle -> {}", next->GetObjectId());
}
SwitchContext(next);

View file

@ -77,7 +77,7 @@ void Timer::WakeupAllWaitingThreads() {
}
void Timer::Signal(int cycles_late) {
NGLOG_TRACE(Kernel, "Timer {} fired", GetObjectId());
LOG_TRACE(Kernel, "Timer {} fired", GetObjectId());
signaled = true;
@ -97,7 +97,7 @@ static void TimerCallback(u64 timer_handle, int cycles_late) {
timer_callback_handle_table.Get<Timer>(static_cast<Handle>(timer_handle));
if (timer == nullptr) {
NGLOG_CRITICAL(Kernel, "Callback fired for invalid timer {:08x}", timer_handle);
LOG_CRITICAL(Kernel, "Callback fired for invalid timer {:08x}", timer_handle);
return;
}

View file

@ -260,12 +260,12 @@ void VMManager::RefreshMemoryBlockMappings(const std::vector<u8>* block) {
void VMManager::LogLayout(Log::Level log_level) const {
for (const auto& p : vma_map) {
const VirtualMemoryArea& vma = p.second;
NGLOG_GENERIC(::Log::Class::Kernel, log_level, "{:08X} - {:08X} size: {:8X} {}{}{} {}",
vma.base, vma.base + vma.size, vma.size,
(u8)vma.permissions & (u8)VMAPermission::Read ? 'R' : '-',
(u8)vma.permissions & (u8)VMAPermission::Write ? 'W' : '-',
(u8)vma.permissions & (u8)VMAPermission::Execute ? 'X' : '-',
GetMemoryStateName(vma.meminfo_state));
LOG_GENERIC(::Log::Class::Kernel, log_level, "{:08X} - {:08X} size: {:8X} {}{}{} {}",
vma.base, vma.base + vma.size, vma.size,
(u8)vma.permissions & (u8)VMAPermission::Read ? 'R' : '-',
(u8)vma.permissions & (u8)VMAPermission::Write ? 'W' : '-',
(u8)vma.permissions & (u8)VMAPermission::Execute ? 'X' : '-',
GetMemoryStateName(vma.meminfo_state));
}
}

View file

@ -27,7 +27,7 @@ void Module::Interface::CreateDefaultConfig(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushStaticBuffer(std::move(buffer), 0);
NGLOG_WARNING(Service_AC, "(STUBBED) called");
LOG_WARNING(Service_AC, "(STUBBED) called");
}
void Module::Interface::ConnectAsync(Kernel::HLERequestContext& ctx) {
@ -45,7 +45,7 @@ void Module::Interface::ConnectAsync(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_AC, "(STUBBED) called");
LOG_WARNING(Service_AC, "(STUBBED) called");
}
void Module::Interface::GetConnectResult(Kernel::HLERequestContext& ctx) {
@ -84,7 +84,7 @@ void Module::Interface::GetCloseResult(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_AC, "(STUBBED) called");
LOG_WARNING(Service_AC, "(STUBBED) called");
}
void Module::Interface::GetWifiStatus(Kernel::HLERequestContext& ctx) {
@ -97,7 +97,7 @@ void Module::Interface::GetWifiStatus(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push<u32>(0); // Connection type set to none
NGLOG_WARNING(Service_AC, "(STUBBED) called");
LOG_WARNING(Service_AC, "(STUBBED) called");
}
void Module::Interface::GetInfraPriority(Kernel::HLERequestContext& ctx) {
@ -108,7 +108,7 @@ void Module::Interface::GetInfraPriority(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push<u32>(0); // Infra Priority, default 0
NGLOG_WARNING(Service_AC, "(STUBBED) called");
LOG_WARNING(Service_AC, "(STUBBED) called");
}
void Module::Interface::SetRequestEulaVersion(Kernel::HLERequestContext& ctx) {
@ -125,7 +125,7 @@ void Module::Interface::SetRequestEulaVersion(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushStaticBuffer(std::move(ac_config), 0);
NGLOG_WARNING(Service_AC, "(STUBBED) called, major={}, minor={}", major, minor);
LOG_WARNING(Service_AC, "(STUBBED) called, major={}, minor={}", major, minor);
}
void Module::Interface::RegisterDisconnectEvent(Kernel::HLERequestContext& ctx) {
@ -140,7 +140,7 @@ void Module::Interface::RegisterDisconnectEvent(Kernel::HLERequestContext& ctx)
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_AC, "(STUBBED) called");
LOG_WARNING(Service_AC, "(STUBBED) called");
}
void Module::Interface::IsConnected(Kernel::HLERequestContext& ctx) {
@ -153,8 +153,8 @@ void Module::Interface::IsConnected(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(ac->ac_connected);
NGLOG_WARNING(Service_AC, "(STUBBED) called unk=0x{:08X} descriptor=0x{:08X} param=0x{:08X}",
unk, unk_descriptor, unk_param);
LOG_WARNING(Service_AC, "(STUBBED) called unk=0x{:08X} descriptor=0x{:08X} param=0x{:08X}", unk,
unk_descriptor, unk_param);
}
void Module::Interface::SetClientVersion(Kernel::HLERequestContext& ctx) {
@ -163,7 +163,7 @@ void Module::Interface::SetClientVersion(Kernel::HLERequestContext& ctx) {
u32 version = rp.Pop<u32>();
rp.Skip(2, false); // ProcessId descriptor
NGLOG_WARNING(Service_AC, "(STUBBED) called, version: 0x{:08X}", version);
LOG_WARNING(Service_AC, "(STUBBED) called, version: 0x{:08X}", version);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);

View file

@ -143,8 +143,8 @@ ResultVal<size_t> CIAFile::WriteContentData(u64 offset, size_t length, const u8*
// Keep tabs on how much of this content ID has been written so new range_min
// values can be calculated.
content_written[i] += available_to_write;
NGLOG_DEBUG(Service_AM, "Wrote {:x} to content {}, total {:x}", available_to_write, i,
content_written[i]);
LOG_DEBUG(Service_AM, "Wrote {:x} to content {}, total {:x}", available_to_write, i,
content_written[i]);
}
}
@ -234,7 +234,7 @@ bool CIAFile::Close() const {
// Install aborted
if (!complete) {
NGLOG_ERROR(Service_AM, "CIAFile closed prematurely, aborting install...");
LOG_ERROR(Service_AM, "CIAFile closed prematurely, aborting install...");
FileUtil::DeleteDir(GetTitlePath(media_type, container.GetTitleMetadata().GetTitleID()));
return true;
}
@ -277,10 +277,10 @@ void CIAFile::Flush() const {}
InstallStatus InstallCIA(const std::string& path,
std::function<ProgressCallback>&& update_callback) {
NGLOG_INFO(Service_AM, "Installing {}...", path);
LOG_INFO(Service_AM, "Installing {}...", path);
if (!FileUtil::Exists(path)) {
NGLOG_ERROR(Service_AM, "File {} does not exist!", path);
LOG_ERROR(Service_AM, "File {} does not exist!", path);
return InstallStatus::ErrorFileNotFound;
}
@ -292,7 +292,7 @@ InstallStatus InstallCIA(const std::string& path,
for (size_t i = 0; i < container.GetTitleMetadata().GetContentCount(); i++) {
if (container.GetTitleMetadata().GetContentTypeByIndex(i) &
FileSys::TMDContentTypeFlag::Encrypted) {
NGLOG_ERROR(Service_AM, "File {} is encrypted! Aborting...", path);
LOG_ERROR(Service_AM, "File {} is encrypted! Aborting...", path);
return InstallStatus::ErrorEncrypted;
}
}
@ -311,19 +311,19 @@ InstallStatus InstallCIA(const std::string& path,
if (update_callback)
update_callback(total_bytes_read, file.GetSize());
if (result.Failed()) {
NGLOG_ERROR(Service_AM, "CIA file installation aborted with error code {:08x}",
result.Code().raw);
LOG_ERROR(Service_AM, "CIA file installation aborted with error code {:08x}",
result.Code().raw);
return InstallStatus::ErrorAborted;
}
total_bytes_read += bytes_read;
}
installFile.Close();
NGLOG_INFO(Service_AM, "Installed {} successfully.", path);
LOG_INFO(Service_AM, "Installed {} successfully.", path);
return InstallStatus::Success;
}
NGLOG_ERROR(Service_AM, "CIA file {} is invalid!", path);
LOG_ERROR(Service_AM, "CIA file {} is invalid!", path);
return InstallStatus::ErrorInvalid;
}
@ -345,7 +345,7 @@ std::string GetTitleMetadataPath(Service::FS::MediaType media_type, u64 tid, boo
std::string content_path = GetTitlePath(media_type, tid) + "content/";
if (media_type == Service::FS::MediaType::GameCard) {
NGLOG_ERROR(Service_AM, "Invalid request for nonexistent gamecard title metadata!");
LOG_ERROR(Service_AM, "Invalid request for nonexistent gamecard title metadata!");
return "";
}
@ -385,8 +385,8 @@ std::string GetTitleContentPath(Service::FS::MediaType media_type, u64 tid, u16
if (media_type == Service::FS::MediaType::GameCard) {
// TODO(shinyquagsire23): get current app file if TID matches?
NGLOG_ERROR(Service_AM, "Request for gamecard partition {} content path unimplemented!",
static_cast<u32>(index));
LOG_ERROR(Service_AM, "Request for gamecard partition {} content path unimplemented!",
static_cast<u32>(index));
return "";
}
@ -420,7 +420,7 @@ std::string GetTitlePath(Service::FS::MediaType media_type, u64 tid) {
if (media_type == Service::FS::MediaType::GameCard) {
// TODO(shinyquagsire23): get current app path if TID matches?
NGLOG_ERROR(Service_AM, "Request for gamecard title path unimplemented!");
LOG_ERROR(Service_AM, "Request for gamecard title path unimplemented!");
return "";
}
@ -439,7 +439,7 @@ std::string GetMediaTitlePath(Service::FS::MediaType media_type) {
if (media_type == Service::FS::MediaType::GameCard) {
// TODO(shinyquagsire23): get current app parent folder if TID matches?
NGLOG_ERROR(Service_AM, "Request for gamecard parent path unimplemented!");
LOG_ERROR(Service_AM, "Request for gamecard parent path unimplemented!");
return "";
}
@ -607,8 +607,8 @@ void Module::Interface::DeleteContents(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(RESULT_SUCCESS);
rb.PushMappedBuffer(content_ids_in);
NGLOG_WARNING(Service_AM, "(STUBBED) media_type={}, title_id=0x{:016x}, content_count={}",
media_type, title_id, content_count);
LOG_WARNING(Service_AM, "(STUBBED) media_type={}, title_id=0x{:016x}, content_count={}",
media_type, title_id, content_count);
}
void Module::Interface::GetProgramList(Kernel::HLERequestContext& ctx) {
@ -692,24 +692,24 @@ void Module::Interface::DeleteUserProgram(Kernel::HLERequestContext& ctx) {
u16 category = static_cast<u16>((title_id >> 32) & 0xFFFF);
u8 variation = static_cast<u8>(title_id & 0xFF);
if (category & CATEGORY_SYSTEM || category & CATEGORY_DLP || variation & VARIATION_SYSTEM) {
NGLOG_ERROR(Service_AM, "Trying to uninstall system app");
LOG_ERROR(Service_AM, "Trying to uninstall system app");
rb.Push(ResultCode(ErrCodes::TryingToUninstallSystemApp, ErrorModule::AM,
ErrorSummary::InvalidArgument, ErrorLevel::Usage));
return;
}
NGLOG_INFO(Service_AM, "Deleting title 0x{:016x}", title_id);
LOG_INFO(Service_AM, "Deleting title 0x{:016x}", title_id);
std::string path = GetTitlePath(media_type, title_id);
if (!FileUtil::Exists(path)) {
rb.Push(ResultCode(ErrorDescription::NotFound, ErrorModule::AM, ErrorSummary::InvalidState,
ErrorLevel::Permanent));
NGLOG_ERROR(Service_AM, "Title not found");
LOG_ERROR(Service_AM, "Title not found");
return;
}
bool success = FileUtil::DeleteDirRecursively(path);
am->ScanForAllTitles();
rb.Push(RESULT_SUCCESS);
if (!success)
NGLOG_ERROR(Service_AM, "FileUtil::DeleteDirRecursively unexpectedly failed");
LOG_ERROR(Service_AM, "FileUtil::DeleteDirRecursively unexpectedly failed");
}
void Module::Interface::GetProductCode(Kernel::HLERequestContext& ctx) {
@ -827,9 +827,9 @@ void Module::Interface::ListDataTitleTicketInfos(Kernel::HLERequestContext& ctx)
rb.Push(ticket_count);
rb.PushMappedBuffer(ticket_info_out);
NGLOG_WARNING(Service_AM,
"(STUBBED) ticket_count=0x{:08X}, title_id=0x{:016x}, start_index=0x{:08X}",
ticket_count, title_id, start_index);
LOG_WARNING(Service_AM,
"(STUBBED) ticket_count=0x{:08X}, title_id=0x{:016x}, start_index=0x{:08X}",
ticket_count, title_id, start_index);
}
void Module::Interface::GetDLCContentInfoCount(Kernel::HLERequestContext& ctx) {
@ -857,8 +857,8 @@ void Module::Interface::GetDLCContentInfoCount(Kernel::HLERequestContext& ctx) {
rb.Push<u32>(tmd.GetContentCount());
} else {
rb.Push<u32>(1); // Number of content infos plus one
NGLOG_WARNING(Service_AM, "(STUBBED) called media_type={}, title_id=0x{:016x}",
static_cast<u32>(media_type), title_id);
LOG_WARNING(Service_AM, "(STUBBED) called media_type={}, title_id=0x{:016x}",
static_cast<u32>(media_type), title_id);
}
}
@ -868,7 +868,7 @@ void Module::Interface::DeleteTicket(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_AM, "(STUBBED) called title_id=0x{:016x}", title_id);
LOG_WARNING(Service_AM, "(STUBBED) called title_id=0x{:016x}", title_id);
}
void Module::Interface::GetNumTickets(Kernel::HLERequestContext& ctx) {
@ -878,7 +878,7 @@ void Module::Interface::GetNumTickets(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.Push(ticket_count);
NGLOG_WARNING(Service_AM, "(STUBBED) called ticket_count=0x{:08x}", ticket_count);
LOG_WARNING(Service_AM, "(STUBBED) called ticket_count=0x{:08x}", ticket_count);
}
void Module::Interface::GetTicketList(Kernel::HLERequestContext& ctx) {
@ -891,8 +891,8 @@ void Module::Interface::GetTicketList(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(ticket_list_count);
rb.PushMappedBuffer(ticket_tids_out);
NGLOG_WARNING(Service_AM, "(STUBBED) ticket_list_count=0x{:08x}, ticket_index=0x{:08x}",
ticket_list_count, ticket_index);
LOG_WARNING(Service_AM, "(STUBBED) ticket_list_count=0x{:08x}, ticket_index=0x{:08x}",
ticket_list_count, ticket_index);
}
void Module::Interface::QueryAvailableTitleDatabase(Kernel::HLERequestContext& ctx) {
@ -903,7 +903,7 @@ void Module::Interface::QueryAvailableTitleDatabase(Kernel::HLERequestContext& c
rb.Push(RESULT_SUCCESS); // No error
rb.Push(true);
NGLOG_WARNING(Service_AM, "(STUBBED) media_type={}", media_type);
LOG_WARNING(Service_AM, "(STUBBED) media_type={}", media_type);
}
void Module::Interface::CheckContentRights(Kernel::HLERequestContext& ctx) {
@ -919,7 +919,7 @@ void Module::Interface::CheckContentRights(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS); // No error
rb.Push(has_rights);
NGLOG_WARNING(Service_AM, "(STUBBED) tid={:016x}, content_index={}", tid, content_index);
LOG_WARNING(Service_AM, "(STUBBED) tid={:016x}, content_index={}", tid, content_index);
}
void Module::Interface::CheckContentRightsIgnorePlatform(Kernel::HLERequestContext& ctx) {
@ -935,7 +935,7 @@ void Module::Interface::CheckContentRightsIgnorePlatform(Kernel::HLERequestConte
rb.Push(RESULT_SUCCESS); // No error
rb.Push(has_rights);
NGLOG_WARNING(Service_AM, "(STUBBED) tid={:016x}, content_index={}", tid, content_index);
LOG_WARNING(Service_AM, "(STUBBED) tid={:016x}, content_index={}", tid, content_index);
}
void Module::Interface::BeginImportProgram(Kernel::HLERequestContext& ctx) {
@ -961,7 +961,7 @@ void Module::Interface::BeginImportProgram(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS); // No error
rb.PushCopyObjects(file->Connect());
NGLOG_WARNING(Service_AM, "(STUBBED) media_type={}", static_cast<u32>(media_type));
LOG_WARNING(Service_AM, "(STUBBED) media_type={}", static_cast<u32>(media_type));
}
void Module::Interface::EndImportProgram(Kernel::HLERequestContext& ctx) {
@ -981,13 +981,13 @@ ResultVal<std::shared_ptr<Service::FS::File>> GetFileFromSession(
// cast to File. For AM on 3DS, invalid handles actually hang the system.
if (file_session->parent == nullptr) {
NGLOG_WARNING(Service_AM, "Invalid file handle!");
LOG_WARNING(Service_AM, "Invalid file handle!");
return Kernel::ERR_INVALID_HANDLE;
}
Kernel::SharedPtr<Kernel::ServerSession> server = file_session->parent->server;
if (server == nullptr) {
NGLOG_WARNING(Service_AM, "File handle ServerSession disconnected!");
LOG_WARNING(Service_AM, "File handle ServerSession disconnected!");
return Kernel::ERR_SESSION_CLOSED_BY_REMOTE;
}
@ -998,13 +998,13 @@ ResultVal<std::shared_ptr<Service::FS::File>> GetFileFromSession(
if (file != nullptr)
return MakeResult<std::shared_ptr<Service::FS::File>>(file);
NGLOG_ERROR(Service_AM, "Failed to cast handle to FSFile!");
LOG_ERROR(Service_AM, "Failed to cast handle to FSFile!");
return Kernel::ERR_INVALID_HANDLE;
}
// Probably the best bet if someone is LLEing the fs service is to just have them LLE AM
// while they're at it, so not implemented.
NGLOG_ERROR(Service_AM, "Given file handle does not have an HLE handler!");
LOG_ERROR(Service_AM, "Given file handle does not have an HLE handler!");
return Kernel::ERR_NOT_IMPLEMENTED;
}
@ -1201,20 +1201,20 @@ void Module::Interface::DeleteProgram(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0410, 3, 0);
auto media_type = rp.PopEnum<FS::MediaType>();
u64 title_id = rp.Pop<u64>();
NGLOG_INFO(Service_AM, "Deleting title 0x{:016x}", title_id);
LOG_INFO(Service_AM, "Deleting title 0x{:016x}", title_id);
std::string path = GetTitlePath(media_type, title_id);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
if (!FileUtil::Exists(path)) {
rb.Push(ResultCode(ErrorDescription::NotFound, ErrorModule::AM, ErrorSummary::InvalidState,
ErrorLevel::Permanent));
NGLOG_ERROR(Service_AM, "Title not found");
LOG_ERROR(Service_AM, "Title not found");
return;
}
bool success = FileUtil::DeleteDirRecursively(path);
am->ScanForAllTitles();
rb.Push(RESULT_SUCCESS);
if (!success)
NGLOG_ERROR(Service_AM, "FileUtil::DeleteDirRecursively unexpectedly failed");
LOG_ERROR(Service_AM, "FileUtil::DeleteDirRecursively unexpectedly failed");
}
void Module::Interface::GetMetaSizeFromCia(Kernel::HLERequestContext& ctx) {

View file

@ -170,8 +170,8 @@ void AppletManager::CancelAndSendParameter(const MessageParameter& parameter) {
// Signal the event to let the receiver know that a new parameter is ready to be read
auto* const slot_data = GetAppletSlotData(static_cast<AppletId>(parameter.destination_id));
if (slot_data == nullptr) {
NGLOG_DEBUG(Service_APT, "No applet was registered with the id {:03X}",
static_cast<u32>(parameter.destination_id));
LOG_DEBUG(Service_APT, "No applet was registered with the id {:03X}",
static_cast<u32>(parameter.destination_id));
return;
}
@ -329,8 +329,8 @@ ResultCode AppletManager::PrepareToStartLibraryApplet(AppletId applet_id) {
// If we weren't able to load the native applet title, try to fallback to an HLE implementation.
auto applet = HLE::Applets::Applet::Get(applet_id);
if (applet) {
NGLOG_WARNING(Service_APT, "applet has already been started id={:08X}",
static_cast<u32>(applet_id));
LOG_WARNING(Service_APT, "applet has already been started id={:08X}",
static_cast<u32>(applet_id));
return RESULT_SUCCESS;
} else {
return HLE::Applets::Applet::Create(applet_id, shared_from_this());
@ -353,8 +353,8 @@ ResultCode AppletManager::PreloadLibraryApplet(AppletId applet_id) {
// If we weren't able to load the native applet title, try to fallback to an HLE implementation.
auto applet = HLE::Applets::Applet::Get(applet_id);
if (applet) {
NGLOG_WARNING(Service_APT, "applet has already been started id={:08X}",
static_cast<u32>(applet_id));
LOG_WARNING(Service_APT, "applet has already been started id={:08X}",
static_cast<u32>(applet_id));
return RESULT_SUCCESS;
} else {
return HLE::Applets::Applet::Create(applet_id, shared_from_this());
@ -400,15 +400,15 @@ ResultVal<AppletManager::AppletInfo> AppletManager::GetAppletInfo(AppletId app_i
return ResultCode(ErrorDescription::NotFound, ErrorModule::Applet,
ErrorSummary::NotFound, ErrorLevel::Status);
}
NGLOG_WARNING(Service_APT, "Using HLE applet info for applet {:03X}",
static_cast<u32>(app_id));
LOG_WARNING(Service_APT, "Using HLE applet info for applet {:03X}",
static_cast<u32>(app_id));
// TODO(Subv): Get the title id for the current applet and write it in the response[2-3]
return MakeResult<AppletInfo>({0, Service::FS::MediaType::NAND, true, true, 0});
}
if (app_id == AppletId::Application) {
// TODO(Subv): Implement this once Application launching is implemented
NGLOG_ERROR(Service_APT, "Unimplemented GetAppletInfo(Application)");
LOG_ERROR(Service_APT, "Unimplemented GetAppletInfo(Application)");
return ResultCode(ErrorDescription::NotFound, ErrorModule::Applet, ErrorSummary::NotFound,
ErrorLevel::Status);
}

View file

@ -32,8 +32,8 @@ void Module::Interface::Initialize(Kernel::HLERequestContext& ctx) {
AppletId app_id = rp.PopEnum<AppletId>();
u32 attributes = rp.Pop<u32>();
NGLOG_DEBUG(Service_APT, "called app_id={:#010X}, attributes={:#010X}",
static_cast<u32>(app_id), attributes);
LOG_DEBUG(Service_APT, "called app_id={:#010X}, attributes={:#010X}", static_cast<u32>(app_id),
attributes);
auto result = apt->applet_manager->Initialize(app_id, attributes);
if (result.Failed()) {
@ -197,10 +197,10 @@ void Module::Interface::GetSharedFont(Kernel::HLERequestContext& ctx) {
if (apt->LoadSharedFont()) {
apt->shared_font_loaded = true;
} else if (apt->LoadLegacySharedFont()) {
NGLOG_WARNING(Service_APT, "Loaded shared font by legacy method");
LOG_WARNING(Service_APT, "Loaded shared font by legacy method");
apt->shared_font_loaded = true;
} else {
NGLOG_ERROR(Service_APT, "shared font file missing - go dump it from your 3ds");
LOG_ERROR(Service_APT, "shared font file missing - go dump it from your 3ds");
rb.Push<u32>(-1); // TODO: Find the right error code
rb.Push<u32>(0);
rb.PushCopyObjects<Kernel::Object>(nullptr);
@ -231,7 +231,7 @@ void Module::Interface::NotifyToWait(Kernel::HLERequestContext& ctx) {
u32 app_id = rp.Pop<u32>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS); // No error
NGLOG_WARNING(Service_APT, "(STUBBED) app_id={}", app_id);
LOG_WARNING(Service_APT, "(STUBBED) app_id={}", app_id);
}
void Module::Interface::GetLockHandle(Kernel::HLERequestContext& ctx) {
@ -252,14 +252,14 @@ void Module::Interface::GetLockHandle(Kernel::HLERequestContext& ctx) {
rb.Push<u32>(0); // Least significant bit = power button state
rb.PushCopyObjects(apt->lock);
NGLOG_WARNING(Service_APT, "(STUBBED) called applet_attributes={:#010X}", applet_attributes);
LOG_WARNING(Service_APT, "(STUBBED) called applet_attributes={:#010X}", applet_attributes);
}
void Module::Interface::Enable(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x3, 1, 0); // 0x30040
u32 attributes = rp.Pop<u32>();
NGLOG_DEBUG(Service_APT, "called attributes={:#010X}", attributes);
LOG_DEBUG(Service_APT, "called attributes={:#010X}", attributes);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(apt->applet_manager->Enable(attributes));
@ -275,7 +275,7 @@ void Module::Interface::GetAppletManInfo(Kernel::HLERequestContext& ctx) {
rb.Push(static_cast<u32>(AppletId::HomeMenu)); // Home menu AppID
rb.Push(static_cast<u32>(AppletId::Application)); // TODO(purpasmart96): Do this correctly
NGLOG_WARNING(Service_APT, "(STUBBED) called unk={:#010X}", unk);
LOG_WARNING(Service_APT, "(STUBBED) called unk={:#010X}", unk);
}
void Module::Interface::IsRegistered(Kernel::HLERequestContext& ctx) {
@ -285,7 +285,7 @@ void Module::Interface::IsRegistered(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS); // No error
rb.Push(apt->applet_manager->IsRegistered(app_id));
NGLOG_DEBUG(Service_APT, "called app_id={:#010X}", static_cast<u32>(app_id));
LOG_DEBUG(Service_APT, "called app_id={:#010X}", static_cast<u32>(app_id));
}
void Module::Interface::InquireNotification(Kernel::HLERequestContext& ctx) {
@ -294,7 +294,7 @@ void Module::Interface::InquireNotification(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS); // No error
rb.Push(static_cast<u32>(SignalType::None)); // Signal type
NGLOG_WARNING(Service_APT, "(STUBBED) called app_id={:#010X}", app_id);
LOG_WARNING(Service_APT, "(STUBBED) called app_id={:#010X}", app_id);
}
void Module::Interface::SendParameter(Kernel::HLERequestContext& ctx) {
@ -306,11 +306,11 @@ void Module::Interface::SendParameter(Kernel::HLERequestContext& ctx) {
Kernel::SharedPtr<Kernel::Object> object = rp.PopGenericObject();
std::vector<u8> buffer = rp.PopStaticBuffer();
NGLOG_DEBUG(Service_APT,
"called src_app_id={:#010X}, dst_app_id={:#010X}, signal_type={:#010X},"
"buffer_size={:#010X}",
static_cast<u32>(src_app_id), static_cast<u32>(dst_app_id),
static_cast<u32>(signal_type), buffer_size);
LOG_DEBUG(Service_APT,
"called src_app_id={:#010X}, dst_app_id={:#010X}, signal_type={:#010X},"
"buffer_size={:#010X}",
static_cast<u32>(src_app_id), static_cast<u32>(dst_app_id),
static_cast<u32>(signal_type), buffer_size);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -329,8 +329,8 @@ void Module::Interface::ReceiveParameter(Kernel::HLERequestContext& ctx) {
AppletId app_id = rp.PopEnum<AppletId>();
u32 buffer_size = rp.Pop<u32>();
NGLOG_DEBUG(Service_APT, "called app_id={:#010X}, buffer_size={:#010X}",
static_cast<u32>(app_id), buffer_size);
LOG_DEBUG(Service_APT, "called app_id={:#010X}, buffer_size={:#010X}", static_cast<u32>(app_id),
buffer_size);
auto next_parameter = apt->applet_manager->ReceiveParameter(app_id);
@ -357,8 +357,8 @@ void Module::Interface::GlanceParameter(Kernel::HLERequestContext& ctx) {
AppletId app_id = rp.PopEnum<AppletId>();
u32 buffer_size = rp.Pop<u32>();
NGLOG_DEBUG(Service_APT, "called app_id={:#010X}, buffer_size={:#010X}",
static_cast<u32>(app_id), buffer_size);
LOG_DEBUG(Service_APT, "called app_id={:#010X}, buffer_size={:#010X}", static_cast<u32>(app_id),
buffer_size);
auto next_parameter = apt->applet_manager->GlanceParameter(app_id);
@ -393,11 +393,11 @@ void Module::Interface::CancelParameter(Kernel::HLERequestContext& ctx) {
rb.Push(apt->applet_manager->CancelParameter(check_sender, sender_appid, check_receiver,
receiver_appid));
NGLOG_DEBUG(Service_APT,
"called check_sender={}, sender_appid={:#010X}, "
"check_receiver={}, receiver_appid={:#010X}",
check_sender, static_cast<u32>(sender_appid), check_receiver,
static_cast<u32>(receiver_appid));
LOG_DEBUG(Service_APT,
"called check_sender={}, sender_appid={:#010X}, "
"check_receiver={}, receiver_appid={:#010X}",
check_sender, static_cast<u32>(sender_appid), check_receiver,
static_cast<u32>(receiver_appid));
}
void Module::Interface::PrepareToStartApplication(Kernel::HLERequestContext& ctx) {
@ -415,11 +415,10 @@ void Module::Interface::PrepareToStartApplication(Kernel::HLERequestContext& ctx
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS); // No error
NGLOG_WARNING(
Service_APT,
"(STUBBED) called title_info1={:#010X}, title_info2={:#010X}, title_info3={:#010X},"
"title_info4={:#010X}, flags={:#010X}",
title_info1, title_info2, title_info3, title_info4, flags);
LOG_WARNING(Service_APT,
"(STUBBED) called title_info1={:#010X}, title_info2={:#010X}, title_info3={:#010X},"
"title_info4={:#010X}, flags={:#010X}",
title_info1, title_info2, title_info3, title_info4, flags);
}
void Module::Interface::StartApplication(Kernel::HLERequestContext& ctx) {
@ -433,9 +432,9 @@ void Module::Interface::StartApplication(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS); // No error
NGLOG_WARNING(Service_APT,
"(STUBBED) called buffer1_size={:#010X}, buffer2_size={:#010X}, flag={:#010X}",
buffer1_size, buffer2_size, flag);
LOG_WARNING(Service_APT,
"(STUBBED) called buffer1_size={:#010X}, buffer2_size={:#010X}, flag={:#010X}",
buffer1_size, buffer2_size, flag);
}
void Module::Interface::AppletUtility(Kernel::HLERequestContext& ctx) {
@ -450,9 +449,9 @@ void Module::Interface::AppletUtility(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS); // No error
NGLOG_WARNING(Service_APT,
"(STUBBED) called command={:#010X}, input_size={:#010X}, output_size={:#010X}",
utility_command, input_size, output_size);
LOG_WARNING(Service_APT,
"(STUBBED) called command={:#010X}, input_size={:#010X}, output_size={:#010X}",
utility_command, input_size, output_size);
}
void Module::Interface::SetAppCpuTimeLimit(Kernel::HLERequestContext& ctx) {
@ -461,14 +460,13 @@ void Module::Interface::SetAppCpuTimeLimit(Kernel::HLERequestContext& ctx) {
apt->cpu_percent = rp.Pop<u32>();
if (value != 1) {
NGLOG_ERROR(Service_APT, "This value should be one, but is actually {}!", value);
LOG_ERROR(Service_APT, "This value should be one, but is actually {}!", value);
}
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS); // No error
NGLOG_WARNING(Service_APT, "(STUBBED) called, cpu_percent={}, value={}", apt->cpu_percent,
value);
LOG_WARNING(Service_APT, "(STUBBED) called, cpu_percent={}, value={}", apt->cpu_percent, value);
}
void Module::Interface::GetAppCpuTimeLimit(Kernel::HLERequestContext& ctx) {
@ -476,21 +474,21 @@ void Module::Interface::GetAppCpuTimeLimit(Kernel::HLERequestContext& ctx) {
u32 value = rp.Pop<u32>();
if (value != 1) {
NGLOG_ERROR(Service_APT, "This value should be one, but is actually {}!", value);
LOG_ERROR(Service_APT, "This value should be one, but is actually {}!", value);
}
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS); // No error
rb.Push(apt->cpu_percent);
NGLOG_WARNING(Service_APT, "(STUBBED) called, value={}", value);
LOG_WARNING(Service_APT, "(STUBBED) called, value={}", value);
}
void Module::Interface::PrepareToStartLibraryApplet(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x18, 1, 0); // 0x180040
AppletId applet_id = rp.PopEnum<AppletId>();
NGLOG_DEBUG(Service_APT, "called, applet_id={:08X}", static_cast<u32>(applet_id));
LOG_DEBUG(Service_APT, "called, applet_id={:08X}", static_cast<u32>(applet_id));
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(apt->applet_manager->PrepareToStartLibraryApplet(applet_id));
@ -507,14 +505,14 @@ void Module::Interface::PrepareToStartNewestHomeMenu(Kernel::HLERequestContext&
rb.Push(ResultCode(ErrorDescription::AlreadyExists, ErrorModule::Applet,
ErrorSummary::InvalidState, ErrorLevel::Status));
NGLOG_DEBUG(Service_APT, "called");
LOG_DEBUG(Service_APT, "called");
}
void Module::Interface::PreloadLibraryApplet(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x16, 1, 0); // 0x160040
AppletId applet_id = rp.PopEnum<AppletId>();
NGLOG_DEBUG(Service_APT, "called, applet_id={:08X}", static_cast<u32>(applet_id));
LOG_DEBUG(Service_APT, "called, applet_id={:08X}", static_cast<u32>(applet_id));
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(apt->applet_manager->PreloadLibraryApplet(applet_id));
@ -527,7 +525,7 @@ void Module::Interface::FinishPreloadingLibraryApplet(Kernel::HLERequestContext&
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(apt->applet_manager->FinishPreloadingLibraryApplet(applet_id));
NGLOG_WARNING(Service_APT, "(STUBBED) called, applet_id={:#05X}", static_cast<u32>(applet_id));
LOG_WARNING(Service_APT, "(STUBBED) called, applet_id={:#05X}", static_cast<u32>(applet_id));
}
void Module::Interface::StartLibraryApplet(Kernel::HLERequestContext& ctx) {
@ -538,7 +536,7 @@ void Module::Interface::StartLibraryApplet(Kernel::HLERequestContext& ctx) {
Kernel::SharedPtr<Kernel::Object> object = rp.PopGenericObject();
std::vector<u8> buffer = rp.PopStaticBuffer();
NGLOG_DEBUG(Service_APT, "called, applet_id={:08X}", static_cast<u32>(applet_id));
LOG_DEBUG(Service_APT, "called, applet_id={:08X}", static_cast<u32>(applet_id));
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(apt->applet_manager->StartLibraryApplet(applet_id, object, buffer));
@ -551,7 +549,7 @@ void Module::Interface::CancelLibraryApplet(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push<u32>(1); // TODO: Find the return code meaning
NGLOG_WARNING(Service_APT, "(STUBBED) called exiting={}", exiting);
LOG_WARNING(Service_APT, "(STUBBED) called exiting={}", exiting);
}
void Module::Interface::SendCaptureBufferInfo(Kernel::HLERequestContext& ctx) {
@ -582,8 +580,8 @@ void Module::Interface::SetScreenCapPostPermission(Kernel::HLERequestContext& ct
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS); // No error
NGLOG_WARNING(Service_APT, "(STUBBED) called, screen_capture_post_permission={}",
static_cast<u32>(apt->screen_capture_post_permission));
LOG_WARNING(Service_APT, "(STUBBED) called, screen_capture_post_permission={}",
static_cast<u32>(apt->screen_capture_post_permission));
}
void Module::Interface::GetScreenCapPostPermission(Kernel::HLERequestContext& ctx) {
@ -592,15 +590,15 @@ void Module::Interface::GetScreenCapPostPermission(Kernel::HLERequestContext& ct
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS); // No error
rb.Push(static_cast<u32>(apt->screen_capture_post_permission));
NGLOG_WARNING(Service_APT, "(STUBBED) called, screen_capture_post_permission={}",
static_cast<u32>(apt->screen_capture_post_permission));
LOG_WARNING(Service_APT, "(STUBBED) called, screen_capture_post_permission={}",
static_cast<u32>(apt->screen_capture_post_permission));
}
void Module::Interface::GetAppletInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x6, 1, 0); // 0x60040
auto app_id = rp.PopEnum<AppletId>();
NGLOG_DEBUG(Service_APT, "called, app_id={}", static_cast<u32>(app_id));
LOG_DEBUG(Service_APT, "called, app_id={}", static_cast<u32>(app_id));
auto info = apt->applet_manager->GetAppletInfo(app_id);
if (info.Failed()) {
@ -623,7 +621,7 @@ void Module::Interface::GetStartupArgument(Kernel::HLERequestContext& ctx) {
StartupArgumentType startup_argument_type = static_cast<StartupArgumentType>(rp.Pop<u8>());
if (parameter_size >= 0x300) {
NGLOG_ERROR(
LOG_ERROR(
Service_APT,
"Parameter size is outside the valid range (capped to 0x300): parameter_size={:#010X}",
parameter_size);
@ -632,9 +630,8 @@ void Module::Interface::GetStartupArgument(Kernel::HLERequestContext& ctx) {
std::vector<u8> parameter(parameter_size, 0);
NGLOG_WARNING(Service_APT,
"(STUBBED) called, startup_argument_type={}, parameter_size={:#010X}",
static_cast<u32>(startup_argument_type), parameter_size);
LOG_WARNING(Service_APT, "(STUBBED) called, startup_argument_type={}, parameter_size={:#010X}",
static_cast<u32>(startup_argument_type), parameter_size);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 2);
rb.Push(RESULT_SUCCESS);
@ -658,9 +655,8 @@ void Module::Interface::Wrap(Kernel::HLERequestContext& ctx) {
ASSERT_MSG(output_size == input_size + HW::AES::CCM_MAC_SIZE,
"input_size ({}) doesn't match to output_size ({})", input_size, output_size);
NGLOG_DEBUG(Service_APT,
"called, output_size={}, input_size={}, nonce_offset={}, nonce_size={}",
output_size, input_size, nonce_offset, nonce_size);
LOG_DEBUG(Service_APT, "called, output_size={}, input_size={}, nonce_offset={}, nonce_size={}",
output_size, input_size, nonce_offset, nonce_size);
// Note: This weird nonce size modification is verified against real 3DS
nonce_size = std::min<u32>(nonce_size & ~3, HW::AES::CCM_NONCE_SIZE);
@ -704,9 +700,8 @@ void Module::Interface::Unwrap(Kernel::HLERequestContext& ctx) {
ASSERT_MSG(output_size == input_size - HW::AES::CCM_MAC_SIZE,
"input_size ({}) doesn't match to output_size ({})", input_size, output_size);
NGLOG_DEBUG(Service_APT,
"called, output_size={}, input_size={}, nonce_offset={}, nonce_size={}",
output_size, input_size, nonce_offset, nonce_size);
LOG_DEBUG(Service_APT, "called, output_size={}, input_size={}, nonce_offset={}, nonce_size={}",
output_size, input_size, nonce_offset, nonce_size);
// Note: This weird nonce size modification is verified against real 3DS
nonce_size = std::min<u32>(nonce_size & ~3, HW::AES::CCM_NONCE_SIZE);
@ -730,7 +725,7 @@ void Module::Interface::Unwrap(Kernel::HLERequestContext& ctx) {
pdata.size() - nonce_offset);
rb.Push(RESULT_SUCCESS);
} else {
NGLOG_ERROR(Service_APT, "Failed to decrypt data");
LOG_ERROR(Service_APT, "Failed to decrypt data");
rb.Push(ResultCode(static_cast<ErrorDescription>(1), ErrorModule::PS,
ErrorSummary::WrongArgument, ErrorLevel::Status));
}
@ -751,7 +746,7 @@ void Module::Interface::CheckNew3DSApp(Kernel::HLERequestContext& ctx) {
PTM::CheckNew3DS(rb);
}
NGLOG_WARNING(Service_APT, "(STUBBED) called");
LOG_WARNING(Service_APT, "(STUBBED) called");
}
void Module::Interface::CheckNew3DS(Kernel::HLERequestContext& ctx) {
@ -760,7 +755,7 @@ void Module::Interface::CheckNew3DS(Kernel::HLERequestContext& ctx) {
PTM::CheckNew3DS(rb);
NGLOG_WARNING(Service_APT, "(STUBBED) called");
LOG_WARNING(Service_APT, "(STUBBED) called");
}
Module::Interface::Interface(std::shared_ptr<Module> apt, const char* name, u32 max_session)

View file

@ -28,16 +28,16 @@ void InitializeSession(Service::Interface* self) {
if (translation != IPC::CallingPidDesc()) {
cmd_buff[0] = IPC::MakeHeader(0, 0x1, 0); // 0x40
cmd_buff[1] = IPC::ERR_INVALID_BUFFER_DESCRIPTOR.raw;
NGLOG_ERROR(Service_BOSS, "The translation was invalid, translation={:#010X}", translation);
LOG_ERROR(Service_BOSS, "The translation was invalid, translation={:#010X}", translation);
return;
}
cmd_buff[0] = IPC::MakeHeader(0x1, 0x1, 0);
cmd_buff[1] = RESULT_SUCCESS.raw;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param={:#018X}, translation={:#010X}, unk_param4={:#010X}",
unk_param, translation, unk_param4);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param={:#018X}, translation={:#010X}, unk_param4={:#010X}",
unk_param, translation, unk_param4);
}
void RegisterStorage(Service::Interface* self) {
@ -51,10 +51,10 @@ void RegisterStorage(Service::Interface* self) {
cmd_buff[0] = IPC::MakeHeader(0x2, 0x1, 0);
cmd_buff[1] = RESULT_SUCCESS.raw;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"unk_flag={:#010X}",
unk_param1, unk_param2, unk_param3, unk_flag);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"unk_flag={:#010X}",
unk_param1, unk_param2, unk_param3, unk_flag);
}
void UnregisterStorage(Service::Interface* self) {
@ -63,7 +63,7 @@ void UnregisterStorage(Service::Interface* self) {
cmd_buff[0] = IPC::MakeHeader(0x3, 0x1, 0);
cmd_buff[1] = RESULT_SUCCESS.raw;
NGLOG_WARNING(Service_BOSS, "(STUBBED) called");
LOG_WARNING(Service_BOSS, "(STUBBED) called");
}
void GetStorageInfo(Service::Interface* self) {
@ -73,7 +73,7 @@ void GetStorageInfo(Service::Interface* self) {
cmd_buff[1] = RESULT_SUCCESS.raw;
cmd_buff[2] = 0; // stub 0
NGLOG_WARNING(Service_BOSS, "(STUBBED) called");
LOG_WARNING(Service_BOSS, "(STUBBED) called");
}
void RegisterPrivateRootCa(Service::Interface* self) {
@ -88,9 +88,9 @@ void RegisterPrivateRootCa(Service::Interface* self) {
cmd_buff[2] = (buff_size << 4 | 0xA);
cmd_buff[3] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) translation={:#010X}, buff_addr{:#010X}, buff_size={:#010X}",
translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) translation={:#010X}, buff_addr{:#010X}, buff_size={:#010X}",
translation, buff_addr, buff_size);
}
void RegisterPrivateClientCert(Service::Interface* self) {
@ -112,12 +112,12 @@ void RegisterPrivateClientCert(Service::Interface* self) {
cmd_buff[2] = (buff2_size << 4 | 0xA);
cmd_buff[3] = buff2_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
"translation1={:#010X}, buff1_addr={:#010X}, buff1_size={:#010X}, "
"translation2={:#010X}, buff2_addr={:#010X}, buff2_size={:#010X}",
unk_param1, unk_param2, translation1, buff1_addr, buff1_size, translation2,
buff2_addr, buff2_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
"translation1={:#010X}, buff1_addr={:#010X}, buff1_size={:#010X}, "
"translation2={:#010X}, buff2_addr={:#010X}, buff2_size={:#010X}",
unk_param1, unk_param2, translation1, buff1_addr, buff1_size, translation2,
buff2_addr, buff2_size);
}
void GetNewArrivalFlag(Service::Interface* self) {
@ -127,7 +127,7 @@ void GetNewArrivalFlag(Service::Interface* self) {
cmd_buff[1] = RESULT_SUCCESS.raw;
cmd_buff[2] = new_arrival_flag;
NGLOG_WARNING(Service_BOSS, "(STUBBED) new_arrival_flag={}", new_arrival_flag);
LOG_WARNING(Service_BOSS, "(STUBBED) new_arrival_flag={}", new_arrival_flag);
}
void RegisterNewArrivalEvent(Service::Interface* self) {
@ -139,8 +139,8 @@ void RegisterNewArrivalEvent(Service::Interface* self) {
cmd_buff[0] = IPC::MakeHeader(0x8, 0x1, 0);
cmd_buff[1] = RESULT_SUCCESS.raw;
NGLOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}", unk_param1,
unk_param2);
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}", unk_param1,
unk_param2);
}
void SetOptoutFlag(Service::Interface* self) {
@ -151,7 +151,7 @@ void SetOptoutFlag(Service::Interface* self) {
cmd_buff[0] = IPC::MakeHeader(0x9, 0x1, 0);
cmd_buff[1] = RESULT_SUCCESS.raw;
NGLOG_WARNING(Service_BOSS, "output_flag={}", output_flag);
LOG_WARNING(Service_BOSS, "output_flag={}", output_flag);
}
void GetOptoutFlag(Service::Interface* self) {
@ -161,7 +161,7 @@ void GetOptoutFlag(Service::Interface* self) {
cmd_buff[1] = RESULT_SUCCESS.raw;
cmd_buff[2] = output_flag;
NGLOG_WARNING(Service_BOSS, "output_flag={}", output_flag);
LOG_WARNING(Service_BOSS, "output_flag={}", output_flag);
}
void RegisterTask(Service::Interface* self) {
@ -179,10 +179,10 @@ void RegisterTask(Service::Interface* self) {
cmd_buff[2] = (buff_size << 4 | 0xA);
cmd_buff[3] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
}
void UnregisterTask(Service::Interface* self) {
@ -199,10 +199,10 @@ void UnregisterTask(Service::Interface* self) {
cmd_buff[2] = (buff_size << 4 | 0xA);
cmd_buff[3] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, translation, buff_addr, buff_size);
}
void ReconfigureTask(Service::Interface* self) {
@ -219,10 +219,10 @@ void ReconfigureTask(Service::Interface* self) {
cmd_buff[2] = (buff_size << 4 | 0xA);
cmd_buff[3] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, translation, buff_addr, buff_size);
}
void GetTaskIdList(Service::Interface* self) {
@ -231,7 +231,7 @@ void GetTaskIdList(Service::Interface* self) {
cmd_buff[0] = IPC::MakeHeader(0xE, 0x1, 0);
cmd_buff[1] = RESULT_SUCCESS.raw;
NGLOG_WARNING(Service_BOSS, "(STUBBED) called");
LOG_WARNING(Service_BOSS, "(STUBBED) called");
}
void GetStepIdList(Service::Interface* self) {
@ -246,9 +246,9 @@ void GetStepIdList(Service::Interface* self) {
cmd_buff[2] = (buff_size << 4 | 0xA);
cmd_buff[3] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
translation, buff_addr, buff_size);
}
void GetNsDataIdList(Service::Interface* self) {
@ -269,12 +269,11 @@ void GetNsDataIdList(Service::Interface* self) {
cmd_buff[4] = (buff_size << 4 | 0xC);
cmd_buff[5] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"unk_param4={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr,
buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"unk_param4={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
}
void GetOwnNsDataIdList(Service::Interface* self) {
@ -295,12 +294,11 @@ void GetOwnNsDataIdList(Service::Interface* self) {
cmd_buff[4] = (buff_size << 4 | 0xC);
cmd_buff[5] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"unk_param4={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr,
buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"unk_param4={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
}
void GetNewDataNsDataIdList(Service::Interface* self) {
@ -321,12 +319,11 @@ void GetNewDataNsDataIdList(Service::Interface* self) {
cmd_buff[4] = (buff_size << 4 | 0xC);
cmd_buff[5] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"unk_param4={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr,
buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"unk_param4={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
}
void GetOwnNewDataNsDataIdList(Service::Interface* self) {
@ -347,12 +344,11 @@ void GetOwnNewDataNsDataIdList(Service::Interface* self) {
cmd_buff[4] = (buff_size << 4 | 0xC);
cmd_buff[5] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"unk_param4={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr,
buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"unk_param4={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
}
void SendProperty(Service::Interface* self) {
@ -369,10 +365,10 @@ void SendProperty(Service::Interface* self) {
cmd_buff[2] = (buff_size << 4 | 0xA);
cmd_buff[3] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, translation, buff_addr, buff_size);
}
void SendPropertyHandle(Service::Interface* self) {
@ -388,10 +384,10 @@ void SendPropertyHandle(Service::Interface* self) {
cmd_buff[2] = (buff_size << 4 | 0xA);
cmd_buff[3] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, translation, buff_addr, buff_size);
}
void ReceiveProperty(Service::Interface* self) {
@ -408,10 +404,10 @@ void ReceiveProperty(Service::Interface* self) {
cmd_buff[3] = (buff_size << 4 | 0xC);
cmd_buff[4] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, buff_size={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}",
unk_param1, buff_size, translation, buff_addr);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, buff_size={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}",
unk_param1, buff_size, translation, buff_addr);
}
void UpdateTaskInterval(Service::Interface* self) {
@ -428,10 +424,10 @@ void UpdateTaskInterval(Service::Interface* self) {
cmd_buff[2] = (buff_size << 4 | 0xA);
cmd_buff[3] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, translation, buff_addr, buff_size);
}
void UpdateTaskCount(Service::Interface* self) {
@ -447,10 +443,10 @@ void UpdateTaskCount(Service::Interface* self) {
cmd_buff[2] = (buff_size << 4 | 0xA);
cmd_buff[3] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}",
buff_size, unk_param2, translation, buff_addr);
LOG_WARNING(Service_BOSS,
"(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}",
buff_size, unk_param2, translation, buff_addr);
}
void GetTaskInterval(Service::Interface* self) {
@ -467,10 +463,10 @@ void GetTaskInterval(Service::Interface* self) {
cmd_buff[3] = (buff_size << 4 | 0xA);
cmd_buff[4] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, translation, buff_addr, buff_size);
}
void GetTaskCount(Service::Interface* self) {
@ -487,10 +483,10 @@ void GetTaskCount(Service::Interface* self) {
cmd_buff[3] = (buff_size << 4 | 0xA);
cmd_buff[4] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, translation, buff_addr, buff_size);
}
void GetTaskServiceStatus(Service::Interface* self) {
@ -507,10 +503,10 @@ void GetTaskServiceStatus(Service::Interface* self) {
cmd_buff[3] = (buff_size << 4 | 0xA);
cmd_buff[4] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, translation, buff_addr, buff_size);
}
void StartTask(Service::Interface* self) {
@ -526,10 +522,10 @@ void StartTask(Service::Interface* self) {
cmd_buff[2] = (buff_size << 4 | 0xA);
cmd_buff[3] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, translation, buff_addr, buff_size);
}
void StartTaskImmediate(Service::Interface* self) {
@ -545,10 +541,10 @@ void StartTaskImmediate(Service::Interface* self) {
cmd_buff[2] = (buff_size << 4 | 0xA);
cmd_buff[3] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, translation, buff_addr, buff_size);
}
void CancelTask(Service::Interface* self) {
@ -564,10 +560,10 @@ void CancelTask(Service::Interface* self) {
cmd_buff[2] = (buff_size << 4 | 0xA);
cmd_buff[3] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, translation, buff_addr, buff_size);
}
void GetTaskFinishHandle(Service::Interface* self) {
@ -578,7 +574,7 @@ void GetTaskFinishHandle(Service::Interface* self) {
cmd_buff[2] = 0;
cmd_buff[3] = 0; // stub 0(This should be a handle of task_finish ?)
NGLOG_WARNING(Service_BOSS, "(STUBBED) called");
LOG_WARNING(Service_BOSS, "(STUBBED) called");
}
void GetTaskState(Service::Interface* self) {
@ -597,10 +593,10 @@ void GetTaskState(Service::Interface* self) {
cmd_buff[5] = (buff_size << 4 | 0xA);
cmd_buff[6] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}",
buff_size, unk_param2, translation, buff_addr);
LOG_WARNING(Service_BOSS,
"(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}",
buff_size, unk_param2, translation, buff_addr);
}
void GetTaskResult(Service::Interface* self) {
@ -619,10 +615,10 @@ void GetTaskResult(Service::Interface* self) {
cmd_buff[5] = (buff_size << 4 | 0xA);
cmd_buff[6] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, translation, buff_addr, buff_size);
}
void GetTaskCommErrorCode(Service::Interface* self) {
@ -641,10 +637,10 @@ void GetTaskCommErrorCode(Service::Interface* self) {
cmd_buff[5] = (buff_size << 4 | 0xA);
cmd_buff[6] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, translation, buff_addr, buff_size);
}
void GetTaskStatus(Service::Interface* self) {
@ -663,10 +659,10 @@ void GetTaskStatus(Service::Interface* self) {
cmd_buff[3] = (buff_size << 4 | 0xA);
cmd_buff[4] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
}
void GetTaskError(Service::Interface* self) {
@ -684,10 +680,10 @@ void GetTaskError(Service::Interface* self) {
cmd_buff[3] = (buff_size << 4 | 0xA);
cmd_buff[4] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, translation, buff_addr, buff_size);
}
void GetTaskInfo(Service::Interface* self) {
@ -704,10 +700,10 @@ void GetTaskInfo(Service::Interface* self) {
cmd_buff[2] = (buff_size << 4 | 0xA);
cmd_buff[3] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, translation, buff_addr, buff_size);
}
void DeleteNsData(Service::Interface* self) {
@ -718,7 +714,7 @@ void DeleteNsData(Service::Interface* self) {
cmd_buff[0] = IPC::MakeHeader(0x26, 0x1, 0);
cmd_buff[1] = RESULT_SUCCESS.raw;
NGLOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}", unk_param1);
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}", unk_param1);
}
void GetNsDataHeaderInfo(Service::Interface* self) {
@ -736,10 +732,10 @@ void GetNsDataHeaderInfo(Service::Interface* self) {
cmd_buff[2] = (buff_size << 4 | 0xC);
cmd_buff[3] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
}
void ReadNsData(Service::Interface* self) {
@ -760,12 +756,11 @@ void ReadNsData(Service::Interface* self) {
cmd_buff[4] = (buff_size << 4 | 0xC);
cmd_buff[5] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"unk_param4={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr,
buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"unk_param4={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
}
void SetNsDataAdditionalInfo(Service::Interface* self) {
@ -777,8 +772,8 @@ void SetNsDataAdditionalInfo(Service::Interface* self) {
cmd_buff[0] = IPC::MakeHeader(0x29, 0x1, 0);
cmd_buff[1] = RESULT_SUCCESS.raw;
NGLOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}", unk_param1,
unk_param2);
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}", unk_param1,
unk_param2);
}
void GetNsDataAdditionalInfo(Service::Interface* self) {
@ -790,7 +785,7 @@ void GetNsDataAdditionalInfo(Service::Interface* self) {
cmd_buff[1] = RESULT_SUCCESS.raw;
cmd_buff[2] = 0; // stub 0 (32bit value)
NGLOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}", unk_param1);
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}", unk_param1);
}
void SetNsDataNewFlag(Service::Interface* self) {
@ -802,8 +797,8 @@ void SetNsDataNewFlag(Service::Interface* self) {
cmd_buff[0] = IPC::MakeHeader(0x2B, 0x1, 0);
cmd_buff[1] = RESULT_SUCCESS.raw;
NGLOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, ns_data_new_flag={:#010X}",
unk_param1, ns_data_new_flag);
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, ns_data_new_flag={:#010X}",
unk_param1, ns_data_new_flag);
}
void GetNsDataNewFlag(Service::Interface* self) {
@ -815,8 +810,8 @@ void GetNsDataNewFlag(Service::Interface* self) {
cmd_buff[1] = RESULT_SUCCESS.raw;
cmd_buff[2] = ns_data_new_flag;
NGLOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, ns_data_new_flag={:#010X}",
unk_param1, ns_data_new_flag);
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, ns_data_new_flag={:#010X}",
unk_param1, ns_data_new_flag);
}
void GetNsDataLastUpdate(Service::Interface* self) {
@ -829,7 +824,7 @@ void GetNsDataLastUpdate(Service::Interface* self) {
cmd_buff[2] = 0; // stub 0 (32bit value)
cmd_buff[3] = 0; // stub 0 (32bit value)
NGLOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}", unk_param1);
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}", unk_param1);
}
void GetErrorCode(Service::Interface* self) {
@ -841,7 +836,7 @@ void GetErrorCode(Service::Interface* self) {
cmd_buff[1] = RESULT_SUCCESS.raw;
cmd_buff[2] = 0; // stub 0 (32bit value)
NGLOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}", unk_param1);
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}", unk_param1);
}
void RegisterStorageEntry(Service::Interface* self) {
@ -856,10 +851,10 @@ void RegisterStorageEntry(Service::Interface* self) {
cmd_buff[0] = IPC::MakeHeader(0x2F, 0x1, 0);
cmd_buff[1] = RESULT_SUCCESS.raw;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"unk_param4={:#010X}, unk_param5={:#010X}",
unk_param1, unk_param2, unk_param3, unk_param4, unk_param5);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"unk_param4={:#010X}, unk_param5={:#010X}",
unk_param1, unk_param2, unk_param3, unk_param4, unk_param5);
}
void GetStorageEntryInfo(Service::Interface* self) {
@ -870,7 +865,7 @@ void GetStorageEntryInfo(Service::Interface* self) {
cmd_buff[2] = 0; // stub 0 (32bit value)
cmd_buff[3] = 0; // stub 0 (16bit value)
NGLOG_WARNING(Service_BOSS, "(STUBBED) called");
LOG_WARNING(Service_BOSS, "(STUBBED) called");
}
void SetStorageOption(Service::Interface* self) {
@ -884,10 +879,10 @@ void SetStorageOption(Service::Interface* self) {
cmd_buff[0] = IPC::MakeHeader(0x31, 0x1, 0);
cmd_buff[1] = RESULT_SUCCESS.raw;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
"unk_param3={:#010X}, unk_param4={:#010X}",
unk_param1, unk_param2, unk_param3, unk_param4);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
"unk_param3={:#010X}, unk_param4={:#010X}",
unk_param1, unk_param2, unk_param3, unk_param4);
}
void GetStorageOption(Service::Interface* self) {
@ -900,7 +895,7 @@ void GetStorageOption(Service::Interface* self) {
cmd_buff[4] = 0; // stub 0 (16bit value)
cmd_buff[5] = 0; // stub 0 (16bit value)
NGLOG_WARNING(Service_BOSS, "(STUBBED) called");
LOG_WARNING(Service_BOSS, "(STUBBED) called");
}
void StartBgImmediate(Service::Interface* self) {
@ -916,10 +911,10 @@ void StartBgImmediate(Service::Interface* self) {
cmd_buff[2] = (buff_size << 4 | 0xA);
cmd_buff[3] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}",
unk_param1, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}",
unk_param1, translation, buff_addr, buff_size);
}
void GetTaskActivePriority(Service::Interface* self) {
@ -936,10 +931,10 @@ void GetTaskActivePriority(Service::Interface* self) {
cmd_buff[3] = (buff_size << 4 | 0xA);
cmd_buff[4] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}",
unk_param1, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}",
unk_param1, translation, buff_addr, buff_size);
}
void RegisterImmediateTask(Service::Interface* self) {
@ -957,10 +952,10 @@ void RegisterImmediateTask(Service::Interface* self) {
cmd_buff[3] = (buff_size << 4 | 0xA);
cmd_buff[4] = buff_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
}
void SetTaskQuery(Service::Interface* self) {
@ -982,12 +977,12 @@ void SetTaskQuery(Service::Interface* self) {
cmd_buff[2] = (buff2_size << 4 | 0xA);
cmd_buff[3] = buff2_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
"translation1={:#010X}, buff1_addr={:#010X}, buff1_size={:#010X}, "
"translation2={:#010X}, buff2_addr={:#010X}, buff2_size={:#010X}",
unk_param1, unk_param2, translation1, buff1_addr, buff1_size, translation2,
buff2_addr, buff2_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
"translation1={:#010X}, buff1_addr={:#010X}, buff1_size={:#010X}, "
"translation2={:#010X}, buff2_addr={:#010X}, buff2_size={:#010X}",
unk_param1, unk_param2, translation1, buff1_addr, buff1_size, translation2,
buff2_addr, buff2_size);
}
void GetTaskQuery(Service::Interface* self) {
@ -1009,12 +1004,12 @@ void GetTaskQuery(Service::Interface* self) {
cmd_buff[2] = (buff2_size << 4 | 0xC);
cmd_buff[3] = buff2_addr;
NGLOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
"translation1={:#010X}, buff1_addr={:#010X}, buff1_size={:#010X}, "
"translation2={:#010X}, buff2_addr={:#010X}, buff2_size={:#010X}",
unk_param1, unk_param2, translation1, buff1_addr, buff1_size, translation2,
buff2_addr, buff2_size);
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
"translation1={:#010X}, buff1_addr={:#010X}, buff1_size={:#010X}, "
"translation2={:#010X}, buff2_addr={:#010X}, buff2_size={:#010X}",
unk_param1, unk_param2, translation1, buff1_addr, buff1_size, translation2,
buff2_addr, buff2_size);
}
void Init() {

View file

@ -86,8 +86,8 @@ void Module::CompletionEventCallBack(u64 port_id, int) {
const int original_height = camera.contexts[camera.current_context].resolution.height;
if (port.x1 <= port.x0 || port.y1 <= port.y0 || port.x1 > original_width ||
port.y1 > original_height) {
NGLOG_ERROR(Service_CAM, "Invalid trimming coordinates x0={}, y0={}, x1={}, y1={}",
port.x0, port.y0, port.x1, port.y1);
LOG_ERROR(Service_CAM, "Invalid trimming coordinates x0={}, y0={}, x1={}, y1={}",
port.x0, port.y0, port.x1, port.y1);
trim_width = 0;
trim_height = 0;
} else {
@ -97,8 +97,8 @@ void Module::CompletionEventCallBack(u64 port_id, int) {
u32 trim_size = (port.x1 - port.x0) * (port.y1 - port.y0) * 2;
if (port.dest_size != trim_size) {
NGLOG_ERROR(Service_CAM, "The destination size ({}) doesn't match the source ({})!",
port.dest_size, trim_size);
LOG_ERROR(Service_CAM, "The destination size ({}) doesn't match the source ({})!",
port.dest_size, trim_size);
}
const u32 src_offset = port.y0 * original_width + port.x0;
@ -124,8 +124,8 @@ void Module::CompletionEventCallBack(u64 port_id, int) {
} else {
std::size_t buffer_size = buffer.size() * sizeof(u16);
if (port.dest_size != buffer_size) {
NGLOG_ERROR(Service_CAM, "The destination size ({}) doesn't match the source ({})!",
port.dest_size, buffer_size);
LOG_ERROR(Service_CAM, "The destination size ({}) doesn't match the source ({})!",
port.dest_size, buffer_size);
}
Memory::WriteBlock(*port.dest_process, port.dest, buffer.data(),
std::min<size_t>(port.dest_size, buffer_size));
@ -161,7 +161,7 @@ void Module::StartReceiving(int port_id) {
void Module::CancelReceiving(int port_id) {
if (!ports[port_id].is_receiving)
return;
NGLOG_WARNING(Service_CAM, "tries to cancel an ongoing receiving process.");
LOG_WARNING(Service_CAM, "tries to cancel an ongoing receiving process.");
CoreTiming::UnscheduleEvent(completion_event_callback, port_id);
ports[port_id].capture_result.wait();
ports[port_id].is_receiving = false;
@ -212,7 +212,7 @@ void Module::Interface::StartCapture(Kernel::HLERequestContext& ctx) {
if (!cam->ports[i].is_active) {
// This doesn't return an error, but seems to put the camera in an undefined
// state
NGLOG_ERROR(Service_CAM, "port {} hasn't been activated", i);
LOG_ERROR(Service_CAM, "port {} hasn't been activated", i);
} else {
cam->cameras[cam->ports[i].camera_id].impl->StartCapture();
cam->ports[i].is_busy = true;
@ -222,16 +222,16 @@ void Module::Interface::StartCapture(Kernel::HLERequestContext& ctx) {
}
}
} else {
NGLOG_WARNING(Service_CAM, "port {} already started", i);
LOG_WARNING(Service_CAM, "port {} already started", i);
}
}
rb.Push(RESULT_SUCCESS);
} else {
NGLOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
LOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
}
NGLOG_DEBUG(Service_CAM, "called, port_select={}", port_select.m_val);
LOG_DEBUG(Service_CAM, "called, port_select={}", port_select.m_val);
}
void Module::Interface::StopCapture(Kernel::HLERequestContext& ctx) {
@ -247,16 +247,16 @@ void Module::Interface::StopCapture(Kernel::HLERequestContext& ctx) {
cam->cameras[cam->ports[i].camera_id].impl->StopCapture();
cam->ports[i].is_busy = false;
} else {
NGLOG_WARNING(Service_CAM, "port {} already stopped", i);
LOG_WARNING(Service_CAM, "port {} already stopped", i);
}
}
rb.Push(RESULT_SUCCESS);
} else {
NGLOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
LOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
}
NGLOG_DEBUG(Service_CAM, "called, port_select={}", port_select.m_val);
LOG_DEBUG(Service_CAM, "called, port_select={}", port_select.m_val);
}
void Module::Interface::IsBusy(Kernel::HLERequestContext& ctx) {
@ -274,12 +274,12 @@ void Module::Interface::IsBusy(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(is_busy);
} else {
NGLOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
LOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
rb.Skip(1, false);
}
NGLOG_DEBUG(Service_CAM, "called, port_select={}", port_select.m_val);
LOG_DEBUG(Service_CAM, "called, port_select={}", port_select.m_val);
}
void Module::Interface::ClearBuffer(Kernel::HLERequestContext& ctx) {
@ -289,7 +289,7 @@ void Module::Interface::ClearBuffer(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_CAM, "(STUBBED) called, port_select={}", port_select.m_val);
LOG_WARNING(Service_CAM, "(STUBBED) called, port_select={}", port_select.m_val);
}
void Module::Interface::GetVsyncInterruptEvent(Kernel::HLERequestContext& ctx) {
@ -302,12 +302,12 @@ void Module::Interface::GetVsyncInterruptEvent(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushCopyObjects(cam->ports[port].vsync_interrupt_event);
} else {
NGLOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
LOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
rb.PushCopyObjects<Kernel::Object>(nullptr);
}
NGLOG_WARNING(Service_CAM, "(STUBBED) called, port_select={}", port_select.m_val);
LOG_WARNING(Service_CAM, "(STUBBED) called, port_select={}", port_select.m_val);
}
void Module::Interface::GetBufferErrorInterruptEvent(Kernel::HLERequestContext& ctx) {
@ -320,12 +320,12 @@ void Module::Interface::GetBufferErrorInterruptEvent(Kernel::HLERequestContext&
rb.Push(RESULT_SUCCESS);
rb.PushCopyObjects(cam->ports[port].buffer_error_interrupt_event);
} else {
NGLOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
LOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
rb.PushCopyObjects<Kernel::Object>(nullptr);
}
NGLOG_WARNING(Service_CAM, "(STUBBED) called, port_select={}", port_select.m_val);
LOG_WARNING(Service_CAM, "(STUBBED) called, port_select={}", port_select.m_val);
}
void Module::Interface::SetReceiving(Kernel::HLERequestContext& ctx) {
@ -355,13 +355,13 @@ void Module::Interface::SetReceiving(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushCopyObjects(port.completion_event);
} else {
NGLOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
LOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
rb.PushCopyObjects<Kernel::Object>(nullptr);
}
NGLOG_DEBUG(Service_CAM, "called, addr=0x{:X}, port_select={}, image_size={}, trans_unit={}",
dest, port_select.m_val, image_size, trans_unit);
LOG_DEBUG(Service_CAM, "called, addr=0x{:X}, port_select={}, image_size={}, trans_unit={}",
dest, port_select.m_val, image_size, trans_unit);
}
void Module::Interface::IsFinishedReceiving(Kernel::HLERequestContext& ctx) {
@ -375,12 +375,12 @@ void Module::Interface::IsFinishedReceiving(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(!is_busy);
} else {
NGLOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
LOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
rb.Skip(1, false);
}
NGLOG_DEBUG(Service_CAM, "called, port_select={}", port_select.m_val);
LOG_DEBUG(Service_CAM, "called, port_select={}", port_select.m_val);
}
void Module::Interface::SetTransferLines(Kernel::HLERequestContext& ctx) {
@ -397,12 +397,12 @@ void Module::Interface::SetTransferLines(Kernel::HLERequestContext& ctx) {
}
rb.Push(RESULT_SUCCESS);
} else {
NGLOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
LOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
}
NGLOG_WARNING(Service_CAM, "(STUBBED) called, port_select={}, lines={}, width={}, height={}",
port_select.m_val, transfer_lines, width, height);
LOG_WARNING(Service_CAM, "(STUBBED) called, port_select={}, lines={}, width={}, height={}",
port_select.m_val, transfer_lines, width, height);
}
void Module::Interface::GetMaxLines(Kernel::HLERequestContext& ctx) {
@ -435,7 +435,7 @@ void Module::Interface::GetMaxLines(Kernel::HLERequestContext& ctx) {
rb.Push(lines);
}
NGLOG_DEBUG(Service_CAM, "called, width={}, height={}", width, height);
LOG_DEBUG(Service_CAM, "called, width={}, height={}", width, height);
}
void Module::Interface::SetTransferBytes(Kernel::HLERequestContext& ctx) {
@ -452,12 +452,12 @@ void Module::Interface::SetTransferBytes(Kernel::HLERequestContext& ctx) {
}
rb.Push(RESULT_SUCCESS);
} else {
NGLOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
LOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
}
NGLOG_WARNING(Service_CAM, "(STUBBED)called, port_select={}, bytes={}, width={}, height={}",
port_select.m_val, transfer_bytes, width, height);
LOG_WARNING(Service_CAM, "(STUBBED)called, port_select={}, bytes={}, width={}, height={}",
port_select.m_val, transfer_bytes, width, height);
}
void Module::Interface::GetTransferBytes(Kernel::HLERequestContext& ctx) {
@ -470,12 +470,12 @@ void Module::Interface::GetTransferBytes(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(cam->ports[port].transfer_bytes);
} else {
NGLOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
LOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
rb.Skip(1, false);
}
NGLOG_WARNING(Service_CAM, "(STUBBED)called, port_select={}", port_select.m_val);
LOG_WARNING(Service_CAM, "(STUBBED)called, port_select={}", port_select.m_val);
}
void Module::Interface::GetMaxBytes(Kernel::HLERequestContext& ctx) {
@ -502,7 +502,7 @@ void Module::Interface::GetMaxBytes(Kernel::HLERequestContext& ctx) {
rb.Push(bytes);
}
NGLOG_DEBUG(Service_CAM, "called, width={}, height={}", width, height);
LOG_DEBUG(Service_CAM, "called, width={}, height={}", width, height);
}
void Module::Interface::SetTrimming(Kernel::HLERequestContext& ctx) {
@ -517,11 +517,11 @@ void Module::Interface::SetTrimming(Kernel::HLERequestContext& ctx) {
}
rb.Push(RESULT_SUCCESS);
} else {
NGLOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
LOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
}
NGLOG_DEBUG(Service_CAM, "called, port_select={}, trim={}", port_select.m_val, trim);
LOG_DEBUG(Service_CAM, "called, port_select={}, trim={}", port_select.m_val, trim);
}
void Module::Interface::IsTrimming(Kernel::HLERequestContext& ctx) {
@ -534,12 +534,12 @@ void Module::Interface::IsTrimming(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(cam->ports[port].is_trimming);
} else {
NGLOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
LOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
rb.Skip(1, false);
}
NGLOG_DEBUG(Service_CAM, "called, port_select={}", port_select.m_val);
LOG_DEBUG(Service_CAM, "called, port_select={}", port_select.m_val);
}
void Module::Interface::SetTrimmingParams(Kernel::HLERequestContext& ctx) {
@ -560,12 +560,12 @@ void Module::Interface::SetTrimmingParams(Kernel::HLERequestContext& ctx) {
}
rb.Push(RESULT_SUCCESS);
} else {
NGLOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
LOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
}
NGLOG_DEBUG(Service_CAM, "called, port_select={}, x0={}, y0={}, x1={}, y1={}",
port_select.m_val, x0, y0, x1, y1);
LOG_DEBUG(Service_CAM, "called, port_select={}, x0={}, y0={}, x1={}, y1={}", port_select.m_val,
x0, y0, x1, y1);
}
void Module::Interface::GetTrimmingParams(Kernel::HLERequestContext& ctx) {
@ -581,12 +581,12 @@ void Module::Interface::GetTrimmingParams(Kernel::HLERequestContext& ctx) {
rb.Push(cam->ports[port].x1);
rb.Push(cam->ports[port].y1);
} else {
NGLOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
LOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
rb.Skip(4, false);
}
NGLOG_DEBUG(Service_CAM, "called, port_select={}", port_select.m_val);
LOG_DEBUG(Service_CAM, "called, port_select={}", port_select.m_val);
}
void Module::Interface::SetTrimmingParamsCenter(Kernel::HLERequestContext& ctx) {
@ -607,12 +607,12 @@ void Module::Interface::SetTrimmingParamsCenter(Kernel::HLERequestContext& ctx)
}
rb.Push(RESULT_SUCCESS);
} else {
NGLOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
LOG_ERROR(Service_CAM, "invalid port_select={}", port_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
}
NGLOG_DEBUG(Service_CAM, "called, port_select={}, trim_w={}, trim_h={}, cam_w={}, cam_h={}",
port_select.m_val, trim_w, trim_h, cam_w, cam_h);
LOG_DEBUG(Service_CAM, "called, port_select={}, trim_w={}, trim_h={}, cam_w={}, cam_h={}",
port_select.m_val, trim_w, trim_h, cam_w, cam_h);
}
void Module::Interface::Activate(Kernel::HLERequestContext& ctx) {
@ -632,7 +632,7 @@ void Module::Interface::Activate(Kernel::HLERequestContext& ctx) {
}
rb.Push(RESULT_SUCCESS);
} else if (camera_select[0] && camera_select[1]) {
NGLOG_ERROR(Service_CAM, "camera 0 and 1 can't be both activated");
LOG_ERROR(Service_CAM, "camera 0 and 1 can't be both activated");
rb.Push(ERROR_INVALID_ENUM_VALUE);
} else {
if (camera_select[0]) {
@ -647,11 +647,11 @@ void Module::Interface::Activate(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
}
} else {
NGLOG_ERROR(Service_CAM, "invalid camera_select={}", camera_select.m_val);
LOG_ERROR(Service_CAM, "invalid camera_select={}", camera_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
}
NGLOG_DEBUG(Service_CAM, "called, camera_select={}", camera_select.m_val);
LOG_DEBUG(Service_CAM, "called, camera_select={}", camera_select.m_val);
}
void Module::Interface::SwitchContext(Kernel::HLERequestContext& ctx) {
@ -672,13 +672,13 @@ void Module::Interface::SwitchContext(Kernel::HLERequestContext& ctx) {
}
rb.Push(RESULT_SUCCESS);
} else {
NGLOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
context_select.m_val);
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
context_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
}
NGLOG_DEBUG(Service_CAM, "called, camera_select={}, context_select={}", camera_select.m_val,
context_select.m_val);
LOG_DEBUG(Service_CAM, "called, camera_select={}, context_select={}", camera_select.m_val,
context_select.m_val);
}
void Module::Interface::FlipImage(Kernel::HLERequestContext& ctx) {
@ -699,13 +699,13 @@ void Module::Interface::FlipImage(Kernel::HLERequestContext& ctx) {
}
rb.Push(RESULT_SUCCESS);
} else {
NGLOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
context_select.m_val);
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
context_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
}
NGLOG_DEBUG(Service_CAM, "called, camera_select={}, flip={}, context_select={}",
camera_select.m_val, static_cast<int>(flip), context_select.m_val);
LOG_DEBUG(Service_CAM, "called, camera_select={}, flip={}, context_select={}",
camera_select.m_val, static_cast<int>(flip), context_select.m_val);
}
void Module::Interface::SetDetailSize(Kernel::HLERequestContext& ctx) {
@ -732,16 +732,16 @@ void Module::Interface::SetDetailSize(Kernel::HLERequestContext& ctx) {
}
rb.Push(RESULT_SUCCESS);
} else {
NGLOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
context_select.m_val);
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
context_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
}
NGLOG_DEBUG(Service_CAM,
"called, camera_select={}, width={}, height={}, crop_x0={}, crop_y0={}, "
"crop_x1={}, crop_y1={}, context_select={}",
camera_select.m_val, resolution.width, resolution.height, resolution.crop_x0,
resolution.crop_y0, resolution.crop_x1, resolution.crop_y1, context_select.m_val);
LOG_DEBUG(Service_CAM,
"called, camera_select={}, width={}, height={}, crop_x0={}, crop_y0={}, "
"crop_x1={}, crop_y1={}, context_select={}",
camera_select.m_val, resolution.width, resolution.height, resolution.crop_x0,
resolution.crop_y0, resolution.crop_x1, resolution.crop_y1, context_select.m_val);
}
void Module::Interface::SetSize(Kernel::HLERequestContext& ctx) {
@ -762,13 +762,13 @@ void Module::Interface::SetSize(Kernel::HLERequestContext& ctx) {
}
rb.Push(RESULT_SUCCESS);
} else {
NGLOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
context_select.m_val);
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
context_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
}
NGLOG_DEBUG(Service_CAM, "called, camera_select={}, size={}, context_select={}",
camera_select.m_val, size, context_select.m_val);
LOG_DEBUG(Service_CAM, "called, camera_select={}, size={}, context_select={}",
camera_select.m_val, size, context_select.m_val);
}
void Module::Interface::SetFrameRate(Kernel::HLERequestContext& ctx) {
@ -784,12 +784,12 @@ void Module::Interface::SetFrameRate(Kernel::HLERequestContext& ctx) {
}
rb.Push(RESULT_SUCCESS);
} else {
NGLOG_ERROR(Service_CAM, "invalid camera_select={}", camera_select.m_val);
LOG_ERROR(Service_CAM, "invalid camera_select={}", camera_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
}
NGLOG_WARNING(Service_CAM, "(STUBBED) called, camera_select={}, frame_rate={}",
camera_select.m_val, static_cast<int>(frame_rate));
LOG_WARNING(Service_CAM, "(STUBBED) called, camera_select={}, frame_rate={}",
camera_select.m_val, static_cast<int>(frame_rate));
}
void Module::Interface::SetEffect(Kernel::HLERequestContext& ctx) {
@ -810,13 +810,13 @@ void Module::Interface::SetEffect(Kernel::HLERequestContext& ctx) {
}
rb.Push(RESULT_SUCCESS);
} else {
NGLOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
context_select.m_val);
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
context_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
}
NGLOG_DEBUG(Service_CAM, "called, camera_select={}, effect={}, context_select={}",
camera_select.m_val, static_cast<int>(effect), context_select.m_val);
LOG_DEBUG(Service_CAM, "called, camera_select={}, effect={}, context_select={}",
camera_select.m_val, static_cast<int>(effect), context_select.m_val);
}
void Module::Interface::SetOutputFormat(Kernel::HLERequestContext& ctx) {
@ -837,13 +837,13 @@ void Module::Interface::SetOutputFormat(Kernel::HLERequestContext& ctx) {
}
rb.Push(RESULT_SUCCESS);
} else {
NGLOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
context_select.m_val);
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
context_select.m_val);
rb.Push(ERROR_INVALID_ENUM_VALUE);
}
NGLOG_DEBUG(Service_CAM, "called, camera_select={}, format={}, context_select={}",
camera_select.m_val, static_cast<int>(format), context_select.m_val);
LOG_DEBUG(Service_CAM, "called, camera_select={}, format={}, context_select={}",
camera_select.m_val, static_cast<int>(format), context_select.m_val);
}
void Module::Interface::SynchronizeVsyncTiming(Kernel::HLERequestContext& ctx) {
@ -854,8 +854,8 @@ void Module::Interface::SynchronizeVsyncTiming(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_CAM, "(STUBBED) called, camera_select1={}, camera_select2={}",
camera_select1, camera_select2);
LOG_WARNING(Service_CAM, "(STUBBED) called, camera_select1={}, camera_select2={}",
camera_select1, camera_select2);
}
void Module::Interface::GetStereoCameraCalibrationData(Kernel::HLERequestContext& ctx) {
@ -881,7 +881,7 @@ void Module::Interface::GetStereoCameraCalibrationData(Kernel::HLERequestContext
rb.Push(RESULT_SUCCESS);
rb.PushRaw(data);
NGLOG_TRACE(Service_CAM, "called");
LOG_TRACE(Service_CAM, "called");
}
void Module::Interface::SetPackageParameterWithoutContext(Kernel::HLERequestContext& ctx) {
@ -893,7 +893,7 @@ void Module::Interface::SetPackageParameterWithoutContext(Kernel::HLERequestCont
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_CAM, "(STUBBED) called");
LOG_WARNING(Service_CAM, "(STUBBED) called");
}
template <typename PackageParameterType>
@ -918,8 +918,8 @@ ResultCode Module::SetPackageParameter(const PackageParameterType& package) {
}
return RESULT_SUCCESS;
} else {
NGLOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}",
package.camera_select, package.context_select);
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", package.camera_select,
package.context_select);
return ERROR_INVALID_ENUM_VALUE;
}
}
@ -938,7 +938,7 @@ void Module::Interface::SetPackageParameterWithContext(Kernel::HLERequestContext
ResultCode result = cam->SetPackageParameter(package);
rb.Push(result);
NGLOG_DEBUG(Service_CAM, "called");
LOG_DEBUG(Service_CAM, "called");
}
void Module::Interface::SetPackageParameterWithContextDetail(Kernel::HLERequestContext& ctx) {
@ -951,7 +951,7 @@ void Module::Interface::SetPackageParameterWithContextDetail(Kernel::HLERequestC
ResultCode result = cam->SetPackageParameter(package);
rb.Push(result);
NGLOG_DEBUG(Service_CAM, "called");
LOG_DEBUG(Service_CAM, "called");
}
void Module::Interface::GetSuitableY2rStandardCoefficient(Kernel::HLERequestContext& ctx) {
@ -960,7 +960,7 @@ void Module::Interface::GetSuitableY2rStandardCoefficient(Kernel::HLERequestCont
rb.Push(RESULT_SUCCESS);
rb.Push<u32>(0);
NGLOG_WARNING(Service_CAM, "(STUBBED) called");
LOG_WARNING(Service_CAM, "(STUBBED) called");
}
void Module::Interface::PlayShutterSound(Kernel::HLERequestContext& ctx) {
@ -970,7 +970,7 @@ void Module::Interface::PlayShutterSound(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_CAM, "(STUBBED) called, sound_id={}", sound_id);
LOG_WARNING(Service_CAM, "(STUBBED) called, sound_id={}", sound_id);
}
void Module::Interface::DriverInitialize(Kernel::HLERequestContext& ctx) {
@ -998,7 +998,7 @@ void Module::Interface::DriverInitialize(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_CAM, "called");
LOG_DEBUG(Service_CAM, "called");
}
void Module::Interface::DriverFinalize(Kernel::HLERequestContext& ctx) {
@ -1014,7 +1014,7 @@ void Module::Interface::DriverFinalize(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_CAM, "called");
LOG_DEBUG(Service_CAM, "called");
}
Module::Module() {

View file

@ -25,7 +25,7 @@ void GetCecStateAbbreviated(Service::Interface* self) {
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
cmd_buff[2] = static_cast<u32>(CecStateAbbreviated::CEC_STATE_ABBREV_IDLE);
NGLOG_WARNING(Service_CECD, "(STUBBED) called");
LOG_WARNING(Service_CECD, "(STUBBED) called");
}
void GetCecInfoEventHandle(Service::Interface* self) {
@ -34,7 +34,7 @@ void GetCecInfoEventHandle(Service::Interface* self) {
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
cmd_buff[3] = Kernel::g_handle_table.Create(cecinfo_event).Unwrap(); // Event handle
NGLOG_WARNING(Service_CECD, "(STUBBED) called");
LOG_WARNING(Service_CECD, "(STUBBED) called");
}
void GetChangeStateEventHandle(Service::Interface* self) {
@ -43,7 +43,7 @@ void GetChangeStateEventHandle(Service::Interface* self) {
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
cmd_buff[3] = Kernel::g_handle_table.Create(change_state_event).Unwrap(); // Event handle
NGLOG_WARNING(Service_CECD, "(STUBBED) called");
LOG_WARNING(Service_CECD, "(STUBBED) called");
}
void Init() {

View file

@ -131,7 +131,7 @@ void Module::Interface::GetCountryCodeString(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
if (country_code_id >= country_codes.size() || 0 == country_codes[country_code_id]) {
NGLOG_ERROR(Service_CFG, "requested country code id={} is invalid", country_code_id);
LOG_ERROR(Service_CFG, "requested country code id={} is invalid", country_code_id);
rb.Push(ResultCode(ErrorDescription::NotFound, ErrorModule::Config,
ErrorSummary::WrongArgument, ErrorLevel::Permanent));
rb.Skip(1, false);
@ -160,8 +160,8 @@ void Module::Interface::GetCountryCodeID(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
if (0 == country_code_id) {
NGLOG_ERROR(Service_CFG, "requested country code name={}{} is invalid",
static_cast<char>(country_code & 0xff), static_cast<char>(country_code >> 8));
LOG_ERROR(Service_CFG, "requested country code name={}{} is invalid",
static_cast<char>(country_code & 0xff), static_cast<char>(country_code >> 8));
rb.Push(ResultCode(ErrorDescription::NotFound, ErrorModule::Config,
ErrorSummary::WrongArgument, ErrorLevel::Permanent));
rb.Push<u16>(0x00FF);
@ -210,7 +210,7 @@ void Module::Interface::GenHashConsoleUnique(Kernel::HLERequestContext& ctx) {
rb.Push<u32>(0);
}
NGLOG_DEBUG(Service_CFG, "called app_id_salt=0x{:X}", app_id_salt);
LOG_DEBUG(Service_CFG, "called app_id_salt=0x{:X}", app_id_salt);
}
void Module::Interface::GetRegionCanadaUSA(Kernel::HLERequestContext& ctx) {
@ -309,22 +309,22 @@ ResultVal<void*> Module::GetConfigInfoBlockPointer(u32 block_id, u32 size, u32 f
[&](const SaveConfigBlockEntry& entry) { return entry.block_id == block_id; });
if (itr == std::end(config->block_entries)) {
NGLOG_ERROR(Service_CFG, "Config block 0x{:X} with flags {} and size {} was not found",
block_id, flag, size);
LOG_ERROR(Service_CFG, "Config block 0x{:X} with flags {} and size {} was not found",
block_id, flag, size);
return ResultCode(ErrorDescription::NotFound, ErrorModule::Config,
ErrorSummary::WrongArgument, ErrorLevel::Permanent);
}
if ((itr->flags & flag) == 0) {
NGLOG_ERROR(Service_CFG, "Invalid flag {} for config block 0x{:X} with size {}", flag,
block_id, size);
LOG_ERROR(Service_CFG, "Invalid flag {} for config block 0x{:X} with size {}", flag,
block_id, size);
return ResultCode(ErrorDescription::NotAuthorized, ErrorModule::Config,
ErrorSummary::WrongArgument, ErrorLevel::Permanent);
}
if (itr->size != size) {
NGLOG_ERROR(Service_CFG, "Invalid size {} for config block 0x{:X} with flags {}", size,
block_id, flag);
LOG_ERROR(Service_CFG, "Invalid size {} for config block 0x{:X} with flags {}", size,
block_id, flag);
return ResultCode(ErrorDescription::InvalidSize, ErrorModule::Config,
ErrorSummary::WrongArgument, ErrorLevel::Permanent);
}
@ -599,15 +599,15 @@ static SystemLanguage AdjustLanguageInfoBlock(u32 region, SystemLanguage languag
void Module::SetPreferredRegionCode(u32 region_code) {
preferred_region_code = region_code;
NGLOG_INFO(Service_CFG, "Preferred region code set to {}", preferred_region_code);
LOG_INFO(Service_CFG, "Preferred region code set to {}", preferred_region_code);
if (Settings::values.region_value == Settings::REGION_VALUE_AUTO_SELECT) {
const SystemLanguage current_language = GetSystemLanguage();
const SystemLanguage adjusted_language =
AdjustLanguageInfoBlock(region_code, current_language);
if (current_language != adjusted_language) {
NGLOG_WARNING(Service_CFG, "System language {} does not fit the region. Adjusted to {}",
static_cast<int>(current_language), static_cast<int>(adjusted_language));
LOG_WARNING(Service_CFG, "System language {} does not fit the region. Adjusted to {}",
static_cast<int>(current_language), static_cast<int>(adjusted_language));
SetSystemLanguage(adjusted_language);
}
}

View file

@ -54,7 +54,7 @@ static void Initialize(Interface* self) {
cmd_buff[3] = Kernel::g_handle_table.Create(mutex).Unwrap();
cmd_buff[4] = Kernel::g_handle_table.Create(shared_memory).Unwrap();
NGLOG_WARNING(Service_CSND, "(STUBBED) called");
LOG_WARNING(Service_CSND, "(STUBBED) called");
}
/**
@ -71,7 +71,7 @@ static void Shutdown(Interface* self) {
mutex = nullptr;
cmd_buff[1] = RESULT_SUCCESS.raw;
NGLOG_WARNING(Service_CSND, "(STUBBED) called");
LOG_WARNING(Service_CSND, "(STUBBED) called");
}
/**
@ -88,7 +88,7 @@ static void ExecuteCommands(Interface* self) {
if (shared_memory == nullptr) {
cmd_buff[1] = 1;
NGLOG_ERROR(Service_CSND, "called, shared memory not allocated");
LOG_ERROR(Service_CSND, "called, shared memory not allocated");
return;
}
@ -102,7 +102,7 @@ static void ExecuteCommands(Interface* self) {
cmd_buff[1] = RESULT_SUCCESS.raw;
NGLOG_WARNING(Service_CSND, "(STUBBED) called, addr=0x{:08X}", addr);
LOG_WARNING(Service_CSND, "(STUBBED) called, addr=0x{:08X}", addr);
}
/**
@ -117,7 +117,7 @@ static void AcquireSoundChannels(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
cmd_buff[1] = RESULT_SUCCESS.raw;
cmd_buff[2] = 0xFFFFFF00;
NGLOG_WARNING(Service_CSND, "(STUBBED) called");
LOG_WARNING(Service_CSND, "(STUBBED) called");
}
const Interface::FunctionInfo FunctionTable[] = {

View file

@ -19,7 +19,7 @@ void DLP_SRVR::IsChild(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(false);
NGLOG_WARNING(Service_DLP, "(STUBBED) called");
LOG_WARNING(Service_DLP, "(STUBBED) called");
}
DLP_SRVR::DLP_SRVR() : ServiceFramework("dlp:SRVR", 1) {

View file

@ -109,7 +109,7 @@ static void ConvertProcessAddressFromDspDram(Service::Interface* self) {
// always zero).
cmd_buff[2] = (addr << 1) + (Memory::DSP_RAM_VADDR + 0x40000);
NGLOG_DEBUG(Service_DSP, "addr=0x{:08X}", addr);
LOG_DEBUG(Service_DSP, "addr=0x{:08X}", addr);
}
/**
@ -146,14 +146,14 @@ static void LoadComponent(Service::Interface* self) {
std::vector<u8> component_data(size);
Memory::ReadBlock(buffer, component_data.data(), component_data.size());
NGLOG_INFO(Service_DSP, "Firmware hash: {:#018x}",
Common::ComputeHash64(component_data.data(), component_data.size()));
LOG_INFO(Service_DSP, "Firmware hash: {:#018x}",
Common::ComputeHash64(component_data.data(), component_data.size()));
// Some versions of the firmware have the location of DSP structures listed here.
if (size > 0x37C) {
NGLOG_INFO(Service_DSP, "Structures hash: {:#018x}",
Common::ComputeHash64(component_data.data() + 0x340, 60));
LOG_INFO(Service_DSP, "Structures hash: {:#018x}",
Common::ComputeHash64(component_data.data() + 0x340, 60));
}
NGLOG_WARNING(
LOG_WARNING(
Service_DSP,
"(STUBBED) called size=0x{:X}, prog_mask=0x{:08X}, data_mask=0x{:08X}, buffer=0x{:08X}",
size, prog_mask, data_mask, buffer);
@ -173,7 +173,7 @@ static void GetSemaphoreEventHandle(Service::Interface* self) {
// cmd_buff[2] not set
cmd_buff[3] = Kernel::g_handle_table.Create(semaphore_event).Unwrap(); // Event handle
NGLOG_WARNING(Service_DSP, "(STUBBED) called");
LOG_WARNING(Service_DSP, "(STUBBED) called");
}
/**
@ -198,8 +198,8 @@ static void FlushDataCache(Service::Interface* self) {
cmd_buff[0] = IPC::MakeHeader(0x13, 1, 0);
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
NGLOG_TRACE(Service_DSP, "called address=0x{:08X}, size=0x{:X}, process=0x{:08X}", address,
size, process);
LOG_TRACE(Service_DSP, "called address=0x{:08X}, size=0x{:X}, process=0x{:08X}", address, size,
process);
}
/**
@ -230,16 +230,16 @@ static void RegisterInterruptEvents(Service::Interface* self) {
auto evt = Kernel::g_handle_table.Get<Kernel::Event>(cmd_buff[4]);
if (!evt) {
NGLOG_INFO(Service_DSP, "Invalid event handle! type={}, pipe={}, event_handle=0x{:08X}",
type_index, pipe_index, event_handle);
LOG_INFO(Service_DSP, "Invalid event handle! type={}, pipe={}, event_handle=0x{:08X}",
type_index, pipe_index, event_handle);
ASSERT(false); // TODO: This should really be handled at an IPC translation layer.
}
if (interrupt_events.HasTooManyEventsRegistered()) {
NGLOG_INFO(Service_DSP,
"Ran out of space to register interrupts (Attempted to register "
"type={}, pipe={}, event_handle=0x{:08X})",
type_index, pipe_index, event_handle);
LOG_INFO(Service_DSP,
"Ran out of space to register interrupts (Attempted to register "
"type={}, pipe={}, event_handle=0x{:08X})",
type_index, pipe_index, event_handle);
cmd_buff[1] = ResultCode(ErrorDescription::InvalidResultValue, ErrorModule::DSP,
ErrorSummary::OutOfResource, ErrorLevel::Status)
.raw;
@ -247,13 +247,13 @@ static void RegisterInterruptEvents(Service::Interface* self) {
}
interrupt_events.Get(type, pipe) = evt;
NGLOG_INFO(Service_DSP, "Registered type={}, pipe={}, event_handle=0x{:08X}", type_index,
pipe_index, event_handle);
LOG_INFO(Service_DSP, "Registered type={}, pipe={}, event_handle=0x{:08X}", type_index,
pipe_index, event_handle);
cmd_buff[1] = RESULT_SUCCESS.raw;
} else {
interrupt_events.Get(type, pipe) = nullptr;
NGLOG_INFO(Service_DSP, "Unregistered interrupt={}, channel={}, event_handle=0x{:08X}",
type_index, pipe_index, event_handle);
LOG_INFO(Service_DSP, "Unregistered interrupt={}, channel={}, event_handle=0x{:08X}",
type_index, pipe_index, event_handle);
cmd_buff[1] = RESULT_SUCCESS.raw;
}
}
@ -271,7 +271,7 @@ static void SetSemaphore(Service::Interface* self) {
cmd_buff[0] = IPC::MakeHeader(0x7, 1, 0);
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
NGLOG_WARNING(Service_DSP, "(STUBBED) called");
LOG_WARNING(Service_DSP, "(STUBBED) called");
}
/**
@ -295,10 +295,10 @@ static void WriteProcessPipe(Service::Interface* self) {
AudioCore::DspPipe pipe = static_cast<AudioCore::DspPipe>(pipe_index);
if (IPC::StaticBufferDesc(size, 1) != cmd_buff[3]) {
NGLOG_ERROR(Service_DSP,
"IPC static buffer descriptor failed validation (0x{:X}). pipe={}, "
"size=0x{:X}, buffer=0x{:08X}",
cmd_buff[3], pipe_index, size, buffer);
LOG_ERROR(Service_DSP,
"IPC static buffer descriptor failed validation (0x{:X}). pipe={}, "
"size=0x{:X}, buffer=0x{:08X}",
cmd_buff[3], pipe_index, size, buffer);
cmd_buff[0] = IPC::MakeHeader(0, 1, 0);
cmd_buff[1] = IPC::ERR_INVALID_BUFFER_DESCRIPTOR.raw;
return;
@ -335,7 +335,7 @@ static void WriteProcessPipe(Service::Interface* self) {
cmd_buff[0] = IPC::MakeHeader(0xD, 1, 0);
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
NGLOG_DEBUG(Service_DSP, "pipe={}, size=0x{:X}, buffer=0x{:08X}", pipe_index, size, buffer);
LOG_DEBUG(Service_DSP, "pipe={}, size=0x{:X}, buffer=0x{:08X}", pipe_index, size, buffer);
}
/**
@ -380,7 +380,7 @@ static void ReadPipeIfPossible(Service::Interface* self) {
cmd_buff[3] = IPC::StaticBufferDesc(size, 0);
cmd_buff[4] = addr;
NGLOG_DEBUG(
LOG_DEBUG(
Service_DSP,
"pipe={}, unknown=0x{:08X}, size=0x{:X}, buffer=0x{:08X}, return cmd_buff[2]=0x{:08X}",
pipe_index, unknown, size, addr, cmd_buff[2]);
@ -426,7 +426,7 @@ static void ReadPipe(Service::Interface* self) {
UNREACHABLE();
}
NGLOG_DEBUG(
LOG_DEBUG(
Service_DSP,
"pipe={}, unknown=0x{:08X}, size=0x{:X}, buffer=0x{:08X}, return cmd_buff[2]=0x{:08X}",
pipe_index, unknown, size, addr, cmd_buff[2]);
@ -453,8 +453,8 @@ static void GetPipeReadableSize(Service::Interface* self) {
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
cmd_buff[2] = static_cast<u32>(Core::DSP().GetPipeReadableSize(pipe));
NGLOG_DEBUG(Service_DSP, "pipe={}, unknown=0x{:08X}, return cmd_buff[2]=0x{:08X}", pipe_index,
unknown, cmd_buff[2]);
LOG_DEBUG(Service_DSP, "pipe={}, unknown=0x{:08X}, return cmd_buff[2]=0x{:08X}", pipe_index,
unknown, cmd_buff[2]);
}
/**
@ -472,7 +472,7 @@ static void SetSemaphoreMask(Service::Interface* self) {
cmd_buff[0] = IPC::MakeHeader(0x17, 1, 0);
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
NGLOG_WARNING(Service_DSP, "(STUBBED) called mask=0x{:08X}", mask);
LOG_WARNING(Service_DSP, "(STUBBED) called mask=0x{:08X}", mask);
}
/**
@ -491,7 +491,7 @@ static void GetHeadphoneStatus(Service::Interface* self) {
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
cmd_buff[2] = 0; // Not using headphones
NGLOG_DEBUG(Service_DSP, "called");
LOG_DEBUG(Service_DSP, "called");
}
/**
@ -530,7 +530,7 @@ static void RecvData(Service::Interface* self) {
break;
}
NGLOG_DEBUG(Service_DSP, "register_number={}", register_number);
LOG_DEBUG(Service_DSP, "register_number={}", register_number);
}
/**
@ -555,7 +555,7 @@ static void RecvDataIsReady(Service::Interface* self) {
cmd_buff[1] = RESULT_SUCCESS.raw;
cmd_buff[2] = 1; // Ready to read
NGLOG_DEBUG(Service_DSP, "register_number={}", register_number);
LOG_DEBUG(Service_DSP, "register_number={}", register_number);
}
const Interface::FunctionInfo FunctionTable[] = {

View file

@ -132,30 +132,29 @@ static std::string GetCurrentSystemTime() {
}
static void LogGenericInfo(const ErrInfo::ErrInfoCommon& errinfo_common) {
NGLOG_CRITICAL(Service_ERR, "PID: 0x{:08X}", errinfo_common.pid);
NGLOG_CRITICAL(Service_ERR, "REV: 0x{:08X}_0x{:08X}", errinfo_common.rev_high,
errinfo_common.rev_low);
NGLOG_CRITICAL(Service_ERR, "TID: 0x{:08X}_0x{:08X}", errinfo_common.title_id_high,
errinfo_common.title_id_low);
NGLOG_CRITICAL(Service_ERR, "AID: 0x{:08X}_0x{:08X}", errinfo_common.app_title_id_high,
errinfo_common.app_title_id_low);
NGLOG_CRITICAL(Service_ERR, "ADR: 0x{:08X}", errinfo_common.pc_address);
LOG_CRITICAL(Service_ERR, "PID: 0x{:08X}", errinfo_common.pid);
LOG_CRITICAL(Service_ERR, "REV: 0x{:08X}_0x{:08X}", errinfo_common.rev_high,
errinfo_common.rev_low);
LOG_CRITICAL(Service_ERR, "TID: 0x{:08X}_0x{:08X}", errinfo_common.title_id_high,
errinfo_common.title_id_low);
LOG_CRITICAL(Service_ERR, "AID: 0x{:08X}_0x{:08X}", errinfo_common.app_title_id_high,
errinfo_common.app_title_id_low);
LOG_CRITICAL(Service_ERR, "ADR: 0x{:08X}", errinfo_common.pc_address);
ResultCode result_code{errinfo_common.result_code};
NGLOG_CRITICAL(Service_ERR, "RSL: 0x{:08X}", result_code.raw);
NGLOG_CRITICAL(Service_ERR, " Level: {}", static_cast<u32>(result_code.level.Value()));
NGLOG_CRITICAL(Service_ERR, " Summary: {}", static_cast<u32>(result_code.summary.Value()));
NGLOG_CRITICAL(Service_ERR, " Module: {}", static_cast<u32>(result_code.module.Value()));
NGLOG_CRITICAL(Service_ERR, " Desc: {}", static_cast<u32>(result_code.description.Value()));
LOG_CRITICAL(Service_ERR, "RSL: 0x{:08X}", result_code.raw);
LOG_CRITICAL(Service_ERR, " Level: {}", static_cast<u32>(result_code.level.Value()));
LOG_CRITICAL(Service_ERR, " Summary: {}", static_cast<u32>(result_code.summary.Value()));
LOG_CRITICAL(Service_ERR, " Module: {}", static_cast<u32>(result_code.module.Value()));
LOG_CRITICAL(Service_ERR, " Desc: {}", static_cast<u32>(result_code.description.Value()));
}
void ERR_F::ThrowFatalError(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 1, 32, 0);
NGLOG_CRITICAL(Service_ERR, "Fatal error");
LOG_CRITICAL(Service_ERR, "Fatal error");
const ErrInfo errinfo = rp.PopRaw<ErrInfo>();
NGLOG_CRITICAL(Service_ERR, "Fatal error type: {}",
GetErrType(errinfo.errinfo_common.specifier));
LOG_CRITICAL(Service_ERR, "Fatal error type: {}", GetErrType(errinfo.errinfo_common.specifier));
Core::System::GetInstance().SetStatus(Core::System::ResultStatus::ErrorUnknown);
// Generic Info
@ -166,56 +165,56 @@ void ERR_F::ThrowFatalError(Kernel::HLERequestContext& ctx) {
case FatalErrType::Corrupted:
case FatalErrType::CardRemoved:
case FatalErrType::Logged: {
NGLOG_CRITICAL(Service_ERR, "Datetime: {}", GetCurrentSystemTime());
LOG_CRITICAL(Service_ERR, "Datetime: {}", GetCurrentSystemTime());
break;
}
case FatalErrType::Exception: {
const auto& errtype = errinfo.exception;
// Register Info
NGLOG_CRITICAL(Service_ERR, "ARM Registers:");
LOG_CRITICAL(Service_ERR, "ARM Registers:");
for (u32 index = 0; index < errtype.exception_data.exception_context.arm_regs.size();
++index) {
if (index < 13) {
NGLOG_DEBUG(Service_ERR, "r{}=0x{:08X}", index,
errtype.exception_data.exception_context.arm_regs.at(index));
LOG_DEBUG(Service_ERR, "r{}=0x{:08X}", index,
errtype.exception_data.exception_context.arm_regs.at(index));
} else if (index == 13) {
NGLOG_CRITICAL(Service_ERR, "SP=0x{:08X}",
errtype.exception_data.exception_context.arm_regs.at(index));
LOG_CRITICAL(Service_ERR, "SP=0x{:08X}",
errtype.exception_data.exception_context.arm_regs.at(index));
} else if (index == 14) {
NGLOG_CRITICAL(Service_ERR, "LR=0x{:08X}",
errtype.exception_data.exception_context.arm_regs.at(index));
LOG_CRITICAL(Service_ERR, "LR=0x{:08X}",
errtype.exception_data.exception_context.arm_regs.at(index));
} else if (index == 15) {
NGLOG_CRITICAL(Service_ERR, "PC=0x{:08X}",
errtype.exception_data.exception_context.arm_regs.at(index));
LOG_CRITICAL(Service_ERR, "PC=0x{:08X}",
errtype.exception_data.exception_context.arm_regs.at(index));
}
}
NGLOG_CRITICAL(Service_ERR, "CPSR=0x{:08X}", errtype.exception_data.exception_context.cpsr);
LOG_CRITICAL(Service_ERR, "CPSR=0x{:08X}", errtype.exception_data.exception_context.cpsr);
// Exception Info
NGLOG_CRITICAL(Service_ERR, "EXCEPTION TYPE: {}",
GetExceptionType(errtype.exception_data.exception_info.exception_type));
LOG_CRITICAL(Service_ERR, "EXCEPTION TYPE: {}",
GetExceptionType(errtype.exception_data.exception_info.exception_type));
switch (static_cast<ExceptionType>(errtype.exception_data.exception_info.exception_type)) {
case ExceptionType::PrefetchAbort:
NGLOG_CRITICAL(Service_ERR, "IFSR: 0x{:08X}", errtype.exception_data.exception_info.sr);
NGLOG_CRITICAL(Service_ERR, "r15: 0x{:08X}", errtype.exception_data.exception_info.ar);
LOG_CRITICAL(Service_ERR, "IFSR: 0x{:08X}", errtype.exception_data.exception_info.sr);
LOG_CRITICAL(Service_ERR, "r15: 0x{:08X}", errtype.exception_data.exception_info.ar);
break;
case ExceptionType::DataAbort:
NGLOG_CRITICAL(Service_ERR, "DFSR: 0x{:08X}", errtype.exception_data.exception_info.sr);
NGLOG_CRITICAL(Service_ERR, "DFAR: 0x{:08X}", errtype.exception_data.exception_info.ar);
LOG_CRITICAL(Service_ERR, "DFSR: 0x{:08X}", errtype.exception_data.exception_info.sr);
LOG_CRITICAL(Service_ERR, "DFAR: 0x{:08X}", errtype.exception_data.exception_info.ar);
break;
case ExceptionType::VectorFP:
NGLOG_CRITICAL(Service_ERR, "FPEXC: 0x{:08X}",
errtype.exception_data.exception_info.fpinst);
NGLOG_CRITICAL(Service_ERR, "FINST: 0x{:08X}",
errtype.exception_data.exception_info.fpinst);
NGLOG_CRITICAL(Service_ERR, "FINST2: 0x{:08X}",
errtype.exception_data.exception_info.fpinst2);
LOG_CRITICAL(Service_ERR, "FPEXC: 0x{:08X}",
errtype.exception_data.exception_info.fpinst);
LOG_CRITICAL(Service_ERR, "FINST: 0x{:08X}",
errtype.exception_data.exception_info.fpinst);
LOG_CRITICAL(Service_ERR, "FINST2: 0x{:08X}",
errtype.exception_data.exception_info.fpinst2);
break;
case ExceptionType::Undefined:
break; // Not logging exception_info for this case
}
NGLOG_CRITICAL(Service_ERR, "Datetime: {}", GetCurrentSystemTime());
LOG_CRITICAL(Service_ERR, "Datetime: {}", GetCurrentSystemTime());
break;
}
@ -223,8 +222,8 @@ void ERR_F::ThrowFatalError(Kernel::HLERequestContext& ctx) {
const auto& errtype = errinfo.result_failure;
// Failure Message
NGLOG_CRITICAL(Service_ERR, "Failure Message: {}", errtype.message);
NGLOG_CRITICAL(Service_ERR, "Datetime: {}", GetCurrentSystemTime());
LOG_CRITICAL(Service_ERR, "Failure Message: {}", errtype.message);
LOG_CRITICAL(Service_ERR, "Datetime: {}", GetCurrentSystemTime());
break;
}

View file

@ -31,7 +31,7 @@ void Module::Interface::GetMyPresence(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushStaticBuffer(buffer, 0);
NGLOG_WARNING(Service_FRD, "(STUBBED) called");
LOG_WARNING(Service_FRD, "(STUBBED) called");
}
void Module::Interface::GetFriendKeyList(Kernel::HLERequestContext& ctx) {
@ -46,7 +46,7 @@ void Module::Interface::GetFriendKeyList(Kernel::HLERequestContext& ctx) {
rb.Push<u32>(0); // 0 friends
rb.PushStaticBuffer(buffer, 0);
NGLOG_WARNING(Service_FRD, "(STUBBED) called, unknown={}, frd_count={}", unknown, frd_count);
LOG_WARNING(Service_FRD, "(STUBBED) called, unknown={}, frd_count={}", unknown, frd_count);
}
void Module::Interface::GetFriendProfile(Kernel::HLERequestContext& ctx) {
@ -61,7 +61,7 @@ void Module::Interface::GetFriendProfile(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushStaticBuffer(buffer, 0);
NGLOG_WARNING(Service_FRD, "(STUBBED) called, count={}", count);
LOG_WARNING(Service_FRD, "(STUBBED) called, count={}", count);
}
void Module::Interface::GetFriendAttributeFlags(Kernel::HLERequestContext& ctx) {
@ -76,7 +76,7 @@ void Module::Interface::GetFriendAttributeFlags(Kernel::HLERequestContext& ctx)
rb.Push(RESULT_SUCCESS);
rb.PushStaticBuffer(buffer, 0);
NGLOG_WARNING(Service_FRD, "(STUBBED) called, count={}", count);
LOG_WARNING(Service_FRD, "(STUBBED) called, count={}", count);
}
void Module::Interface::GetMyFriendKey(Kernel::HLERequestContext& ctx) {
@ -85,7 +85,7 @@ void Module::Interface::GetMyFriendKey(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushRaw(frd->my_friend_key);
NGLOG_WARNING(Service_FRD, "(STUBBED) called");
LOG_WARNING(Service_FRD, "(STUBBED) called");
}
void Module::Interface::GetMyScreenName(Kernel::HLERequestContext& ctx) {
@ -102,7 +102,7 @@ void Module::Interface::GetMyScreenName(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushRaw(screen_name);
NGLOG_WARNING(Service_FRD, "(STUBBED) called");
LOG_WARNING(Service_FRD, "(STUBBED) called");
}
void Module::Interface::UnscrambleLocalFriendCode(Kernel::HLERequestContext& ctx) {
@ -130,7 +130,7 @@ void Module::Interface::UnscrambleLocalFriendCode(Kernel::HLERequestContext& ctx
// scambled_friend_code[5]; unscrambled_friend_code[3] = scambled_friend_code[3] ^
// scambled_friend_code[5];
NGLOG_WARNING(Service_FRD, "(STUBBED) called");
LOG_WARNING(Service_FRD, "(STUBBED) called");
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(RESULT_SUCCESS);
rb.PushStaticBuffer(unscrambled_friend_codes, 0);
@ -144,7 +144,7 @@ void Module::Interface::SetClientSdkVersion(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_FRD, "(STUBBED) called, version: 0x{:08X}", version);
LOG_WARNING(Service_FRD, "(STUBBED) called, version: 0x{:08X}", version);
}
Module::Module() = default;

View file

@ -73,12 +73,12 @@ void File::Read(Kernel::HLERequestContext& ctx) {
u64 offset = rp.Pop<u64>();
u32 length = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
NGLOG_TRACE(Service_FS, "Read {}: offset=0x{:x} length=0x{:08X}", GetName(), offset, length);
LOG_TRACE(Service_FS, "Read {}: offset=0x{:x} length=0x{:08X}", GetName(), offset, length);
const FileSessionSlot* file = GetSessionData(ctx.Session());
if (file->subfile && length > file->size) {
NGLOG_WARNING(Service_FS, "Trying to read beyond the subfile size, truncating");
LOG_WARNING(Service_FS, "Trying to read beyond the subfile size, truncating");
length = file->size;
}
@ -86,9 +86,9 @@ void File::Read(Kernel::HLERequestContext& ctx) {
offset += file->offset;
if (offset + length > backend->GetSize()) {
NGLOG_ERROR(Service_FS,
"Reading from out of bounds offset=0x{:x} length=0x{:08X} file_size=0x{:x}",
offset, length, backend->GetSize());
LOG_ERROR(Service_FS,
"Reading from out of bounds offset=0x{:x} length=0x{:08X} file_size=0x{:x}",
offset, length, backend->GetSize());
}
IPC::RequestBuilder rb = rp.MakeBuilder(2, 2);
@ -119,8 +119,8 @@ void File::Write(Kernel::HLERequestContext& ctx) {
u32 length = rp.Pop<u32>();
u32 flush = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
NGLOG_TRACE(Service_FS, "Write {}: offset=0x{:x} length={}, flush=0x{:x}", GetName(), offset,
length, flush);
LOG_TRACE(Service_FS, "Write {}: offset=0x{:x} length={}, flush=0x{:x}", GetName(), offset,
length, flush);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 2);
@ -181,8 +181,8 @@ void File::Close(Kernel::HLERequestContext& ctx) {
// TODO(Subv): Only close the backend if this client is the only one left.
if (connected_sessions.size() > 1)
NGLOG_WARNING(Service_FS, "Closing File backend but {} clients still connected",
connected_sessions.size());
LOG_WARNING(Service_FS, "Closing File backend but {} clients still connected",
connected_sessions.size());
backend->Close();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -226,7 +226,7 @@ void File::GetPriority(Kernel::HLERequestContext& ctx) {
}
void File::OpenLinkFile(Kernel::HLERequestContext& ctx) {
NGLOG_WARNING(Service_FS, "(STUBBED) File command OpenLinkFile {}", GetName());
LOG_WARNING(Service_FS, "(STUBBED) File command OpenLinkFile {}", GetName());
using Kernel::ClientSession;
using Kernel::ServerSession;
using Kernel::SharedPtr;
@ -327,7 +327,7 @@ void Directory::Read(Kernel::HLERequestContext& ctx) {
u32 count = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
std::vector<FileSys::Entry> entries(count);
NGLOG_TRACE(Service_FS, "Read {}: count={}", GetName(), count);
LOG_TRACE(Service_FS, "Read {}: count={}", GetName(), count);
// Number of entries actually read
u32 read = backend->Read(static_cast<u32>(entries.size()), entries.data());
buffer.Write(entries.data(), 0, read * sizeof(FileSys::Entry));
@ -340,7 +340,7 @@ void Directory::Read(Kernel::HLERequestContext& ctx) {
void Directory::Close(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0802, 0, 0);
NGLOG_TRACE(Service_FS, "Close {}", GetName());
LOG_TRACE(Service_FS, "Close {}", GetName());
backend->Close();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -370,7 +370,7 @@ static ArchiveBackend* GetArchive(ArchiveHandle handle) {
}
ResultVal<ArchiveHandle> OpenArchive(ArchiveIdCode id_code, FileSys::Path& archive_path) {
NGLOG_TRACE(Service_FS, "Opening archive with id code 0x{:08X}", static_cast<u32>(id_code));
LOG_TRACE(Service_FS, "Opening archive with id code 0x{:08X}", static_cast<u32>(id_code));
auto itr = id_code_map.find(id_code);
if (itr == id_code_map.end()) {
@ -404,8 +404,8 @@ ResultCode RegisterArchiveType(std::unique_ptr<FileSys::ArchiveFactory>&& factor
ASSERT_MSG(inserted, "Tried to register more than one archive with same id code");
auto& archive = result.first->second;
NGLOG_DEBUG(Service_FS, "Registered archive {} with id code 0x{:08X}", archive->GetName(),
static_cast<u32>(id_code));
LOG_DEBUG(Service_FS, "Registered archive {} with id code 0x{:08X}", archive->GetName(),
static_cast<u32>(id_code));
return RESULT_SUCCESS;
}
@ -576,7 +576,7 @@ ResultCode DeleteExtSaveData(MediaType media_type, u32 high, u32 low) {
} else if (media_type == MediaType::SDMC) {
media_type_directory = FileUtil::GetUserPath(D_SDMC_IDX);
} else {
NGLOG_ERROR(Service_FS, "Unsupported media type {}", static_cast<u32>(media_type));
LOG_ERROR(Service_FS, "Unsupported media type {}", static_cast<u32>(media_type));
return ResultCode(-1); // TODO(Subv): Find the right error code
}
@ -623,14 +623,14 @@ void RegisterArchiveTypes() {
if (sdmc_factory->Initialize())
RegisterArchiveType(std::move(sdmc_factory), ArchiveIdCode::SDMC);
else
NGLOG_ERROR(Service_FS, "Can't instantiate SDMC archive with path {}", sdmc_directory);
LOG_ERROR(Service_FS, "Can't instantiate SDMC archive with path {}", sdmc_directory);
auto sdmcwo_factory = std::make_unique<FileSys::ArchiveFactory_SDMCWriteOnly>(sdmc_directory);
if (sdmcwo_factory->Initialize())
RegisterArchiveType(std::move(sdmcwo_factory), ArchiveIdCode::SDMCWriteOnly);
else
NGLOG_ERROR(Service_FS, "Can't instantiate SDMCWriteOnly archive with path {}",
sdmc_directory);
LOG_ERROR(Service_FS, "Can't instantiate SDMCWriteOnly archive with path {}",
sdmc_directory);
// Create the SaveData archive
auto sd_savedata_source = std::make_shared<FileSys::ArchiveSource_SDSaveData>(sdmc_directory);
@ -650,16 +650,16 @@ void RegisterArchiveTypes() {
if (extsavedata_factory->Initialize())
RegisterArchiveType(std::move(extsavedata_factory), ArchiveIdCode::ExtSaveData);
else
NGLOG_ERROR(Service_FS, "Can't instantiate ExtSaveData archive with path {}",
extsavedata_factory->GetMountPoint());
LOG_ERROR(Service_FS, "Can't instantiate ExtSaveData archive with path {}",
extsavedata_factory->GetMountPoint());
auto sharedextsavedata_factory =
std::make_unique<FileSys::ArchiveFactory_ExtSaveData>(nand_directory, true);
if (sharedextsavedata_factory->Initialize())
RegisterArchiveType(std::move(sharedextsavedata_factory), ArchiveIdCode::SharedExtSaveData);
else
NGLOG_ERROR(Service_FS, "Can't instantiate SharedExtSaveData archive with path {}",
sharedextsavedata_factory->GetMountPoint());
LOG_ERROR(Service_FS, "Can't instantiate SharedExtSaveData archive with path {}",
sharedextsavedata_factory->GetMountPoint());
// Create the NCCH archive, basically a small variation of the RomFS archive
auto savedatacheck_factory = std::make_unique<FileSys::ArchiveFactory_NCCH>();
@ -676,9 +676,8 @@ void RegisterArchiveTypes() {
void RegisterSelfNCCH(Loader::AppLoader& app_loader) {
auto itr = id_code_map.find(ArchiveIdCode::SelfNCCH);
if (itr == id_code_map.end()) {
NGLOG_ERROR(
Service_FS,
"Could not register a new NCCH because the SelfNCCH archive hasn't been created");
LOG_ERROR(Service_FS,
"Could not register a new NCCH because the SelfNCCH archive hasn't been created");
return;
}

View file

@ -54,8 +54,7 @@ void FS_USER::OpenFile(Kernel::HLERequestContext& ctx) {
ASSERT(filename.size() == filename_size);
FileSys::Path file_path(filename_type, filename);
NGLOG_DEBUG(Service_FS, "path={}, mode={} attrs={}", file_path.DebugStr(), mode.hex,
attributes);
LOG_DEBUG(Service_FS, "path={}, mode={} attrs={}", file_path.DebugStr(), mode.hex, attributes);
ResultVal<std::shared_ptr<File>> file_res =
OpenFileFromArchive(archive_handle, file_path, mode);
@ -66,7 +65,7 @@ void FS_USER::OpenFile(Kernel::HLERequestContext& ctx) {
rb.PushMoveObjects(file->Connect());
} else {
rb.PushMoveObjects<Kernel::Object>(nullptr);
NGLOG_ERROR(Service_FS, "failed to get a handle for file {}", file_path.DebugStr());
LOG_ERROR(Service_FS, "failed to get a handle for file {}", file_path.DebugStr());
}
}
@ -88,18 +87,17 @@ void FS_USER::OpenFileDirectly(Kernel::HLERequestContext& ctx) {
FileSys::Path archive_path(archivename_type, archivename);
FileSys::Path file_path(filename_type, filename);
NGLOG_DEBUG(Service_FS,
"archive_id=0x{:08X} archive_path={} file_path={}, mode={} attributes={}",
static_cast<u32>(archive_id), archive_path.DebugStr(), file_path.DebugStr(),
mode.hex, attributes);
LOG_DEBUG(Service_FS, "archive_id=0x{:08X} archive_path={} file_path={}, mode={} attributes={}",
static_cast<u32>(archive_id), archive_path.DebugStr(), file_path.DebugStr(), mode.hex,
attributes);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
ResultVal<ArchiveHandle> archive_handle = Service::FS::OpenArchive(archive_id, archive_path);
if (archive_handle.Failed()) {
NGLOG_ERROR(Service_FS,
"Failed to get a handle for archive archive_id=0x{:08X} archive_path={}",
static_cast<u32>(archive_id), archive_path.DebugStr());
LOG_ERROR(Service_FS,
"Failed to get a handle for archive archive_id=0x{:08X} archive_path={}",
static_cast<u32>(archive_id), archive_path.DebugStr());
rb.Push(archive_handle.Code());
rb.PushMoveObjects<Kernel::Object>(nullptr);
return;
@ -114,8 +112,8 @@ void FS_USER::OpenFileDirectly(Kernel::HLERequestContext& ctx) {
rb.PushMoveObjects(file->Connect());
} else {
rb.PushMoveObjects<Kernel::Object>(nullptr);
NGLOG_ERROR(Service_FS, "failed to get a handle for file {} mode={} attributes={}",
file_path.DebugStr(), mode.hex, attributes);
LOG_ERROR(Service_FS, "failed to get a handle for file {} mode={} attributes={}",
file_path.DebugStr(), mode.hex, attributes);
}
}
@ -130,8 +128,8 @@ void FS_USER::DeleteFile(Kernel::HLERequestContext& ctx) {
FileSys::Path file_path(filename_type, filename);
NGLOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(filename_type),
filename_size, file_path.DebugStr());
LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(filename_type), filename_size,
file_path.DebugStr());
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(DeleteFileFromArchive(archive_handle, file_path));
@ -155,10 +153,10 @@ void FS_USER::RenameFile(Kernel::HLERequestContext& ctx) {
FileSys::Path src_file_path(src_filename_type, src_filename);
FileSys::Path dest_file_path(dest_filename_type, dest_filename);
NGLOG_DEBUG(
Service_FS, "src_type={} src_size={} src_data={} dest_type={} dest_size={} dest_data={}",
static_cast<u32>(src_filename_type), src_filename_size, src_file_path.DebugStr(),
static_cast<u32>(dest_filename_type), dest_filename_size, dest_file_path.DebugStr());
LOG_DEBUG(Service_FS,
"src_type={} src_size={} src_data={} dest_type={} dest_size={} dest_data={}",
static_cast<u32>(src_filename_type), src_filename_size, src_file_path.DebugStr(),
static_cast<u32>(dest_filename_type), dest_filename_size, dest_file_path.DebugStr());
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RenameFileBetweenArchives(src_archive_handle, src_file_path, dest_archive_handle,
@ -177,8 +175,8 @@ void FS_USER::DeleteDirectory(Kernel::HLERequestContext& ctx) {
FileSys::Path dir_path(dirname_type, dirname);
NGLOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size,
dir_path.DebugStr());
LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size,
dir_path.DebugStr());
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(DeleteDirectoryFromArchive(archive_handle, dir_path));
@ -196,8 +194,8 @@ void FS_USER::DeleteDirectoryRecursively(Kernel::HLERequestContext& ctx) {
FileSys::Path dir_path(dirname_type, dirname);
NGLOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size,
dir_path.DebugStr());
LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size,
dir_path.DebugStr());
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(DeleteDirectoryRecursivelyFromArchive(archive_handle, dir_path));
@ -217,8 +215,8 @@ void FS_USER::CreateFile(Kernel::HLERequestContext& ctx) {
FileSys::Path file_path(filename_type, filename);
NGLOG_DEBUG(Service_FS, "type={} attributes={} size={:x} data={}",
static_cast<u32>(filename_type), attributes, file_size, file_path.DebugStr());
LOG_DEBUG(Service_FS, "type={} attributes={} size={:x} data={}",
static_cast<u32>(filename_type), attributes, file_size, file_path.DebugStr());
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(CreateFileInArchive(archive_handle, file_path, file_size));
@ -235,8 +233,8 @@ void FS_USER::CreateDirectory(Kernel::HLERequestContext& ctx) {
ASSERT(dirname.size() == dirname_size);
FileSys::Path dir_path(dirname_type, dirname);
NGLOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size,
dir_path.DebugStr());
LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size,
dir_path.DebugStr());
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(CreateDirectoryFromArchive(archive_handle, dir_path));
@ -259,10 +257,10 @@ void FS_USER::RenameDirectory(Kernel::HLERequestContext& ctx) {
FileSys::Path src_dir_path(src_dirname_type, src_dirname);
FileSys::Path dest_dir_path(dest_dirname_type, dest_dirname);
NGLOG_DEBUG(Service_FS,
"src_type={} src_size={} src_data={} dest_type={} dest_size={} dest_data={}",
static_cast<u32>(src_dirname_type), src_dirname_size, src_dir_path.DebugStr(),
static_cast<u32>(dest_dirname_type), dest_dirname_size, dest_dir_path.DebugStr());
LOG_DEBUG(Service_FS,
"src_type={} src_size={} src_data={} dest_type={} dest_size={} dest_data={}",
static_cast<u32>(src_dirname_type), src_dirname_size, src_dir_path.DebugStr(),
static_cast<u32>(dest_dirname_type), dest_dirname_size, dest_dir_path.DebugStr());
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RenameDirectoryBetweenArchives(src_archive_handle, src_dir_path, dest_archive_handle,
@ -279,8 +277,8 @@ void FS_USER::OpenDirectory(Kernel::HLERequestContext& ctx) {
FileSys::Path dir_path(dirname_type, dirname);
NGLOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size,
dir_path.DebugStr());
LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size,
dir_path.DebugStr());
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
ResultVal<std::shared_ptr<Directory>> dir_res =
@ -292,8 +290,8 @@ void FS_USER::OpenDirectory(Kernel::HLERequestContext& ctx) {
directory->ClientConnected(std::get<SharedPtr<ServerSession>>(sessions));
rb.PushMoveObjects(std::get<SharedPtr<ClientSession>>(sessions));
} else {
NGLOG_ERROR(Service_FS, "failed to get a handle for directory type={} size={} data={}",
static_cast<u32>(dirname_type), dirname_size, dir_path.DebugStr());
LOG_ERROR(Service_FS, "failed to get a handle for directory type={} size={} data={}",
static_cast<u32>(dirname_type), dirname_size, dir_path.DebugStr());
rb.PushMoveObjects<Kernel::Object>(nullptr);
}
}
@ -307,8 +305,8 @@ void FS_USER::OpenArchive(Kernel::HLERequestContext& ctx) {
ASSERT(archivename.size() == archivename_size);
FileSys::Path archive_path(archivename_type, archivename);
NGLOG_DEBUG(Service_FS, "archive_id=0x{:08X} archive_path={}", static_cast<u32>(archive_id),
archive_path.DebugStr());
LOG_DEBUG(Service_FS, "archive_id=0x{:08X} archive_path={}", static_cast<u32>(archive_id),
archive_path.DebugStr());
IPC::RequestBuilder rb = rp.MakeBuilder(3, 0);
ResultVal<ArchiveHandle> handle = Service::FS::OpenArchive(archive_id, archive_path);
@ -317,9 +315,9 @@ void FS_USER::OpenArchive(Kernel::HLERequestContext& ctx) {
rb.PushRaw(*handle);
} else {
rb.Push<u64>(0);
NGLOG_ERROR(Service_FS,
"failed to get a handle for archive archive_id=0x{:08X} archive_path={}",
static_cast<u32>(archive_id), archive_path.DebugStr());
LOG_ERROR(Service_FS,
"failed to get a handle for archive archive_id=0x{:08X} archive_path={}",
static_cast<u32>(archive_id), archive_path.DebugStr());
}
}
@ -344,11 +342,11 @@ void FS_USER::IsSdmcWriteable(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
// If the SD isn't enabled, it can't be writeable...else, stubbed true
rb.Push(Settings::values.use_virtual_sd);
NGLOG_DEBUG(Service_FS, " (STUBBED)");
LOG_DEBUG(Service_FS, " (STUBBED)");
}
void FS_USER::FormatSaveData(Kernel::HLERequestContext& ctx) {
NGLOG_WARNING(Service_FS, "(STUBBED)");
LOG_WARNING(Service_FS, "(STUBBED)");
IPC::RequestParser rp(ctx, 0x84C, 9, 2);
auto archive_id = rp.PopEnum<FS::ArchiveIdCode>();
@ -364,19 +362,19 @@ void FS_USER::FormatSaveData(Kernel::HLERequestContext& ctx) {
ASSERT(archivename.size() == archivename_size);
FileSys::Path archive_path(archivename_type, archivename);
NGLOG_DEBUG(Service_FS, "archive_path={}", archive_path.DebugStr());
LOG_DEBUG(Service_FS, "archive_path={}", archive_path.DebugStr());
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
if (archive_id != FS::ArchiveIdCode::SaveData) {
NGLOG_ERROR(Service_FS, "tried to format an archive different than SaveData, {}",
static_cast<u32>(archive_id));
LOG_ERROR(Service_FS, "tried to format an archive different than SaveData, {}",
static_cast<u32>(archive_id));
rb.Push(FileSys::ERROR_INVALID_PATH);
return;
}
if (archive_path.GetType() != FileSys::LowPathType::Empty) {
// TODO(Subv): Implement formatting the SaveData of other games
NGLOG_ERROR(Service_FS, "archive LowPath type other than empty is currently unsupported");
LOG_ERROR(Service_FS, "archive LowPath type other than empty is currently unsupported");
rb.Push(UnimplementedFunction(ErrorModule::FS));
return;
}
@ -408,7 +406,7 @@ void FS_USER::FormatThisUserSaveData(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(FormatArchive(ArchiveIdCode::SaveData, format_info));
NGLOG_TRACE(Service_FS, "called");
LOG_TRACE(Service_FS, "called");
}
void FS_USER::GetFreeBytes(Kernel::HLERequestContext& ctx) {
@ -438,10 +436,10 @@ void FS_USER::CreateExtSaveData(Kernel::HLERequestContext& ctx) {
u32 icon_size = rp.Pop<u32>();
auto icon_buffer = rp.PopMappedBuffer();
NGLOG_WARNING(Service_FS,
"(STUBBED) savedata_high={:08X} savedata_low={:08X} unknown={:08X} "
"files={:08X} directories={:08X} size_limit={:016x} icon_size={:08X}",
save_high, save_low, unknown, directories, files, size_limit, icon_size);
LOG_WARNING(Service_FS,
"(STUBBED) savedata_high={:08X} savedata_low={:08X} unknown={:08X} "
"files={:08X} directories={:08X} size_limit={:016x} icon_size={:08X}",
save_high, save_low, unknown, directories, files, size_limit, icon_size);
std::vector<u8> icon(icon_size);
icon_buffer.Read(icon.data(), 0, icon_size);
@ -464,9 +462,9 @@ void FS_USER::DeleteExtSaveData(Kernel::HLERequestContext& ctx) {
u32 save_high = rp.Pop<u32>();
u32 unknown = rp.Pop<u32>(); // TODO(Subv): Figure out what this is
NGLOG_WARNING(Service_FS,
"(STUBBED) save_low={:08X} save_high={:08X} media_type={:08X} unknown={:08X}",
save_low, save_high, static_cast<u32>(media_type), unknown);
LOG_WARNING(Service_FS,
"(STUBBED) save_low={:08X} save_high={:08X} media_type={:08X} unknown={:08X}",
save_low, save_high, static_cast<u32>(media_type), unknown);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(Service::FS::DeleteExtSaveData(media_type, save_high, save_low));
@ -477,7 +475,7 @@ void FS_USER::CardSlotIsInserted(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.Push(false);
NGLOG_WARNING(Service_FS, "(STUBBED) called");
LOG_WARNING(Service_FS, "(STUBBED) called");
}
void FS_USER::DeleteSystemSaveData(Kernel::HLERequestContext& ctx) {
@ -501,7 +499,7 @@ void FS_USER::CreateSystemSaveData(Kernel::HLERequestContext& ctx) {
u32 file_buckets = rp.Pop<u32>();
bool duplicate = rp.Pop<bool>();
NGLOG_WARNING(
LOG_WARNING(
Service_FS,
"(STUBBED) savedata_high={:08X} savedata_low={:08X} total_size={:08X} block_size={:08X} "
"directories={} files={} directory_buckets={} file_buckets={} duplicate={}",
@ -523,11 +521,11 @@ void FS_USER::CreateLegacySystemSaveData(Kernel::HLERequestContext& ctx) {
u32 file_buckets = rp.Pop<u32>();
bool duplicate = rp.Pop<bool>();
NGLOG_WARNING(Service_FS,
"(STUBBED) savedata_id={:08X} total_size={:08X} block_size={:08X} directories={} "
"files={} directory_buckets={} file_buckets={} duplicate={}",
savedata_id, total_size, block_size, directories, files, directory_buckets,
file_buckets, duplicate);
LOG_WARNING(Service_FS,
"(STUBBED) savedata_id={:08X} total_size={:08X} block_size={:08X} directories={} "
"files={} directory_buckets={} file_buckets={} duplicate={}",
savedata_id, total_size, block_size, directories, files, directory_buckets,
file_buckets, duplicate);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
// With this command, the SystemSaveData always has save_high = 0 (Always created in the NAND)
@ -539,7 +537,7 @@ void FS_USER::InitializeWithSdkVersion(Kernel::HLERequestContext& ctx) {
const u32 version = rp.Pop<u32>();
rp.PopPID();
NGLOG_WARNING(Service_FS, "(STUBBED) called, version: 0x{:08X}", version);
LOG_WARNING(Service_FS, "(STUBBED) called, version: 0x{:08X}", version);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
@ -553,28 +551,28 @@ void FS_USER::SetPriority(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_FS, "called priority=0x{:X}", priority);
LOG_DEBUG(Service_FS, "called priority=0x{:X}", priority);
}
void FS_USER::GetPriority(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x863, 0, 0);
if (priority == -1) {
NGLOG_INFO(Service_FS, "priority was not set, priority=0x{:X}", priority);
LOG_INFO(Service_FS, "priority was not set, priority=0x{:X}", priority);
}
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.Push(priority);
NGLOG_DEBUG(Service_FS, "called priority=0x{:X}", priority);
LOG_DEBUG(Service_FS, "called priority=0x{:X}", priority);
}
void FS_USER::GetArchiveResource(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x849, 1, 0);
u32 system_media_type = rp.Pop<u32>();
NGLOG_WARNING(Service_FS, "(STUBBED) called Media type=0x{:08X}", system_media_type);
LOG_WARNING(Service_FS, "(STUBBED) called Media type=0x{:08X}", system_media_type);
IPC::RequestBuilder rb = rp.MakeBuilder(5, 0);
rb.Push(RESULT_SUCCESS);
@ -594,14 +592,14 @@ void FS_USER::GetFormatInfo(Kernel::HLERequestContext& ctx) {
FileSys::Path archive_path(archivename_type, archivename);
NGLOG_DEBUG(Service_FS, "archive_path={}", archive_path.DebugStr());
LOG_DEBUG(Service_FS, "archive_path={}", archive_path.DebugStr());
IPC::RequestBuilder rb = rp.MakeBuilder(5, 0);
auto format_info = GetArchiveFormatInfo(archive_id, archive_path);
rb.Push(format_info.Code());
if (format_info.Failed()) {
NGLOG_ERROR(Service_FS, "Failed to retrieve the format info");
LOG_ERROR(Service_FS, "Failed to retrieve the format info");
rb.Skip(4, true);
return;
}
@ -617,7 +615,7 @@ void FS_USER::GetProgramLaunchInfo(Kernel::HLERequestContext& ctx) {
u32 process_id = rp.Pop<u32>();
NGLOG_DEBUG(Service_FS, "process_id={}", process_id);
LOG_DEBUG(Service_FS, "process_id={}", process_id);
// TODO(Subv): The real FS service manages its own process list and only checks the processes
// that were registered with the 'fs:REG' service.
@ -649,7 +647,7 @@ void FS_USER::GetProgramLaunchInfo(Kernel::HLERequestContext& ctx) {
void FS_USER::GetNumSeeds(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x87D, 0, 0);
NGLOG_WARNING(Service_FS, "(STUBBED) called");
LOG_WARNING(Service_FS, "(STUBBED) called");
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -666,10 +664,10 @@ void FS_USER::SetSaveDataSecureValue(Kernel::HLERequestContext& ctx) {
// TODO: Generate and Save the Secure Value
NGLOG_WARNING(Service_FS,
"(STUBBED) called, value=0x{:016x} secure_value_slot=0x{:08X} "
"unqiue_id=0x{:08X} title_variation=0x{:02X}",
value, secure_value_slot, unique_id, title_variation);
LOG_WARNING(Service_FS,
"(STUBBED) called, value=0x{:016x} secure_value_slot=0x{:08X} "
"unqiue_id=0x{:08X} title_variation=0x{:02X}",
value, secure_value_slot, unique_id, title_variation);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -683,7 +681,7 @@ void FS_USER::GetSaveDataSecureValue(Kernel::HLERequestContext& ctx) {
u32 unique_id = rp.Pop<u32>();
u8 title_variation = rp.Pop<u8>();
NGLOG_WARNING(
LOG_WARNING(
Service_FS,
"(STUBBED) called secure_value_slot=0x{:08X} unqiue_id=0x{:08X} title_variation=0x{:02X}",
secure_value_slot, unique_id, title_variation);

View file

@ -120,14 +120,13 @@ static ResultCode WriteHWRegs(u32 base_address, u32 size_in_bytes, const std::ve
const u32 max_size_in_bytes = 0x80;
if (base_address & 3 || base_address >= 0x420000) {
NGLOG_ERROR(
Service_GSP,
"Write address was out of range or misaligned! (address=0x{:08x}, size=0x{:08x})",
base_address, size_in_bytes);
LOG_ERROR(Service_GSP,
"Write address was out of range or misaligned! (address=0x{:08x}, size=0x{:08x})",
base_address, size_in_bytes);
return ERR_REGS_OUTOFRANGE_OR_MISALIGNED;
} else if (size_in_bytes <= max_size_in_bytes) {
if (size_in_bytes & 3) {
NGLOG_ERROR(Service_GSP, "Misaligned size 0x{:08x}", size_in_bytes);
LOG_ERROR(Service_GSP, "Misaligned size 0x{:08x}", size_in_bytes);
return ERR_REGS_MISALIGNED;
} else {
size_t offset = 0;
@ -144,7 +143,7 @@ static ResultCode WriteHWRegs(u32 base_address, u32 size_in_bytes, const std::ve
}
} else {
NGLOG_ERROR(Service_GSP, "Out of range size 0x{:08x}", size_in_bytes);
LOG_ERROR(Service_GSP, "Out of range size 0x{:08x}", size_in_bytes);
return ERR_REGS_INVALID_SIZE;
}
}
@ -165,14 +164,13 @@ static ResultCode WriteHWRegsWithMask(u32 base_address, u32 size_in_bytes,
const u32 max_size_in_bytes = 0x80;
if (base_address & 3 || base_address >= 0x420000) {
NGLOG_ERROR(
Service_GSP,
"Write address was out of range or misaligned! (address=0x{:08x}, size=0x{:08x})",
base_address, size_in_bytes);
LOG_ERROR(Service_GSP,
"Write address was out of range or misaligned! (address=0x{:08x}, size=0x{:08x})",
base_address, size_in_bytes);
return ERR_REGS_OUTOFRANGE_OR_MISALIGNED;
} else if (size_in_bytes <= max_size_in_bytes) {
if (size_in_bytes & 3) {
NGLOG_ERROR(Service_GSP, "Misaligned size 0x{:08x}", size_in_bytes);
LOG_ERROR(Service_GSP, "Misaligned size 0x{:08x}", size_in_bytes);
return ERR_REGS_MISALIGNED;
} else {
size_t offset = 0;
@ -199,7 +197,7 @@ static ResultCode WriteHWRegsWithMask(u32 base_address, u32 size_in_bytes,
}
} else {
NGLOG_ERROR(Service_GSP, "Out of range size 0x{:08x}", size_in_bytes);
LOG_ERROR(Service_GSP, "Out of range size 0x{:08x}", size_in_bytes);
return ERR_REGS_INVALID_SIZE;
}
}
@ -237,7 +235,7 @@ void GSP_GPU::ReadHWRegs(Kernel::HLERequestContext& ctx) {
if ((reg_addr % 4) != 0 || reg_addr >= 0x420000) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(ERR_REGS_OUTOFRANGE_OR_MISALIGNED);
NGLOG_ERROR(Service_GSP, "Invalid address 0x{:08x}", reg_addr);
LOG_ERROR(Service_GSP, "Invalid address 0x{:08x}", reg_addr);
return;
}
@ -245,7 +243,7 @@ void GSP_GPU::ReadHWRegs(Kernel::HLERequestContext& ctx) {
if ((size % 4) != 0) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(ERR_REGS_MISALIGNED);
NGLOG_ERROR(Service_GSP, "Invalid size 0x{:08x}", size);
LOG_ERROR(Service_GSP, "Invalid size 0x{:08x}", size);
return;
}
@ -319,8 +317,8 @@ void GSP_GPU::FlushDataCache(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}",
address, size, process->process_id);
LOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}", address,
size, process->process_id);
}
void GSP_GPU::InvalidateDataCache(Kernel::HLERequestContext& ctx) {
@ -334,8 +332,8 @@ void GSP_GPU::InvalidateDataCache(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}",
address, size, process->process_id);
LOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}", address,
size, process->process_id);
}
void GSP_GPU::SetAxiConfigQoSMode(Kernel::HLERequestContext& ctx) {
@ -345,7 +343,7 @@ void GSP_GPU::SetAxiConfigQoSMode(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_GSP, "(STUBBED) called mode=0x{:08X}", mode);
LOG_DEBUG(Service_GSP, "(STUBBED) called mode=0x{:08X}", mode);
}
void GSP_GPU::RegisterInterruptRelayQueue(Kernel::HLERequestContext& ctx) {
@ -375,7 +373,7 @@ void GSP_GPU::RegisterInterruptRelayQueue(Kernel::HLERequestContext& ctx) {
rb.Push(session_data->thread_id);
rb.PushCopyObjects(shared_memory);
NGLOG_DEBUG(Service_GSP, "called, flags=0x{:08X}", flags);
LOG_DEBUG(Service_GSP, "called, flags=0x{:08X}", flags);
}
void GSP_GPU::UnregisterInterruptRelayQueue(Kernel::HLERequestContext& ctx) {
@ -388,7 +386,7 @@ void GSP_GPU::UnregisterInterruptRelayQueue(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_GSP, "called");
LOG_DEBUG(Service_GSP, "called");
}
void GSP_GPU::SignalInterruptForThread(InterruptId interrupt_id, u32 thread_id) {
@ -398,7 +396,7 @@ void GSP_GPU::SignalInterruptForThread(InterruptId interrupt_id, u32 thread_id)
auto interrupt_event = session_data->interrupt_event;
if (interrupt_event == nullptr) {
NGLOG_WARNING(Service_GSP, "cannot synchronize until GSP event has been created!");
LOG_WARNING(Service_GSP, "cannot synchronize until GSP event has been created!");
return;
}
InterruptRelayQueue* interrupt_relay_queue = GetInterruptRelayQueue(shared_memory, thread_id);
@ -436,7 +434,7 @@ void GSP_GPU::SignalInterruptForThread(InterruptId interrupt_id, u32 thread_id)
*/
void GSP_GPU::SignalInterrupt(InterruptId interrupt_id) {
if (nullptr == shared_memory) {
NGLOG_WARNING(Service_GSP, "cannot synchronize until GSP shared memory has been created!");
LOG_WARNING(Service_GSP, "cannot synchronize until GSP shared memory has been created!");
return;
}
@ -583,7 +581,7 @@ static void ExecuteCommand(const Command& command, u32 thread_id) {
}
default:
NGLOG_ERROR(Service_GSP, "unknown command 0x{:08X}", (int)command.id.Value());
LOG_ERROR(Service_GSP, "unknown command 0x{:08X}", (int)command.id.Value());
}
if (Pica::g_debug_context)
@ -668,7 +666,7 @@ void GSP_GPU::ImportDisplayCaptureInfo(Kernel::HLERequestContext& ctx) {
rb.PushRaw(top_entry);
rb.PushRaw(bottom_entry);
NGLOG_WARNING(Service_GSP, "called");
LOG_WARNING(Service_GSP, "called");
}
void GSP_GPU::AcquireRight(Kernel::HLERequestContext& ctx) {
@ -679,8 +677,8 @@ void GSP_GPU::AcquireRight(Kernel::HLERequestContext& ctx) {
SessionData* session_data = GetSessionData(ctx.Session());
NGLOG_WARNING(Service_GSP, "called flag={:08X} process={} thread_id={}", flag,
process->process_id, session_data->thread_id);
LOG_WARNING(Service_GSP, "called flag={:08X} process={} thread_id={}", flag,
process->process_id, session_data->thread_id);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -713,7 +711,7 @@ void GSP_GPU::ReleaseRight(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_GSP, "called");
LOG_WARNING(Service_GSP, "called");
}
void GSP_GPU::StoreDataCache(Kernel::HLERequestContext& ctx) {
@ -726,8 +724,8 @@ void GSP_GPU::StoreDataCache(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}",
address, size, process->process_id);
LOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}", address,
size, process->process_id);
}
void GSP_GPU::SetLedForceOff(Kernel::HLERequestContext& ctx) {
@ -738,7 +736,7 @@ void GSP_GPU::SetLedForceOff(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_GSP, "(STUBBED) called");
LOG_DEBUG(Service_GSP, "(STUBBED) called");
}
SessionData* GSP_GPU::FindRegisteredThreadData(u32 thread_id) {

View file

@ -266,7 +266,7 @@ void Module::Interface::EnableAccelerometer(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_HID, "called");
LOG_DEBUG(Service_HID, "called");
}
void Module::Interface::DisableAccelerometer(Kernel::HLERequestContext& ctx) {
@ -282,7 +282,7 @@ void Module::Interface::DisableAccelerometer(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_HID, "called");
LOG_DEBUG(Service_HID, "called");
}
void Module::Interface::EnableGyroscopeLow(Kernel::HLERequestContext& ctx) {
@ -298,7 +298,7 @@ void Module::Interface::EnableGyroscopeLow(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_HID, "called");
LOG_DEBUG(Service_HID, "called");
}
void Module::Interface::DisableGyroscopeLow(Kernel::HLERequestContext& ctx) {
@ -314,7 +314,7 @@ void Module::Interface::DisableGyroscopeLow(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_HID, "called");
LOG_DEBUG(Service_HID, "called");
}
void Module::Interface::GetGyroscopeLowRawToDpsCoefficient(Kernel::HLERequestContext& ctx) {
@ -339,7 +339,7 @@ void Module::Interface::GetGyroscopeLowCalibrateParam(Kernel::HLERequestContext&
};
rb.PushRaw(param);
NGLOG_WARNING(Service_HID, "(STUBBED) called");
LOG_WARNING(Service_HID, "(STUBBED) called");
}
void Module::Interface::GetSoundVolume(Kernel::HLERequestContext& ctx) {
@ -351,7 +351,7 @@ void Module::Interface::GetSoundVolume(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(volume);
NGLOG_WARNING(Service_HID, "(STUBBED) called");
LOG_WARNING(Service_HID, "(STUBBED) called");
}
Module::Interface::Interface(std::shared_ptr<Module> hid, const char* name, u32 max_session)

View file

@ -165,8 +165,8 @@ void ExtraHID::OnDisconnect() {
void ExtraHID::HandleConfigureHIDPollingRequest(const std::vector<u8>& request) {
if (request.size() != 3) {
NGLOG_ERROR(Service_IR, "Wrong request size ({}): {}", request.size(),
Common::ArrayToString(request.data(), request.size()));
LOG_ERROR(Service_IR, "Wrong request size ({}): {}", request.size(),
Common::ArrayToString(request.data(), request.size()));
return;
}
@ -187,8 +187,8 @@ void ExtraHID::HandleReadCalibrationDataRequest(const std::vector<u8>& request_b
"ReadCalibrationDataRequest has wrong size");
if (request_buf.size() != sizeof(ReadCalibrationDataRequest)) {
NGLOG_ERROR(Service_IR, "Wrong request size ({}): {}", request_buf.size(),
Common::ArrayToString(request_buf.data(), request_buf.size()));
LOG_ERROR(Service_IR, "Wrong request size ({}): {}", request_buf.size(),
Common::ArrayToString(request_buf.data(), request_buf.size()));
return;
}
@ -199,8 +199,8 @@ void ExtraHID::HandleReadCalibrationDataRequest(const std::vector<u8>& request_b
const u16 size = Common::AlignDown(request.size, 16);
if (offset + size > calibration_data.size()) {
NGLOG_ERROR(Service_IR, "Read beyond the end of calibration data! (offset={}, size={})",
offset, size);
LOG_ERROR(Service_IR, "Read beyond the end of calibration data! (offset={}, size={})",
offset, size);
return;
}
@ -222,8 +222,8 @@ void ExtraHID::OnReceive(const std::vector<u8>& data) {
HandleReadCalibrationDataRequest(data);
break;
default:
NGLOG_ERROR(Service_IR, "Unknown request: {}",
Common::ArrayToString(data.data(), data.size()));
LOG_ERROR(Service_IR, "Unknown request: {}",
Common::ArrayToString(data.data(), data.size()));
break;
}
}

View file

@ -122,7 +122,7 @@ void IR_RST::Initialize(Kernel::HLERequestContext& ctx) {
raw_c_stick = rp.Pop<bool>();
if (raw_c_stick)
NGLOG_ERROR(Service_IR, "raw C-stick data is not implemented!");
LOG_ERROR(Service_IR, "raw C-stick data is not implemented!");
next_pad_index = 0;
is_device_reload_pending.store(true);
@ -131,7 +131,7 @@ void IR_RST::Initialize(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_IR, "called. update_period={}, raw_c_stick={}", update_period, raw_c_stick);
LOG_DEBUG(Service_IR, "called. update_period={}, raw_c_stick={}", update_period, raw_c_stick);
}
void IR_RST::Shutdown(Kernel::HLERequestContext& ctx) {
@ -142,7 +142,7 @@ void IR_RST::Shutdown(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_IR, "called");
LOG_DEBUG(Service_IR, "called");
}
IR_RST::IR_RST() : ServiceFramework("ir:rst", 1) {

View file

@ -183,8 +183,7 @@ private:
/// Wraps the payload into packet and puts it to the receive buffer
void IR_USER::PutToReceive(const std::vector<u8>& payload) {
NGLOG_TRACE(Service_IR, "called, data={}",
Common::ArrayToString(payload.data(), payload.size()));
LOG_TRACE(Service_IR, "called, data={}", Common::ArrayToString(payload.data(), payload.size()));
size_t size = payload.size();
std::vector<u8> packet;
@ -225,7 +224,7 @@ void IR_USER::PutToReceive(const std::vector<u8>& payload) {
if (receive_buffer->Put(packet)) {
receive_event->Signal();
} else {
NGLOG_ERROR(Service_IR, "receive buffer is full!");
LOG_ERROR(Service_IR, "receive buffer is full!");
}
}
@ -251,12 +250,12 @@ void IR_USER::InitializeIrNopShared(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
NGLOG_INFO(Service_IR,
"called, shared_buff_size={}, recv_buff_size={}, "
"recv_buff_packet_count={}, send_buff_size={}, "
"send_buff_packet_count={}, baud_rate={}",
shared_buff_size, recv_buff_size, recv_buff_packet_count, send_buff_size,
send_buff_packet_count, baud_rate);
LOG_INFO(Service_IR,
"called, shared_buff_size={}, recv_buff_size={}, "
"recv_buff_packet_count={}, send_buff_size={}, "
"send_buff_packet_count={}, baud_rate={}",
shared_buff_size, recv_buff_size, recv_buff_packet_count, send_buff_size,
send_buff_packet_count, baud_rate);
}
void IR_USER::RequireConnection(Kernel::HLERequestContext& ctx) {
@ -275,7 +274,7 @@ void IR_USER::RequireConnection(Kernel::HLERequestContext& ctx) {
connected_device->OnConnect();
conn_status_event->Signal();
} else {
NGLOG_WARNING(Service_IR, "unknown device id {}. Won't connect.", device_id);
LOG_WARNING(Service_IR, "unknown device id {}. Won't connect.", device_id);
shared_memory_ptr[offsetof(SharedMemoryHeader, connection_status)] = 1;
shared_memory_ptr[offsetof(SharedMemoryHeader, trying_to_connect_status)] = 2;
}
@ -283,7 +282,7 @@ void IR_USER::RequireConnection(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_INFO(Service_IR, "called, device_id = {}", device_id);
LOG_INFO(Service_IR, "called, device_id = {}", device_id);
}
void IR_USER::GetReceiveEvent(Kernel::HLERequestContext& ctx) {
@ -292,7 +291,7 @@ void IR_USER::GetReceiveEvent(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushCopyObjects(receive_event);
NGLOG_INFO(Service_IR, "called");
LOG_INFO(Service_IR, "called");
}
void IR_USER::GetSendEvent(Kernel::HLERequestContext& ctx) {
@ -301,7 +300,7 @@ void IR_USER::GetSendEvent(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushCopyObjects(send_event);
NGLOG_INFO(Service_IR, "called");
LOG_INFO(Service_IR, "called");
}
void IR_USER::Disconnect(Kernel::HLERequestContext& ctx) {
@ -318,7 +317,7 @@ void IR_USER::Disconnect(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb(ctx, 0x09, 1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_INFO(Service_IR, "called");
LOG_INFO(Service_IR, "called");
}
void IR_USER::GetConnectionStatusEvent(Kernel::HLERequestContext& ctx) {
@ -327,7 +326,7 @@ void IR_USER::GetConnectionStatusEvent(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushCopyObjects(conn_status_event);
NGLOG_INFO(Service_IR, "called");
LOG_INFO(Service_IR, "called");
}
void IR_USER::FinalizeIrNop(Kernel::HLERequestContext& ctx) {
@ -342,7 +341,7 @@ void IR_USER::FinalizeIrNop(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb(ctx, 0x02, 1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_INFO(Service_IR, "called");
LOG_INFO(Service_IR, "called");
}
void IR_USER::SendIrNop(Kernel::HLERequestContext& ctx) {
@ -357,12 +356,12 @@ void IR_USER::SendIrNop(Kernel::HLERequestContext& ctx) {
send_event->Signal();
rb.Push(RESULT_SUCCESS);
} else {
NGLOG_ERROR(Service_IR, "not connected");
LOG_ERROR(Service_IR, "not connected");
rb.Push(ResultCode(static_cast<ErrorDescription>(13), ErrorModule::IR,
ErrorSummary::InvalidState, ErrorLevel::Status));
}
NGLOG_TRACE(Service_IR, "called, data={}", Common::ArrayToString(buffer.data(), size));
LOG_TRACE(Service_IR, "called, data={}", Common::ArrayToString(buffer.data(), size));
}
void IR_USER::ReleaseReceivedData(Kernel::HLERequestContext& ctx) {
@ -374,12 +373,12 @@ void IR_USER::ReleaseReceivedData(Kernel::HLERequestContext& ctx) {
if (receive_buffer->Release(count)) {
rb.Push(RESULT_SUCCESS);
} else {
NGLOG_ERROR(Service_IR, "failed to release {} packets", count);
LOG_ERROR(Service_IR, "failed to release {} packets", count);
rb.Push(ResultCode(ErrorDescription::NoData, ErrorModule::IR, ErrorSummary::NotFound,
ErrorLevel::Status));
}
NGLOG_TRACE(Service_IR, "called, count={}", count);
LOG_TRACE(Service_IR, "called, count={}", count);
}
IR_USER::IR_USER() : ServiceFramework("ir:USER", 1) {

View file

@ -131,7 +131,7 @@ ResultCode CROHelper::ApplyRelocationBatch(VAddr batch, u32 symbol_address, bool
ResultCode result = ApplyRelocation(relocation_target, relocation.type, relocation.addend,
symbol_address, relocation_target);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying relocation {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error applying relocation {:08X}", result.raw);
return result;
}
@ -493,7 +493,7 @@ ResultCode CROHelper::ResetExternalRelocations() {
ResultCode result = ApplyRelocation(relocation_target, relocation.type, relocation.addend,
unresolved_symbol, relocation_target);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying relocation {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error applying relocation {:08X}", result.raw);
return result;
}
@ -525,7 +525,7 @@ ResultCode CROHelper::ClearExternalRelocations() {
ResultCode result = ClearRelocation(relocation_target, relocation.type);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error clearing relocation {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error clearing relocation {:08X}", result.raw);
return result;
}
@ -550,8 +550,8 @@ ResultCode CROHelper::ApplyStaticAnonymousSymbolToCRS(VAddr crs_address) {
CROHelper crs(crs_address);
u32 offset_export_num = GetField(StaticAnonymousSymbolNum);
NGLOG_INFO(Service_LDR, "CRO \"{}\" exports {} static anonymous symbols", ModuleName(),
offset_export_num);
LOG_INFO(Service_LDR, "CRO \"{}\" exports {} static anonymous symbols", ModuleName(),
offset_export_num);
for (u32 i = 0; i < offset_export_num; ++i) {
StaticAnonymousSymbolEntry entry;
GetEntry(i, entry);
@ -563,11 +563,11 @@ ResultCode CROHelper::ApplyStaticAnonymousSymbolToCRS(VAddr crs_address) {
}
u32 symbol_address = SegmentTagToAddress(entry.symbol_position);
NGLOG_TRACE(Service_LDR, "CRO \"{}\" exports 0x{:08X} to the static module", ModuleName(),
symbol_address);
LOG_TRACE(Service_LDR, "CRO \"{}\" exports 0x{:08X} to the static module", ModuleName(),
symbol_address);
ResultCode result = crs.ApplyRelocationBatch(batch_address, symbol_address);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}", result.raw);
return result;
}
}
@ -603,12 +603,12 @@ ResultCode CROHelper::ApplyInternalRelocations(u32 old_data_segment_address) {
SegmentEntry symbol_segment;
GetEntry(relocation.symbol_segment, symbol_segment);
NGLOG_TRACE(Service_LDR, "Internally relocates 0x{:08X} with 0x{:08X}", target_address,
symbol_segment.offset);
LOG_TRACE(Service_LDR, "Internally relocates 0x{:08X} with 0x{:08X}", target_address,
symbol_segment.offset);
ResultCode result = ApplyRelocation(target_address, relocation.type, relocation.addend,
symbol_segment.offset, target_addressB);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying relocation {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error applying relocation {:08X}", result.raw);
return result;
}
}
@ -628,7 +628,7 @@ ResultCode CROHelper::ClearInternalRelocations() {
ResultCode result = ClearRelocation(target_address, relocation.type);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error clearing relocation {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error clearing relocation {:08X}", result.raw);
return result;
}
}
@ -764,13 +764,13 @@ ResultCode CROHelper::ApplyImportNamedSymbol(VAddr crs_address) {
u32 symbol_address = source.FindExportNamedSymbol(symbol_name);
if (symbol_address != 0) {
NGLOG_TRACE(Service_LDR, "CRO \"{}\" imports \"{}\" from \"{}\"",
ModuleName(), symbol_name, source.ModuleName());
LOG_TRACE(Service_LDR, "CRO \"{}\" imports \"{}\" from \"{}\"",
ModuleName(), symbol_name, source.ModuleName());
ResultCode result = ApplyRelocationBatch(relocation_addr, symbol_address);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}",
result.raw);
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}",
result.raw);
return result;
}
@ -800,7 +800,7 @@ ResultCode CROHelper::ResetImportNamedSymbol() {
ResultCode result = ApplyRelocationBatch(relocation_addr, unresolved_symbol, true);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error reseting relocation batch {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error reseting relocation batch {:08X}", result.raw);
return result;
}
}
@ -820,7 +820,7 @@ ResultCode CROHelper::ResetImportIndexedSymbol() {
ResultCode result = ApplyRelocationBatch(relocation_addr, unresolved_symbol, true);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error reseting relocation batch {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error reseting relocation batch {:08X}", result.raw);
return result;
}
}
@ -840,7 +840,7 @@ ResultCode CROHelper::ResetImportAnonymousSymbol() {
ResultCode result = ApplyRelocationBatch(relocation_addr, unresolved_symbol, true);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error reseting relocation batch {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error reseting relocation batch {:08X}", result.raw);
return result;
}
}
@ -859,36 +859,35 @@ ResultCode CROHelper::ApplyModuleImport(VAddr crs_address) {
ResultCode result =
ForEachAutoLinkCRO(crs_address, [&](CROHelper source) -> ResultVal<bool> {
if (want_cro_name == source.ModuleName()) {
NGLOG_INFO(Service_LDR, "CRO \"{}\" imports {} indexed symbols from \"{}\"",
ModuleName(), entry.import_indexed_symbol_num, source.ModuleName());
LOG_INFO(Service_LDR, "CRO \"{}\" imports {} indexed symbols from \"{}\"",
ModuleName(), entry.import_indexed_symbol_num, source.ModuleName());
for (u32 j = 0; j < entry.import_indexed_symbol_num; ++j) {
ImportIndexedSymbolEntry im;
entry.GetImportIndexedSymbolEntry(j, im);
ExportIndexedSymbolEntry ex;
source.GetEntry(im.index, ex);
u32 symbol_address = source.SegmentTagToAddress(ex.symbol_position);
NGLOG_TRACE(Service_LDR, " Imports 0x{:08X}", symbol_address);
LOG_TRACE(Service_LDR, " Imports 0x{:08X}", symbol_address);
ResultCode result =
ApplyRelocationBatch(im.relocation_batch_offset, symbol_address);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}",
result.raw);
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}",
result.raw);
return result;
}
}
NGLOG_INFO(Service_LDR, "CRO \"{}\" imports {} anonymous symbols from \"{}\"",
ModuleName(), entry.import_anonymous_symbol_num,
source.ModuleName());
LOG_INFO(Service_LDR, "CRO \"{}\" imports {} anonymous symbols from \"{}\"",
ModuleName(), entry.import_anonymous_symbol_num, source.ModuleName());
for (u32 j = 0; j < entry.import_anonymous_symbol_num; ++j) {
ImportAnonymousSymbolEntry im;
entry.GetImportAnonymousSymbolEntry(j, im);
u32 symbol_address = source.SegmentTagToAddress(im.symbol_position);
NGLOG_TRACE(Service_LDR, " Imports 0x{:08X}", symbol_address);
LOG_TRACE(Service_LDR, " Imports 0x{:08X}", symbol_address);
ResultCode result =
ApplyRelocationBatch(im.relocation_batch_offset, symbol_address);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}",
result.raw);
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}",
result.raw);
return result;
}
}
@ -904,8 +903,8 @@ ResultCode CROHelper::ApplyModuleImport(VAddr crs_address) {
}
ResultCode CROHelper::ApplyExportNamedSymbol(CROHelper target) {
NGLOG_DEBUG(Service_LDR, "CRO \"{}\" exports named symbols to \"{}\"", ModuleName(),
target.ModuleName());
LOG_DEBUG(Service_LDR, "CRO \"{}\" exports named symbols to \"{}\"", ModuleName(),
target.ModuleName());
u32 target_import_strings_size = target.GetField(ImportStringsSize);
u32 target_symbol_import_num = target.GetField(ImportNamedSymbolNum);
for (u32 i = 0; i < target_symbol_import_num; ++i) {
@ -920,10 +919,10 @@ ResultCode CROHelper::ApplyExportNamedSymbol(CROHelper target) {
Memory::ReadCString(entry.name_offset, target_import_strings_size);
u32 symbol_address = FindExportNamedSymbol(symbol_name);
if (symbol_address != 0) {
NGLOG_TRACE(Service_LDR, " exports symbol \"{}\"", symbol_name);
LOG_TRACE(Service_LDR, " exports symbol \"{}\"", symbol_name);
ResultCode result = target.ApplyRelocationBatch(relocation_addr, symbol_address);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}", result.raw);
return result;
}
}
@ -933,8 +932,8 @@ ResultCode CROHelper::ApplyExportNamedSymbol(CROHelper target) {
}
ResultCode CROHelper::ResetExportNamedSymbol(CROHelper target) {
NGLOG_DEBUG(Service_LDR, "CRO \"{}\" unexports named symbols to \"{}\"", ModuleName(),
target.ModuleName());
LOG_DEBUG(Service_LDR, "CRO \"{}\" unexports named symbols to \"{}\"", ModuleName(),
target.ModuleName());
u32 unresolved_symbol = target.GetOnUnresolvedAddress();
u32 target_import_strings_size = target.GetField(ImportStringsSize);
u32 target_symbol_import_num = target.GetField(ImportNamedSymbolNum);
@ -950,11 +949,11 @@ ResultCode CROHelper::ResetExportNamedSymbol(CROHelper target) {
Memory::ReadCString(entry.name_offset, target_import_strings_size);
u32 symbol_address = FindExportNamedSymbol(symbol_name);
if (symbol_address != 0) {
NGLOG_TRACE(Service_LDR, " unexports symbol \"{}\"", symbol_name);
LOG_TRACE(Service_LDR, " unexports symbol \"{}\"", symbol_name);
ResultCode result =
target.ApplyRelocationBatch(relocation_addr, unresolved_symbol, true);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}", result.raw);
return result;
}
}
@ -974,34 +973,34 @@ ResultCode CROHelper::ApplyModuleExport(CROHelper target) {
if (Memory::ReadCString(entry.name_offset, target_import_string_size) != module_name)
continue;
NGLOG_INFO(Service_LDR, "CRO \"{}\" exports {} indexed symbols to \"{}\"", module_name,
entry.import_indexed_symbol_num, target.ModuleName());
LOG_INFO(Service_LDR, "CRO \"{}\" exports {} indexed symbols to \"{}\"", module_name,
entry.import_indexed_symbol_num, target.ModuleName());
for (u32 j = 0; j < entry.import_indexed_symbol_num; ++j) {
ImportIndexedSymbolEntry im;
entry.GetImportIndexedSymbolEntry(j, im);
ExportIndexedSymbolEntry ex;
GetEntry(im.index, ex);
u32 symbol_address = SegmentTagToAddress(ex.symbol_position);
NGLOG_TRACE(Service_LDR, " exports symbol 0x{:08X}", symbol_address);
LOG_TRACE(Service_LDR, " exports symbol 0x{:08X}", symbol_address);
ResultCode result =
target.ApplyRelocationBatch(im.relocation_batch_offset, symbol_address);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}", result.raw);
return result;
}
}
NGLOG_INFO(Service_LDR, "CRO \"{}\" exports {} anonymous symbols to \"{}\"", module_name,
entry.import_anonymous_symbol_num, target.ModuleName());
LOG_INFO(Service_LDR, "CRO \"{}\" exports {} anonymous symbols to \"{}\"", module_name,
entry.import_anonymous_symbol_num, target.ModuleName());
for (u32 j = 0; j < entry.import_anonymous_symbol_num; ++j) {
ImportAnonymousSymbolEntry im;
entry.GetImportAnonymousSymbolEntry(j, im);
u32 symbol_address = SegmentTagToAddress(im.symbol_position);
NGLOG_TRACE(Service_LDR, " exports symbol 0x{:08X}", symbol_address);
LOG_TRACE(Service_LDR, " exports symbol 0x{:08X}", symbol_address);
ResultCode result =
target.ApplyRelocationBatch(im.relocation_batch_offset, symbol_address);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}", result.raw);
return result;
}
}
@ -1023,28 +1022,28 @@ ResultCode CROHelper::ResetModuleExport(CROHelper target) {
if (Memory::ReadCString(entry.name_offset, target_import_string_size) != module_name)
continue;
NGLOG_DEBUG(Service_LDR, "CRO \"{}\" unexports indexed symbols to \"{}\"", module_name,
target.ModuleName());
LOG_DEBUG(Service_LDR, "CRO \"{}\" unexports indexed symbols to \"{}\"", module_name,
target.ModuleName());
for (u32 j = 0; j < entry.import_indexed_symbol_num; ++j) {
ImportIndexedSymbolEntry im;
entry.GetImportIndexedSymbolEntry(j, im);
ResultCode result =
target.ApplyRelocationBatch(im.relocation_batch_offset, unresolved_symbol, true);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}", result.raw);
return result;
}
}
NGLOG_DEBUG(Service_LDR, "CRO \"{}\" unexports anonymous symbols to \"{}\"", module_name,
target.ModuleName());
LOG_DEBUG(Service_LDR, "CRO \"{}\" unexports anonymous symbols to \"{}\"", module_name,
target.ModuleName());
for (u32 j = 0; j < entry.import_anonymous_symbol_num; ++j) {
ImportAnonymousSymbolEntry im;
entry.GetImportAnonymousSymbolEntry(j, im);
ResultCode result =
target.ApplyRelocationBatch(im.relocation_batch_offset, unresolved_symbol, true);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}", result.raw);
return result;
}
}
@ -1069,13 +1068,13 @@ ResultCode CROHelper::ApplyExitRelocations(VAddr crs_address) {
u32 symbol_address = source.FindExportNamedSymbol("nnroAeabiAtexit_");
if (symbol_address != 0) {
NGLOG_DEBUG(Service_LDR, "CRO \"{}\" import exit function from \"{}\"",
ModuleName(), source.ModuleName());
LOG_DEBUG(Service_LDR, "CRO \"{}\" import exit function from \"{}\"",
ModuleName(), source.ModuleName());
ResultCode result = ApplyRelocationBatch(relocation_addr, symbol_address);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}",
result.raw);
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}",
result.raw);
return result;
}
@ -1085,7 +1084,7 @@ ResultCode CROHelper::ApplyExitRelocations(VAddr crs_address) {
return MakeResult<bool>(true);
});
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying exit relocation {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error applying exit relocation {:08X}", result.raw);
return result;
}
}
@ -1116,13 +1115,13 @@ ResultCode CROHelper::Rebase(VAddr crs_address, u32 cro_size, VAddr data_segment
ResultCode result = RebaseHeader(cro_size);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error rebasing header {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error rebasing header {:08X}", result.raw);
return result;
}
result = VerifyStringTableLength(GetField(ModuleNameOffset), GetField(ModuleNameSize));
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error verifying module name {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error verifying module name {:08X}", result.raw);
return result;
}
@ -1131,7 +1130,7 @@ ResultCode CROHelper::Rebase(VAddr crs_address, u32 cro_size, VAddr data_segment
auto result_val = RebaseSegmentTable(cro_size, data_segment_addresss, data_segment_size,
bss_segment_address, bss_segment_size);
if (result_val.Failed()) {
NGLOG_ERROR(Service_LDR, "Error rebasing segment table {:08X}", result_val.Code().raw);
LOG_ERROR(Service_LDR, "Error rebasing segment table {:08X}", result_val.Code().raw);
return result_val.Code();
}
prev_data_segment_address = *result_val;
@ -1139,76 +1138,76 @@ ResultCode CROHelper::Rebase(VAddr crs_address, u32 cro_size, VAddr data_segment
result = RebaseExportNamedSymbolTable();
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error rebasing symbol export table {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error rebasing symbol export table {:08X}", result.raw);
return result;
}
result = VerifyExportTreeTable();
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error verifying export tree {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error verifying export tree {:08X}", result.raw);
return result;
}
result = VerifyStringTableLength(GetField(ExportStringsOffset), GetField(ExportStringsSize));
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error verifying export strings {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error verifying export strings {:08X}", result.raw);
return result;
}
result = RebaseImportModuleTable();
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error rebasing object table {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error rebasing object table {:08X}", result.raw);
return result;
}
result = ResetExternalRelocations();
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error resetting all external relocations {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error resetting all external relocations {:08X}", result.raw);
return result;
}
result = RebaseImportNamedSymbolTable();
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error rebasing symbol import table {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error rebasing symbol import table {:08X}", result.raw);
return result;
}
result = RebaseImportIndexedSymbolTable();
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error rebasing index import table {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error rebasing index import table {:08X}", result.raw);
return result;
}
result = RebaseImportAnonymousSymbolTable();
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error rebasing offset import table {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error rebasing offset import table {:08X}", result.raw);
return result;
}
result = VerifyStringTableLength(GetField(ImportStringsOffset), GetField(ImportStringsSize));
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error verifying import strings {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error verifying import strings {:08X}", result.raw);
return result;
}
if (!is_crs) {
result = ApplyStaticAnonymousSymbolToCRS(crs_address);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying offset export to CRS {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error applying offset export to CRS {:08X}", result.raw);
return result;
}
}
result = ApplyInternalRelocations(prev_data_segment_address);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying internal relocations {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error applying internal relocations {:08X}", result.raw);
return result;
}
if (!is_crs) {
result = ApplyExitRelocations(crs_address);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying exit relocations {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error applying exit relocations {:08X}", result.raw);
return result;
}
}
@ -1280,14 +1279,14 @@ ResultCode CROHelper::Link(VAddr crs_address, bool link_on_load_bug_fix) {
// Imports named symbols from other modules
result = ApplyImportNamedSymbol(crs_address);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying symbol import {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error applying symbol import {:08X}", result.raw);
return result;
}
// Imports indexed and anonymous symbols from other modules
result = ApplyModuleImport(crs_address);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying module import {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error applying module import {:08X}", result.raw);
return result;
}
}
@ -1305,7 +1304,7 @@ ResultCode CROHelper::Link(VAddr crs_address, bool link_on_load_bug_fix) {
return MakeResult<bool>(true);
});
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error applying export {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error applying export {:08X}", result.raw);
return result;
}
@ -1317,21 +1316,21 @@ ResultCode CROHelper::Unlink(VAddr crs_address) {
// Resets all imported named symbols
ResultCode result = ResetImportNamedSymbol();
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error resetting symbol import {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error resetting symbol import {:08X}", result.raw);
return result;
}
// Resets all imported indexed symbols
result = ResetImportIndexedSymbol();
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error resetting indexed import {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error resetting indexed import {:08X}", result.raw);
return result;
}
// Resets all imported anonymous symbols
result = ResetImportAnonymousSymbol();
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error resetting anonymous import {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error resetting anonymous import {:08X}", result.raw);
return result;
}
@ -1349,7 +1348,7 @@ ResultCode CROHelper::Unlink(VAddr crs_address) {
return MakeResult<bool>(true);
});
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error resetting export {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error resetting export {:08X}", result.raw);
return result;
}
@ -1359,13 +1358,13 @@ ResultCode CROHelper::Unlink(VAddr crs_address) {
ResultCode CROHelper::ClearRelocations() {
ResultCode result = ClearExternalRelocations();
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error clearing external relocations {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error clearing external relocations {:08X}", result.raw);
return result;
}
result = ClearInternalRelocations();
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error clearing internal relocations {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error clearing internal relocations {:08X}", result.raw);
return result;
}
return RESULT_SUCCESS;

View file

@ -58,52 +58,51 @@ void RO::Initialize(Kernel::HLERequestContext& ctx) {
// All other service functions below have the same issue.
auto process = rp.PopObject<Kernel::Process>();
NGLOG_DEBUG(Service_LDR,
"called, crs_buffer_ptr=0x{:08X}, crs_address=0x{:08X}, crs_size=0x{:X}",
crs_buffer_ptr, crs_address, crs_size);
LOG_DEBUG(Service_LDR, "called, crs_buffer_ptr=0x{:08X}, crs_address=0x{:08X}, crs_size=0x{:X}",
crs_buffer_ptr, crs_address, crs_size);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
ClientSlot* slot = GetSessionData(ctx.Session());
if (slot->loaded_crs != 0) {
NGLOG_ERROR(Service_LDR, "Already initialized");
LOG_ERROR(Service_LDR, "Already initialized");
rb.Push(ERROR_ALREADY_INITIALIZED);
return;
}
if (crs_size < CRO_HEADER_SIZE) {
NGLOG_ERROR(Service_LDR, "CRS is too small");
LOG_ERROR(Service_LDR, "CRS is too small");
rb.Push(ERROR_BUFFER_TOO_SMALL);
return;
}
if (crs_buffer_ptr & Memory::PAGE_MASK) {
NGLOG_ERROR(Service_LDR, "CRS original address is not aligned");
LOG_ERROR(Service_LDR, "CRS original address is not aligned");
rb.Push(ERROR_MISALIGNED_ADDRESS);
return;
}
if (crs_address & Memory::PAGE_MASK) {
NGLOG_ERROR(Service_LDR, "CRS mapping address is not aligned");
LOG_ERROR(Service_LDR, "CRS mapping address is not aligned");
rb.Push(ERROR_MISALIGNED_ADDRESS);
return;
}
if (crs_size & Memory::PAGE_MASK) {
NGLOG_ERROR(Service_LDR, "CRS size is not aligned");
LOG_ERROR(Service_LDR, "CRS size is not aligned");
rb.Push(ERROR_MISALIGNED_SIZE);
return;
}
if (!VerifyBufferState(*process, crs_buffer_ptr, crs_size)) {
NGLOG_ERROR(Service_LDR, "CRS original buffer is in invalid state");
LOG_ERROR(Service_LDR, "CRS original buffer is in invalid state");
rb.Push(ERROR_INVALID_MEMORY_STATE);
return;
}
if (crs_address < Memory::PROCESS_IMAGE_VADDR ||
crs_address + crs_size > Memory::PROCESS_IMAGE_VADDR_END) {
NGLOG_ERROR(Service_LDR, "CRS mapping address is not in the process image region");
LOG_ERROR(Service_LDR, "CRS mapping address is not in the process image region");
rb.Push(ERROR_ILLEGAL_ADDRESS);
return;
}
@ -118,7 +117,7 @@ void RO::Initialize(Kernel::HLERequestContext& ctx) {
.MapMemoryBlock(crs_address, crs_mem, 0, crs_size, Kernel::MemoryState::Code)
.Code();
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error mapping memory block {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error mapping memory block {:08X}", result.raw);
rb.Push(result);
return;
}
@ -126,7 +125,7 @@ void RO::Initialize(Kernel::HLERequestContext& ctx) {
result =
process->vm_manager.ReprotectRange(crs_address, crs_size, Kernel::VMAPermission::Read);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error reprotecting memory block {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error reprotecting memory block {:08X}", result.raw);
rb.Push(result);
return;
}
@ -137,7 +136,7 @@ void RO::Initialize(Kernel::HLERequestContext& ctx) {
// TODO(wwylele): verify this behaviour. This is only seen in the web browser app,
// and the actual behaviour is unclear. "Do nothing" is probably an incorrect implement.
// There is also a chance that another issue causes the app passing wrong arguments.
NGLOG_WARNING(Service_LDR, "crs_buffer_ptr == crs_address (0x{:08X})", crs_address);
LOG_WARNING(Service_LDR, "crs_buffer_ptr == crs_address (0x{:08X})", crs_address);
}
CROHelper crs(crs_address);
@ -145,7 +144,7 @@ void RO::Initialize(Kernel::HLERequestContext& ctx) {
result = crs.Rebase(0, crs_size, 0, 0, 0, 0, true);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error rebasing CRS 0x{:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error rebasing CRS 0x{:08X}", result.raw);
rb.Push(result);
return;
}
@ -166,8 +165,8 @@ void RO::LoadCRR(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_LDR, "(STUBBED) called, crr_buffer_ptr=0x{:08X}, crr_size=0x{:08X}",
crr_buffer_ptr, crr_size);
LOG_WARNING(Service_LDR, "(STUBBED) called, crr_buffer_ptr=0x{:08X}, crr_size=0x{:08X}",
crr_buffer_ptr, crr_size);
}
void RO::UnloadCRR(Kernel::HLERequestContext& ctx) {
@ -178,7 +177,7 @@ void RO::UnloadCRR(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_LDR, "(STUBBED) called, crr_buffer_ptr=0x{:08X}", crr_buffer_ptr);
LOG_WARNING(Service_LDR, "(STUBBED) called, crr_buffer_ptr=0x{:08X}", crr_buffer_ptr);
}
void RO::LoadCRO(Kernel::HLERequestContext& ctx, bool link_on_load_bug_fix) {
@ -196,55 +195,55 @@ void RO::LoadCRO(Kernel::HLERequestContext& ctx, bool link_on_load_bug_fix) {
VAddr crr_address = rp.Pop<u32>();
auto process = rp.PopObject<Kernel::Process>();
NGLOG_DEBUG(Service_LDR,
"called ({}), cro_buffer_ptr=0x{:08X}, cro_address=0x{:08X}, cro_size=0x{:X}, "
"data_segment_address=0x{:08X}, zero={}, data_segment_size=0x{:X}, "
"bss_segment_address=0x{:08X}, bss_segment_size=0x{:X}, auto_link={}, "
"fix_level={}, crr_address=0x{:08X}",
link_on_load_bug_fix ? "new" : "old", cro_buffer_ptr, cro_address, cro_size,
data_segment_address, zero, data_segment_size, bss_segment_address,
bss_segment_size, auto_link ? "true" : "false", fix_level, crr_address);
LOG_DEBUG(Service_LDR,
"called ({}), cro_buffer_ptr=0x{:08X}, cro_address=0x{:08X}, cro_size=0x{:X}, "
"data_segment_address=0x{:08X}, zero={}, data_segment_size=0x{:X}, "
"bss_segment_address=0x{:08X}, bss_segment_size=0x{:X}, auto_link={}, "
"fix_level={}, crr_address=0x{:08X}",
link_on_load_bug_fix ? "new" : "old", cro_buffer_ptr, cro_address, cro_size,
data_segment_address, zero, data_segment_size, bss_segment_address, bss_segment_size,
auto_link ? "true" : "false", fix_level, crr_address);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
ClientSlot* slot = GetSessionData(ctx.Session());
if (slot->loaded_crs == 0) {
NGLOG_ERROR(Service_LDR, "Not initialized");
LOG_ERROR(Service_LDR, "Not initialized");
rb.Push(ERROR_NOT_INITIALIZED);
rb.Push<u32>(0);
return;
}
if (cro_size < CRO_HEADER_SIZE) {
NGLOG_ERROR(Service_LDR, "CRO too small");
LOG_ERROR(Service_LDR, "CRO too small");
rb.Push(ERROR_BUFFER_TOO_SMALL);
rb.Push<u32>(0);
return;
}
if (cro_buffer_ptr & Memory::PAGE_MASK) {
NGLOG_ERROR(Service_LDR, "CRO original address is not aligned");
LOG_ERROR(Service_LDR, "CRO original address is not aligned");
rb.Push(ERROR_MISALIGNED_ADDRESS);
rb.Push<u32>(0);
return;
}
if (cro_address & Memory::PAGE_MASK) {
NGLOG_ERROR(Service_LDR, "CRO mapping address is not aligned");
LOG_ERROR(Service_LDR, "CRO mapping address is not aligned");
rb.Push(ERROR_MISALIGNED_ADDRESS);
rb.Push<u32>(0);
return;
}
if (cro_size & Memory::PAGE_MASK) {
NGLOG_ERROR(Service_LDR, "CRO size is not aligned");
LOG_ERROR(Service_LDR, "CRO size is not aligned");
rb.Push(ERROR_MISALIGNED_SIZE);
rb.Push<u32>(0);
return;
}
if (!VerifyBufferState(*process, cro_buffer_ptr, cro_size)) {
NGLOG_ERROR(Service_LDR, "CRO original buffer is in invalid state");
LOG_ERROR(Service_LDR, "CRO original buffer is in invalid state");
rb.Push(ERROR_INVALID_MEMORY_STATE);
rb.Push<u32>(0);
return;
@ -252,14 +251,14 @@ void RO::LoadCRO(Kernel::HLERequestContext& ctx, bool link_on_load_bug_fix) {
if (cro_address < Memory::PROCESS_IMAGE_VADDR ||
cro_address + cro_size > Memory::PROCESS_IMAGE_VADDR_END) {
NGLOG_ERROR(Service_LDR, "CRO mapping address is not in the process image region");
LOG_ERROR(Service_LDR, "CRO mapping address is not in the process image region");
rb.Push(ERROR_ILLEGAL_ADDRESS);
rb.Push<u32>(0);
return;
}
if (zero) {
NGLOG_ERROR(Service_LDR, "Zero is not zero {}", zero);
LOG_ERROR(Service_LDR, "Zero is not zero {}", zero);
rb.Push(ResultCode(static_cast<ErrorDescription>(29), ErrorModule::RO,
ErrorSummary::Internal, ErrorLevel::Usage));
rb.Push<u32>(0);
@ -276,7 +275,7 @@ void RO::LoadCRO(Kernel::HLERequestContext& ctx, bool link_on_load_bug_fix) {
.MapMemoryBlock(cro_address, cro_mem, 0, cro_size, Kernel::MemoryState::Code)
.Code();
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error mapping memory block {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error mapping memory block {:08X}", result.raw);
rb.Push(result);
rb.Push<u32>(0);
return;
@ -285,7 +284,7 @@ void RO::LoadCRO(Kernel::HLERequestContext& ctx, bool link_on_load_bug_fix) {
result =
process->vm_manager.ReprotectRange(cro_address, cro_size, Kernel::VMAPermission::Read);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error reprotecting memory block {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error reprotecting memory block {:08X}", result.raw);
process->vm_manager.UnmapRange(cro_address, cro_size);
rb.Push(result);
rb.Push<u32>(0);
@ -299,14 +298,14 @@ void RO::LoadCRO(Kernel::HLERequestContext& ctx, bool link_on_load_bug_fix) {
// This is derived from the case of LoadCRS with buffer_ptr==address,
// and is never seen in any game. "Do nothing" is probably an incorrect implement.
// There is also a chance that this case is just prohibited.
NGLOG_WARNING(Service_LDR, "cro_buffer_ptr == cro_address (0x{:08X})", cro_address);
LOG_WARNING(Service_LDR, "cro_buffer_ptr == cro_address (0x{:08X})", cro_address);
}
CROHelper cro(cro_address);
result = cro.VerifyHash(cro_size, crr_address);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error verifying CRO in CRR {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error verifying CRO in CRR {:08X}", result.raw);
process->vm_manager.UnmapRange(cro_address, cro_size);
rb.Push(result);
rb.Push<u32>(0);
@ -316,7 +315,7 @@ void RO::LoadCRO(Kernel::HLERequestContext& ctx, bool link_on_load_bug_fix) {
result = cro.Rebase(slot->loaded_crs, cro_size, data_segment_address, data_segment_size,
bss_segment_address, bss_segment_size, false);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error rebasing CRO {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error rebasing CRO {:08X}", result.raw);
process->vm_manager.UnmapRange(cro_address, cro_size);
rb.Push(result);
rb.Push<u32>(0);
@ -325,7 +324,7 @@ void RO::LoadCRO(Kernel::HLERequestContext& ctx, bool link_on_load_bug_fix) {
result = cro.Link(slot->loaded_crs, link_on_load_bug_fix);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error linking CRO {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error linking CRO {:08X}", result.raw);
process->vm_manager.UnmapRange(cro_address, cro_size);
rb.Push(result);
rb.Push<u32>(0);
@ -343,7 +342,7 @@ void RO::LoadCRO(Kernel::HLERequestContext& ctx, bool link_on_load_bug_fix) {
if (fix_size != cro_size) {
result = process->vm_manager.UnmapRange(cro_address + fix_size, cro_size - fix_size);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error unmapping memory block {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error unmapping memory block {:08X}", result.raw);
process->vm_manager.UnmapRange(cro_address, cro_size);
rb.Push(result);
rb.Push<u32>(0);
@ -362,7 +361,7 @@ void RO::LoadCRO(Kernel::HLERequestContext& ctx, bool link_on_load_bug_fix) {
result = process->vm_manager.ReprotectRange(exe_begin, exe_size,
Kernel::VMAPermission::ReadExecute);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error reprotecting memory block {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error reprotecting memory block {:08X}", result.raw);
process->vm_manager.UnmapRange(cro_address, fix_size);
rb.Push(result);
rb.Push<u32>(0);
@ -372,8 +371,8 @@ void RO::LoadCRO(Kernel::HLERequestContext& ctx, bool link_on_load_bug_fix) {
Core::CPU().InvalidateCacheRange(cro_address, cro_size);
NGLOG_INFO(Service_LDR, "CRO \"{}\" loaded at 0x{:08X}, fixed_end=0x{:08X}", cro.ModuleName(),
cro_address, cro_address + fix_size);
LOG_INFO(Service_LDR, "CRO \"{}\" loaded at 0x{:08X}, fixed_end=0x{:08X}", cro.ModuleName(),
cro_address, cro_address + fix_size);
rb.Push(RESULT_SUCCESS, fix_size);
}
@ -385,8 +384,8 @@ void RO::UnloadCRO(Kernel::HLERequestContext& ctx) {
VAddr cro_buffer_ptr = rp.Pop<u32>();
auto process = rp.PopObject<Kernel::Process>();
NGLOG_DEBUG(Service_LDR, "called, cro_address=0x{:08X}, zero={}, cro_buffer_ptr=0x{:08X}",
cro_address, zero, cro_buffer_ptr);
LOG_DEBUG(Service_LDR, "called, cro_address=0x{:08X}, zero={}, cro_buffer_ptr=0x{:08X}",
cro_address, zero, cro_buffer_ptr);
CROHelper cro(cro_address);
@ -394,24 +393,24 @@ void RO::UnloadCRO(Kernel::HLERequestContext& ctx) {
ClientSlot* slot = GetSessionData(ctx.Session());
if (slot->loaded_crs == 0) {
NGLOG_ERROR(Service_LDR, "Not initialized");
LOG_ERROR(Service_LDR, "Not initialized");
rb.Push(ERROR_NOT_INITIALIZED);
return;
}
if (cro_address & Memory::PAGE_MASK) {
NGLOG_ERROR(Service_LDR, "CRO address is not aligned");
LOG_ERROR(Service_LDR, "CRO address is not aligned");
rb.Push(ERROR_MISALIGNED_ADDRESS);
return;
}
if (!cro.IsLoaded()) {
NGLOG_ERROR(Service_LDR, "Invalid or not loaded CRO");
LOG_ERROR(Service_LDR, "Invalid or not loaded CRO");
rb.Push(ERROR_NOT_LOADED);
return;
}
NGLOG_INFO(Service_LDR, "Unloading CRO \"{}\"", cro.ModuleName());
LOG_INFO(Service_LDR, "Unloading CRO \"{}\"", cro.ModuleName());
u32 fixed_size = cro.GetFixedSize();
@ -419,7 +418,7 @@ void RO::UnloadCRO(Kernel::HLERequestContext& ctx) {
ResultCode result = cro.Unlink(slot->loaded_crs);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error unlinking CRO {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error unlinking CRO {:08X}", result.raw);
rb.Push(result);
return;
}
@ -429,7 +428,7 @@ void RO::UnloadCRO(Kernel::HLERequestContext& ctx) {
if (!cro.IsFixed()) {
result = cro.ClearRelocations();
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error clearing relocations {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error clearing relocations {:08X}", result.raw);
rb.Push(result);
return;
}
@ -443,7 +442,7 @@ void RO::UnloadCRO(Kernel::HLERequestContext& ctx) {
if (cro_address != cro_buffer_ptr) {
result = process->vm_manager.UnmapRange(cro_address, fixed_size);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error unmapping CRO {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error unmapping CRO {:08X}", result.raw);
}
slot->memory_synchronizer.RemoveMemoryBlock(cro_address, cro_buffer_ptr);
}
@ -458,7 +457,7 @@ void RO::LinkCRO(Kernel::HLERequestContext& ctx) {
VAddr cro_address = rp.Pop<u32>();
auto process = rp.PopObject<Kernel::Process>();
NGLOG_DEBUG(Service_LDR, "called, cro_address=0x{:08X}", cro_address);
LOG_DEBUG(Service_LDR, "called, cro_address=0x{:08X}", cro_address);
CROHelper cro(cro_address);
@ -466,28 +465,28 @@ void RO::LinkCRO(Kernel::HLERequestContext& ctx) {
ClientSlot* slot = GetSessionData(ctx.Session());
if (slot->loaded_crs == 0) {
NGLOG_ERROR(Service_LDR, "Not initialized");
LOG_ERROR(Service_LDR, "Not initialized");
rb.Push(ERROR_NOT_INITIALIZED);
return;
}
if (cro_address & Memory::PAGE_MASK) {
NGLOG_ERROR(Service_LDR, "CRO address is not aligned");
LOG_ERROR(Service_LDR, "CRO address is not aligned");
rb.Push(ERROR_MISALIGNED_ADDRESS);
return;
}
if (!cro.IsLoaded()) {
NGLOG_ERROR(Service_LDR, "Invalid or not loaded CRO");
LOG_ERROR(Service_LDR, "Invalid or not loaded CRO");
rb.Push(ERROR_NOT_LOADED);
return;
}
NGLOG_INFO(Service_LDR, "Linking CRO \"{}\"", cro.ModuleName());
LOG_INFO(Service_LDR, "Linking CRO \"{}\"", cro.ModuleName());
ResultCode result = cro.Link(slot->loaded_crs, false);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error linking CRO {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error linking CRO {:08X}", result.raw);
}
slot->memory_synchronizer.SynchronizeOriginalMemory(*process);
@ -500,7 +499,7 @@ void RO::UnlinkCRO(Kernel::HLERequestContext& ctx) {
VAddr cro_address = rp.Pop<u32>();
auto process = rp.PopObject<Kernel::Process>();
NGLOG_DEBUG(Service_LDR, "called, cro_address=0x{:08X}", cro_address);
LOG_DEBUG(Service_LDR, "called, cro_address=0x{:08X}", cro_address);
CROHelper cro(cro_address);
@ -508,28 +507,28 @@ void RO::UnlinkCRO(Kernel::HLERequestContext& ctx) {
ClientSlot* slot = GetSessionData(ctx.Session());
if (slot->loaded_crs == 0) {
NGLOG_ERROR(Service_LDR, "Not initialized");
LOG_ERROR(Service_LDR, "Not initialized");
rb.Push(ERROR_NOT_INITIALIZED);
return;
}
if (cro_address & Memory::PAGE_MASK) {
NGLOG_ERROR(Service_LDR, "CRO address is not aligned");
LOG_ERROR(Service_LDR, "CRO address is not aligned");
rb.Push(ERROR_MISALIGNED_ADDRESS);
return;
}
if (!cro.IsLoaded()) {
NGLOG_ERROR(Service_LDR, "Invalid or not loaded CRO");
LOG_ERROR(Service_LDR, "Invalid or not loaded CRO");
rb.Push(ERROR_NOT_LOADED);
return;
}
NGLOG_INFO(Service_LDR, "Unlinking CRO \"{}\"", cro.ModuleName());
LOG_INFO(Service_LDR, "Unlinking CRO \"{}\"", cro.ModuleName());
ResultCode result = cro.Unlink(slot->loaded_crs);
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error unlinking CRO {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error unlinking CRO {:08X}", result.raw);
}
slot->memory_synchronizer.SynchronizeOriginalMemory(*process);
@ -542,13 +541,13 @@ void RO::Shutdown(Kernel::HLERequestContext& ctx) {
VAddr crs_buffer_ptr = rp.Pop<u32>();
auto process = rp.PopObject<Kernel::Process>();
NGLOG_DEBUG(Service_LDR, "called, crs_buffer_ptr=0x{:08X}", crs_buffer_ptr);
LOG_DEBUG(Service_LDR, "called, crs_buffer_ptr=0x{:08X}", crs_buffer_ptr);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
ClientSlot* slot = GetSessionData(ctx.Session());
if (slot->loaded_crs == 0) {
NGLOG_ERROR(Service_LDR, "Not initialized");
LOG_ERROR(Service_LDR, "Not initialized");
rb.Push(ERROR_NOT_INITIALIZED);
return;
}
@ -564,7 +563,7 @@ void RO::Shutdown(Kernel::HLERequestContext& ctx) {
if (slot->loaded_crs != crs_buffer_ptr) {
result = process->vm_manager.UnmapRange(slot->loaded_crs, crs.GetFileSize());
if (result.IsError()) {
NGLOG_ERROR(Service_LDR, "Error unmapping CRS {:08X}", result.raw);
LOG_ERROR(Service_LDR, "Error unmapping CRS {:08X}", result.raw);
}
slot->memory_synchronizer.RemoveMemoryBlock(slot->loaded_crs, crs_buffer_ptr);
}

View file

@ -41,14 +41,14 @@ struct MIC_U::Impl {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_MIC, "called, size=0x{:X}", size);
LOG_WARNING(Service_MIC, "called, size=0x{:X}", size);
}
void UnmapSharedMem(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x02, 0, 0};
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_MIC, "called");
LOG_WARNING(Service_MIC, "called");
}
void StartSampling(Kernel::HLERequestContext& ctx) {
@ -63,11 +63,11 @@ struct MIC_U::Impl {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
is_sampling = true;
NGLOG_WARNING(Service_MIC,
"(STUBBED) called, encoding={}, sample_rate={}, "
"audio_buffer_offset={}, audio_buffer_size={}, audio_buffer_loop={}",
static_cast<u32>(encoding), static_cast<u32>(sample_rate),
audio_buffer_offset, audio_buffer_size, audio_buffer_loop);
LOG_WARNING(Service_MIC,
"(STUBBED) called, encoding={}, sample_rate={}, "
"audio_buffer_offset={}, audio_buffer_size={}, audio_buffer_loop={}",
static_cast<u32>(encoding), static_cast<u32>(sample_rate), audio_buffer_offset,
audio_buffer_size, audio_buffer_loop);
}
void AdjustSampling(Kernel::HLERequestContext& ctx) {
@ -76,8 +76,7 @@ struct MIC_U::Impl {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_MIC, "(STUBBED) called, sample_rate={}",
static_cast<u32>(sample_rate));
LOG_WARNING(Service_MIC, "(STUBBED) called, sample_rate={}", static_cast<u32>(sample_rate));
}
void StopSampling(Kernel::HLERequestContext& ctx) {
@ -85,7 +84,7 @@ struct MIC_U::Impl {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
is_sampling = false;
NGLOG_WARNING(Service_MIC, "(STUBBED) called");
LOG_WARNING(Service_MIC, "(STUBBED) called");
}
void IsSampling(Kernel::HLERequestContext& ctx) {
@ -93,7 +92,7 @@ struct MIC_U::Impl {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.Push<bool>(is_sampling);
NGLOG_WARNING(Service_MIC, "(STUBBED) called");
LOG_WARNING(Service_MIC, "(STUBBED) called");
}
void GetBufferFullEvent(Kernel::HLERequestContext& ctx) {
@ -101,7 +100,7 @@ struct MIC_U::Impl {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(RESULT_SUCCESS);
rb.PushCopyObjects(buffer_full_event);
NGLOG_WARNING(Service_MIC, "(STUBBED) called");
LOG_WARNING(Service_MIC, "(STUBBED) called");
}
void SetGain(Kernel::HLERequestContext& ctx) {
@ -110,7 +109,7 @@ struct MIC_U::Impl {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_MIC, "(STUBBED) called, mic_gain={}", mic_gain);
LOG_WARNING(Service_MIC, "(STUBBED) called, mic_gain={}", mic_gain);
}
void GetGain(Kernel::HLERequestContext& ctx) {
@ -119,7 +118,7 @@ struct MIC_U::Impl {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.Push<u8>(mic_gain);
NGLOG_WARNING(Service_MIC, "(STUBBED) called");
LOG_WARNING(Service_MIC, "(STUBBED) called");
}
void SetPower(Kernel::HLERequestContext& ctx) {
@ -128,7 +127,7 @@ struct MIC_U::Impl {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_MIC, "(STUBBED) called, mic_power={}", mic_power);
LOG_WARNING(Service_MIC, "(STUBBED) called, mic_power={}", mic_power);
}
void GetPower(Kernel::HLERequestContext& ctx) {
@ -136,7 +135,7 @@ struct MIC_U::Impl {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.Push<u8>(mic_power);
NGLOG_WARNING(Service_MIC, "(STUBBED) called");
LOG_WARNING(Service_MIC, "(STUBBED) called");
}
void SetIirFilterMic(Kernel::HLERequestContext& ctx) {
@ -147,8 +146,8 @@ struct MIC_U::Impl {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(RESULT_SUCCESS);
rb.PushMappedBuffer(buffer);
NGLOG_WARNING(Service_MIC, "(STUBBED) called, size=0x{:X}, buffer=0x{:08X}", size,
buffer.GetId());
LOG_WARNING(Service_MIC, "(STUBBED) called, size=0x{:X}, buffer=0x{:08X}", size,
buffer.GetId());
}
void SetClamp(Kernel::HLERequestContext& ctx) {
@ -157,7 +156,7 @@ struct MIC_U::Impl {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_MIC, "(STUBBED) called, clamp={}", clamp);
LOG_WARNING(Service_MIC, "(STUBBED) called, clamp={}", clamp);
}
void GetClamp(Kernel::HLERequestContext& ctx) {
@ -165,7 +164,7 @@ struct MIC_U::Impl {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.Push<bool>(clamp);
NGLOG_WARNING(Service_MIC, "(STUBBED) called");
LOG_WARNING(Service_MIC, "(STUBBED) called");
}
void SetAllowShellClosed(Kernel::HLERequestContext& ctx) {
@ -174,14 +173,14 @@ struct MIC_U::Impl {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_MIC, "(STUBBED) called, allow_shell_closed={}", allow_shell_closed);
LOG_WARNING(Service_MIC, "(STUBBED) called, allow_shell_closed={}", allow_shell_closed);
}
void SetClientVersion(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x10, 1, 0};
const u32 version = rp.Pop<u32>();
NGLOG_WARNING(Service_MIC, "(STUBBED) called, version: 0x{:08X}", version);
LOG_WARNING(Service_MIC, "(STUBBED) called, version: 0x{:08X}", version);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);

View file

@ -15,8 +15,8 @@ void NDM_U::EnterExclusiveState(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NDM, "(STUBBED) exclusive_state=0x{:08X}",
static_cast<u32>(exclusive_state));
LOG_WARNING(Service_NDM, "(STUBBED) exclusive_state=0x{:08X}",
static_cast<u32>(exclusive_state));
}
void NDM_U::LeaveExclusiveState(Kernel::HLERequestContext& ctx) {
@ -25,7 +25,7 @@ void NDM_U::LeaveExclusiveState(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NDM, "(STUBBED)");
LOG_WARNING(Service_NDM, "(STUBBED)");
}
void NDM_U::QueryExclusiveMode(Kernel::HLERequestContext& ctx) {
@ -33,7 +33,7 @@ void NDM_U::QueryExclusiveMode(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.PushEnum(exclusive_state);
NGLOG_WARNING(Service_NDM, "(STUBBED)");
LOG_WARNING(Service_NDM, "(STUBBED)");
}
void NDM_U::LockState(Kernel::HLERequestContext& ctx) {
@ -43,7 +43,7 @@ void NDM_U::LockState(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NDM, "(STUBBED)");
LOG_WARNING(Service_NDM, "(STUBBED)");
}
void NDM_U::UnlockState(Kernel::HLERequestContext& ctx) {
@ -53,7 +53,7 @@ void NDM_U::UnlockState(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NDM, "(STUBBED)");
LOG_WARNING(Service_NDM, "(STUBBED)");
}
void NDM_U::SuspendDaemons(Kernel::HLERequestContext& ctx) {
@ -69,7 +69,7 @@ void NDM_U::SuspendDaemons(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NDM, "(STUBBED) bit_mask=0x{:08X}", bit_mask);
LOG_WARNING(Service_NDM, "(STUBBED) bit_mask=0x{:08X}", bit_mask);
}
void NDM_U::ResumeDaemons(Kernel::HLERequestContext& ctx) {
@ -84,7 +84,7 @@ void NDM_U::ResumeDaemons(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NDM, "(STUBBED) bit_mask=0x{:08X}", bit_mask);
LOG_WARNING(Service_NDM, "(STUBBED) bit_mask=0x{:08X}", bit_mask);
}
void NDM_U::SuspendScheduler(Kernel::HLERequestContext& ctx) {
@ -93,14 +93,14 @@ void NDM_U::SuspendScheduler(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NDM, "(STUBBED) perform_in_background={}", perform_in_background);
LOG_WARNING(Service_NDM, "(STUBBED) perform_in_background={}", perform_in_background);
}
void NDM_U::ResumeScheduler(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x09, 0, 0);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NDM, "(STUBBED)");
LOG_WARNING(Service_NDM, "(STUBBED)");
}
void NDM_U::QueryStatus(Kernel::HLERequestContext& ctx) {
@ -110,7 +110,7 @@ void NDM_U::QueryStatus(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.PushEnum(daemon_status.at(daemon));
NGLOG_WARNING(Service_NDM, "(STUBBED) daemon=0x{:02X}", daemon);
LOG_WARNING(Service_NDM, "(STUBBED) daemon=0x{:02X}", daemon);
}
void NDM_U::GetDaemonDisableCount(Kernel::HLERequestContext& ctx) {
@ -121,7 +121,7 @@ void NDM_U::GetDaemonDisableCount(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push<u32>(0); // current process disable count
rb.Push<u32>(0); // total disable count
NGLOG_WARNING(Service_NDM, "(STUBBED) daemon=0x{:02X}", daemon);
LOG_WARNING(Service_NDM, "(STUBBED) daemon=0x{:02X}", daemon);
}
void NDM_U::GetSchedulerDisableCount(Kernel::HLERequestContext& ctx) {
@ -131,7 +131,7 @@ void NDM_U::GetSchedulerDisableCount(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push<u32>(0); // current process disable count
rb.Push<u32>(0); // total disable count
NGLOG_WARNING(Service_NDM, "(STUBBED)");
LOG_WARNING(Service_NDM, "(STUBBED)");
}
void NDM_U::SetScanInterval(Kernel::HLERequestContext& ctx) {
@ -140,7 +140,7 @@ void NDM_U::SetScanInterval(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NDM, "(STUBBED) scan_interval=0x{:08X}", scan_interval);
LOG_WARNING(Service_NDM, "(STUBBED) scan_interval=0x{:08X}", scan_interval);
}
void NDM_U::GetScanInterval(Kernel::HLERequestContext& ctx) {
@ -148,7 +148,7 @@ void NDM_U::GetScanInterval(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.Push(scan_interval);
NGLOG_WARNING(Service_NDM, "(STUBBED)");
LOG_WARNING(Service_NDM, "(STUBBED)");
}
void NDM_U::SetRetryInterval(Kernel::HLERequestContext& ctx) {
@ -157,7 +157,7 @@ void NDM_U::SetRetryInterval(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NDM, "(STUBBED) retry_interval=0x{:08X}", retry_interval);
LOG_WARNING(Service_NDM, "(STUBBED) retry_interval=0x{:08X}", retry_interval);
}
void NDM_U::GetRetryInterval(Kernel::HLERequestContext& ctx) {
@ -165,7 +165,7 @@ void NDM_U::GetRetryInterval(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.Push(retry_interval);
NGLOG_WARNING(Service_NDM, "(STUBBED)");
LOG_WARNING(Service_NDM, "(STUBBED)");
}
void NDM_U::OverrideDefaultDaemons(Kernel::HLERequestContext& ctx) {
@ -181,7 +181,7 @@ void NDM_U::OverrideDefaultDaemons(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NDM, "(STUBBED) bit_mask=0x{:08X}", bit_mask);
LOG_WARNING(Service_NDM, "(STUBBED) bit_mask=0x{:08X}", bit_mask);
}
void NDM_U::ResetDefaultDaemons(Kernel::HLERequestContext& ctx) {
@ -190,7 +190,7 @@ void NDM_U::ResetDefaultDaemons(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NDM, "(STUBBED)");
LOG_WARNING(Service_NDM, "(STUBBED)");
}
void NDM_U::GetDefaultDaemons(Kernel::HLERequestContext& ctx) {
@ -198,14 +198,14 @@ void NDM_U::GetDefaultDaemons(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.PushEnum(default_daemon_bit_mask);
NGLOG_WARNING(Service_NDM, "(STUBBED)");
LOG_WARNING(Service_NDM, "(STUBBED)");
}
void NDM_U::ClearHalfAwakeMacFilter(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x17, 0, 0);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NDM, "(STUBBED)");
LOG_WARNING(Service_NDM, "(STUBBED)");
}
NDM_U::NDM_U() : ServiceFramework("ndm:u", 6) {

View file

@ -11,7 +11,7 @@ namespace NEWS {
void NEWS_S::GetTotalNotifications(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x5, 0, 0);
NGLOG_WARNING(Service, "(STUBBED) called");
LOG_WARNING(Service, "(STUBBED) called");
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);

View file

@ -19,7 +19,7 @@ void Module::Interface::Initialize(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NFC, "(STUBBED) called, param={}", param);
LOG_WARNING(Service_NFC, "(STUBBED) called, param={}", param);
}
void Module::Interface::Shutdown(Kernel::HLERequestContext& ctx) {
@ -30,7 +30,7 @@ void Module::Interface::Shutdown(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NFC, "(STUBBED) called, param={}", param);
LOG_WARNING(Service_NFC, "(STUBBED) called, param={}", param);
}
void Module::Interface::StartCommunication(Kernel::HLERequestContext& ctx) {
@ -38,7 +38,7 @@ void Module::Interface::StartCommunication(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NFC, "(STUBBED) called");
LOG_WARNING(Service_NFC, "(STUBBED) called");
}
void Module::Interface::StopCommunication(Kernel::HLERequestContext& ctx) {
@ -46,7 +46,7 @@ void Module::Interface::StopCommunication(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NFC, "(STUBBED) called");
LOG_WARNING(Service_NFC, "(STUBBED) called");
}
void Module::Interface::StartTagScanning(Kernel::HLERequestContext& ctx) {
@ -66,7 +66,7 @@ void Module::Interface::StartTagScanning(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(result);
NGLOG_WARNING(Service_NFC, "(STUBBED) called, in_val={:04x}", in_val);
LOG_WARNING(Service_NFC, "(STUBBED) called, in_val={:04x}", in_val);
}
void Module::Interface::StopTagScanning(Kernel::HLERequestContext& ctx) {
@ -76,7 +76,7 @@ void Module::Interface::StopTagScanning(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NFC, "(STUBBED) called");
LOG_WARNING(Service_NFC, "(STUBBED) called");
}
void Module::Interface::LoadAmiiboData(Kernel::HLERequestContext& ctx) {
@ -86,7 +86,7 @@ void Module::Interface::LoadAmiiboData(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NFC, "(STUBBED) called");
LOG_WARNING(Service_NFC, "(STUBBED) called");
}
void Module::Interface::ResetTagScanState(Kernel::HLERequestContext& ctx) {
@ -96,7 +96,7 @@ void Module::Interface::ResetTagScanState(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_NFC, "(STUBBED) called");
LOG_WARNING(Service_NFC, "(STUBBED) called");
}
void Module::Interface::GetTagInRangeEvent(Kernel::HLERequestContext& ctx) {
@ -105,7 +105,7 @@ void Module::Interface::GetTagInRangeEvent(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(RESULT_SUCCESS);
rb.PushCopyObjects(nfc->tag_in_range_event);
NGLOG_WARNING(Service_NFC, "(STUBBED) called");
LOG_WARNING(Service_NFC, "(STUBBED) called");
}
void Module::Interface::GetTagOutOfRangeEvent(Kernel::HLERequestContext& ctx) {
@ -114,7 +114,7 @@ void Module::Interface::GetTagOutOfRangeEvent(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(RESULT_SUCCESS);
rb.PushCopyObjects(nfc->tag_out_of_range_event);
NGLOG_WARNING(Service_NFC, "(STUBBED) called");
LOG_WARNING(Service_NFC, "(STUBBED) called");
}
void Module::Interface::GetTagState(Kernel::HLERequestContext& ctx) {
@ -123,7 +123,7 @@ void Module::Interface::GetTagState(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.PushEnum(nfc->nfc_tag_state);
NGLOG_DEBUG(Service_NFC, "(STUBBED) called");
LOG_DEBUG(Service_NFC, "(STUBBED) called");
}
void Module::Interface::CommunicationGetStatus(Kernel::HLERequestContext& ctx) {
@ -132,7 +132,7 @@ void Module::Interface::CommunicationGetStatus(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.PushEnum(nfc->nfc_status);
NGLOG_DEBUG(Service_NFC, "(STUBBED) called");
LOG_DEBUG(Service_NFC, "(STUBBED) called");
}
Module::Interface::Interface(std::shared_ptr<Module> nfc, const char* name, u32 max_session)

View file

@ -31,7 +31,7 @@ void NIM_U::CheckForSysUpdateEvent(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(RESULT_SUCCESS);
rb.PushCopyObjects(nim_system_update_event);
NGLOG_TRACE(Service_NIM, "called");
LOG_TRACE(Service_NIM, "called");
}
void NIM_U::CheckSysUpdateAvailable(Kernel::HLERequestContext& ctx) {
@ -41,7 +41,7 @@ void NIM_U::CheckSysUpdateAvailable(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(false); // No update available
NGLOG_WARNING(Service_NIM, "(STUBBED) called");
LOG_WARNING(Service_NIM, "(STUBBED) called");
}
} // namespace NIM

View file

@ -16,7 +16,7 @@ Kernel::SharedPtr<Kernel::Process> LaunchTitle(FS::MediaType media_type, u64 tit
auto loader = Loader::GetLoader(path);
if (!loader) {
NGLOG_WARNING(Service_NS, "Could not find .app for title 0x{:016x}", title_id);
LOG_WARNING(Service_NS, "Could not find .app for title 0x{:016x}", title_id);
return nullptr;
}
@ -24,7 +24,7 @@ Kernel::SharedPtr<Kernel::Process> LaunchTitle(FS::MediaType media_type, u64 tit
Loader::ResultStatus result = loader->Load(process);
if (result != Loader::ResultStatus::Success) {
NGLOG_WARNING(Service_NS, "Error loading .app for title 0x{:016x}", title_id);
LOG_WARNING(Service_NS, "Error loading .app for title 0x{:016x}", title_id);
return nullptr;
}

View file

@ -238,8 +238,8 @@ static void HandleEAPoLPacket(const Network::WifiPacket& packet) {
if (GetEAPoLFrameType(packet.data) == EAPoLStartMagic) {
if (connection_status.status != static_cast<u32>(NetworkStatus::ConnectedAsHost)) {
NGLOG_DEBUG(Service_NWM, "Connection sequence aborted, because connection status is {}",
connection_status.status);
LOG_DEBUG(Service_NWM, "Connection sequence aborted, because connection status is {}",
connection_status.status);
return;
}
@ -247,7 +247,7 @@ static void HandleEAPoLPacket(const Network::WifiPacket& packet) {
if (connection_status.max_nodes == connection_status.total_nodes) {
// Reject connection attempt
NGLOG_ERROR(Service_NWM, "Reached maximum nodes, but reject packet wasn't sent.");
LOG_ERROR(Service_NWM, "Reached maximum nodes, but reject packet wasn't sent.");
// TODO(B3N30): Figure out what packet is sent here
return;
}
@ -425,8 +425,8 @@ void SendAssociationResponseFrame(const MacAddress& address) {
{
std::lock_guard<std::mutex> lock(connection_status_mutex);
if (connection_status.status != static_cast<u32>(NetworkStatus::ConnectedAsHost)) {
NGLOG_ERROR(Service_NWM, "Connection sequence aborted, because connection status is {}",
connection_status.status);
LOG_ERROR(Service_NWM, "Connection sequence aborted, because connection status is {}",
connection_status.status);
return;
}
@ -457,9 +457,9 @@ void HandleAuthenticationFrame(const Network::WifiPacket& packet) {
{
std::lock_guard<std::mutex> lock(connection_status_mutex);
if (connection_status.status != static_cast<u32>(NetworkStatus::ConnectedAsHost)) {
NGLOG_ERROR(Service_NWM,
"Connection sequence aborted, because connection status is {}",
connection_status.status);
LOG_ERROR(Service_NWM,
"Connection sequence aborted, because connection status is {}",
connection_status.status);
return;
}
@ -477,16 +477,16 @@ void HandleAuthenticationFrame(const Network::WifiPacket& packet) {
/// Handles the deauthentication frames sent from clients to hosts, when they leave a session
void HandleDeauthenticationFrame(const Network::WifiPacket& packet) {
NGLOG_DEBUG(Service_NWM, "called");
LOG_DEBUG(Service_NWM, "called");
std::unique_lock<std::recursive_mutex> hle_lock(HLE::g_hle_lock, std::defer_lock);
std::unique_lock<std::mutex> lock(connection_status_mutex, std::defer_lock);
std::lock(hle_lock, lock);
if (connection_status.status != static_cast<u32>(NetworkStatus::ConnectedAsHost)) {
NGLOG_ERROR(Service_NWM, "Got deauthentication frame but we are not the host");
LOG_ERROR(Service_NWM, "Got deauthentication frame but we are not the host");
return;
}
if (node_map.find(packet.transmitter_address) == node_map.end()) {
NGLOG_ERROR(Service_NWM, "Got deauthentication frame from unknown node");
LOG_ERROR(Service_NWM, "Got deauthentication frame from unknown node");
return;
}
@ -555,7 +555,7 @@ void NWM_UDS::Shutdown(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_NWM, "called");
LOG_DEBUG(Service_NWM, "called");
}
void NWM_UDS::RecvBeaconBroadcastData(Kernel::HLERequestContext& ctx) {
@ -617,10 +617,10 @@ void NWM_UDS::RecvBeaconBroadcastData(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushMappedBuffer(out_buffer);
NGLOG_DEBUG(Service_NWM,
"called out_buffer_size=0x{:08X}, wlan_comm_id=0x{:08X}, id=0x{:08X},"
"unk1=0x{:08X}, unk2=0x{:08X}, offset={}",
out_buffer_size, wlan_comm_id, id, unk1, unk2, cur_buffer_size);
LOG_DEBUG(Service_NWM,
"called out_buffer_size=0x{:08X}, wlan_comm_id=0x{:08X}, id=0x{:08X},"
"unk1=0x{:08X}, unk2=0x{:08X}, offset={}",
out_buffer_size, wlan_comm_id, id, unk1, unk2, cur_buffer_size);
}
void NWM_UDS::InitializeWithVersion(Kernel::HLERequestContext& ctx) {
@ -642,7 +642,7 @@ void NWM_UDS::InitializeWithVersion(Kernel::HLERequestContext& ctx) {
if (auto room_member = Network::GetRoomMember().lock()) {
wifi_packet_received = room_member->BindOnWifiPacketReceived(OnWifiPacketReceived);
} else {
NGLOG_ERROR(Service_NWM, "Network isn't initalized");
LOG_ERROR(Service_NWM, "Network isn't initalized");
}
{
@ -660,8 +660,8 @@ void NWM_UDS::InitializeWithVersion(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushCopyObjects(connection_status_event);
NGLOG_DEBUG(Service_NWM, "called sharedmem_size=0x{:08X}, version=0x{:08X}", sharedmem_size,
version);
LOG_DEBUG(Service_NWM, "called sharedmem_size=0x{:08X}, version=0x{:08X}", sharedmem_size,
version);
}
void NWM_UDS::GetConnectionStatus(Kernel::HLERequestContext& ctx) {
@ -680,7 +680,7 @@ void NWM_UDS::GetConnectionStatus(Kernel::HLERequestContext& ctx) {
connection_status.changed_nodes = 0;
}
NGLOG_DEBUG(Service_NWM, "called");
LOG_DEBUG(Service_NWM, "called");
}
void NWM_UDS::GetNodeInformation(Kernel::HLERequestContext& ctx) {
@ -711,7 +711,7 @@ void NWM_UDS::GetNodeInformation(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushRaw<NodeInfo>(*itr);
}
NGLOG_DEBUG(Service_NWM, "called");
LOG_DEBUG(Service_NWM, "called");
}
void NWM_UDS::Bind(Kernel::HLERequestContext& ctx) {
@ -722,14 +722,14 @@ void NWM_UDS::Bind(Kernel::HLERequestContext& ctx) {
u8 data_channel = rp.Pop<u8>();
u16 network_node_id = rp.Pop<u16>();
NGLOG_DEBUG(Service_NWM, "called");
LOG_DEBUG(Service_NWM, "called");
if (data_channel == 0 || bind_node_id == 0) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(ResultCode(ErrorDescription::NotAuthorized, ErrorModule::UDS,
ErrorSummary::WrongArgument, ErrorLevel::Usage));
NGLOG_WARNING(Service_NWM, "data_channel = {}, bind_node_id = {}", data_channel,
bind_node_id);
LOG_WARNING(Service_NWM, "data_channel = {}, bind_node_id = {}", data_channel,
bind_node_id);
return;
}
@ -738,7 +738,7 @@ void NWM_UDS::Bind(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(ResultCode(ErrorDescription::OutOfMemory, ErrorModule::UDS,
ErrorSummary::OutOfResource, ErrorLevel::Status));
NGLOG_WARNING(Service_NWM, "max bind nodes");
LOG_WARNING(Service_NWM, "max bind nodes");
return;
}
@ -747,7 +747,7 @@ void NWM_UDS::Bind(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(ResultCode(ErrorDescription::TooLarge, ErrorModule::UDS,
ErrorSummary::WrongArgument, ErrorLevel::Usage));
NGLOG_WARNING(Service_NWM, "MinRecvBufferSize");
LOG_WARNING(Service_NWM, "MinRecvBufferSize");
return;
}
@ -808,7 +808,7 @@ void NWM_UDS::BeginHostingNetwork(Kernel::HLERequestContext& ctx) {
// TODO(Subv): Store the passphrase and verify it when attempting a connection.
NGLOG_DEBUG(Service_NWM, "called");
LOG_DEBUG(Service_NWM, "called");
{
std::lock_guard<std::mutex> lock(connection_status_mutex);
@ -868,7 +868,7 @@ void NWM_UDS::BeginHostingNetwork(Kernel::HLERequestContext& ctx) {
CoreTiming::ScheduleEvent(msToCycles(DefaultBeaconInterval * MillisecondsPerTU),
beacon_broadcast_event, 0);
NGLOG_DEBUG(Service_NWM, "An UDS network has been created.");
LOG_DEBUG(Service_NWM, "An UDS network has been created.");
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
@ -877,7 +877,7 @@ void NWM_UDS::BeginHostingNetwork(Kernel::HLERequestContext& ctx) {
void NWM_UDS::UpdateNetworkAttribute(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x07, 2, 0);
rp.Skip(2, false);
NGLOG_WARNING(Service_NWM, "stubbed");
LOG_WARNING(Service_NWM, "stubbed");
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
}
@ -894,7 +894,7 @@ void NWM_UDS::DestroyNetwork(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(ResultCode(ErrCodes::WrongStatus, ErrorModule::UDS, ErrorSummary::InvalidState,
ErrorLevel::Status));
NGLOG_WARNING(Service_NWM, "called with status {}", connection_status.status);
LOG_WARNING(Service_NWM, "called with status {}", connection_status.status);
return;
}
@ -916,7 +916,7 @@ void NWM_UDS::DestroyNetwork(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_NWM, "called");
LOG_DEBUG(Service_NWM, "called");
}
void NWM_UDS::DisconnectNetwork(Kernel::HLERequestContext& ctx) {
@ -934,7 +934,7 @@ void NWM_UDS::DisconnectNetwork(Kernel::HLERequestContext& ctx) {
connection_status.status = static_cast<u32>(NetworkStatus::ConnectedAsHost);
connection_status.network_node_id = tmp_node_id;
node_map.clear();
NGLOG_DEBUG(Service_NWM, "called as a host");
LOG_DEBUG(Service_NWM, "called as a host");
rb.Push(ResultCode(ErrCodes::WrongStatus, ErrorModule::UDS, ErrorSummary::InvalidState,
ErrorLevel::Status));
return;
@ -961,7 +961,7 @@ void NWM_UDS::DisconnectNetwork(Kernel::HLERequestContext& ctx) {
channel_data.clear();
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_NWM, "called");
LOG_DEBUG(Service_NWM, "called");
}
void NWM_UDS::SendTo(Kernel::HLERequestContext& ctx) {
@ -992,7 +992,7 @@ void NWM_UDS::SendTo(Kernel::HLERequestContext& ctx) {
}
if (dest_node_id == connection_status.network_node_id) {
NGLOG_ERROR(Service_NWM, "tried to send packet to itself");
LOG_ERROR(Service_NWM, "tried to send packet to itself");
rb.Push(ResultCode(ErrorDescription::NotFound, ErrorModule::UDS,
ErrorSummary::WrongArgument, ErrorLevel::Status));
return;
@ -1001,7 +1001,7 @@ void NWM_UDS::SendTo(Kernel::HLERequestContext& ctx) {
Network::MacAddress dest_address;
if (flags >> 2) {
NGLOG_ERROR(Service_NWM, "Unexpected flags 0x{:02X}", flags);
LOG_ERROR(Service_NWM, "Unexpected flags 0x{:02X}", flags);
}
if ((flags & (0x1 << 1)) || dest_node_id == 0xFFFF) {
@ -1013,7 +1013,7 @@ void NWM_UDS::SendTo(Kernel::HLERequestContext& ctx) {
std::find_if(node_map.begin(), node_map.end(),
[dest_node_id](const auto& node) { return node.second == dest_node_id; });
if (destination == node_map.end()) {
NGLOG_ERROR(Service_NWM, "tried to send packet to unknown dest id {}", dest_node_id);
LOG_ERROR(Service_NWM, "tried to send packet to unknown dest id {}", dest_node_id);
rb.Push(ResultCode(ErrorDescription::NotFound, ErrorModule::UDS,
ErrorSummary::WrongArgument, ErrorLevel::Status));
return;
@ -1133,7 +1133,7 @@ void NWM_UDS::GetChannel(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(channel);
NGLOG_DEBUG(Service_NWM, "called");
LOG_DEBUG(Service_NWM, "called");
}
void NWM_UDS::ConnectToNetwork(Kernel::HLERequestContext& ctx) {
@ -1163,10 +1163,10 @@ void NWM_UDS::ConnectToNetwork(Kernel::HLERequestContext& ctx) {
// TODO(B3N30): Add error handling for host full and timeout
IPC::RequestBuilder rb(ctx, 0x1E, 1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_NWM, "connection sequence finished");
LOG_DEBUG(Service_NWM, "connection sequence finished");
});
NGLOG_DEBUG(Service_NWM, "called");
LOG_DEBUG(Service_NWM, "called");
}
void NWM_UDS::SetApplicationData(Kernel::HLERequestContext& ctx) {
@ -1177,7 +1177,7 @@ void NWM_UDS::SetApplicationData(Kernel::HLERequestContext& ctx) {
const std::vector<u8> application_data = rp.PopStaticBuffer();
ASSERT(application_data.size() == size);
NGLOG_DEBUG(Service_NWM, "called");
LOG_DEBUG(Service_NWM, "called");
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -1202,7 +1202,7 @@ void NWM_UDS::DecryptBeaconData(Kernel::HLERequestContext& ctx) {
const std::vector<u8> encrypted_data0_buffer = rp.PopStaticBuffer();
const std::vector<u8> encrypted_data1_buffer = rp.PopStaticBuffer();
NGLOG_DEBUG(Service_NWM, "called");
LOG_DEBUG(Service_NWM, "called");
NetworkInfo net_info;
std::memcpy(&net_info, network_struct_buffer.data(), sizeof(net_info));

View file

@ -209,7 +209,7 @@ static std::vector<u8> DecryptDataFrame(const std::vector<u8>& encrypted_payload
df.Get(pdata.data(), size);
return pdata;
} catch (CryptoPP::Exception&) {
NGLOG_ERROR(Service_NWM, "failed to decrypt");
LOG_ERROR(Service_NWM, "failed to decrypt");
}
return {};
@ -263,7 +263,7 @@ static std::vector<u8> EncryptDataFrame(const std::vector<u8>& payload,
df.Get(cipher.data(), size);
return cipher;
} catch (CryptoPP::Exception&) {
NGLOG_ERROR(Service_NWM, "failed to encrypt");
LOG_ERROR(Service_NWM, "failed to encrypt");
}
return {};

View file

@ -31,7 +31,7 @@ void Module::Interface::GetAdapterState(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(ptm->battery_is_charging);
NGLOG_WARNING(Service_PTM, "(STUBBED) called");
LOG_WARNING(Service_PTM, "(STUBBED) called");
}
void Module::Interface::GetShellState(Kernel::HLERequestContext& ctx) {
@ -49,7 +49,7 @@ void Module::Interface::GetBatteryLevel(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(static_cast<u32>(ChargeLevels::CompletelyFull)); // Set to a completely full battery
NGLOG_WARNING(Service_PTM, "(STUBBED) called");
LOG_WARNING(Service_PTM, "(STUBBED) called");
}
void Module::Interface::GetBatteryChargeState(Kernel::HLERequestContext& ctx) {
@ -59,7 +59,7 @@ void Module::Interface::GetBatteryChargeState(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(ptm->battery_is_charging);
NGLOG_WARNING(Service_PTM, "(STUBBED) called");
LOG_WARNING(Service_PTM, "(STUBBED) called");
}
void Module::Interface::GetPedometerState(Kernel::HLERequestContext& ctx) {
@ -69,7 +69,7 @@ void Module::Interface::GetPedometerState(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(ptm->pedometer_is_counting);
NGLOG_WARNING(Service_PTM, "(STUBBED) called");
LOG_WARNING(Service_PTM, "(STUBBED) called");
}
void Module::Interface::GetStepHistory(Kernel::HLERequestContext& ctx) {
@ -92,8 +92,8 @@ void Module::Interface::GetStepHistory(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushMappedBuffer(buffer);
NGLOG_WARNING(Service_PTM, "(STUBBED) called, from time(raw): 0x{:x}, for {} hours", start_time,
hours);
LOG_WARNING(Service_PTM, "(STUBBED) called, from time(raw): 0x{:x}, for {} hours", start_time,
hours);
}
void Module::Interface::GetTotalStepCount(Kernel::HLERequestContext& ctx) {
@ -103,7 +103,7 @@ void Module::Interface::GetTotalStepCount(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push<u32>(0);
NGLOG_WARNING(Service_PTM, "(STUBBED) called");
LOG_WARNING(Service_PTM, "(STUBBED) called");
}
void Module::Interface::GetSoftwareClosedFlag(Kernel::HLERequestContext& ctx) {
@ -113,23 +113,21 @@ void Module::Interface::GetSoftwareClosedFlag(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(false);
NGLOG_WARNING(Service_PTM, "(STUBBED) called");
LOG_WARNING(Service_PTM, "(STUBBED) called");
}
void CheckNew3DS(IPC::RequestBuilder& rb) {
const bool is_new_3ds = Settings::values.is_new_3ds;
if (is_new_3ds) {
NGLOG_CRITICAL(Service_PTM,
"The option 'is_new_3ds' is enabled as part of the 'System' "
"settings. Citra does not fully support New 3DS emulation yet!");
LOG_CRITICAL(Service_PTM, "The option 'is_new_3ds' is enabled as part of the 'System' "
"settings. Citra does not fully support New 3DS emulation yet!");
}
rb.Push(RESULT_SUCCESS);
rb.Push(is_new_3ds);
NGLOG_WARNING(Service_PTM, "(STUBBED) called isNew3DS = 0x{:08x}",
static_cast<u32>(is_new_3ds));
LOG_WARNING(Service_PTM, "(STUBBED) called isNew3DS = 0x{:08x}", static_cast<u32>(is_new_3ds));
}
void Module::Interface::CheckNew3DS(Kernel::HLERequestContext& ctx) {

View file

@ -94,15 +94,14 @@ void Interface::HandleSyncRequest(SharedPtr<ServerSession> server_session) {
std::string function_name = (itr == m_functions.end())
? Common::StringFromFormat("0x%08X", cmd_buff[0])
: itr->second.name;
NGLOG_ERROR(Service, "unknown / unimplemented {}",
MakeFunctionString(function_name.c_str(), GetPortName().c_str(), cmd_buff));
LOG_ERROR(Service, "unknown / unimplemented {}",
MakeFunctionString(function_name.c_str(), GetPortName().c_str(), cmd_buff));
// TODO(bunnei): Hack - ignore error
cmd_buff[1] = 0;
return;
}
NGLOG_TRACE(Service, "{}",
MakeFunctionString(itr->second.name, GetPortName().c_str(), cmd_buff));
LOG_TRACE(Service, "{}", MakeFunctionString(itr->second.name, GetPortName().c_str(), cmd_buff));
itr->second.func(this);
}
@ -159,7 +158,7 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(u32* cmd_buf, const Funct
}
buf.push_back('}');
NGLOG_ERROR(Service, "unknown / unimplemented {}", fmt::to_string(buf));
LOG_ERROR(Service, "unknown / unimplemented {}", fmt::to_string(buf));
// TODO(bunnei): Hack - ignore error
cmd_buf[1] = 0;
}
@ -180,7 +179,7 @@ void ServiceFrameworkBase::HandleSyncRequest(SharedPtr<ServerSession> server_ses
context.PopulateFromIncomingCommandBuffer(cmd_buf, *Kernel::g_current_process,
Kernel::g_handle_table);
NGLOG_TRACE(Service, "{}", MakeFunctionString(info->name, GetServiceName().c_str(), cmd_buf));
LOG_TRACE(Service, "{}", MakeFunctionString(info->name, GetServiceName().c_str(), cmd_buf));
handler_invoker(this, info->handler_callback, context);
auto thread = Kernel::GetCurrentThread();
@ -264,7 +263,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
SSL::InstallInterfaces(*sm);
Y2R::InstallInterfaces(*sm);
NGLOG_DEBUG(Service, "initialized OK");
LOG_DEBUG(Service, "initialized OK");
}
/// Shutdown ServiceManager
@ -274,6 +273,6 @@ void Shutdown() {
FS::ArchiveShutdown();
g_kernel_named_ports.clear();
NGLOG_DEBUG(Service, "shutdown OK");
LOG_DEBUG(Service, "shutdown OK");
}
} // namespace Service

View file

@ -45,7 +45,7 @@ void SRV::RegisterClient(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_SRV, "(STUBBED) called");
LOG_WARNING(Service_SRV, "(STUBBED) called");
}
/**
@ -67,7 +67,7 @@ void SRV::EnableNotification(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(RESULT_SUCCESS);
rb.PushCopyObjects(notification_semaphore);
NGLOG_WARNING(Service_SRV, "(STUBBED) called");
LOG_WARNING(Service_SRV, "(STUBBED) called");
}
/**
@ -92,7 +92,7 @@ void SRV::GetServiceHandle(Kernel::HLERequestContext& ctx) {
if (name_len > Service::kMaxPortSize) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(ERR_INVALID_NAME_SIZE);
NGLOG_ERROR(Service_SRV, "called name_len=0x{:X} -> ERR_INVALID_NAME_SIZE", name_len);
LOG_ERROR(Service_SRV, "called name_len=0x{:X} -> ERR_INVALID_NAME_SIZE", name_len);
return;
}
std::string name(name_buf.data(), name_len);
@ -103,24 +103,22 @@ void SRV::GetServiceHandle(Kernel::HLERequestContext& ctx) {
if (client_port.Failed()) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(client_port.Code());
NGLOG_ERROR(Service_SRV, "called service={} -> error 0x{:08X}", name,
client_port.Code().raw);
LOG_ERROR(Service_SRV, "called service={} -> error 0x{:08X}", name, client_port.Code().raw);
return;
}
auto session = client_port.Unwrap()->Connect();
if (session.Succeeded()) {
NGLOG_DEBUG(Service_SRV, "called service={} -> session={}", name,
(*session)->GetObjectId());
LOG_DEBUG(Service_SRV, "called service={} -> session={}", name, (*session)->GetObjectId());
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(session.Code());
rb.PushMoveObjects(std::move(session).Unwrap());
} else if (session.Code() == Kernel::ERR_MAX_CONNECTIONS_REACHED && wait_until_available) {
NGLOG_WARNING(Service_SRV, "called service={} -> ERR_MAX_CONNECTIONS_REACHED", name);
LOG_WARNING(Service_SRV, "called service={} -> ERR_MAX_CONNECTIONS_REACHED", name);
// TODO(Subv): Put the caller guest thread to sleep until this port becomes available again.
UNIMPLEMENTED_MSG("Unimplemented wait until port {} is available.", name);
} else {
NGLOG_ERROR(Service_SRV, "called service={} -> error 0x{:08X}", name, session.Code().raw);
LOG_ERROR(Service_SRV, "called service={} -> error 0x{:08X}", name, session.Code().raw);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(session.Code());
}
@ -141,7 +139,7 @@ void SRV::Subscribe(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_SRV, "(STUBBED) called, notification_id=0x{:X}", notification_id);
LOG_WARNING(Service_SRV, "(STUBBED) called, notification_id=0x{:X}", notification_id);
}
/**
@ -159,7 +157,7 @@ void SRV::Unsubscribe(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_SRV, "(STUBBED) called, notification_id=0x{:X}", notification_id);
LOG_WARNING(Service_SRV, "(STUBBED) called, notification_id=0x{:X}", notification_id);
}
/**
@ -179,8 +177,8 @@ void SRV::PublishToSubscriber(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_SRV, "(STUBBED) called, notification_id=0x{:X}, flags={}",
notification_id, flags);
LOG_WARNING(Service_SRV, "(STUBBED) called, notification_id=0x{:X}, flags={}", notification_id,
flags);
}
void SRV::RegisterService(Kernel::HLERequestContext& ctx) {
@ -197,7 +195,7 @@ void SRV::RegisterService(Kernel::HLERequestContext& ctx) {
if (port.Failed()) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(port.Code());
NGLOG_ERROR(Service_SRV, "called service={} -> error 0x{:08X}", name, port.Code().raw);
LOG_ERROR(Service_SRV, "called service={} -> error 0x{:08X}", name, port.Code().raw);
return;
}

View file

@ -463,7 +463,7 @@ static void Fcntl(Interface* self) {
}
#endif
} else {
NGLOG_ERROR(Service_SOC, "Unsupported command ({}) in fcntl call", ctr_cmd);
LOG_ERROR(Service_SOC, "Unsupported command ({}) in fcntl call", ctr_cmd);
posix_ret = TranslateError(EINVAL); // TODO: Find the correct error
return;
}

View file

@ -69,7 +69,7 @@ void Y2R_U::SetInputFormat(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_Y2R, "called input_format={}", static_cast<u8>(conversion.input_format));
LOG_DEBUG(Service_Y2R, "called input_format={}", static_cast<u8>(conversion.input_format));
}
void Y2R_U::GetInputFormat(Kernel::HLERequestContext& ctx) {
@ -79,7 +79,7 @@ void Y2R_U::GetInputFormat(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushEnum(conversion.input_format);
NGLOG_DEBUG(Service_Y2R, "called input_format={}", static_cast<u8>(conversion.input_format));
LOG_DEBUG(Service_Y2R, "called input_format={}", static_cast<u8>(conversion.input_format));
}
void Y2R_U::SetOutputFormat(Kernel::HLERequestContext& ctx) {
@ -90,7 +90,7 @@ void Y2R_U::SetOutputFormat(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_Y2R, "called output_format={}", static_cast<u8>(conversion.output_format));
LOG_DEBUG(Service_Y2R, "called output_format={}", static_cast<u8>(conversion.output_format));
}
void Y2R_U::GetOutputFormat(Kernel::HLERequestContext& ctx) {
@ -100,7 +100,7 @@ void Y2R_U::GetOutputFormat(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushEnum(conversion.output_format);
NGLOG_DEBUG(Service_Y2R, "called output_format={}", static_cast<u8>(conversion.output_format));
LOG_DEBUG(Service_Y2R, "called output_format={}", static_cast<u8>(conversion.output_format));
}
void Y2R_U::SetRotation(Kernel::HLERequestContext& ctx) {
@ -111,7 +111,7 @@ void Y2R_U::SetRotation(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_Y2R, "called rotation={}", static_cast<u8>(conversion.rotation));
LOG_DEBUG(Service_Y2R, "called rotation={}", static_cast<u8>(conversion.rotation));
}
void Y2R_U::GetRotation(Kernel::HLERequestContext& ctx) {
@ -121,7 +121,7 @@ void Y2R_U::GetRotation(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushEnum(conversion.rotation);
NGLOG_DEBUG(Service_Y2R, "called rotation={}", static_cast<u8>(conversion.rotation));
LOG_DEBUG(Service_Y2R, "called rotation={}", static_cast<u8>(conversion.rotation));
}
void Y2R_U::SetBlockAlignment(Kernel::HLERequestContext& ctx) {
@ -132,8 +132,8 @@ void Y2R_U::SetBlockAlignment(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_Y2R, "called block_alignment={}",
static_cast<u8>(conversion.block_alignment));
LOG_DEBUG(Service_Y2R, "called block_alignment={}",
static_cast<u8>(conversion.block_alignment));
}
void Y2R_U::GetBlockAlignment(Kernel::HLERequestContext& ctx) {
@ -143,8 +143,8 @@ void Y2R_U::GetBlockAlignment(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushEnum(conversion.block_alignment);
NGLOG_DEBUG(Service_Y2R, "called block_alignment={}",
static_cast<u8>(conversion.block_alignment));
LOG_DEBUG(Service_Y2R, "called block_alignment={}",
static_cast<u8>(conversion.block_alignment));
}
void Y2R_U::SetSpacialDithering(Kernel::HLERequestContext& ctx) {
@ -155,7 +155,7 @@ void Y2R_U::SetSpacialDithering(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_Y2R, "(STUBBED) called");
LOG_WARNING(Service_Y2R, "(STUBBED) called");
}
void Y2R_U::GetSpacialDithering(Kernel::HLERequestContext& ctx) {
@ -165,7 +165,7 @@ void Y2R_U::GetSpacialDithering(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(spacial_dithering_enabled);
NGLOG_WARNING(Service_Y2R, "(STUBBED) called");
LOG_WARNING(Service_Y2R, "(STUBBED) called");
}
void Y2R_U::SetTemporalDithering(Kernel::HLERequestContext& ctx) {
@ -175,7 +175,7 @@ void Y2R_U::SetTemporalDithering(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_Y2R, "(STUBBED) called");
LOG_WARNING(Service_Y2R, "(STUBBED) called");
}
void Y2R_U::GetTemporalDithering(Kernel::HLERequestContext& ctx) {
@ -185,7 +185,7 @@ void Y2R_U::GetTemporalDithering(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(temporal_dithering_enabled);
NGLOG_WARNING(Service_Y2R, "(STUBBED) called");
LOG_WARNING(Service_Y2R, "(STUBBED) called");
}
void Y2R_U::SetTransferEndInterrupt(Kernel::HLERequestContext& ctx) {
@ -195,7 +195,7 @@ void Y2R_U::SetTransferEndInterrupt(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_WARNING(Service_Y2R, "(STUBBED) called");
LOG_WARNING(Service_Y2R, "(STUBBED) called");
}
void Y2R_U::GetTransferEndInterrupt(Kernel::HLERequestContext& ctx) {
@ -205,7 +205,7 @@ void Y2R_U::GetTransferEndInterrupt(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(transfer_end_interrupt_enabled);
NGLOG_WARNING(Service_Y2R, "(STUBBED) called");
LOG_WARNING(Service_Y2R, "(STUBBED) called");
}
void Y2R_U::GetTransferEndEvent(Kernel::HLERequestContext& ctx) {
@ -215,7 +215,7 @@ void Y2R_U::GetTransferEndEvent(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushCopyObjects(completion_event);
NGLOG_DEBUG(Service_Y2R, "called");
LOG_DEBUG(Service_Y2R, "called");
}
void Y2R_U::SetSendingY(Kernel::HLERequestContext& ctx) {
@ -230,11 +230,11 @@ void Y2R_U::SetSendingY(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_Y2R,
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
"src_process_id={}",
conversion.src_Y.image_size, conversion.src_Y.transfer_unit, conversion.src_Y.gap,
process->process_id);
LOG_DEBUG(Service_Y2R,
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
"src_process_id={}",
conversion.src_Y.image_size, conversion.src_Y.transfer_unit, conversion.src_Y.gap,
process->process_id);
}
void Y2R_U::SetSendingU(Kernel::HLERequestContext& ctx) {
@ -249,11 +249,11 @@ void Y2R_U::SetSendingU(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_Y2R,
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
"src_process_id={}",
conversion.src_U.image_size, conversion.src_U.transfer_unit, conversion.src_U.gap,
process->process_id);
LOG_DEBUG(Service_Y2R,
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
"src_process_id={}",
conversion.src_U.image_size, conversion.src_U.transfer_unit, conversion.src_U.gap,
process->process_id);
}
void Y2R_U::SetSendingV(Kernel::HLERequestContext& ctx) {
@ -269,11 +269,11 @@ void Y2R_U::SetSendingV(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_Y2R,
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
"src_process_id={}",
conversion.src_V.image_size, conversion.src_V.transfer_unit, conversion.src_V.gap,
process->process_id);
LOG_DEBUG(Service_Y2R,
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
"src_process_id={}",
conversion.src_V.image_size, conversion.src_V.transfer_unit, conversion.src_V.gap,
process->process_id);
}
void Y2R_U::SetSendingYUYV(Kernel::HLERequestContext& ctx) {
@ -289,11 +289,11 @@ void Y2R_U::SetSendingYUYV(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_Y2R,
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
"src_process_id={}",
conversion.src_YUYV.image_size, conversion.src_YUYV.transfer_unit,
conversion.src_YUYV.gap, process->process_id);
LOG_DEBUG(Service_Y2R,
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
"src_process_id={}",
conversion.src_YUYV.image_size, conversion.src_YUYV.transfer_unit,
conversion.src_YUYV.gap, process->process_id);
}
void Y2R_U::IsFinishedSendingYuv(Kernel::HLERequestContext& ctx) {
@ -303,7 +303,7 @@ void Y2R_U::IsFinishedSendingYuv(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push<u8>(1);
NGLOG_WARNING(Service_Y2R, "(STUBBED) called");
LOG_WARNING(Service_Y2R, "(STUBBED) called");
}
void Y2R_U::IsFinishedSendingY(Kernel::HLERequestContext& ctx) {
@ -313,7 +313,7 @@ void Y2R_U::IsFinishedSendingY(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push<u8>(1);
NGLOG_WARNING(Service_Y2R, "(STUBBED) called");
LOG_WARNING(Service_Y2R, "(STUBBED) called");
}
void Y2R_U::IsFinishedSendingU(Kernel::HLERequestContext& ctx) {
@ -323,7 +323,7 @@ void Y2R_U::IsFinishedSendingU(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push<u8>(1);
NGLOG_WARNING(Service_Y2R, "(STUBBED) called");
LOG_WARNING(Service_Y2R, "(STUBBED) called");
}
void Y2R_U::IsFinishedSendingV(Kernel::HLERequestContext& ctx) {
@ -333,7 +333,7 @@ void Y2R_U::IsFinishedSendingV(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push<u8>(1);
NGLOG_WARNING(Service_Y2R, "(STUBBED) called");
LOG_WARNING(Service_Y2R, "(STUBBED) called");
}
void Y2R_U::SetReceiving(Kernel::HLERequestContext& ctx) {
@ -349,11 +349,11 @@ void Y2R_U::SetReceiving(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_Y2R,
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
"dst_process_id={}",
conversion.dst.image_size, conversion.dst.transfer_unit, conversion.dst.gap,
static_cast<u32>(dst_process->process_id));
LOG_DEBUG(Service_Y2R,
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
"dst_process_id={}",
conversion.dst.image_size, conversion.dst.transfer_unit, conversion.dst.gap,
static_cast<u32>(dst_process->process_id));
}
void Y2R_U::IsFinishedReceiving(Kernel::HLERequestContext& ctx) {
@ -363,7 +363,7 @@ void Y2R_U::IsFinishedReceiving(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push<u8>(1);
NGLOG_WARNING(Service_Y2R, "(STUBBED) called");
LOG_WARNING(Service_Y2R, "(STUBBED) called");
}
void Y2R_U::SetInputLineWidth(Kernel::HLERequestContext& ctx) {
@ -373,7 +373,7 @@ void Y2R_U::SetInputLineWidth(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(conversion.SetInputLineWidth(input_line_width));
NGLOG_DEBUG(Service_Y2R, "called input_line_width={}", input_line_width);
LOG_DEBUG(Service_Y2R, "called input_line_width={}", input_line_width);
}
void Y2R_U::GetInputLineWidth(Kernel::HLERequestContext& ctx) {
@ -383,7 +383,7 @@ void Y2R_U::GetInputLineWidth(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(conversion.input_line_width);
NGLOG_DEBUG(Service_Y2R, "called input_line_width={}", conversion.input_line_width);
LOG_DEBUG(Service_Y2R, "called input_line_width={}", conversion.input_line_width);
}
void Y2R_U::SetInputLines(Kernel::HLERequestContext& ctx) {
@ -393,7 +393,7 @@ void Y2R_U::SetInputLines(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(conversion.SetInputLines(input_lines));
NGLOG_DEBUG(Service_Y2R, "called input_lines={}", input_lines);
LOG_DEBUG(Service_Y2R, "called input_lines={}", input_lines);
}
void Y2R_U::GetInputLines(Kernel::HLERequestContext& ctx) {
@ -403,7 +403,7 @@ void Y2R_U::GetInputLines(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(static_cast<u32>(conversion.input_lines));
NGLOG_DEBUG(Service_Y2R, "called input_lines={}", conversion.input_lines);
LOG_DEBUG(Service_Y2R, "called input_lines={}", conversion.input_lines);
}
void Y2R_U::SetCoefficient(Kernel::HLERequestContext& ctx) {
@ -414,10 +414,10 @@ void Y2R_U::SetCoefficient(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_Y2R, "called coefficients=[{:X}, {:X}, {:X}, {:X}, {:X}, {:X}, {:X}, {:X}]",
conversion.coefficients[0], conversion.coefficients[1], conversion.coefficients[2],
conversion.coefficients[3], conversion.coefficients[4], conversion.coefficients[5],
conversion.coefficients[6], conversion.coefficients[7]);
LOG_DEBUG(Service_Y2R, "called coefficients=[{:X}, {:X}, {:X}, {:X}, {:X}, {:X}, {:X}, {:X}]",
conversion.coefficients[0], conversion.coefficients[1], conversion.coefficients[2],
conversion.coefficients[3], conversion.coefficients[4], conversion.coefficients[5],
conversion.coefficients[6], conversion.coefficients[7]);
}
void Y2R_U::GetCoefficient(Kernel::HLERequestContext& ctx) {
@ -427,7 +427,7 @@ void Y2R_U::GetCoefficient(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushRaw(conversion.coefficients);
NGLOG_DEBUG(Service_Y2R, "called");
LOG_DEBUG(Service_Y2R, "called");
}
void Y2R_U::SetStandardCoefficient(Kernel::HLERequestContext& ctx) {
@ -437,7 +437,7 @@ void Y2R_U::SetStandardCoefficient(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(conversion.SetStandardCoefficient(static_cast<StandardCoefficient>(index)));
NGLOG_DEBUG(Service_Y2R, "called standard_coefficient={}", index);
LOG_DEBUG(Service_Y2R, "called standard_coefficient={}", index);
}
void Y2R_U::GetStandardCoefficient(Kernel::HLERequestContext& ctx) {
@ -449,13 +449,13 @@ void Y2R_U::GetStandardCoefficient(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushRaw(standard_coefficients[index]);
NGLOG_DEBUG(Service_Y2R, "called standard_coefficient={} ", index);
LOG_DEBUG(Service_Y2R, "called standard_coefficient={} ", index);
} else {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(ResultCode(ErrorDescription::InvalidEnumValue, ErrorModule::CAM,
ErrorSummary::InvalidArgument, ErrorLevel::Usage));
NGLOG_ERROR(Service_Y2R, "called standard_coefficient={} The argument is invalid!", index);
LOG_ERROR(Service_Y2R, "called standard_coefficient={} The argument is invalid!", index);
}
}
@ -466,7 +466,7 @@ void Y2R_U::SetAlpha(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_Y2R, "called alpha={}", conversion.alpha);
LOG_DEBUG(Service_Y2R, "called alpha={}", conversion.alpha);
}
void Y2R_U::GetAlpha(Kernel::HLERequestContext& ctx) {
@ -476,7 +476,7 @@ void Y2R_U::GetAlpha(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(conversion.alpha);
NGLOG_DEBUG(Service_Y2R, "called alpha={}", conversion.alpha);
LOG_DEBUG(Service_Y2R, "called alpha={}", conversion.alpha);
}
void Y2R_U::SetDitheringWeightParams(Kernel::HLERequestContext& ctx) {
@ -485,7 +485,7 @@ void Y2R_U::SetDitheringWeightParams(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_Y2R, "called");
LOG_DEBUG(Service_Y2R, "called");
}
void Y2R_U::GetDitheringWeightParams(Kernel::HLERequestContext& ctx) {
@ -495,7 +495,7 @@ void Y2R_U::GetDitheringWeightParams(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushRaw(dithering_weight_params);
NGLOG_DEBUG(Service_Y2R, "called");
LOG_DEBUG(Service_Y2R, "called");
}
void Y2R_U::StartConversion(Kernel::HLERequestContext& ctx) {
@ -514,7 +514,7 @@ void Y2R_U::StartConversion(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_Y2R, "called");
LOG_DEBUG(Service_Y2R, "called");
}
void Y2R_U::StopConversion(Kernel::HLERequestContext& ctx) {
@ -523,7 +523,7 @@ void Y2R_U::StopConversion(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_Y2R, "called");
LOG_DEBUG(Service_Y2R, "called");
}
void Y2R_U::IsBusyConversion(Kernel::HLERequestContext& ctx) {
@ -533,7 +533,7 @@ void Y2R_U::IsBusyConversion(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push<u8>(0); // StartConversion always finishes immediately
NGLOG_DEBUG(Service_Y2R, "called");
LOG_DEBUG(Service_Y2R, "called");
}
void Y2R_U::SetPackageParameter(Kernel::HLERequestContext& ctx) {
@ -567,13 +567,13 @@ cleanup:
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(result);
NGLOG_DEBUG(Service_Y2R,
"called input_format={} output_format={} rotation={} block_alignment={} "
"input_line_width={} input_lines={} standard_coefficient={} reserved={} alpha={:X}",
static_cast<u8>(params.input_format), static_cast<u8>(params.output_format),
static_cast<u8>(params.rotation), static_cast<u8>(params.block_alignment),
params.input_line_width, params.input_lines,
static_cast<u8>(params.standard_coefficient), params.padding, params.alpha);
LOG_DEBUG(Service_Y2R,
"called input_format={} output_format={} rotation={} block_alignment={} "
"input_line_width={} input_lines={} standard_coefficient={} reserved={} alpha={:X}",
static_cast<u8>(params.input_format), static_cast<u8>(params.output_format),
static_cast<u8>(params.rotation), static_cast<u8>(params.block_alignment),
params.input_line_width, params.input_lines,
static_cast<u8>(params.standard_coefficient), params.padding, params.alpha);
}
void Y2R_U::PingProcess(Kernel::HLERequestContext& ctx) {
@ -583,7 +583,7 @@ void Y2R_U::PingProcess(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push<u8>(0);
NGLOG_WARNING(Service_Y2R, "(STUBBED) called");
LOG_WARNING(Service_Y2R, "(STUBBED) called");
}
void Y2R_U::DriverInitialize(Kernel::HLERequestContext& ctx) {
@ -610,7 +610,7 @@ void Y2R_U::DriverInitialize(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_Y2R, "called");
LOG_DEBUG(Service_Y2R, "called");
}
void Y2R_U::DriverFinalize(Kernel::HLERequestContext& ctx) {
@ -619,7 +619,7 @@ void Y2R_U::DriverFinalize(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
NGLOG_DEBUG(Service_Y2R, "called");
LOG_DEBUG(Service_Y2R, "called");
}
void Y2R_U::GetPackageParameter(Kernel::HLERequestContext& ctx) {
@ -629,7 +629,7 @@ void Y2R_U::GetPackageParameter(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.PushRaw(conversion);
NGLOG_DEBUG(Service_Y2R, "called");
LOG_DEBUG(Service_Y2R, "called");
}
Y2R_U::Y2R_U() : ServiceFramework("y2r:u", 1) {