mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	log: replace all NGLOG with LOG
This commit is contained in:
		
							parent
							
								
									fde415968e
								
							
						
					
					
						commit
						7c5a76e58b
					
				
					 152 changed files with 1541 additions and 1541 deletions
				
			
		|  | @ -231,7 +231,7 @@ static unsigned int DPO(RotateRightByRegister)(ARMul_State* cpu, unsigned int sh | |||
| } | ||||
| 
 | ||||
| #define DEBUG_MSG                                                                                  \ | ||||
|     NGLOG_DEBUG(Core_ARM11, "inst is {:x}", inst);                                                 \ | ||||
|     LOG_DEBUG(Core_ARM11, "inst is {:x}", inst);                                                 \ | ||||
|     CITRA_IGNORE_EXIT(0) | ||||
| 
 | ||||
| #define LnSWoUB(s) glue(LnSWoUB, s) | ||||
|  | @ -770,7 +770,7 @@ static ThumbDecodeStatus DecodeThumbInstruction(u32 inst, u32 addr, u32* arm_ins | |||
|                 inst_index = table_length - 4; | ||||
|                 *ptr_inst_base = arm_instruction_trans[inst_index](tinstr, inst_index); | ||||
|             } else { | ||||
|                 NGLOG_ERROR(Core_ARM11, "thumb decoder error"); | ||||
|                 LOG_ERROR(Core_ARM11, "thumb decoder error"); | ||||
|             } | ||||
|             break; | ||||
|         case 28: | ||||
|  | @ -828,9 +828,9 @@ static unsigned int InterpreterTranslateInstruction(const ARMul_State* cpu, cons | |||
| 
 | ||||
|     int idx; | ||||
|     if (DecodeARMInstruction(inst, &idx) == ARMDecodeStatus::FAILURE) { | ||||
|         NGLOG_ERROR(Core_ARM11, "Decode failure.\tPC: [{:#010X}]\tInstruction: {:08X}", phys_addr, | ||||
|         LOG_ERROR(Core_ARM11, "Decode failure.\tPC: [{:#010X}]\tInstruction: {:08X}", phys_addr, | ||||
|                     inst); | ||||
|         NGLOG_ERROR(Core_ARM11, "cpsr={:#X}, cpu->TFlag={}, r15={:#010X}", cpu->Cpsr, cpu->TFlag, | ||||
|         LOG_ERROR(Core_ARM11, "cpsr={:#X}, cpu->TFlag={}, r15={:#010X}", cpu->Cpsr, cpu->TFlag, | ||||
|                     cpu->Reg[15]); | ||||
|         CITRA_IGNORE_EXIT(-1); | ||||
|     } | ||||
|  | @ -1802,7 +1802,7 @@ BIC_INST : { | |||
| BKPT_INST : { | ||||
|     if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { | ||||
|         bkpt_inst* const inst_cream = (bkpt_inst*)inst_base->component; | ||||
|         NGLOG_DEBUG(Core_ARM11, "Breakpoint instruction hit. Immediate: {:#010X}", inst_cream->imm); | ||||
|         LOG_DEBUG(Core_ARM11, "Breakpoint instruction hit. Immediate: {:#010X}", inst_cream->imm); | ||||
|     } | ||||
|     cpu->Reg[15] += cpu->GetInstructionSize(); | ||||
|     INC_PC(sizeof(bkpt_inst)); | ||||
|  | @ -2017,7 +2017,7 @@ EOR_INST : { | |||
| } | ||||
| LDC_INST : { | ||||
|     // Instruction not implemented
 | ||||
|     // NGLOG_CRITICAL(Core_ARM11, "unimplemented instruction");
 | ||||
|     // LOG_CRITICAL(Core_ARM11, "unimplemented instruction");
 | ||||
|     cpu->Reg[15] += cpu->GetInstructionSize(); | ||||
|     INC_PC(sizeof(ldc_inst)); | ||||
|     FETCH_INST; | ||||
|  | @ -2368,7 +2368,7 @@ MCRR_INST : { | |||
|     if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { | ||||
|         mcrr_inst* const inst_cream = (mcrr_inst*)inst_base->component; | ||||
| 
 | ||||
|         NGLOG_ERROR(Core_ARM11, | ||||
|         LOG_ERROR(Core_ARM11, | ||||
|                     "MCRR executed | Coprocessor: {}, CRm {}, opc1: {}, Rt: {}, Rt2: {}", | ||||
|                     inst_cream->cp_num, inst_cream->crm, inst_cream->opcode_1, inst_cream->rt, | ||||
|                     inst_cream->rt2); | ||||
|  | @ -2452,7 +2452,7 @@ MRRC_INST : { | |||
|     if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { | ||||
|         mcrr_inst* const inst_cream = (mcrr_inst*)inst_base->component; | ||||
| 
 | ||||
|         NGLOG_ERROR(Core_ARM11, | ||||
|         LOG_ERROR(Core_ARM11, | ||||
|                     "MRRC executed | Coprocessor: {}, CRm {}, opc1: {}, Rt: {}, Rt2: {}", | ||||
|                     inst_cream->cp_num, inst_cream->crm, inst_cream->opcode_1, inst_cream->rt, | ||||
|                     inst_cream->rt2); | ||||
|  | @ -3080,7 +3080,7 @@ SETEND_INST : { | |||
|     else | ||||
|         cpu->Cpsr &= ~(1 << 9); | ||||
| 
 | ||||
|     NGLOG_WARNING(Core_ARM11, "SETEND {} executed", big_endian ? "BE" : "LE"); | ||||
|     LOG_WARNING(Core_ARM11, "SETEND {} executed", big_endian ? "BE" : "LE"); | ||||
| 
 | ||||
|     cpu->Reg[15] += cpu->GetInstructionSize(); | ||||
|     INC_PC(sizeof(setend_inst)); | ||||
|  | @ -3091,7 +3091,7 @@ SETEND_INST : { | |||
| SEV_INST : { | ||||
|     // Stubbed, as SEV is a hint instruction.
 | ||||
|     if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { | ||||
|         NGLOG_TRACE(Core_ARM11, "SEV executed."); | ||||
|         LOG_TRACE(Core_ARM11, "SEV executed."); | ||||
|     } | ||||
| 
 | ||||
|     cpu->Reg[15] += cpu->GetInstructionSize(); | ||||
|  | @ -3541,7 +3541,7 @@ SSAT16_INST : { | |||
| 
 | ||||
| STC_INST : { | ||||
|     // Instruction not implemented
 | ||||
|     // NGLOG_CRITICAL(Core_ARM11, "unimplemented instruction");
 | ||||
|     // LOG_CRITICAL(Core_ARM11, "unimplemented instruction");
 | ||||
|     cpu->Reg[15] += cpu->GetInstructionSize(); | ||||
|     INC_PC(sizeof(stc_inst)); | ||||
|     FETCH_INST; | ||||
|  | @ -4537,7 +4537,7 @@ UXTB16_INST : { | |||
| WFE_INST : { | ||||
|     // Stubbed, as WFE is a hint instruction.
 | ||||
|     if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { | ||||
|         NGLOG_TRACE(Core_ARM11, "WFE executed."); | ||||
|         LOG_TRACE(Core_ARM11, "WFE executed."); | ||||
|     } | ||||
| 
 | ||||
|     cpu->Reg[15] += cpu->GetInstructionSize(); | ||||
|  | @ -4549,7 +4549,7 @@ WFE_INST : { | |||
| WFI_INST : { | ||||
|     // Stubbed, as WFI is a hint instruction.
 | ||||
|     if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { | ||||
|         NGLOG_TRACE(Core_ARM11, "WFI executed."); | ||||
|         LOG_TRACE(Core_ARM11, "WFI executed."); | ||||
|     } | ||||
| 
 | ||||
|     cpu->Reg[15] += cpu->GetInstructionSize(); | ||||
|  | @ -4561,7 +4561,7 @@ WFI_INST : { | |||
| YIELD_INST : { | ||||
|     // Stubbed, as YIELD is a hint instruction.
 | ||||
|     if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { | ||||
|         NGLOG_TRACE(Core_ARM11, "YIELD executed."); | ||||
|         LOG_TRACE(Core_ARM11, "YIELD executed."); | ||||
|     } | ||||
| 
 | ||||
|     cpu->Reg[15] += cpu->GetInstructionSize(); | ||||
|  |  | |||
|  | @ -184,7 +184,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(cdp)(unsigned int inst, int index) { | |||
|     inst_cream->opcode_1 = BITS(inst, 20, 23); | ||||
|     inst_cream->inst = inst; | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "inst {:x} index {:x}", inst, index); | ||||
|     LOG_TRACE(Core_ARM11, "inst {:x} index {:x}", inst, index); | ||||
|     return inst_base; | ||||
| } | ||||
| static ARM_INST_PTR INTERPRETER_TRANSLATE(clrex)(unsigned int inst, int index) { | ||||
|  |  | |||
|  | @ -183,7 +183,7 @@ void ARMul_State::ResetMPCoreCP15Registers() { | |||
| 
 | ||||
| static void CheckMemoryBreakpoint(u32 address, GDBStub::BreakpointType type) { | ||||
|     if (GDBStub::IsServerEnabled() && GDBStub::CheckBreakpoint(address, type)) { | ||||
|         NGLOG_DEBUG(Debug, "Found memory breakpoint @ {:08x}", address); | ||||
|         LOG_DEBUG(Debug, "Found memory breakpoint @ {:08x}", address); | ||||
|         GDBStub::Break(true); | ||||
|     } | ||||
| } | ||||
|  | @ -428,7 +428,7 @@ u32 ARMul_State::ReadCP15Register(u32 crn, u32 opcode_1, u32 crm, u32 opcode_2) | |||
|         } | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_ERROR(Core_ARM11, "MRC CRn={}, CRm={}, OP1={} OP2={} is not implemented. Returning zero.", | ||||
|     LOG_ERROR(Core_ARM11, "MRC CRn={}, CRm={}, OP1={} OP2={} is not implemented. Returning zero.", | ||||
|                 crn, crm, opcode_1, opcode_2); | ||||
|     return 0; | ||||
| } | ||||
|  |  | |||
|  | @ -90,23 +90,23 @@ void VMOVR(ARMul_State* state, u32 single, u32 d, u32 m) { | |||
| 
 | ||||
| /* Miscellaneous functions */ | ||||
| s32 vfp_get_float(ARMul_State* state, unsigned int reg) { | ||||
|     NGLOG_TRACE(Core_ARM11, "VFP get float: s{}=[{:08x}]", reg, state->ExtReg[reg]); | ||||
|     LOG_TRACE(Core_ARM11, "VFP get float: s{}=[{:08x}]", reg, state->ExtReg[reg]); | ||||
|     return state->ExtReg[reg]; | ||||
| } | ||||
| 
 | ||||
| void vfp_put_float(ARMul_State* state, s32 val, unsigned int reg) { | ||||
|     NGLOG_TRACE(Core_ARM11, "VFP put float: s{} <= [{:08x}]", reg, val); | ||||
|     LOG_TRACE(Core_ARM11, "VFP put float: s{} <= [{:08x}]", reg, val); | ||||
|     state->ExtReg[reg] = val; | ||||
| } | ||||
| 
 | ||||
| u64 vfp_get_double(ARMul_State* state, unsigned int reg) { | ||||
|     u64 result = ((u64)state->ExtReg[reg * 2 + 1]) << 32 | state->ExtReg[reg * 2]; | ||||
|     NGLOG_TRACE(Core_ARM11, "VFP get double: s[{}-{}]=[{:016llx}]", reg * 2 + 1, reg * 2, result); | ||||
|     LOG_TRACE(Core_ARM11, "VFP get double: s[{}-{}]=[{:016llx}]", reg * 2 + 1, reg * 2, result); | ||||
|     return result; | ||||
| } | ||||
| 
 | ||||
| void vfp_put_double(ARMul_State* state, u64 val, unsigned int reg) { | ||||
|     NGLOG_TRACE(Core_ARM11, "VFP put double: s[{}-{}] <= [{:08x}-{:08x}]", reg * 2 + 1, reg * 2, | ||||
|     LOG_TRACE(Core_ARM11, "VFP put double: s[{}-{}] <= [{:08x}-{:08x}]", reg * 2 + 1, reg * 2, | ||||
|                 (u32)(val >> 32), (u32)(val & 0xffffffff)); | ||||
|     state->ExtReg[reg * 2] = (u32)(val & 0xffffffff); | ||||
|     state->ExtReg[reg * 2 + 1] = (u32)(val >> 32); | ||||
|  | @ -116,10 +116,10 @@ void vfp_put_double(ARMul_State* state, u64 val, unsigned int reg) { | |||
|  * Process bitmask of exception conditions. (from vfpmodule.c) | ||||
|  */ | ||||
| void vfp_raise_exceptions(ARMul_State* state, u32 exceptions, u32 inst, u32 fpscr) { | ||||
|     NGLOG_TRACE(Core_ARM11, "VFP: raising exceptions {:08x}", exceptions); | ||||
|     LOG_TRACE(Core_ARM11, "VFP: raising exceptions {:08x}", exceptions); | ||||
| 
 | ||||
|     if (exceptions == VFP_EXCEPTION_ERROR) { | ||||
|         NGLOG_CRITICAL(Core_ARM11, "unhandled bounce {:x}", inst); | ||||
|         LOG_CRITICAL(Core_ARM11, "unhandled bounce {:x}", inst); | ||||
|         Crash(); | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -22,7 +22,7 @@ | |||
| 
 | ||||
| #include "core/arm/skyeye_common/vfp/vfp_helper.h" /* for references to cdp SoftFloat functions */ | ||||
| 
 | ||||
| #define VFP_DEBUG_UNTESTED(x) NGLOG_TRACE(Core_ARM11, "in func {}, " #x " untested", __FUNCTION__); | ||||
| #define VFP_DEBUG_UNTESTED(x) LOG_TRACE(Core_ARM11, "in func {}, " #x " untested", __FUNCTION__); | ||||
| #define CHECK_VFP_ENABLED | ||||
| #define CHECK_VFP_CDP_RET vfp_raise_exceptions(cpu, ret, inst_cream->instr, cpu->VFP[VFP_FPSCR]); | ||||
| 
 | ||||
|  |  | |||
|  | @ -64,7 +64,7 @@ static struct vfp_double vfp_double_default_qnan = { | |||
| }; | ||||
| 
 | ||||
| static void vfp_double_dump(const char* str, struct vfp_double* d) { | ||||
|     NGLOG_TRACE(Core_ARM11, "VFP: {}: sign={} exponent={} significand={:016llx}", str, d->sign != 0, | ||||
|     LOG_TRACE(Core_ARM11, "VFP: {}: sign={} exponent={} significand={:016llx}", str, d->sign != 0, | ||||
|                 d->exponent, d->significand); | ||||
| } | ||||
| 
 | ||||
|  | @ -166,7 +166,7 @@ u32 vfp_double_normaliseround(ARMul_State* state, int dd, struct vfp_double* vd, | |||
|     } else if ((rmode == FPSCR_ROUND_PLUSINF) ^ (vd->sign != 0)) | ||||
|         incr = (1ULL << (VFP_DOUBLE_LOW_BITS + 1)) - 1; | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "VFP: rounding increment = 0x{:08llx}", incr); | ||||
|     LOG_TRACE(Core_ARM11, "VFP: rounding increment = 0x{:08llx}", incr); | ||||
| 
 | ||||
|     /*
 | ||||
|      * Is our rounding going to overflow? | ||||
|  | @ -221,7 +221,7 @@ pack: | |||
|     vfp_double_dump("pack: final", vd); | ||||
|     { | ||||
|         s64 d = vfp_double_pack(vd); | ||||
|         NGLOG_TRACE(Core_ARM11, "VFP: {}: d(d{})={:016llx} exceptions={:08x}", func, dd, d, | ||||
|         LOG_TRACE(Core_ARM11, "VFP: {}: d(d{})={:016llx} exceptions={:08x}", func, dd, d, | ||||
|                     exceptions); | ||||
|         vfp_put_double(state, d, dd); | ||||
|     } | ||||
|  | @ -275,25 +275,25 @@ static u32 vfp_propagate_nan(struct vfp_double* vdd, struct vfp_double* vdn, str | |||
|  * Extended operations | ||||
|  */ | ||||
| static u32 vfp_double_fabs(ARMul_State* state, int dd, int unused, int dm, u32 fpscr) { | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     vfp_put_double(state, vfp_double_packed_abs(vfp_get_double(state, dm)), dd); | ||||
|     return 0; | ||||
| } | ||||
| 
 | ||||
| static u32 vfp_double_fcpy(ARMul_State* state, int dd, int unused, int dm, u32 fpscr) { | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     vfp_put_double(state, vfp_get_double(state, dm), dd); | ||||
|     return 0; | ||||
| } | ||||
| 
 | ||||
| static u32 vfp_double_fneg(ARMul_State* state, int dd, int unused, int dm, u32 fpscr) { | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     vfp_put_double(state, vfp_double_packed_negate(vfp_get_double(state, dm)), dd); | ||||
|     return 0; | ||||
| } | ||||
| 
 | ||||
| static u32 vfp_double_fsqrt(ARMul_State* state, int dd, int unused, int dm, u32 fpscr) { | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     vfp_double vdm, vdd, *vdp; | ||||
|     int ret, tm; | ||||
|     u32 exceptions = 0; | ||||
|  | @ -390,7 +390,7 @@ static u32 vfp_compare(ARMul_State* state, int dd, int signal_on_qnan, s64 m, u3 | |||
|     s64 d; | ||||
|     u32 ret = 0; | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}, state=0x{}, fpscr=0x{:x}", __FUNCTION__, fmt::ptr(state), | ||||
|     LOG_TRACE(Core_ARM11, "In {}, state=0x{}, fpscr=0x{:x}", __FUNCTION__, fmt::ptr(state), | ||||
|                 fpscr); | ||||
|     if (vfp_double_packed_exponent(m) == 2047 && vfp_double_packed_mantissa(m)) { | ||||
|         ret |= FPSCR_CFLAG | FPSCR_VFLAG; | ||||
|  | @ -447,28 +447,28 @@ static u32 vfp_compare(ARMul_State* state, int dd, int signal_on_qnan, s64 m, u3 | |||
|             ret |= FPSCR_CFLAG; | ||||
|         } | ||||
|     } | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}, state=0x{}, ret=0x{:x}", __FUNCTION__, fmt::ptr(state), ret); | ||||
|     LOG_TRACE(Core_ARM11, "In {}, state=0x{}, ret=0x{:x}", __FUNCTION__, fmt::ptr(state), ret); | ||||
| 
 | ||||
|     return ret; | ||||
| } | ||||
| 
 | ||||
| static u32 vfp_double_fcmp(ARMul_State* state, int dd, int unused, int dm, u32 fpscr) { | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     return vfp_compare(state, dd, 0, vfp_get_double(state, dm), fpscr); | ||||
| } | ||||
| 
 | ||||
| static u32 vfp_double_fcmpe(ARMul_State* state, int dd, int unused, int dm, u32 fpscr) { | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     return vfp_compare(state, dd, 1, vfp_get_double(state, dm), fpscr); | ||||
| } | ||||
| 
 | ||||
| static u32 vfp_double_fcmpz(ARMul_State* state, int dd, int unused, int dm, u32 fpscr) { | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     return vfp_compare(state, dd, 0, 0, fpscr); | ||||
| } | ||||
| 
 | ||||
| static u32 vfp_double_fcmpez(ARMul_State* state, int dd, int unused, int dm, u32 fpscr) { | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     return vfp_compare(state, dd, 1, 0, fpscr); | ||||
| } | ||||
| 
 | ||||
|  | @ -478,7 +478,7 @@ static u32 vfp_double_fcvts(ARMul_State* state, int sd, int unused, int dm, u32 | |||
|     int tm; | ||||
|     u32 exceptions = 0; | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     exceptions |= vfp_double_unpack(&vdm, vfp_get_double(state, dm), fpscr); | ||||
| 
 | ||||
|     tm = vfp_double_type(&vdm); | ||||
|  | @ -519,7 +519,7 @@ static u32 vfp_double_fuito(ARMul_State* state, int dd, int unused, int dm, u32 | |||
|     struct vfp_double vdm; | ||||
|     u32 m = vfp_get_float(state, dm); | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     vdm.sign = 0; | ||||
|     vdm.exponent = 1023 + 63 - 1; | ||||
|     vdm.significand = (u64)m; | ||||
|  | @ -531,7 +531,7 @@ static u32 vfp_double_fsito(ARMul_State* state, int dd, int unused, int dm, u32 | |||
|     struct vfp_double vdm; | ||||
|     u32 m = vfp_get_float(state, dm); | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     vdm.sign = (m & 0x80000000) >> 16; | ||||
|     vdm.exponent = 1023 + 63 - 1; | ||||
|     vdm.significand = vdm.sign ? (~m + 1) : m; | ||||
|  | @ -545,7 +545,7 @@ static u32 vfp_double_ftoui(ARMul_State* state, int sd, int unused, int dm, u32 | |||
|     int rmode = fpscr & FPSCR_RMODE_MASK; | ||||
|     int tm; | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     exceptions |= vfp_double_unpack(&vdm, vfp_get_double(state, dm), fpscr); | ||||
| 
 | ||||
|     /*
 | ||||
|  | @ -614,7 +614,7 @@ static u32 vfp_double_ftoui(ARMul_State* state, int sd, int unused, int dm, u32 | |||
|         } | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "VFP: ftoui: d(s{})={:08x} exceptions={:08x}", sd, d, exceptions); | ||||
|     LOG_TRACE(Core_ARM11, "VFP: ftoui: d(s{})={:08x} exceptions={:08x}", sd, d, exceptions); | ||||
| 
 | ||||
|     vfp_put_float(state, d, sd); | ||||
| 
 | ||||
|  | @ -622,7 +622,7 @@ static u32 vfp_double_ftoui(ARMul_State* state, int sd, int unused, int dm, u32 | |||
| } | ||||
| 
 | ||||
| static u32 vfp_double_ftouiz(ARMul_State* state, int sd, int unused, int dm, u32 fpscr) { | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     return vfp_double_ftoui(state, sd, unused, dm, | ||||
|                             (fpscr & ~FPSCR_RMODE_MASK) | FPSCR_ROUND_TOZERO); | ||||
| } | ||||
|  | @ -633,7 +633,7 @@ static u32 vfp_double_ftosi(ARMul_State* state, int sd, int unused, int dm, u32 | |||
|     int rmode = fpscr & FPSCR_RMODE_MASK; | ||||
|     int tm; | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     exceptions |= vfp_double_unpack(&vdm, vfp_get_double(state, dm), fpscr); | ||||
|     vfp_double_dump("VDM", &vdm); | ||||
| 
 | ||||
|  | @ -697,7 +697,7 @@ static u32 vfp_double_ftosi(ARMul_State* state, int sd, int unused, int dm, u32 | |||
|         } | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "VFP: ftosi: d(s{})={:08x} exceptions={:08x}", sd, d, exceptions); | ||||
|     LOG_TRACE(Core_ARM11, "VFP: ftosi: d(s{})={:08x} exceptions={:08x}", sd, d, exceptions); | ||||
| 
 | ||||
|     vfp_put_float(state, (s32)d, sd); | ||||
| 
 | ||||
|  | @ -705,7 +705,7 @@ static u32 vfp_double_ftosi(ARMul_State* state, int sd, int unused, int dm, u32 | |||
| } | ||||
| 
 | ||||
| static u32 vfp_double_ftosiz(ARMul_State* state, int dd, int unused, int dm, u32 fpscr) { | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     return vfp_double_ftosi(state, dd, unused, dm, | ||||
|                             (fpscr & ~FPSCR_RMODE_MASK) | FPSCR_ROUND_TOZERO); | ||||
| } | ||||
|  | @ -787,7 +787,7 @@ u32 vfp_double_add(struct vfp_double* vdd, struct vfp_double* vdn, struct vfp_do | |||
|     u64 m_sig; | ||||
| 
 | ||||
|     if (vdn->significand & (1ULL << 63) || vdm->significand & (1ULL << 63)) { | ||||
|         NGLOG_INFO(Core_ARM11, "VFP: bad FP values in {}", __func__); | ||||
|         LOG_INFO(Core_ARM11, "VFP: bad FP values in {}", __func__); | ||||
|         vfp_double_dump("VDN", vdn); | ||||
|         vfp_double_dump("VDM", vdm); | ||||
|     } | ||||
|  | @ -852,7 +852,7 @@ u32 vfp_double_multiply(struct vfp_double* vdd, struct vfp_double* vdn, struct v | |||
|      */ | ||||
|     if (vdn->exponent < vdm->exponent) { | ||||
|         std::swap(vdm, vdn); | ||||
|         NGLOG_TRACE(Core_ARM11, "VFP: swapping M <-> N"); | ||||
|         LOG_TRACE(Core_ARM11, "VFP: swapping M <-> N"); | ||||
|     } | ||||
| 
 | ||||
|     vdd->sign = vdn->sign ^ vdm->sign; | ||||
|  | @ -934,7 +934,7 @@ static u32 vfp_double_multiply_accumulate(ARMul_State* state, int dd, int dn, in | |||
|  * sd = sd + (sn * sm) | ||||
|  */ | ||||
| static u32 vfp_double_fmac(ARMul_State* state, int dd, int dn, int dm, u32 fpscr) { | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     return vfp_double_multiply_accumulate(state, dd, dn, dm, fpscr, 0, "fmac"); | ||||
| } | ||||
| 
 | ||||
|  | @ -942,7 +942,7 @@ static u32 vfp_double_fmac(ARMul_State* state, int dd, int dn, int dm, u32 fpscr | |||
|  * sd = sd - (sn * sm) | ||||
|  */ | ||||
| static u32 vfp_double_fnmac(ARMul_State* state, int dd, int dn, int dm, u32 fpscr) { | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     return vfp_double_multiply_accumulate(state, dd, dn, dm, fpscr, NEG_MULTIPLY, "fnmac"); | ||||
| } | ||||
| 
 | ||||
|  | @ -950,7 +950,7 @@ static u32 vfp_double_fnmac(ARMul_State* state, int dd, int dn, int dm, u32 fpsc | |||
|  * sd = -sd + (sn * sm) | ||||
|  */ | ||||
| static u32 vfp_double_fmsc(ARMul_State* state, int dd, int dn, int dm, u32 fpscr) { | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     return vfp_double_multiply_accumulate(state, dd, dn, dm, fpscr, NEG_SUBTRACT, "fmsc"); | ||||
| } | ||||
| 
 | ||||
|  | @ -958,7 +958,7 @@ static u32 vfp_double_fmsc(ARMul_State* state, int dd, int dn, int dm, u32 fpscr | |||
|  * sd = -sd - (sn * sm) | ||||
|  */ | ||||
| static u32 vfp_double_fnmsc(ARMul_State* state, int dd, int dn, int dm, u32 fpscr) { | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     return vfp_double_multiply_accumulate(state, dd, dn, dm, fpscr, NEG_SUBTRACT | NEG_MULTIPLY, | ||||
|                                           "fnmsc"); | ||||
| } | ||||
|  | @ -970,7 +970,7 @@ static u32 vfp_double_fmul(ARMul_State* state, int dd, int dn, int dm, u32 fpscr | |||
|     struct vfp_double vdd, vdn, vdm; | ||||
|     u32 exceptions = 0; | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     exceptions |= vfp_double_unpack(&vdn, vfp_get_double(state, dn), fpscr); | ||||
|     if (vdn.exponent == 0 && vdn.significand) | ||||
|         vfp_double_normalise_denormal(&vdn); | ||||
|  | @ -990,7 +990,7 @@ static u32 vfp_double_fnmul(ARMul_State* state, int dd, int dn, int dm, u32 fpsc | |||
|     struct vfp_double vdd, vdn, vdm; | ||||
|     u32 exceptions = 0; | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     exceptions |= vfp_double_unpack(&vdn, vfp_get_double(state, dn), fpscr); | ||||
|     if (vdn.exponent == 0 && vdn.significand) | ||||
|         vfp_double_normalise_denormal(&vdn); | ||||
|  | @ -1012,7 +1012,7 @@ static u32 vfp_double_fadd(ARMul_State* state, int dd, int dn, int dm, u32 fpscr | |||
|     struct vfp_double vdd, vdn, vdm; | ||||
|     u32 exceptions = 0; | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     exceptions |= vfp_double_unpack(&vdn, vfp_get_double(state, dn), fpscr); | ||||
|     if (vdn.exponent == 0 && vdn.significand) | ||||
|         vfp_double_normalise_denormal(&vdn); | ||||
|  | @ -1033,7 +1033,7 @@ static u32 vfp_double_fsub(ARMul_State* state, int dd, int dn, int dm, u32 fpscr | |||
|     struct vfp_double vdd, vdn, vdm; | ||||
|     u32 exceptions = 0; | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     exceptions |= vfp_double_unpack(&vdn, vfp_get_double(state, dn), fpscr); | ||||
|     if (vdn.exponent == 0 && vdn.significand) | ||||
|         vfp_double_normalise_denormal(&vdn); | ||||
|  | @ -1060,7 +1060,7 @@ static u32 vfp_double_fdiv(ARMul_State* state, int dd, int dn, int dm, u32 fpscr | |||
|     u32 exceptions = 0; | ||||
|     int tm, tn; | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     exceptions |= vfp_double_unpack(&vdn, vfp_get_double(state, dn), fpscr); | ||||
|     exceptions |= vfp_double_unpack(&vdm, vfp_get_double(state, dm), fpscr); | ||||
| 
 | ||||
|  | @ -1178,7 +1178,7 @@ u32 vfp_double_cpdo(ARMul_State* state, u32 inst, u32 fpscr) { | |||
|     unsigned int vecitr, veclen, vecstride; | ||||
|     struct op* fop; | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     LOG_TRACE(Core_ARM11, "In {}", __FUNCTION__); | ||||
|     vecstride = (1 + ((fpscr & FPSCR_STRIDE_MASK) == FPSCR_STRIDE_MASK)); | ||||
| 
 | ||||
|     fop = (op == FOP_EXT) ? &fops_ext[FEXT_TO_IDX(inst)] : &fops[FOP_TO_IDX(op)]; | ||||
|  | @ -1209,11 +1209,11 @@ u32 vfp_double_cpdo(ARMul_State* state, u32 inst, u32 fpscr) { | |||
|     else | ||||
|         veclen = fpscr & FPSCR_LENGTH_MASK; | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "VFP: vecstride={} veclen={}", vecstride, | ||||
|     LOG_TRACE(Core_ARM11, "VFP: vecstride={} veclen={}", vecstride, | ||||
|                 (veclen >> FPSCR_LENGTH_BIT) + 1); | ||||
| 
 | ||||
|     if (!fop->fn) { | ||||
|         NGLOG_TRACE(Core_ARM11, "VFP: could not find double op {}", FEXT_TO_IDX(inst)); | ||||
|         LOG_TRACE(Core_ARM11, "VFP: could not find double op {}", FEXT_TO_IDX(inst)); | ||||
|         goto invalid; | ||||
|     } | ||||
| 
 | ||||
|  | @ -1223,14 +1223,14 @@ u32 vfp_double_cpdo(ARMul_State* state, u32 inst, u32 fpscr) { | |||
| 
 | ||||
|         type = (fop->flags & OP_SD) ? 's' : 'd'; | ||||
|         if (op == FOP_EXT) | ||||
|             NGLOG_TRACE(Core_ARM11, "VFP: itr{} ({}{}) = op[{}] (d{})", vecitr >> FPSCR_LENGTH_BIT, | ||||
|             LOG_TRACE(Core_ARM11, "VFP: itr{} ({}{}) = op[{}] (d{})", vecitr >> FPSCR_LENGTH_BIT, | ||||
|                         type, dest, dn, dm); | ||||
|         else | ||||
|             NGLOG_TRACE(Core_ARM11, "VFP: itr{} ({}{}) = (d{}) op[{}] (d{})", | ||||
|             LOG_TRACE(Core_ARM11, "VFP: itr{} ({}{}) = (d{}) op[{}] (d{})", | ||||
|                         vecitr >> FPSCR_LENGTH_BIT, type, dest, dn, FOP_TO_IDX(op), dm); | ||||
| 
 | ||||
|         except = fop->fn(state, dest, dn, dm, fpscr); | ||||
|         NGLOG_TRACE(Core_ARM11, "VFP: itr{}: exceptions={:08x}", vecitr >> FPSCR_LENGTH_BIT, | ||||
|         LOG_TRACE(Core_ARM11, "VFP: itr{}: exceptions={:08x}", vecitr >> FPSCR_LENGTH_BIT, | ||||
|                     except); | ||||
| 
 | ||||
|         exceptions |= except & ~VFP_NAN_FLAG; | ||||
|  |  | |||
|  | @ -66,7 +66,7 @@ static struct vfp_single vfp_single_default_qnan = { | |||
| }; | ||||
| 
 | ||||
| static void vfp_single_dump(const char* str, struct vfp_single* s) { | ||||
|     NGLOG_TRACE(Core_ARM11, "{}: sign={} exponent={} significand={:08x}", str, s->sign != 0, | ||||
|     LOG_TRACE(Core_ARM11, "{}: sign={} exponent={} significand={:08x}", str, s->sign != 0, | ||||
|                 s->exponent, s->significand); | ||||
| } | ||||
| 
 | ||||
|  | @ -168,7 +168,7 @@ u32 vfp_single_normaliseround(ARMul_State* state, int sd, struct vfp_single* vs, | |||
|     } else if ((rmode == FPSCR_ROUND_PLUSINF) ^ (vs->sign != 0)) | ||||
|         incr = (1 << (VFP_SINGLE_LOW_BITS + 1)) - 1; | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "rounding increment = 0x{:08x}", incr); | ||||
|     LOG_TRACE(Core_ARM11, "rounding increment = 0x{:08x}", incr); | ||||
| 
 | ||||
|     /*
 | ||||
|      * Is our rounding going to overflow? | ||||
|  | @ -223,7 +223,7 @@ pack: | |||
|     vfp_single_dump("pack: final", vs); | ||||
|     { | ||||
|         s32 d = vfp_single_pack(vs); | ||||
|         NGLOG_TRACE(Core_ARM11, "{}: d(s{})={:08x} exceptions={:08x}", func, sd, d, exceptions); | ||||
|         LOG_TRACE(Core_ARM11, "{}: d(s{})={:08x} exceptions={:08x}", func, sd, d, exceptions); | ||||
|         vfp_put_float(state, d, sd); | ||||
|     } | ||||
| 
 | ||||
|  | @ -306,7 +306,7 @@ u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand) { | |||
|     u32 z, a; | ||||
| 
 | ||||
|     if ((significand & 0xc0000000) != 0x40000000) { | ||||
|         NGLOG_TRACE(Core_ARM11, "invalid significand"); | ||||
|         LOG_TRACE(Core_ARM11, "invalid significand"); | ||||
|     } | ||||
| 
 | ||||
|     a = significand << 1; | ||||
|  | @ -396,7 +396,7 @@ static u32 vfp_single_fsqrt(ARMul_State* state, int sd, int unused, s32 m, u32 f | |||
|             term = (u64)vsd.significand * vsd.significand; | ||||
|             rem = ((u64)vsm.significand << 32) - term; | ||||
| 
 | ||||
|             NGLOG_TRACE(Core_ARM11, "term={} rem={}", term, rem); | ||||
|             LOG_TRACE(Core_ARM11, "term={} rem={}", term, rem); | ||||
| 
 | ||||
|             while (rem < 0) { | ||||
|                 vsd.significand -= 1; | ||||
|  | @ -635,7 +635,7 @@ static u32 vfp_single_ftoui(ARMul_State* state, int sd, int unused, s32 m, u32 f | |||
|         } | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "ftoui: d(s{})={:08x} exceptions={:08x}", sd, d, exceptions); | ||||
|     LOG_TRACE(Core_ARM11, "ftoui: d(s{})={:08x} exceptions={:08x}", sd, d, exceptions); | ||||
| 
 | ||||
|     vfp_put_float(state, d, sd); | ||||
| 
 | ||||
|  | @ -716,7 +716,7 @@ static u32 vfp_single_ftosi(ARMul_State* state, int sd, int unused, s32 m, u32 f | |||
|         } | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "ftosi: d(s{})={:08x} exceptions={:08x}", sd, d, exceptions); | ||||
|     LOG_TRACE(Core_ARM11, "ftosi: d(s{})={:08x} exceptions={:08x}", sd, d, exceptions); | ||||
| 
 | ||||
|     vfp_put_float(state, (s32)d, sd); | ||||
| 
 | ||||
|  | @ -803,7 +803,7 @@ static u32 vfp_single_add(struct vfp_single* vsd, struct vfp_single* vsn, struct | |||
|     u32 exp_diff, m_sig; | ||||
| 
 | ||||
|     if (vsn->significand & 0x80000000 || vsm->significand & 0x80000000) { | ||||
|         NGLOG_WARNING(Core_ARM11, "bad FP values"); | ||||
|         LOG_WARNING(Core_ARM11, "bad FP values"); | ||||
|         vfp_single_dump("VSN", vsn); | ||||
|         vfp_single_dump("VSM", vsm); | ||||
|     } | ||||
|  | @ -868,7 +868,7 @@ static u32 vfp_single_multiply(struct vfp_single* vsd, struct vfp_single* vsn, | |||
|      */ | ||||
|     if (vsn->exponent < vsm->exponent) { | ||||
|         std::swap(vsm, vsn); | ||||
|         NGLOG_TRACE(Core_ARM11, "swapping M <-> N"); | ||||
|         LOG_TRACE(Core_ARM11, "swapping M <-> N"); | ||||
|     } | ||||
| 
 | ||||
|     vsd->sign = vsn->sign ^ vsm->sign; | ||||
|  | @ -920,7 +920,7 @@ static u32 vfp_single_multiply_accumulate(ARMul_State* state, int sd, int sn, s3 | |||
|     s32 v; | ||||
| 
 | ||||
|     v = vfp_get_float(state, sn); | ||||
|     NGLOG_TRACE(Core_ARM11, "s{} = {:08x}", sn, v); | ||||
|     LOG_TRACE(Core_ARM11, "s{} = {:08x}", sn, v); | ||||
|     exceptions |= vfp_single_unpack(&vsn, v, fpscr); | ||||
|     if (vsn.exponent == 0 && vsn.significand) | ||||
|         vfp_single_normalise_denormal(&vsn); | ||||
|  | @ -935,7 +935,7 @@ static u32 vfp_single_multiply_accumulate(ARMul_State* state, int sd, int sn, s3 | |||
|         vsp.sign = vfp_sign_negate(vsp.sign); | ||||
| 
 | ||||
|     v = vfp_get_float(state, sd); | ||||
|     NGLOG_TRACE(Core_ARM11, "s{} = {:08x}", sd, v); | ||||
|     LOG_TRACE(Core_ARM11, "s{} = {:08x}", sd, v); | ||||
|     exceptions |= vfp_single_unpack(&vsn, v, fpscr); | ||||
|     if (vsn.exponent == 0 && vsn.significand != 0) | ||||
|         vfp_single_normalise_denormal(&vsn); | ||||
|  | @ -956,7 +956,7 @@ static u32 vfp_single_multiply_accumulate(ARMul_State* state, int sd, int sn, s3 | |||
|  * sd = sd + (sn * sm) | ||||
|  */ | ||||
| static u32 vfp_single_fmac(ARMul_State* state, int sd, int sn, s32 m, u32 fpscr) { | ||||
|     NGLOG_TRACE(Core_ARM11, "s{} = {:08x}", sn, sd); | ||||
|     LOG_TRACE(Core_ARM11, "s{} = {:08x}", sn, sd); | ||||
|     return vfp_single_multiply_accumulate(state, sd, sn, m, fpscr, 0, "fmac"); | ||||
| } | ||||
| 
 | ||||
|  | @ -965,7 +965,7 @@ static u32 vfp_single_fmac(ARMul_State* state, int sd, int sn, s32 m, u32 fpscr) | |||
|  */ | ||||
| static u32 vfp_single_fnmac(ARMul_State* state, int sd, int sn, s32 m, u32 fpscr) { | ||||
|     // TODO: this one has its arguments inverted, investigate.
 | ||||
|     NGLOG_TRACE(Core_ARM11, "s{} = {:08x}", sd, sn); | ||||
|     LOG_TRACE(Core_ARM11, "s{} = {:08x}", sd, sn); | ||||
|     return vfp_single_multiply_accumulate(state, sd, sn, m, fpscr, NEG_MULTIPLY, "fnmac"); | ||||
| } | ||||
| 
 | ||||
|  | @ -973,7 +973,7 @@ static u32 vfp_single_fnmac(ARMul_State* state, int sd, int sn, s32 m, u32 fpscr | |||
|  * sd = -sd + (sn * sm) | ||||
|  */ | ||||
| static u32 vfp_single_fmsc(ARMul_State* state, int sd, int sn, s32 m, u32 fpscr) { | ||||
|     NGLOG_TRACE(Core_ARM11, "s{} = {:08x}", sn, sd); | ||||
|     LOG_TRACE(Core_ARM11, "s{} = {:08x}", sn, sd); | ||||
|     return vfp_single_multiply_accumulate(state, sd, sn, m, fpscr, NEG_SUBTRACT, "fmsc"); | ||||
| } | ||||
| 
 | ||||
|  | @ -981,7 +981,7 @@ static u32 vfp_single_fmsc(ARMul_State* state, int sd, int sn, s32 m, u32 fpscr) | |||
|  * sd = -sd - (sn * sm) | ||||
|  */ | ||||
| static u32 vfp_single_fnmsc(ARMul_State* state, int sd, int sn, s32 m, u32 fpscr) { | ||||
|     NGLOG_TRACE(Core_ARM11, "s{} = {:08x}", sn, sd); | ||||
|     LOG_TRACE(Core_ARM11, "s{} = {:08x}", sn, sd); | ||||
|     return vfp_single_multiply_accumulate(state, sd, sn, m, fpscr, NEG_SUBTRACT | NEG_MULTIPLY, | ||||
|                                           "fnmsc"); | ||||
| } | ||||
|  | @ -994,7 +994,7 @@ static u32 vfp_single_fmul(ARMul_State* state, int sd, int sn, s32 m, u32 fpscr) | |||
|     u32 exceptions = 0; | ||||
|     s32 n = vfp_get_float(state, sn); | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "s{} = {:08x}", sn, n); | ||||
|     LOG_TRACE(Core_ARM11, "s{} = {:08x}", sn, n); | ||||
| 
 | ||||
|     exceptions |= vfp_single_unpack(&vsn, n, fpscr); | ||||
|     if (vsn.exponent == 0 && vsn.significand) | ||||
|  | @ -1016,7 +1016,7 @@ static u32 vfp_single_fnmul(ARMul_State* state, int sd, int sn, s32 m, u32 fpscr | |||
|     u32 exceptions = 0; | ||||
|     s32 n = vfp_get_float(state, sn); | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "s{} = {:08x}", sn, n); | ||||
|     LOG_TRACE(Core_ARM11, "s{} = {:08x}", sn, n); | ||||
| 
 | ||||
|     exceptions |= vfp_single_unpack(&vsn, n, fpscr); | ||||
|     if (vsn.exponent == 0 && vsn.significand) | ||||
|  | @ -1039,7 +1039,7 @@ static u32 vfp_single_fadd(ARMul_State* state, int sd, int sn, s32 m, u32 fpscr) | |||
|     u32 exceptions = 0; | ||||
|     s32 n = vfp_get_float(state, sn); | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "s{} = {:08x}", sn, n); | ||||
|     LOG_TRACE(Core_ARM11, "s{} = {:08x}", sn, n); | ||||
| 
 | ||||
|     /*
 | ||||
|      * Unpack and normalise denormals. | ||||
|  | @ -1061,7 +1061,7 @@ static u32 vfp_single_fadd(ARMul_State* state, int sd, int sn, s32 m, u32 fpscr) | |||
|  * sd = sn - sm | ||||
|  */ | ||||
| static u32 vfp_single_fsub(ARMul_State* state, int sd, int sn, s32 m, u32 fpscr) { | ||||
|     NGLOG_TRACE(Core_ARM11, "s{} = {:08x}", sn, sd); | ||||
|     LOG_TRACE(Core_ARM11, "s{} = {:08x}", sn, sd); | ||||
|     /*
 | ||||
|      * Subtraction is addition with one sign inverted. Unpack the second operand to perform FTZ if | ||||
|      * necessary, we can't let fadd do this because a denormal in m might get flushed to +0 in FTZ | ||||
|  | @ -1090,7 +1090,7 @@ static u32 vfp_single_fdiv(ARMul_State* state, int sd, int sn, s32 m, u32 fpscr) | |||
|     s32 n = vfp_get_float(state, sn); | ||||
|     int tm, tn; | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "s{} = {:08x}", sn, n); | ||||
|     LOG_TRACE(Core_ARM11, "s{} = {:08x}", sn, n); | ||||
| 
 | ||||
|     exceptions |= vfp_single_unpack(&vsn, n, fpscr); | ||||
|     exceptions |= vfp_single_unpack(&vsm, m, fpscr); | ||||
|  | @ -1230,10 +1230,10 @@ u32 vfp_single_cpdo(ARMul_State* state, u32 inst, u32 fpscr) { | |||
|     else | ||||
|         veclen = fpscr & FPSCR_LENGTH_MASK; | ||||
| 
 | ||||
|     NGLOG_TRACE(Core_ARM11, "vecstride={} veclen={}", vecstride, (veclen >> FPSCR_LENGTH_BIT) + 1); | ||||
|     LOG_TRACE(Core_ARM11, "vecstride={} veclen={}", vecstride, (veclen >> FPSCR_LENGTH_BIT) + 1); | ||||
| 
 | ||||
|     if (!fop->fn) { | ||||
|         NGLOG_CRITICAL(Core_ARM11, "could not find single op {}, inst=0x{:x}@0x{:x}", | ||||
|         LOG_CRITICAL(Core_ARM11, "could not find single op {}, inst=0x{:x}@0x{:x}", | ||||
|                        FEXT_TO_IDX(inst), inst, state->Reg[15]); | ||||
|         Crash(); | ||||
|         goto invalid; | ||||
|  | @ -1246,14 +1246,14 @@ u32 vfp_single_cpdo(ARMul_State* state, u32 inst, u32 fpscr) { | |||
| 
 | ||||
|         type = (fop->flags & OP_DD) ? 'd' : 's'; | ||||
|         if (op == FOP_EXT) | ||||
|             NGLOG_TRACE(Core_ARM11, "itr{} ({}{}) = op[{}] (s{}={:08x})", | ||||
|             LOG_TRACE(Core_ARM11, "itr{} ({}{}) = op[{}] (s{}={:08x})", | ||||
|                         vecitr >> FPSCR_LENGTH_BIT, type, dest, sn, sm, m); | ||||
|         else | ||||
|             NGLOG_TRACE(Core_ARM11, "itr{} ({}{}) = (s{}) op[{}] (s{}={:08x})", | ||||
|             LOG_TRACE(Core_ARM11, "itr{} ({}{}) = (s{}) op[{}] (s{}={:08x})", | ||||
|                         vecitr >> FPSCR_LENGTH_BIT, type, dest, sn, FOP_TO_IDX(op), sm, m); | ||||
| 
 | ||||
|         except = fop->fn(state, dest, sn, m, fpscr); | ||||
|         NGLOG_TRACE(Core_ARM11, "itr{}: exceptions={:08x}", vecitr >> FPSCR_LENGTH_BIT, except); | ||||
|         LOG_TRACE(Core_ARM11, "itr{}: exceptions={:08x}", vecitr >> FPSCR_LENGTH_BIT, except); | ||||
| 
 | ||||
|         exceptions |= except & ~VFP_NAN_FLAG; | ||||
| 
 | ||||
|  |  | |||
|  | @ -57,7 +57,7 @@ System::ResultStatus System::RunLoop(bool tight_loop) { | |||
|     // If we don't have a currently active thread then don't execute instructions,
 | ||||
|     // instead advance to the next event and try to yield to the next thread
 | ||||
|     if (Kernel::GetCurrentThread() == nullptr) { | ||||
|         NGLOG_TRACE(Core_ARM11, "Idling"); | ||||
|         LOG_TRACE(Core_ARM11, "Idling"); | ||||
|         CoreTiming::Idle(); | ||||
|         CoreTiming::Advance(); | ||||
|         PrepareReschedule(); | ||||
|  | @ -84,14 +84,14 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file | |||
|     app_loader = Loader::GetLoader(filepath); | ||||
| 
 | ||||
|     if (!app_loader) { | ||||
|         NGLOG_CRITICAL(Core, "Failed to obtain loader for {}!", filepath); | ||||
|         LOG_CRITICAL(Core, "Failed to obtain loader for {}!", filepath); | ||||
|         return ResultStatus::ErrorGetLoader; | ||||
|     } | ||||
|     std::pair<boost::optional<u32>, Loader::ResultStatus> system_mode = | ||||
|         app_loader->LoadKernelSystemMode(); | ||||
| 
 | ||||
|     if (system_mode.second != Loader::ResultStatus::Success) { | ||||
|         NGLOG_CRITICAL(Core, "Failed to determine system mode (Error {})!", | ||||
|         LOG_CRITICAL(Core, "Failed to determine system mode (Error {})!", | ||||
|                        static_cast<int>(system_mode.second)); | ||||
| 
 | ||||
|         switch (system_mode.second) { | ||||
|  | @ -106,7 +106,7 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file | |||
| 
 | ||||
|     ResultStatus init_result{Init(emu_window, system_mode.first.get())}; | ||||
|     if (init_result != ResultStatus::Success) { | ||||
|         NGLOG_CRITICAL(Core, "Failed to initialize system (Error {})!", | ||||
|         LOG_CRITICAL(Core, "Failed to initialize system (Error {})!", | ||||
|                        static_cast<u32>(init_result)); | ||||
|         System::Shutdown(); | ||||
|         return init_result; | ||||
|  | @ -114,7 +114,7 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file | |||
| 
 | ||||
|     const Loader::ResultStatus load_result{app_loader->Load(Kernel::g_current_process)}; | ||||
|     if (Loader::ResultStatus::Success != load_result) { | ||||
|         NGLOG_CRITICAL(Core, "Failed to load ROM (Error {})!", static_cast<u32>(load_result)); | ||||
|         LOG_CRITICAL(Core, "Failed to load ROM (Error {})!", static_cast<u32>(load_result)); | ||||
|         System::Shutdown(); | ||||
| 
 | ||||
|         switch (load_result) { | ||||
|  | @ -150,7 +150,7 @@ void System::Reschedule() { | |||
| } | ||||
| 
 | ||||
| System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { | ||||
|     NGLOG_DEBUG(HW_Memory, "initialized OK"); | ||||
|     LOG_DEBUG(HW_Memory, "initialized OK"); | ||||
| 
 | ||||
|     CoreTiming::Init(); | ||||
| 
 | ||||
|  | @ -159,7 +159,7 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { | |||
|         cpu_core = std::make_unique<ARM_Dynarmic>(USER32MODE); | ||||
| #else | ||||
|         cpu_core = std::make_unique<ARM_DynCom>(USER32MODE); | ||||
|         NGLOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available"); | ||||
|         LOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available"); | ||||
| #endif | ||||
|     } else { | ||||
|         cpu_core = std::make_unique<ARM_DynCom>(USER32MODE); | ||||
|  | @ -182,7 +182,7 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { | |||
|         return ResultStatus::ErrorVideoCore; | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_DEBUG(Core, "Initialized OK"); | ||||
|     LOG_DEBUG(Core, "Initialized OK"); | ||||
| 
 | ||||
|     // Reset counters and set time origin to current frame
 | ||||
|     GetAndResetPerfStats(); | ||||
|  | @ -228,7 +228,7 @@ void System::Shutdown() { | |||
|         room_member->SendGameInfo(game_info); | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_DEBUG(Core, "Shutdown OK"); | ||||
|     LOG_DEBUG(Core, "Shutdown OK"); | ||||
| } | ||||
| 
 | ||||
| } // namespace Core
 | ||||
|  |  | |||
|  | @ -53,11 +53,11 @@ inline s64 usToCycles(int us) { | |||
| 
 | ||||
| inline s64 usToCycles(s64 us) { | ||||
|     if (us / 1000000 > MAX_VALUE_TO_MULTIPLY) { | ||||
|         NGLOG_ERROR(Core_Timing, "Integer overflow, use max value"); | ||||
|         LOG_ERROR(Core_Timing, "Integer overflow, use max value"); | ||||
|         return std::numeric_limits<s64>::max(); | ||||
|     } | ||||
|     if (us > MAX_VALUE_TO_MULTIPLY) { | ||||
|         NGLOG_DEBUG(Core_Timing, "Time very big, do rounding"); | ||||
|         LOG_DEBUG(Core_Timing, "Time very big, do rounding"); | ||||
|         return BASE_CLOCK_RATE_ARM11 * (us / 1000000); | ||||
|     } | ||||
|     return (BASE_CLOCK_RATE_ARM11 * us) / 1000000; | ||||
|  | @ -65,11 +65,11 @@ inline s64 usToCycles(s64 us) { | |||
| 
 | ||||
| inline s64 usToCycles(u64 us) { | ||||
|     if (us / 1000000 > MAX_VALUE_TO_MULTIPLY) { | ||||
|         NGLOG_ERROR(Core_Timing, "Integer overflow, use max value"); | ||||
|         LOG_ERROR(Core_Timing, "Integer overflow, use max value"); | ||||
|         return std::numeric_limits<s64>::max(); | ||||
|     } | ||||
|     if (us > MAX_VALUE_TO_MULTIPLY) { | ||||
|         NGLOG_DEBUG(Core_Timing, "Time very big, do rounding"); | ||||
|         LOG_DEBUG(Core_Timing, "Time very big, do rounding"); | ||||
|         return BASE_CLOCK_RATE_ARM11 * static_cast<s64>(us / 1000000); | ||||
|     } | ||||
|     return (BASE_CLOCK_RATE_ARM11 * static_cast<s64>(us)) / 1000000; | ||||
|  | @ -85,11 +85,11 @@ inline s64 nsToCycles(int ns) { | |||
| 
 | ||||
| inline s64 nsToCycles(s64 ns) { | ||||
|     if (ns / 1000000000 > MAX_VALUE_TO_MULTIPLY) { | ||||
|         NGLOG_ERROR(Core_Timing, "Integer overflow, use max value"); | ||||
|         LOG_ERROR(Core_Timing, "Integer overflow, use max value"); | ||||
|         return std::numeric_limits<s64>::max(); | ||||
|     } | ||||
|     if (ns > MAX_VALUE_TO_MULTIPLY) { | ||||
|         NGLOG_DEBUG(Core_Timing, "Time very big, do rounding"); | ||||
|         LOG_DEBUG(Core_Timing, "Time very big, do rounding"); | ||||
|         return BASE_CLOCK_RATE_ARM11 * (ns / 1000000000); | ||||
|     } | ||||
|     return (BASE_CLOCK_RATE_ARM11 * ns) / 1000000000; | ||||
|  | @ -97,11 +97,11 @@ inline s64 nsToCycles(s64 ns) { | |||
| 
 | ||||
| inline s64 nsToCycles(u64 ns) { | ||||
|     if (ns / 1000000000 > MAX_VALUE_TO_MULTIPLY) { | ||||
|         NGLOG_ERROR(Core_Timing, "Integer overflow, use max value"); | ||||
|         LOG_ERROR(Core_Timing, "Integer overflow, use max value"); | ||||
|         return std::numeric_limits<s64>::max(); | ||||
|     } | ||||
|     if (ns > MAX_VALUE_TO_MULTIPLY) { | ||||
|         NGLOG_DEBUG(Core_Timing, "Time very big, do rounding"); | ||||
|         LOG_DEBUG(Core_Timing, "Time very big, do rounding"); | ||||
|         return BASE_CLOCK_RATE_ARM11 * (static_cast<s64>(ns) / 1000000000); | ||||
|     } | ||||
|     return (BASE_CLOCK_RATE_ARM11 * static_cast<s64>(ns)) / 1000000000; | ||||
|  |  | |||
|  | @ -70,7 +70,7 @@ std::string Path::AsString() const { | |||
|     case LowPathType::Binary: | ||||
|     default: | ||||
|         // TODO(yuriks): Add assert
 | ||||
|         NGLOG_ERROR(Service_FS, "LowPathType cannot be converted to string!"); | ||||
|         LOG_ERROR(Service_FS, "LowPathType cannot be converted to string!"); | ||||
|         return {}; | ||||
|     } | ||||
| } | ||||
|  | @ -86,7 +86,7 @@ std::u16string Path::AsU16Str() const { | |||
|     case LowPathType::Invalid: | ||||
|     case LowPathType::Binary: | ||||
|         // TODO(yuriks): Add assert
 | ||||
|         NGLOG_ERROR(Service_FS, "LowPathType cannot be converted to u16string!"); | ||||
|         LOG_ERROR(Service_FS, "LowPathType cannot be converted to u16string!"); | ||||
|         return {}; | ||||
|     } | ||||
| 
 | ||||
|  | @ -114,7 +114,7 @@ std::vector<u8> Path::AsBinary() const { | |||
|     case LowPathType::Invalid: | ||||
|     default: | ||||
|         // TODO(yuriks): Add assert
 | ||||
|         NGLOG_ERROR(Service_FS, "LowPathType cannot be converted to binary!"); | ||||
|         LOG_ERROR(Service_FS, "LowPathType cannot be converted to binary!"); | ||||
|         return {}; | ||||
|     } | ||||
| } | ||||
|  |  | |||
|  | @ -87,22 +87,22 @@ public: | |||
| 
 | ||||
|     ResultVal<std::unique_ptr<FileBackend>> OpenFile(const Path& path, | ||||
|                                                      const Mode& mode) const override { | ||||
|         NGLOG_DEBUG(Service_FS, "called path={} mode={:01X}", path.DebugStr(), mode.hex); | ||||
|         LOG_DEBUG(Service_FS, "called path={} mode={:01X}", path.DebugStr(), mode.hex); | ||||
| 
 | ||||
|         const PathParser path_parser(path); | ||||
| 
 | ||||
|         if (!path_parser.IsValid()) { | ||||
|             NGLOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|             LOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|             return ERROR_INVALID_PATH; | ||||
|         } | ||||
| 
 | ||||
|         if (mode.hex == 0) { | ||||
|             NGLOG_ERROR(Service_FS, "Empty open mode"); | ||||
|             LOG_ERROR(Service_FS, "Empty open mode"); | ||||
|             return ERROR_UNSUPPORTED_OPEN_FLAGS; | ||||
|         } | ||||
| 
 | ||||
|         if (mode.create_flag) { | ||||
|             NGLOG_ERROR(Service_FS, "Create flag is not supported"); | ||||
|             LOG_ERROR(Service_FS, "Create flag is not supported"); | ||||
|             return ERROR_UNSUPPORTED_OPEN_FLAGS; | ||||
|         } | ||||
| 
 | ||||
|  | @ -110,17 +110,17 @@ public: | |||
| 
 | ||||
|         switch (path_parser.GetHostStatus(mount_point)) { | ||||
|         case PathParser::InvalidMountPoint: | ||||
|             NGLOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|             LOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|             return ERROR_FILE_NOT_FOUND; | ||||
|         case PathParser::PathNotFound: | ||||
|             NGLOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|             LOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|             return ERROR_PATH_NOT_FOUND; | ||||
|         case PathParser::FileInPath: | ||||
|         case PathParser::DirectoryFound: | ||||
|             NGLOG_ERROR(Service_FS, "Unexpected file or directory in {}", full_path); | ||||
|             LOG_ERROR(Service_FS, "Unexpected file or directory in {}", full_path); | ||||
|             return ERROR_UNEXPECTED_FILE_OR_DIRECTORY; | ||||
|         case PathParser::NotFound: | ||||
|             NGLOG_ERROR(Service_FS, "{} not found", full_path); | ||||
|             LOG_ERROR(Service_FS, "{} not found", full_path); | ||||
|             return ERROR_FILE_NOT_FOUND; | ||||
|         case PathParser::FileFound: | ||||
|             break; // Expected 'success' case
 | ||||
|  | @ -128,7 +128,7 @@ public: | |||
| 
 | ||||
|         FileUtil::IOFile file(full_path, "r+b"); | ||||
|         if (!file.IsOpen()) { | ||||
|             NGLOG_CRITICAL(Service_FS, "(unreachable) Unknown error opening {}", full_path); | ||||
|             LOG_CRITICAL(Service_FS, "(unreachable) Unknown error opening {}", full_path); | ||||
|             return ERROR_FILE_NOT_FOUND; | ||||
|         } | ||||
| 
 | ||||
|  | @ -144,7 +144,7 @@ public: | |||
| 
 | ||||
|     ResultCode CreateFile(const Path& path, u64 size) const override { | ||||
|         if (size == 0) { | ||||
|             NGLOG_ERROR(Service_FS, "Zero-size file is not supported"); | ||||
|             LOG_ERROR(Service_FS, "Zero-size file is not supported"); | ||||
|             return ERROR_UNSUPPORTED_OPEN_FLAGS; | ||||
|         } | ||||
|         return SaveDataArchive::CreateFile(path, size); | ||||
|  | @ -192,12 +192,12 @@ Path ConstructExtDataBinaryPath(u32 media_type, u32 high, u32 low) { | |||
| ArchiveFactory_ExtSaveData::ArchiveFactory_ExtSaveData(const std::string& mount_location, | ||||
|                                                        bool shared) | ||||
|     : shared(shared), mount_point(GetExtDataContainerPath(mount_location, shared)) { | ||||
|     NGLOG_DEBUG(Service_FS, "Directory {} set as base for ExtSaveData.", mount_point); | ||||
|     LOG_DEBUG(Service_FS, "Directory {} set as base for ExtSaveData.", mount_point); | ||||
| } | ||||
| 
 | ||||
| bool ArchiveFactory_ExtSaveData::Initialize() { | ||||
|     if (!FileUtil::CreateFullPath(mount_point)) { | ||||
|         NGLOG_ERROR(Service_FS, "Unable to create ExtSaveData base path."); | ||||
|         LOG_ERROR(Service_FS, "Unable to create ExtSaveData base path."); | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|  | @ -266,7 +266,7 @@ ResultVal<ArchiveFormatInfo> ArchiveFactory_ExtSaveData::GetFormatInfo(const Pat | |||
|     FileUtil::IOFile file(metadata_path, "rb"); | ||||
| 
 | ||||
|     if (!file.IsOpen()) { | ||||
|         NGLOG_ERROR(Service_FS, "Could not open metadata information for archive"); | ||||
|         LOG_ERROR(Service_FS, "Could not open metadata information for archive"); | ||||
|         // TODO(Subv): Verify error code
 | ||||
|         return ERR_NOT_FORMATTED; | ||||
|     } | ||||
|  |  | |||
|  | @ -49,13 +49,13 @@ static_assert(sizeof(NCCHFilePath) == 0x14, "NCCHFilePath has wrong size!"); | |||
| ResultVal<std::unique_ptr<FileBackend>> NCCHArchive::OpenFile(const Path& path, | ||||
|                                                               const Mode& mode) const { | ||||
|     if (path.GetType() != LowPathType::Binary) { | ||||
|         NGLOG_ERROR(Service_FS, "Path need to be Binary"); | ||||
|         LOG_ERROR(Service_FS, "Path need to be Binary"); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|     std::vector<u8> binary = path.AsBinary(); | ||||
|     if (binary.size() != sizeof(NCCHFilePath)) { | ||||
|         NGLOG_ERROR(Service_FS, "Wrong path size {}", binary.size()); | ||||
|         LOG_ERROR(Service_FS, "Wrong path size {}", binary.size()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|  | @ -89,7 +89,7 @@ ResultVal<std::unique_ptr<FileBackend>> NCCHArchive::OpenFile(const Path& path, | |||
|         std::unique_ptr<DelayGenerator> delay_generator = std::make_unique<ExeFSDelayGenerator>(); | ||||
|         file = std::make_unique<NCCHFile>(std::move(buffer), std::move(delay_generator)); | ||||
|     } else { | ||||
|         NGLOG_ERROR(Service_FS, "Unknown NCCH archive type {}!", openfile_path.filepath_type); | ||||
|         LOG_ERROR(Service_FS, "Unknown NCCH archive type {}!", openfile_path.filepath_type); | ||||
|         result = Loader::ResultStatus::Error; | ||||
|     } | ||||
| 
 | ||||
|  | @ -106,7 +106,7 @@ ResultVal<std::unique_ptr<FileBackend>> NCCHArchive::OpenFile(const Path& path, | |||
|         u32 high = static_cast<u32>(title_id >> 32); | ||||
|         u32 low = static_cast<u32>(title_id & 0xFFFFFFFF); | ||||
| 
 | ||||
|         NGLOG_DEBUG(Service_FS, "Full Path: {}. Category: 0x{:X}. Path: 0x{:X}.", path.DebugStr(), | ||||
|         LOG_DEBUG(Service_FS, "Full Path: {}. Category: 0x{:X}. Path: 0x{:X}.", path.DebugStr(), | ||||
|                     high, low); | ||||
| 
 | ||||
|         std::string archive_name; | ||||
|  | @ -121,7 +121,7 @@ ResultVal<std::unique_ptr<FileBackend>> NCCHArchive::OpenFile(const Path& path, | |||
|         } | ||||
| 
 | ||||
|         if (!archive_name.empty()) { | ||||
|             NGLOG_ERROR(Service_FS, "Failed to get a handle for shared data archive: {}. ", | ||||
|             LOG_ERROR(Service_FS, "Failed to get a handle for shared data archive: {}. ", | ||||
|                         archive_name); | ||||
|             Core::System::GetInstance().SetStatus(Core::System::ResultStatus::ErrorSystemFiles, | ||||
|                                                   archive_name.c_str()); | ||||
|  | @ -133,63 +133,63 @@ ResultVal<std::unique_ptr<FileBackend>> NCCHArchive::OpenFile(const Path& path, | |||
| } | ||||
| 
 | ||||
| ResultCode NCCHArchive::DeleteFile(const Path& path) const { | ||||
|     NGLOG_CRITICAL(Service_FS, "Attempted to delete a file from an NCCH archive ({}).", GetName()); | ||||
|     LOG_CRITICAL(Service_FS, "Attempted to delete a file from an NCCH archive ({}).", GetName()); | ||||
|     // TODO(Subv): Verify error code
 | ||||
|     return ResultCode(ErrorDescription::NoData, ErrorModule::FS, ErrorSummary::Canceled, | ||||
|                       ErrorLevel::Status); | ||||
| } | ||||
| 
 | ||||
| ResultCode NCCHArchive::RenameFile(const Path& src_path, const Path& dest_path) const { | ||||
|     NGLOG_CRITICAL(Service_FS, "Attempted to rename a file within an NCCH archive ({}).", | ||||
|     LOG_CRITICAL(Service_FS, "Attempted to rename a file within an NCCH archive ({}).", | ||||
|                    GetName()); | ||||
|     // TODO(wwylele): Use correct error code
 | ||||
|     return ResultCode(-1); | ||||
| } | ||||
| 
 | ||||
| ResultCode NCCHArchive::DeleteDirectory(const Path& path) const { | ||||
|     NGLOG_CRITICAL(Service_FS, "Attempted to delete a directory from an NCCH archive ({}).", | ||||
|     LOG_CRITICAL(Service_FS, "Attempted to delete a directory from an NCCH archive ({}).", | ||||
|                    GetName()); | ||||
|     // TODO(wwylele): Use correct error code
 | ||||
|     return ResultCode(-1); | ||||
| } | ||||
| 
 | ||||
| ResultCode NCCHArchive::DeleteDirectoryRecursively(const Path& path) const { | ||||
|     NGLOG_CRITICAL(Service_FS, "Attempted to delete a directory from an NCCH archive ({}).", | ||||
|     LOG_CRITICAL(Service_FS, "Attempted to delete a directory from an NCCH archive ({}).", | ||||
|                    GetName()); | ||||
|     // TODO(wwylele): Use correct error code
 | ||||
|     return ResultCode(-1); | ||||
| } | ||||
| 
 | ||||
| ResultCode NCCHArchive::CreateFile(const Path& path, u64 size) const { | ||||
|     NGLOG_CRITICAL(Service_FS, "Attempted to create a file in an NCCH archive ({}).", GetName()); | ||||
|     LOG_CRITICAL(Service_FS, "Attempted to create a file in an NCCH archive ({}).", GetName()); | ||||
|     // TODO: Verify error code
 | ||||
|     return ResultCode(ErrorDescription::NotAuthorized, ErrorModule::FS, ErrorSummary::NotSupported, | ||||
|                       ErrorLevel::Permanent); | ||||
| } | ||||
| 
 | ||||
| ResultCode NCCHArchive::CreateDirectory(const Path& path) const { | ||||
|     NGLOG_CRITICAL(Service_FS, "Attempted to create a directory in an NCCH archive ({}).", | ||||
|     LOG_CRITICAL(Service_FS, "Attempted to create a directory in an NCCH archive ({}).", | ||||
|                    GetName()); | ||||
|     // TODO(wwylele): Use correct error code
 | ||||
|     return ResultCode(-1); | ||||
| } | ||||
| 
 | ||||
| ResultCode NCCHArchive::RenameDirectory(const Path& src_path, const Path& dest_path) const { | ||||
|     NGLOG_CRITICAL(Service_FS, "Attempted to rename a file within an NCCH archive ({}).", | ||||
|     LOG_CRITICAL(Service_FS, "Attempted to rename a file within an NCCH archive ({}).", | ||||
|                    GetName()); | ||||
|     // TODO(wwylele): Use correct error code
 | ||||
|     return ResultCode(-1); | ||||
| } | ||||
| 
 | ||||
| ResultVal<std::unique_ptr<DirectoryBackend>> NCCHArchive::OpenDirectory(const Path& path) const { | ||||
|     NGLOG_CRITICAL(Service_FS, "Attempted to open a directory within an NCCH archive ({}).", | ||||
|     LOG_CRITICAL(Service_FS, "Attempted to open a directory within an NCCH archive ({}).", | ||||
|                    GetName().c_str()); | ||||
|     // TODO(shinyquagsire23): Use correct error code
 | ||||
|     return ResultCode(-1); | ||||
| } | ||||
| 
 | ||||
| u64 NCCHArchive::GetFreeBytes() const { | ||||
|     NGLOG_WARNING(Service_FS, "Attempted to get the free space in an NCCH archive"); | ||||
|     LOG_WARNING(Service_FS, "Attempted to get the free space in an NCCH archive"); | ||||
|     return 0; | ||||
| } | ||||
| 
 | ||||
|  | @ -201,7 +201,7 @@ NCCHFile::NCCHFile(std::vector<u8> buffer, std::unique_ptr<DelayGenerator> delay | |||
| } | ||||
| 
 | ||||
| ResultVal<size_t> NCCHFile::Read(const u64 offset, const size_t length, u8* buffer) const { | ||||
|     NGLOG_TRACE(Service_FS, "called offset={}, length={}", offset, length); | ||||
|     LOG_TRACE(Service_FS, "called offset={}, length={}", offset, length); | ||||
|     size_t length_left = static_cast<size_t>(data_size - offset); | ||||
|     size_t read_length = static_cast<size_t>(std::min(length, length_left)); | ||||
| 
 | ||||
|  | @ -214,7 +214,7 @@ ResultVal<size_t> NCCHFile::Read(const u64 offset, const size_t length, u8* buff | |||
| 
 | ||||
| ResultVal<size_t> NCCHFile::Write(const u64 offset, const size_t length, const bool flush, | ||||
|                                   const u8* buffer) { | ||||
|     NGLOG_ERROR(Service_FS, "Attempted to write to NCCH file"); | ||||
|     LOG_ERROR(Service_FS, "Attempted to write to NCCH file"); | ||||
|     // TODO(shinyquagsire23): Find error code
 | ||||
|     return MakeResult<size_t>(0); | ||||
| } | ||||
|  | @ -224,7 +224,7 @@ u64 NCCHFile::GetSize() const { | |||
| } | ||||
| 
 | ||||
| bool NCCHFile::SetSize(const u64 size) const { | ||||
|     NGLOG_ERROR(Service_FS, "Attempted to set the size of an NCCH file"); | ||||
|     LOG_ERROR(Service_FS, "Attempted to set the size of an NCCH file"); | ||||
|     return false; | ||||
| } | ||||
| 
 | ||||
|  | @ -234,13 +234,13 @@ ArchiveFactory_NCCH::ArchiveFactory_NCCH() {} | |||
| 
 | ||||
| ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_NCCH::Open(const Path& path) { | ||||
|     if (path.GetType() != LowPathType::Binary) { | ||||
|         NGLOG_ERROR(Service_FS, "Path need to be Binary"); | ||||
|         LOG_ERROR(Service_FS, "Path need to be Binary"); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|     std::vector<u8> binary = path.AsBinary(); | ||||
|     if (binary.size() != sizeof(NCCHArchivePath)) { | ||||
|         NGLOG_ERROR(Service_FS, "Wrong path size {}", binary.size()); | ||||
|         LOG_ERROR(Service_FS, "Wrong path size {}", binary.size()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|  | @ -254,7 +254,7 @@ ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_NCCH::Open(const Path& | |||
| 
 | ||||
| ResultCode ArchiveFactory_NCCH::Format(const Path& path, | ||||
|                                        const FileSys::ArchiveFormatInfo& format_info) { | ||||
|     NGLOG_ERROR(Service_FS, "Attempted to format a NCCH archive."); | ||||
|     LOG_ERROR(Service_FS, "Attempted to format a NCCH archive."); | ||||
|     // TODO: Verify error code
 | ||||
|     return ResultCode(ErrorDescription::NotAuthorized, ErrorModule::FS, ErrorSummary::NotSupported, | ||||
|                       ErrorLevel::Permanent); | ||||
|  | @ -262,7 +262,7 @@ ResultCode ArchiveFactory_NCCH::Format(const Path& path, | |||
| 
 | ||||
| ResultVal<ArchiveFormatInfo> ArchiveFactory_NCCH::GetFormatInfo(const Path& path) const { | ||||
|     // TODO(Subv): Implement
 | ||||
|     NGLOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive {}", GetName()); | ||||
|     LOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive {}", GetName()); | ||||
|     return ResultCode(-1); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -23,14 +23,14 @@ namespace { | |||
| template <typename T> | ||||
| ResultVal<std::tuple<MediaType, u64>> ParsePath(const Path& path, T program_id_reader) { | ||||
|     if (path.GetType() != LowPathType::Binary) { | ||||
|         NGLOG_ERROR(Service_FS, "Wrong path type {}", static_cast<int>(path.GetType())); | ||||
|         LOG_ERROR(Service_FS, "Wrong path type {}", static_cast<int>(path.GetType())); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|     std::vector<u8> vec_data = path.AsBinary(); | ||||
| 
 | ||||
|     if (vec_data.size() != 12) { | ||||
|         NGLOG_ERROR(Service_FS, "Wrong path length {}", vec_data.size()); | ||||
|         LOG_ERROR(Service_FS, "Wrong path length {}", vec_data.size()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|  | @ -38,7 +38,7 @@ ResultVal<std::tuple<MediaType, u64>> ParsePath(const Path& path, T program_id_r | |||
|     auto media_type = static_cast<MediaType>(data[0]); | ||||
| 
 | ||||
|     if (media_type != MediaType::SDMC && media_type != MediaType::GameCard) { | ||||
|         NGLOG_ERROR(Service_FS, "Unsupported media type {}", static_cast<u32>(media_type)); | ||||
|         LOG_ERROR(Service_FS, "Unsupported media type {}", static_cast<u32>(media_type)); | ||||
| 
 | ||||
|         // Note: this is strange, but the error code was verified with a real 3DS
 | ||||
|         return ERROR_UNSUPPORTED_OPEN_FLAGS; | ||||
|  | @ -70,7 +70,7 @@ ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_OtherSaveDataPermitted | |||
|     CASCADE_RESULT(std::tie(media_type, program_id), ParsePathPermitted(path)); | ||||
| 
 | ||||
|     if (media_type == MediaType::GameCard) { | ||||
|         NGLOG_WARNING(Service_FS, "(stubbed) Unimplemented media type GameCard"); | ||||
|         LOG_WARNING(Service_FS, "(stubbed) Unimplemented media type GameCard"); | ||||
|         return ERROR_GAMECARD_NOT_INSERTED; | ||||
|     } | ||||
| 
 | ||||
|  | @ -79,7 +79,7 @@ ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_OtherSaveDataPermitted | |||
| 
 | ||||
| ResultCode ArchiveFactory_OtherSaveDataPermitted::Format( | ||||
|     const Path& path, const FileSys::ArchiveFormatInfo& format_info) { | ||||
|     NGLOG_ERROR(Service_FS, "Attempted to format a OtherSaveDataPermitted archive."); | ||||
|     LOG_ERROR(Service_FS, "Attempted to format a OtherSaveDataPermitted archive."); | ||||
|     return ERROR_INVALID_PATH; | ||||
| } | ||||
| 
 | ||||
|  | @ -90,7 +90,7 @@ ResultVal<ArchiveFormatInfo> ArchiveFactory_OtherSaveDataPermitted::GetFormatInf | |||
|     CASCADE_RESULT(std::tie(media_type, program_id), ParsePathPermitted(path)); | ||||
| 
 | ||||
|     if (media_type == MediaType::GameCard) { | ||||
|         NGLOG_WARNING(Service_FS, "(stubbed) Unimplemented media type GameCard"); | ||||
|         LOG_WARNING(Service_FS, "(stubbed) Unimplemented media type GameCard"); | ||||
|         return ERROR_GAMECARD_NOT_INSERTED; | ||||
|     } | ||||
| 
 | ||||
|  | @ -108,7 +108,7 @@ ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_OtherSaveDataGeneral:: | |||
|     CASCADE_RESULT(std::tie(media_type, program_id), ParsePathGeneral(path)); | ||||
| 
 | ||||
|     if (media_type == MediaType::GameCard) { | ||||
|         NGLOG_WARNING(Service_FS, "(stubbed) Unimplemented media type GameCard"); | ||||
|         LOG_WARNING(Service_FS, "(stubbed) Unimplemented media type GameCard"); | ||||
|         return ERROR_GAMECARD_NOT_INSERTED; | ||||
|     } | ||||
| 
 | ||||
|  | @ -122,7 +122,7 @@ ResultCode ArchiveFactory_OtherSaveDataGeneral::Format( | |||
|     CASCADE_RESULT(std::tie(media_type, program_id), ParsePathGeneral(path)); | ||||
| 
 | ||||
|     if (media_type == MediaType::GameCard) { | ||||
|         NGLOG_WARNING(Service_FS, "(stubbed) Unimplemented media type GameCard"); | ||||
|         LOG_WARNING(Service_FS, "(stubbed) Unimplemented media type GameCard"); | ||||
|         return ERROR_GAMECARD_NOT_INSERTED; | ||||
|     } | ||||
| 
 | ||||
|  | @ -136,7 +136,7 @@ ResultVal<ArchiveFormatInfo> ArchiveFactory_OtherSaveDataGeneral::GetFormatInfo( | |||
|     CASCADE_RESULT(std::tie(media_type, program_id), ParsePathGeneral(path)); | ||||
| 
 | ||||
|     if (media_type == MediaType::GameCard) { | ||||
|         NGLOG_WARNING(Service_FS, "(stubbed) Unimplemented media type GameCard"); | ||||
|         LOG_WARNING(Service_FS, "(stubbed) Unimplemented media type GameCard"); | ||||
|         return ERROR_GAMECARD_NOT_INSERTED; | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -44,22 +44,22 @@ ResultVal<std::unique_ptr<FileBackend>> SDMCArchive::OpenFile(const Path& path, | |||
| 
 | ||||
| ResultVal<std::unique_ptr<FileBackend>> SDMCArchive::OpenFileBase(const Path& path, | ||||
|                                                                   const Mode& mode) const { | ||||
|     NGLOG_DEBUG(Service_FS, "called path={} mode={:01X}", path.DebugStr(), mode.hex); | ||||
|     LOG_DEBUG(Service_FS, "called path={} mode={:01X}", path.DebugStr(), mode.hex); | ||||
| 
 | ||||
|     const PathParser path_parser(path); | ||||
| 
 | ||||
|     if (!path_parser.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|     if (mode.hex == 0) { | ||||
|         NGLOG_ERROR(Service_FS, "Empty open mode"); | ||||
|         LOG_ERROR(Service_FS, "Empty open mode"); | ||||
|         return ERROR_INVALID_OPEN_FLAGS; | ||||
|     } | ||||
| 
 | ||||
|     if (mode.create_flag && !mode.write_flag) { | ||||
|         NGLOG_ERROR(Service_FS, "Create flag set but write flag not set"); | ||||
|         LOG_ERROR(Service_FS, "Create flag set but write flag not set"); | ||||
|         return ERROR_INVALID_OPEN_FLAGS; | ||||
|     } | ||||
| 
 | ||||
|  | @ -67,18 +67,18 @@ ResultVal<std::unique_ptr<FileBackend>> SDMCArchive::OpenFileBase(const Path& pa | |||
| 
 | ||||
|     switch (path_parser.GetHostStatus(mount_point)) { | ||||
|     case PathParser::InvalidMountPoint: | ||||
|         NGLOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         LOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         return ERROR_NOT_FOUND; | ||||
|     case PathParser::PathNotFound: | ||||
|     case PathParser::FileInPath: | ||||
|         NGLOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         LOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         return ERROR_NOT_FOUND; | ||||
|     case PathParser::DirectoryFound: | ||||
|         NGLOG_ERROR(Service_FS, "{} is not a file", full_path); | ||||
|         LOG_ERROR(Service_FS, "{} is not a file", full_path); | ||||
|         return ERROR_UNEXPECTED_FILE_OR_DIRECTORY_SDMC; | ||||
|     case PathParser::NotFound: | ||||
|         if (!mode.create_flag) { | ||||
|             NGLOG_ERROR(Service_FS, "Non-existing file {} can't be open without mode create.", | ||||
|             LOG_ERROR(Service_FS, "Non-existing file {} can't be open without mode create.", | ||||
|                         full_path); | ||||
|             return ERROR_NOT_FOUND; | ||||
|         } else { | ||||
|  | @ -92,7 +92,7 @@ ResultVal<std::unique_ptr<FileBackend>> SDMCArchive::OpenFileBase(const Path& pa | |||
| 
 | ||||
|     FileUtil::IOFile file(full_path, mode.write_flag ? "r+b" : "rb"); | ||||
|     if (!file.IsOpen()) { | ||||
|         NGLOG_CRITICAL(Service_FS, "(unreachable) Unknown error opening {}", full_path); | ||||
|         LOG_CRITICAL(Service_FS, "(unreachable) Unknown error opening {}", full_path); | ||||
|         return ERROR_NOT_FOUND; | ||||
|     } | ||||
| 
 | ||||
|  | @ -105,7 +105,7 @@ ResultCode SDMCArchive::DeleteFile(const Path& path) const { | |||
|     const PathParser path_parser(path); | ||||
| 
 | ||||
|     if (!path_parser.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|  | @ -113,15 +113,15 @@ ResultCode SDMCArchive::DeleteFile(const Path& path) const { | |||
| 
 | ||||
|     switch (path_parser.GetHostStatus(mount_point)) { | ||||
|     case PathParser::InvalidMountPoint: | ||||
|         NGLOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         LOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         return ERROR_NOT_FOUND; | ||||
|     case PathParser::PathNotFound: | ||||
|     case PathParser::FileInPath: | ||||
|     case PathParser::NotFound: | ||||
|         NGLOG_ERROR(Service_FS, "{} not found", full_path); | ||||
|         LOG_ERROR(Service_FS, "{} not found", full_path); | ||||
|         return ERROR_NOT_FOUND; | ||||
|     case PathParser::DirectoryFound: | ||||
|         NGLOG_ERROR(Service_FS, "{} is not a file", full_path); | ||||
|         LOG_ERROR(Service_FS, "{} is not a file", full_path); | ||||
|         return ERROR_UNEXPECTED_FILE_OR_DIRECTORY_SDMC; | ||||
|     case PathParser::FileFound: | ||||
|         break; // Expected 'success' case
 | ||||
|  | @ -131,7 +131,7 @@ ResultCode SDMCArchive::DeleteFile(const Path& path) const { | |||
|         return RESULT_SUCCESS; | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_CRITICAL(Service_FS, "(unreachable) Unknown error deleting {}", full_path); | ||||
|     LOG_CRITICAL(Service_FS, "(unreachable) Unknown error deleting {}", full_path); | ||||
|     return ERROR_NOT_FOUND; | ||||
| } | ||||
| 
 | ||||
|  | @ -140,14 +140,14 @@ ResultCode SDMCArchive::RenameFile(const Path& src_path, const Path& dest_path) | |||
| 
 | ||||
|     // TODO: Verify these return codes with HW
 | ||||
|     if (!path_parser_src.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid src path {}", src_path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid src path {}", src_path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|     const PathParser path_parser_dest(dest_path); | ||||
| 
 | ||||
|     if (!path_parser_dest.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid dest path {}", dest_path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid dest path {}", dest_path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|  | @ -170,7 +170,7 @@ static ResultCode DeleteDirectoryHelper(const Path& path, const std::string& mou | |||
|     const PathParser path_parser(path); | ||||
| 
 | ||||
|     if (!path_parser.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|  | @ -181,15 +181,15 @@ static ResultCode DeleteDirectoryHelper(const Path& path, const std::string& mou | |||
| 
 | ||||
|     switch (path_parser.GetHostStatus(mount_point)) { | ||||
|     case PathParser::InvalidMountPoint: | ||||
|         NGLOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         LOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         return ERROR_NOT_FOUND; | ||||
|     case PathParser::PathNotFound: | ||||
|     case PathParser::NotFound: | ||||
|         NGLOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         LOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         return ERROR_NOT_FOUND; | ||||
|     case PathParser::FileInPath: | ||||
|     case PathParser::FileFound: | ||||
|         NGLOG_ERROR(Service_FS, "Unexpected file in path {}", full_path); | ||||
|         LOG_ERROR(Service_FS, "Unexpected file in path {}", full_path); | ||||
|         return ERROR_UNEXPECTED_FILE_OR_DIRECTORY_SDMC; | ||||
|     case PathParser::DirectoryFound: | ||||
|         break; // Expected 'success' case
 | ||||
|  | @ -199,7 +199,7 @@ static ResultCode DeleteDirectoryHelper(const Path& path, const std::string& mou | |||
|         return RESULT_SUCCESS; | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_ERROR(Service_FS, "Directory not empty {}", full_path); | ||||
|     LOG_ERROR(Service_FS, "Directory not empty {}", full_path); | ||||
|     return ERROR_UNEXPECTED_FILE_OR_DIRECTORY_SDMC; | ||||
| } | ||||
| 
 | ||||
|  | @ -216,7 +216,7 @@ ResultCode SDMCArchive::CreateFile(const FileSys::Path& path, u64 size) const { | |||
|     const PathParser path_parser(path); | ||||
| 
 | ||||
|     if (!path_parser.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|  | @ -224,17 +224,17 @@ ResultCode SDMCArchive::CreateFile(const FileSys::Path& path, u64 size) const { | |||
| 
 | ||||
|     switch (path_parser.GetHostStatus(mount_point)) { | ||||
|     case PathParser::InvalidMountPoint: | ||||
|         NGLOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         LOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         return ERROR_NOT_FOUND; | ||||
|     case PathParser::PathNotFound: | ||||
|     case PathParser::FileInPath: | ||||
|         NGLOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         LOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         return ERROR_NOT_FOUND; | ||||
|     case PathParser::DirectoryFound: | ||||
|         NGLOG_ERROR(Service_FS, "{} already exists", full_path); | ||||
|         LOG_ERROR(Service_FS, "{} already exists", full_path); | ||||
|         return ERROR_UNEXPECTED_FILE_OR_DIRECTORY_SDMC; | ||||
|     case PathParser::FileFound: | ||||
|         NGLOG_ERROR(Service_FS, "{} already exists", full_path); | ||||
|         LOG_ERROR(Service_FS, "{} already exists", full_path); | ||||
|         return ERROR_ALREADY_EXISTS; | ||||
|     case PathParser::NotFound: | ||||
|         break; // Expected 'success' case
 | ||||
|  | @ -252,7 +252,7 @@ ResultCode SDMCArchive::CreateFile(const FileSys::Path& path, u64 size) const { | |||
|         return RESULT_SUCCESS; | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_ERROR(Service_FS, "Too large file"); | ||||
|     LOG_ERROR(Service_FS, "Too large file"); | ||||
|     return ResultCode(ErrorDescription::TooLarge, ErrorModule::FS, ErrorSummary::OutOfResource, | ||||
|                       ErrorLevel::Info); | ||||
| } | ||||
|  | @ -261,7 +261,7 @@ ResultCode SDMCArchive::CreateDirectory(const Path& path) const { | |||
|     const PathParser path_parser(path); | ||||
| 
 | ||||
|     if (!path_parser.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|  | @ -269,15 +269,15 @@ ResultCode SDMCArchive::CreateDirectory(const Path& path) const { | |||
| 
 | ||||
|     switch (path_parser.GetHostStatus(mount_point)) { | ||||
|     case PathParser::InvalidMountPoint: | ||||
|         NGLOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         LOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         return ERROR_NOT_FOUND; | ||||
|     case PathParser::PathNotFound: | ||||
|     case PathParser::FileInPath: | ||||
|         NGLOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         LOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         return ERROR_NOT_FOUND; | ||||
|     case PathParser::DirectoryFound: | ||||
|     case PathParser::FileFound: | ||||
|         NGLOG_ERROR(Service_FS, "{} already exists", full_path); | ||||
|         LOG_ERROR(Service_FS, "{} already exists", full_path); | ||||
|         return ERROR_ALREADY_EXISTS; | ||||
|     case PathParser::NotFound: | ||||
|         break; // Expected 'success' case
 | ||||
|  | @ -287,7 +287,7 @@ ResultCode SDMCArchive::CreateDirectory(const Path& path) const { | |||
|         return RESULT_SUCCESS; | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_CRITICAL(Service_FS, "(unreachable) Unknown error creating {}", mount_point); | ||||
|     LOG_CRITICAL(Service_FS, "(unreachable) Unknown error creating {}", mount_point); | ||||
|     return ResultCode(ErrorDescription::NoData, ErrorModule::FS, ErrorSummary::Canceled, | ||||
|                       ErrorLevel::Status); | ||||
| } | ||||
|  | @ -297,14 +297,14 @@ ResultCode SDMCArchive::RenameDirectory(const Path& src_path, const Path& dest_p | |||
| 
 | ||||
|     // TODO: Verify these return codes with HW
 | ||||
|     if (!path_parser_src.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid src path {}", src_path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid src path {}", src_path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|     const PathParser path_parser_dest(dest_path); | ||||
| 
 | ||||
|     if (!path_parser_dest.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid dest path {}", dest_path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid dest path {}", dest_path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|  | @ -325,7 +325,7 @@ ResultVal<std::unique_ptr<DirectoryBackend>> SDMCArchive::OpenDirectory(const Pa | |||
|     const PathParser path_parser(path); | ||||
| 
 | ||||
|     if (!path_parser.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|  | @ -333,15 +333,15 @@ ResultVal<std::unique_ptr<DirectoryBackend>> SDMCArchive::OpenDirectory(const Pa | |||
| 
 | ||||
|     switch (path_parser.GetHostStatus(mount_point)) { | ||||
|     case PathParser::InvalidMountPoint: | ||||
|         NGLOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         LOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         return ERROR_NOT_FOUND; | ||||
|     case PathParser::PathNotFound: | ||||
|     case PathParser::NotFound: | ||||
|     case PathParser::FileFound: | ||||
|         NGLOG_ERROR(Service_FS, "{} not found", full_path); | ||||
|         LOG_ERROR(Service_FS, "{} not found", full_path); | ||||
|         return ERROR_NOT_FOUND; | ||||
|     case PathParser::FileInPath: | ||||
|         NGLOG_ERROR(Service_FS, "Unexpected file in path {}", full_path); | ||||
|         LOG_ERROR(Service_FS, "Unexpected file in path {}", full_path); | ||||
|         return ERROR_UNEXPECTED_FILE_OR_DIRECTORY_SDMC; | ||||
|     case PathParser::DirectoryFound: | ||||
|         break; // Expected 'success' case
 | ||||
|  | @ -359,17 +359,17 @@ u64 SDMCArchive::GetFreeBytes() const { | |||
| ArchiveFactory_SDMC::ArchiveFactory_SDMC(const std::string& sdmc_directory) | ||||
|     : sdmc_directory(sdmc_directory) { | ||||
| 
 | ||||
|     NGLOG_DEBUG(Service_FS, "Directory {} set as SDMC.", sdmc_directory); | ||||
|     LOG_DEBUG(Service_FS, "Directory {} set as SDMC.", sdmc_directory); | ||||
| } | ||||
| 
 | ||||
| bool ArchiveFactory_SDMC::Initialize() { | ||||
|     if (!Settings::values.use_virtual_sd) { | ||||
|         NGLOG_WARNING(Service_FS, "SDMC disabled by config."); | ||||
|         LOG_WARNING(Service_FS, "SDMC disabled by config."); | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|     if (!FileUtil::CreateFullPath(sdmc_directory)) { | ||||
|         NGLOG_ERROR(Service_FS, "Unable to create SDMC path."); | ||||
|         LOG_ERROR(Service_FS, "Unable to create SDMC path."); | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|  | @ -389,7 +389,7 @@ ResultCode ArchiveFactory_SDMC::Format(const Path& path, | |||
| 
 | ||||
| ResultVal<ArchiveFormatInfo> ArchiveFactory_SDMC::GetFormatInfo(const Path& path) const { | ||||
|     // TODO(Subv): Implement
 | ||||
|     NGLOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive {}", GetName()); | ||||
|     LOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive {}", GetName()); | ||||
|     return ResultCode(-1); | ||||
| } | ||||
| } // namespace FileSys
 | ||||
|  |  | |||
|  | @ -18,7 +18,7 @@ namespace FileSys { | |||
| ResultVal<std::unique_ptr<FileBackend>> SDMCWriteOnlyArchive::OpenFile(const Path& path, | ||||
|                                                                        const Mode& mode) const { | ||||
|     if (mode.read_flag) { | ||||
|         NGLOG_ERROR(Service_FS, "Read flag is not supported"); | ||||
|         LOG_ERROR(Service_FS, "Read flag is not supported"); | ||||
|         return ERROR_INVALID_READ_FLAG; | ||||
|     } | ||||
|     return SDMCArchive::OpenFileBase(path, mode); | ||||
|  | @ -26,23 +26,23 @@ ResultVal<std::unique_ptr<FileBackend>> SDMCWriteOnlyArchive::OpenFile(const Pat | |||
| 
 | ||||
| ResultVal<std::unique_ptr<DirectoryBackend>> SDMCWriteOnlyArchive::OpenDirectory( | ||||
|     const Path& path) const { | ||||
|     NGLOG_ERROR(Service_FS, "Not supported"); | ||||
|     LOG_ERROR(Service_FS, "Not supported"); | ||||
|     return ERROR_UNSUPPORTED_OPEN_FLAGS; | ||||
| } | ||||
| 
 | ||||
| ArchiveFactory_SDMCWriteOnly::ArchiveFactory_SDMCWriteOnly(const std::string& mount_point) | ||||
|     : sdmc_directory(mount_point) { | ||||
|     NGLOG_DEBUG(Service_FS, "Directory {} set as SDMCWriteOnly.", sdmc_directory); | ||||
|     LOG_DEBUG(Service_FS, "Directory {} set as SDMCWriteOnly.", sdmc_directory); | ||||
| } | ||||
| 
 | ||||
| bool ArchiveFactory_SDMCWriteOnly::Initialize() { | ||||
|     if (!Settings::values.use_virtual_sd) { | ||||
|         NGLOG_WARNING(Service_FS, "SDMC disabled by config."); | ||||
|         LOG_WARNING(Service_FS, "SDMC disabled by config."); | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|     if (!FileUtil::CreateFullPath(sdmc_directory)) { | ||||
|         NGLOG_ERROR(Service_FS, "Unable to create SDMC path."); | ||||
|         LOG_ERROR(Service_FS, "Unable to create SDMC path."); | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|  | @ -57,13 +57,13 @@ ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SDMCWriteOnly::Open(co | |||
| ResultCode ArchiveFactory_SDMCWriteOnly::Format(const Path& path, | ||||
|                                                 const FileSys::ArchiveFormatInfo& format_info) { | ||||
|     // TODO(wwylele): hwtest this
 | ||||
|     NGLOG_ERROR(Service_FS, "Attempted to format a SDMC write-only archive."); | ||||
|     LOG_ERROR(Service_FS, "Attempted to format a SDMC write-only archive."); | ||||
|     return ResultCode(-1); | ||||
| } | ||||
| 
 | ||||
| ResultVal<ArchiveFormatInfo> ArchiveFactory_SDMCWriteOnly::GetFormatInfo(const Path& path) const { | ||||
|     // TODO(Subv): Implement
 | ||||
|     NGLOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive {}", GetName()); | ||||
|     LOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive {}", GetName()); | ||||
|     return ResultCode(-1); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -38,12 +38,12 @@ public: | |||
| 
 | ||||
|     ResultVal<size_t> Read(u64 offset, size_t length, u8* buffer) const override { | ||||
|         if (offset != 0) { | ||||
|             NGLOG_ERROR(Service_FS, "offset must be zero!"); | ||||
|             LOG_ERROR(Service_FS, "offset must be zero!"); | ||||
|             return ERROR_UNSUPPORTED_OPEN_FLAGS; | ||||
|         } | ||||
| 
 | ||||
|         if (length != data->size()) { | ||||
|             NGLOG_ERROR(Service_FS, "size must match the file size!"); | ||||
|             LOG_ERROR(Service_FS, "size must match the file size!"); | ||||
|             return ERROR_INCORRECT_EXEFS_READ_SIZE; | ||||
|         } | ||||
| 
 | ||||
|  | @ -52,7 +52,7 @@ public: | |||
|     } | ||||
| 
 | ||||
|     ResultVal<size_t> Write(u64 offset, size_t length, bool flush, const u8* buffer) override { | ||||
|         NGLOG_ERROR(Service_FS, "The file is read-only!"); | ||||
|         LOG_ERROR(Service_FS, "The file is read-only!"); | ||||
|         return ERROR_UNSUPPORTED_OPEN_FLAGS; | ||||
|     } | ||||
| 
 | ||||
|  | @ -88,13 +88,13 @@ public: | |||
|         // Note: SelfNCCHArchive doesn't check the open mode.
 | ||||
| 
 | ||||
|         if (path.GetType() != LowPathType::Binary) { | ||||
|             NGLOG_ERROR(Service_FS, "Path need to be Binary"); | ||||
|             LOG_ERROR(Service_FS, "Path need to be Binary"); | ||||
|             return ERROR_INVALID_PATH; | ||||
|         } | ||||
| 
 | ||||
|         std::vector<u8> binary = path.AsBinary(); | ||||
|         if (binary.size() != sizeof(SelfNCCHFilePath)) { | ||||
|             NGLOG_ERROR(Service_FS, "Wrong path size {}", binary.size()); | ||||
|             LOG_ERROR(Service_FS, "Wrong path size {}", binary.size()); | ||||
|             return ERROR_INVALID_PATH; | ||||
|         } | ||||
| 
 | ||||
|  | @ -109,7 +109,7 @@ public: | |||
|             return OpenRomFS(); | ||||
| 
 | ||||
|         case SelfNCCHFilePathType::Code: | ||||
|             NGLOG_ERROR(Service_FS, "Reading the code section is not supported!"); | ||||
|             LOG_ERROR(Service_FS, "Reading the code section is not supported!"); | ||||
|             return ERROR_COMMAND_NOT_ALLOWED; | ||||
| 
 | ||||
|         case SelfNCCHFilePathType::ExeFS: { | ||||
|  | @ -119,48 +119,48 @@ public: | |||
|             return OpenExeFS(filename); | ||||
|         } | ||||
|         default: | ||||
|             NGLOG_ERROR(Service_FS, "Unknown file type {}!", static_cast<u32>(file_path.type)); | ||||
|             LOG_ERROR(Service_FS, "Unknown file type {}!", static_cast<u32>(file_path.type)); | ||||
|             return ERROR_INVALID_PATH; | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     ResultCode DeleteFile(const Path& path) const override { | ||||
|         NGLOG_ERROR(Service_FS, "Unsupported"); | ||||
|         LOG_ERROR(Service_FS, "Unsupported"); | ||||
|         return ERROR_UNSUPPORTED_OPEN_FLAGS; | ||||
|     } | ||||
| 
 | ||||
|     ResultCode RenameFile(const Path& src_path, const Path& dest_path) const override { | ||||
|         NGLOG_ERROR(Service_FS, "Unsupported"); | ||||
|         LOG_ERROR(Service_FS, "Unsupported"); | ||||
|         return ERROR_UNSUPPORTED_OPEN_FLAGS; | ||||
|     } | ||||
| 
 | ||||
|     ResultCode DeleteDirectory(const Path& path) const override { | ||||
|         NGLOG_ERROR(Service_FS, "Unsupported"); | ||||
|         LOG_ERROR(Service_FS, "Unsupported"); | ||||
|         return ERROR_UNSUPPORTED_OPEN_FLAGS; | ||||
|     } | ||||
| 
 | ||||
|     ResultCode DeleteDirectoryRecursively(const Path& path) const override { | ||||
|         NGLOG_ERROR(Service_FS, "Unsupported"); | ||||
|         LOG_ERROR(Service_FS, "Unsupported"); | ||||
|         return ERROR_UNSUPPORTED_OPEN_FLAGS; | ||||
|     } | ||||
| 
 | ||||
|     ResultCode CreateFile(const Path& path, u64 size) const override { | ||||
|         NGLOG_ERROR(Service_FS, "Unsupported"); | ||||
|         LOG_ERROR(Service_FS, "Unsupported"); | ||||
|         return ERROR_UNSUPPORTED_OPEN_FLAGS; | ||||
|     } | ||||
| 
 | ||||
|     ResultCode CreateDirectory(const Path& path) const override { | ||||
|         NGLOG_ERROR(Service_FS, "Unsupported"); | ||||
|         LOG_ERROR(Service_FS, "Unsupported"); | ||||
|         return ERROR_UNSUPPORTED_OPEN_FLAGS; | ||||
|     } | ||||
| 
 | ||||
|     ResultCode RenameDirectory(const Path& src_path, const Path& dest_path) const override { | ||||
|         NGLOG_ERROR(Service_FS, "Unsupported"); | ||||
|         LOG_ERROR(Service_FS, "Unsupported"); | ||||
|         return ERROR_UNSUPPORTED_OPEN_FLAGS; | ||||
|     } | ||||
| 
 | ||||
|     ResultVal<std::unique_ptr<DirectoryBackend>> OpenDirectory(const Path& path) const override { | ||||
|         NGLOG_ERROR(Service_FS, "Unsupported"); | ||||
|         LOG_ERROR(Service_FS, "Unsupported"); | ||||
|         return ERROR_UNSUPPORTED_OPEN_FLAGS; | ||||
|     } | ||||
| 
 | ||||
|  | @ -177,7 +177,7 @@ private: | |||
|                 std::make_unique<IVFCFile>(ncch_data.romfs_file, ncch_data.romfs_offset, | ||||
|                                            ncch_data.romfs_size, std::move(delay_generator))); | ||||
|         } else { | ||||
|             NGLOG_INFO(Service_FS, "Unable to read RomFS"); | ||||
|             LOG_INFO(Service_FS, "Unable to read RomFS"); | ||||
|             return ERROR_ROMFS_NOT_FOUND; | ||||
|         } | ||||
|     } | ||||
|  | @ -190,7 +190,7 @@ private: | |||
|                 ncch_data.update_romfs_file, ncch_data.update_romfs_offset, | ||||
|                 ncch_data.update_romfs_size, std::move(delay_generator))); | ||||
|         } else { | ||||
|             NGLOG_INFO(Service_FS, "Unable to read update RomFS"); | ||||
|             LOG_INFO(Service_FS, "Unable to read update RomFS"); | ||||
|             return ERROR_ROMFS_NOT_FOUND; | ||||
|         } | ||||
|     } | ||||
|  | @ -202,7 +202,7 @@ private: | |||
|                     std::make_unique<ExeFSSectionFile>(ncch_data.icon)); | ||||
|             } | ||||
| 
 | ||||
|             NGLOG_WARNING(Service_FS, "Unable to read icon"); | ||||
|             LOG_WARNING(Service_FS, "Unable to read icon"); | ||||
|             return ERROR_EXEFS_SECTION_NOT_FOUND; | ||||
|         } | ||||
| 
 | ||||
|  | @ -212,7 +212,7 @@ private: | |||
|                     std::make_unique<ExeFSSectionFile>(ncch_data.logo)); | ||||
|             } | ||||
| 
 | ||||
|             NGLOG_WARNING(Service_FS, "Unable to read logo"); | ||||
|             LOG_WARNING(Service_FS, "Unable to read logo"); | ||||
|             return ERROR_EXEFS_SECTION_NOT_FOUND; | ||||
|         } | ||||
| 
 | ||||
|  | @ -222,11 +222,11 @@ private: | |||
|                     std::make_unique<ExeFSSectionFile>(ncch_data.banner)); | ||||
|             } | ||||
| 
 | ||||
|             NGLOG_WARNING(Service_FS, "Unable to read banner"); | ||||
|             LOG_WARNING(Service_FS, "Unable to read banner"); | ||||
|             return ERROR_EXEFS_SECTION_NOT_FOUND; | ||||
|         } | ||||
| 
 | ||||
|         NGLOG_ERROR(Service_FS, "Unknown ExeFS section {}!", filename); | ||||
|         LOG_ERROR(Service_FS, "Unknown ExeFS section {}!", filename); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|  | @ -236,16 +236,16 @@ private: | |||
| void ArchiveFactory_SelfNCCH::Register(Loader::AppLoader& app_loader) { | ||||
|     u64 program_id = 0; | ||||
|     if (app_loader.ReadProgramId(program_id) != Loader::ResultStatus::Success) { | ||||
|         NGLOG_WARNING( | ||||
|         LOG_WARNING( | ||||
|             Service_FS, | ||||
|             "Could not read program id when registering with SelfNCCH, this might be a 3dsx file"); | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_DEBUG(Service_FS, "Registering program {:016X} with the SelfNCCH archive factory", | ||||
|     LOG_DEBUG(Service_FS, "Registering program {:016X} with the SelfNCCH archive factory", | ||||
|                 program_id); | ||||
| 
 | ||||
|     if (ncch_data.find(program_id) != ncch_data.end()) { | ||||
|         NGLOG_WARNING(Service_FS, | ||||
|         LOG_WARNING(Service_FS, | ||||
|                       "Registering program {:016X} with SelfNCCH will override existing mapping", | ||||
|                       program_id); | ||||
|     } | ||||
|  | @ -288,12 +288,12 @@ ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SelfNCCH::Open(const P | |||
| } | ||||
| 
 | ||||
| ResultCode ArchiveFactory_SelfNCCH::Format(const Path&, const FileSys::ArchiveFormatInfo&) { | ||||
|     NGLOG_ERROR(Service_FS, "Attempted to format a SelfNCCH archive."); | ||||
|     LOG_ERROR(Service_FS, "Attempted to format a SelfNCCH archive."); | ||||
|     return ERROR_INVALID_PATH; | ||||
| } | ||||
| 
 | ||||
| ResultVal<ArchiveFormatInfo> ArchiveFactory_SelfNCCH::GetFormatInfo(const Path&) const { | ||||
|     NGLOG_ERROR(Service_FS, "Attempted to get format info of a SelfNCCH archive"); | ||||
|     LOG_ERROR(Service_FS, "Attempted to get format info of a SelfNCCH archive"); | ||||
|     return ERROR_INVALID_PATH; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -40,7 +40,7 @@ std::string GetSaveDataMetadataPath(const std::string& mount_location, u64 progr | |||
| 
 | ||||
| ArchiveSource_SDSaveData::ArchiveSource_SDSaveData(const std::string& sdmc_directory) | ||||
|     : mount_point(GetSaveDataContainerPath(sdmc_directory)) { | ||||
|     NGLOG_DEBUG(Service_FS, "Directory {} set as SaveData.", mount_point); | ||||
|     LOG_DEBUG(Service_FS, "Directory {} set as SaveData.", mount_point); | ||||
| } | ||||
| 
 | ||||
| ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveSource_SDSaveData::Open(u64 program_id) { | ||||
|  | @ -79,7 +79,7 @@ ResultVal<ArchiveFormatInfo> ArchiveSource_SDSaveData::GetFormatInfo(u64 program | |||
|     FileUtil::IOFile file(metadata_path, "rb"); | ||||
| 
 | ||||
|     if (!file.IsOpen()) { | ||||
|         NGLOG_ERROR(Service_FS, "Could not open metadata information for archive"); | ||||
|         LOG_ERROR(Service_FS, "Could not open metadata information for archive"); | ||||
|         // TODO(Subv): Verify error code
 | ||||
|         return ERR_NOT_FORMATTED; | ||||
|     } | ||||
|  |  | |||
|  | @ -72,7 +72,7 @@ ResultCode ArchiveFactory_SystemSaveData::Format(const Path& path, | |||
| 
 | ||||
| ResultVal<ArchiveFormatInfo> ArchiveFactory_SystemSaveData::GetFormatInfo(const Path& path) const { | ||||
|     // TODO(Subv): Implement
 | ||||
|     NGLOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive {}", GetName()); | ||||
|     LOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive {}", GetName()); | ||||
|     return ResultCode(-1); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -208,21 +208,21 @@ u64 CIAContainer::GetContentSize(u16 index) const { | |||
| } | ||||
| 
 | ||||
| void CIAContainer::Print() const { | ||||
|     NGLOG_DEBUG(Service_FS, "Type:               {}", static_cast<u32>(cia_header.type)); | ||||
|     NGLOG_DEBUG(Service_FS, "Version:            {}\n", static_cast<u32>(cia_header.version)); | ||||
|     LOG_DEBUG(Service_FS, "Type:               {}", static_cast<u32>(cia_header.type)); | ||||
|     LOG_DEBUG(Service_FS, "Version:            {}\n", static_cast<u32>(cia_header.version)); | ||||
| 
 | ||||
|     NGLOG_DEBUG(Service_FS, "Certificate Size: 0x{:08x} bytes", GetCertificateSize()); | ||||
|     NGLOG_DEBUG(Service_FS, "Ticket Size:      0x{:08x} bytes", GetTicketSize()); | ||||
|     NGLOG_DEBUG(Service_FS, "TMD Size:         0x{:08x} bytes", GetTitleMetadataSize()); | ||||
|     NGLOG_DEBUG(Service_FS, "Meta Size:        0x{:08x} bytes", GetMetadataSize()); | ||||
|     NGLOG_DEBUG(Service_FS, "Content Size:     0x{:08x} bytes\n", GetTotalContentSize()); | ||||
|     LOG_DEBUG(Service_FS, "Certificate Size: 0x{:08x} bytes", GetCertificateSize()); | ||||
|     LOG_DEBUG(Service_FS, "Ticket Size:      0x{:08x} bytes", GetTicketSize()); | ||||
|     LOG_DEBUG(Service_FS, "TMD Size:         0x{:08x} bytes", GetTitleMetadataSize()); | ||||
|     LOG_DEBUG(Service_FS, "Meta Size:        0x{:08x} bytes", GetMetadataSize()); | ||||
|     LOG_DEBUG(Service_FS, "Content Size:     0x{:08x} bytes\n", GetTotalContentSize()); | ||||
| 
 | ||||
|     NGLOG_DEBUG(Service_FS, "Certificate Offset: 0x{:08x} bytes", GetCertificateOffset()); | ||||
|     NGLOG_DEBUG(Service_FS, "Ticket Offset:      0x{:08x} bytes", GetTicketOffset()); | ||||
|     NGLOG_DEBUG(Service_FS, "TMD Offset:         0x{:08x} bytes", GetTitleMetadataOffset()); | ||||
|     NGLOG_DEBUG(Service_FS, "Meta Offset:        0x{:08x} bytes", GetMetadataOffset()); | ||||
|     LOG_DEBUG(Service_FS, "Certificate Offset: 0x{:08x} bytes", GetCertificateOffset()); | ||||
|     LOG_DEBUG(Service_FS, "Ticket Offset:      0x{:08x} bytes", GetTicketOffset()); | ||||
|     LOG_DEBUG(Service_FS, "TMD Offset:         0x{:08x} bytes", GetTitleMetadataOffset()); | ||||
|     LOG_DEBUG(Service_FS, "Meta Offset:        0x{:08x} bytes", GetMetadataOffset()); | ||||
|     for (u16 i = 0; i < cia_tmd.GetContentCount(); i++) { | ||||
|         NGLOG_DEBUG(Service_FS, "Content {:x} Offset:   0x{:08x} bytes", i, GetContentOffset(i)); | ||||
|         LOG_DEBUG(Service_FS, "Content {:x} Offset:   0x{:08x} bytes", i, GetContentOffset(i)); | ||||
|     } | ||||
| } | ||||
| } // namespace FileSys
 | ||||
|  |  | |||
|  | @ -67,7 +67,7 @@ u32 DiskDirectory::Read(const u32 count, Entry* entries) { | |||
|         const std::string& filename = file.virtualName; | ||||
|         Entry& entry = entries[entries_read]; | ||||
| 
 | ||||
|         NGLOG_TRACE(Service_FS, "File {}: size={} dir={}", filename, file.size, file.isDirectory); | ||||
|         LOG_TRACE(Service_FS, "File {}: size={} dir={}", filename, file.size, file.isDirectory); | ||||
| 
 | ||||
|         // TODO(Link Mauve): use a proper conversion to UTF-16.
 | ||||
|         for (size_t j = 0; j < FILENAME_LENGTH; ++j) { | ||||
|  |  | |||
|  | @ -49,7 +49,7 @@ public: | |||
|         if (delay_generator != nullptr) { | ||||
|             return delay_generator->GetReadDelayNs(length); | ||||
|         } | ||||
|         NGLOG_ERROR(Service_FS, "Delay generator was not initalized. Using default"); | ||||
|         LOG_ERROR(Service_FS, "Delay generator was not initalized. Using default"); | ||||
|         delay_generator = std::make_unique<DefaultDelayGenerator>(); | ||||
|         return delay_generator->GetReadDelayNs(length); | ||||
|     } | ||||
|  |  | |||
|  | @ -29,49 +29,49 @@ ResultVal<std::unique_ptr<FileBackend>> IVFCArchive::OpenFile(const Path& path, | |||
| } | ||||
| 
 | ||||
| ResultCode IVFCArchive::DeleteFile(const Path& path) const { | ||||
|     NGLOG_CRITICAL(Service_FS, "Attempted to delete a file from an IVFC archive ({}).", GetName()); | ||||
|     LOG_CRITICAL(Service_FS, "Attempted to delete a file from an IVFC archive ({}).", GetName()); | ||||
|     // TODO(Subv): Verify error code
 | ||||
|     return ResultCode(ErrorDescription::NoData, ErrorModule::FS, ErrorSummary::Canceled, | ||||
|                       ErrorLevel::Status); | ||||
| } | ||||
| 
 | ||||
| ResultCode IVFCArchive::RenameFile(const Path& src_path, const Path& dest_path) const { | ||||
|     NGLOG_CRITICAL(Service_FS, "Attempted to rename a file within an IVFC archive ({}).", | ||||
|     LOG_CRITICAL(Service_FS, "Attempted to rename a file within an IVFC archive ({}).", | ||||
|                    GetName()); | ||||
|     // TODO(wwylele): Use correct error code
 | ||||
|     return ResultCode(-1); | ||||
| } | ||||
| 
 | ||||
| ResultCode IVFCArchive::DeleteDirectory(const Path& path) const { | ||||
|     NGLOG_CRITICAL(Service_FS, "Attempted to delete a directory from an IVFC archive ({}).", | ||||
|     LOG_CRITICAL(Service_FS, "Attempted to delete a directory from an IVFC archive ({}).", | ||||
|                    GetName()); | ||||
|     // TODO(wwylele): Use correct error code
 | ||||
|     return ResultCode(-1); | ||||
| } | ||||
| 
 | ||||
| ResultCode IVFCArchive::DeleteDirectoryRecursively(const Path& path) const { | ||||
|     NGLOG_CRITICAL(Service_FS, "Attempted to delete a directory from an IVFC archive ({}).", | ||||
|     LOG_CRITICAL(Service_FS, "Attempted to delete a directory from an IVFC archive ({}).", | ||||
|                    GetName()); | ||||
|     // TODO(wwylele): Use correct error code
 | ||||
|     return ResultCode(-1); | ||||
| } | ||||
| 
 | ||||
| ResultCode IVFCArchive::CreateFile(const Path& path, u64 size) const { | ||||
|     NGLOG_CRITICAL(Service_FS, "Attempted to create a file in an IVFC archive ({}).", GetName()); | ||||
|     LOG_CRITICAL(Service_FS, "Attempted to create a file in an IVFC archive ({}).", GetName()); | ||||
|     // TODO: Verify error code
 | ||||
|     return ResultCode(ErrorDescription::NotAuthorized, ErrorModule::FS, ErrorSummary::NotSupported, | ||||
|                       ErrorLevel::Permanent); | ||||
| } | ||||
| 
 | ||||
| ResultCode IVFCArchive::CreateDirectory(const Path& path) const { | ||||
|     NGLOG_CRITICAL(Service_FS, "Attempted to create a directory in an IVFC archive ({}).", | ||||
|     LOG_CRITICAL(Service_FS, "Attempted to create a directory in an IVFC archive ({}).", | ||||
|                    GetName()); | ||||
|     // TODO(wwylele): Use correct error code
 | ||||
|     return ResultCode(-1); | ||||
| } | ||||
| 
 | ||||
| ResultCode IVFCArchive::RenameDirectory(const Path& src_path, const Path& dest_path) const { | ||||
|     NGLOG_CRITICAL(Service_FS, "Attempted to rename a file within an IVFC archive ({}).", | ||||
|     LOG_CRITICAL(Service_FS, "Attempted to rename a file within an IVFC archive ({}).", | ||||
|                    GetName()); | ||||
|     // TODO(wwylele): Use correct error code
 | ||||
|     return ResultCode(-1); | ||||
|  | @ -82,7 +82,7 @@ ResultVal<std::unique_ptr<DirectoryBackend>> IVFCArchive::OpenDirectory(const Pa | |||
| } | ||||
| 
 | ||||
| u64 IVFCArchive::GetFreeBytes() const { | ||||
|     NGLOG_WARNING(Service_FS, "Attempted to get the free space in an IVFC archive"); | ||||
|     LOG_WARNING(Service_FS, "Attempted to get the free space in an IVFC archive"); | ||||
|     return 0; | ||||
| } | ||||
| 
 | ||||
|  | @ -95,7 +95,7 @@ IVFCFile::IVFCFile(std::shared_ptr<FileUtil::IOFile> file, u64 offset, u64 size, | |||
| } | ||||
| 
 | ||||
| ResultVal<size_t> IVFCFile::Read(const u64 offset, const size_t length, u8* buffer) const { | ||||
|     NGLOG_TRACE(Service_FS, "called offset={}, length={}", offset, length); | ||||
|     LOG_TRACE(Service_FS, "called offset={}, length={}", offset, length); | ||||
|     romfs_file->Seek(data_offset + offset, SEEK_SET); | ||||
|     size_t read_length = (size_t)std::min((u64)length, data_size - offset); | ||||
| 
 | ||||
|  | @ -104,7 +104,7 @@ ResultVal<size_t> IVFCFile::Read(const u64 offset, const size_t length, u8* buff | |||
| 
 | ||||
| ResultVal<size_t> IVFCFile::Write(const u64 offset, const size_t length, const bool flush, | ||||
|                                   const u8* buffer) { | ||||
|     NGLOG_ERROR(Service_FS, "Attempted to write to IVFC file"); | ||||
|     LOG_ERROR(Service_FS, "Attempted to write to IVFC file"); | ||||
|     // TODO(Subv): Find error code
 | ||||
|     return MakeResult<size_t>(0); | ||||
| } | ||||
|  | @ -114,7 +114,7 @@ u64 IVFCFile::GetSize() const { | |||
| } | ||||
| 
 | ||||
| bool IVFCFile::SetSize(const u64 size) const { | ||||
|     NGLOG_ERROR(Service_FS, "Attempted to set the size of an IVFC file"); | ||||
|     LOG_ERROR(Service_FS, "Attempted to set the size of an IVFC file"); | ||||
|     return false; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -110,11 +110,11 @@ Loader::ResultStatus NCCHContainer::OpenFile(const std::string& filepath, u32 nc | |||
|     file = FileUtil::IOFile(filepath, "rb"); | ||||
| 
 | ||||
|     if (!file.IsOpen()) { | ||||
|         NGLOG_WARNING(Service_FS, "Failed to open {}", filepath); | ||||
|         LOG_WARNING(Service_FS, "Failed to open {}", filepath); | ||||
|         return Loader::ResultStatus::Error; | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_DEBUG(Service_FS, "Opened {}", filepath); | ||||
|     LOG_DEBUG(Service_FS, "Opened {}", filepath); | ||||
|     return Loader::ResultStatus::Success; | ||||
| } | ||||
| 
 | ||||
|  | @ -131,7 +131,7 @@ Loader::ResultStatus NCCHContainer::Load() { | |||
| 
 | ||||
|         // Skip NCSD header and load first NCCH (NCSD is just a container of NCCH files)...
 | ||||
|         if (Loader::MakeMagic('N', 'C', 'S', 'D') == ncch_header.magic) { | ||||
|             NGLOG_DEBUG(Service_FS, "Only loading the first (bootable) NCCH within the NCSD file!"); | ||||
|             LOG_DEBUG(Service_FS, "Only loading the first (bootable) NCCH within the NCSD file!"); | ||||
|             ncch_offset += 0x4000; | ||||
|             file.Seek(ncch_offset, SEEK_SET); | ||||
|             file.ReadBytes(&ncch_header, sizeof(NCCH_Header)); | ||||
|  | @ -159,23 +159,23 @@ Loader::ResultStatus NCCHContainer::Load() { | |||
|             u8 resource_limit_category = | ||||
|                 exheader_header.arm11_system_local_caps.resource_limit_category; | ||||
| 
 | ||||
|             NGLOG_DEBUG(Service_FS, "Name:                        {}", | ||||
|             LOG_DEBUG(Service_FS, "Name:                        {}", | ||||
|                         exheader_header.codeset_info.name); | ||||
|             NGLOG_DEBUG(Service_FS, "Program ID:                  {:016X}", ncch_header.program_id); | ||||
|             NGLOG_DEBUG(Service_FS, "Code compressed:             {}", | ||||
|             LOG_DEBUG(Service_FS, "Program ID:                  {:016X}", ncch_header.program_id); | ||||
|             LOG_DEBUG(Service_FS, "Code compressed:             {}", | ||||
|                         is_compressed ? "yes" : "no"); | ||||
|             NGLOG_DEBUG(Service_FS, "Entry point:                 0x{:08X}", entry_point); | ||||
|             NGLOG_DEBUG(Service_FS, "Code size:                   0x{:08X}", code_size); | ||||
|             NGLOG_DEBUG(Service_FS, "Stack size:                  0x{:08X}", stack_size); | ||||
|             NGLOG_DEBUG(Service_FS, "Bss size:                    0x{:08X}", bss_size); | ||||
|             NGLOG_DEBUG(Service_FS, "Core version:                {}", core_version); | ||||
|             NGLOG_DEBUG(Service_FS, "Thread priority:             0x{:X}", priority); | ||||
|             NGLOG_DEBUG(Service_FS, "Resource limit category:     {}", resource_limit_category); | ||||
|             NGLOG_DEBUG(Service_FS, "System Mode:                 {}", | ||||
|             LOG_DEBUG(Service_FS, "Entry point:                 0x{:08X}", entry_point); | ||||
|             LOG_DEBUG(Service_FS, "Code size:                   0x{:08X}", code_size); | ||||
|             LOG_DEBUG(Service_FS, "Stack size:                  0x{:08X}", stack_size); | ||||
|             LOG_DEBUG(Service_FS, "Bss size:                    0x{:08X}", bss_size); | ||||
|             LOG_DEBUG(Service_FS, "Core version:                {}", core_version); | ||||
|             LOG_DEBUG(Service_FS, "Thread priority:             0x{:X}", priority); | ||||
|             LOG_DEBUG(Service_FS, "Resource limit category:     {}", resource_limit_category); | ||||
|             LOG_DEBUG(Service_FS, "System Mode:                 {}", | ||||
|                         static_cast<int>(exheader_header.arm11_system_local_caps.system_mode)); | ||||
| 
 | ||||
|             if (exheader_header.system_info.jump_id != ncch_header.program_id) { | ||||
|                 NGLOG_ERROR(Service_FS, | ||||
|                 LOG_ERROR(Service_FS, | ||||
|                             "ExHeader Program ID mismatch: the ROM is probably encrypted."); | ||||
|                 return Loader::ResultStatus::ErrorEncrypted; | ||||
|             } | ||||
|  | @ -188,8 +188,8 @@ Loader::ResultStatus NCCHContainer::Load() { | |||
|             exefs_offset = ncch_header.exefs_offset * kBlockSize; | ||||
|             u32 exefs_size = ncch_header.exefs_size * kBlockSize; | ||||
| 
 | ||||
|             NGLOG_DEBUG(Service_FS, "ExeFS offset:                0x{:08X}", exefs_offset); | ||||
|             NGLOG_DEBUG(Service_FS, "ExeFS size:                  0x{:08X}", exefs_size); | ||||
|             LOG_DEBUG(Service_FS, "ExeFS offset:                0x{:08X}", exefs_offset); | ||||
|             LOG_DEBUG(Service_FS, "ExeFS size:                  0x{:08X}", exefs_size); | ||||
| 
 | ||||
|             file.Seek(exefs_offset + ncch_offset, SEEK_SET); | ||||
|             if (file.ReadBytes(&exefs_header, sizeof(ExeFs_Header)) != sizeof(ExeFs_Header)) | ||||
|  | @ -227,7 +227,7 @@ Loader::ResultStatus NCCHContainer::LoadOverrides() { | |||
|         exefs_file = FileUtil::IOFile(exefs_override, "rb"); | ||||
| 
 | ||||
|         if (exefs_file.ReadBytes(&exefs_header, sizeof(ExeFs_Header)) == sizeof(ExeFs_Header)) { | ||||
|             NGLOG_DEBUG(Service_FS, "Loading ExeFS section from {}", exefs_override); | ||||
|             LOG_DEBUG(Service_FS, "Loading ExeFS section from {}", exefs_override); | ||||
|             exefs_offset = 0; | ||||
|             is_tainted = true; | ||||
|             has_exefs = true; | ||||
|  | @ -239,7 +239,7 @@ Loader::ResultStatus NCCHContainer::LoadOverrides() { | |||
|     } | ||||
| 
 | ||||
|     if (is_tainted) | ||||
|         NGLOG_WARNING(Service_FS, | ||||
|         LOG_WARNING(Service_FS, | ||||
|                       "Loaded NCCH {} is tainted, application behavior may not be as expected!", | ||||
|                       filepath); | ||||
| 
 | ||||
|  | @ -267,12 +267,12 @@ Loader::ResultStatus NCCHContainer::LoadSectionExeFS(const char* name, std::vect | |||
|             file.Seek(ncch_offset + logo_offset, SEEK_SET); | ||||
| 
 | ||||
|             if (file.ReadBytes(buffer.data(), logo_size) != logo_size) { | ||||
|                 NGLOG_ERROR(Service_FS, "Could not read NCCH logo"); | ||||
|                 LOG_ERROR(Service_FS, "Could not read NCCH logo"); | ||||
|                 return Loader::ResultStatus::Error; | ||||
|             } | ||||
|             return Loader::ResultStatus::Success; | ||||
|         } else { | ||||
|             NGLOG_INFO(Service_FS, "Attempting to load logo from the ExeFS"); | ||||
|             LOG_INFO(Service_FS, "Attempting to load logo from the ExeFS"); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|  | @ -280,14 +280,14 @@ Loader::ResultStatus NCCHContainer::LoadSectionExeFS(const char* name, std::vect | |||
|     if (!exefs_file.IsOpen()) | ||||
|         return Loader::ResultStatus::Error; | ||||
| 
 | ||||
|     NGLOG_DEBUG(Service_FS, "{} sections:", kMaxSections); | ||||
|     LOG_DEBUG(Service_FS, "{} sections:", kMaxSections); | ||||
|     // Iterate through the ExeFs archive until we find a section with the specified name...
 | ||||
|     for (unsigned section_number = 0; section_number < kMaxSections; section_number++) { | ||||
|         const auto& section = exefs_header.section[section_number]; | ||||
| 
 | ||||
|         // Load the specified section...
 | ||||
|         if (strcmp(section.name, name) == 0) { | ||||
|             NGLOG_DEBUG(Service_FS, "{} - offset: 0x{:08X}, size: 0x{:08X}, name: {}", | ||||
|             LOG_DEBUG(Service_FS, "{} - offset: 0x{:08X}, size: 0x{:08X}, name: {}", | ||||
|                         section_number, section.offset, section.size, section.name); | ||||
| 
 | ||||
|             s64 section_offset = | ||||
|  | @ -348,7 +348,7 @@ Loader::ResultStatus NCCHContainer::LoadOverrideExeFSSection(const char* name, | |||
| 
 | ||||
|         section_file.Seek(0, SEEK_SET); | ||||
|         if (section_file.ReadBytes(&buffer[0], section_size) == section_size) { | ||||
|             NGLOG_WARNING(Service_FS, "File {} overriding built-in ExeFS file", section_override); | ||||
|             LOG_WARNING(Service_FS, "File {} overriding built-in ExeFS file", section_override); | ||||
|             return Loader::ResultStatus::Success; | ||||
|         } | ||||
|     } | ||||
|  | @ -365,7 +365,7 @@ Loader::ResultStatus NCCHContainer::ReadRomFS(std::shared_ptr<FileUtil::IOFile>& | |||
|         return Loader::ResultStatus::Success; | ||||
| 
 | ||||
|     if (!has_romfs) { | ||||
|         NGLOG_DEBUG(Service_FS, "RomFS requested from NCCH which has no RomFS"); | ||||
|         LOG_DEBUG(Service_FS, "RomFS requested from NCCH which has no RomFS"); | ||||
|         return Loader::ResultStatus::ErrorNotUsed; | ||||
|     } | ||||
| 
 | ||||
|  | @ -375,8 +375,8 @@ Loader::ResultStatus NCCHContainer::ReadRomFS(std::shared_ptr<FileUtil::IOFile>& | |||
|     u32 romfs_offset = ncch_offset + (ncch_header.romfs_offset * kBlockSize) + 0x1000; | ||||
|     u32 romfs_size = (ncch_header.romfs_size * kBlockSize) - 0x1000; | ||||
| 
 | ||||
|     NGLOG_DEBUG(Service_FS, "RomFS offset:           0x{:08X}", romfs_offset); | ||||
|     NGLOG_DEBUG(Service_FS, "RomFS size:             0x{:08X}", romfs_size); | ||||
|     LOG_DEBUG(Service_FS, "RomFS offset:           0x{:08X}", romfs_offset); | ||||
|     LOG_DEBUG(Service_FS, "RomFS size:             0x{:08X}", romfs_size); | ||||
| 
 | ||||
|     if (file.GetSize() < romfs_offset + romfs_size) | ||||
|         return Loader::ResultStatus::Error; | ||||
|  | @ -399,7 +399,7 @@ Loader::ResultStatus NCCHContainer::ReadOverrideRomFS(std::shared_ptr<FileUtil:: | |||
|     if (FileUtil::Exists(split_filepath)) { | ||||
|         romfs_file = std::make_shared<FileUtil::IOFile>(split_filepath, "rb"); | ||||
|         if (romfs_file->IsOpen()) { | ||||
|             NGLOG_WARNING(Service_FS, "File {} overriding built-in RomFS", split_filepath); | ||||
|             LOG_WARNING(Service_FS, "File {} overriding built-in RomFS", split_filepath); | ||||
|             offset = 0; | ||||
|             size = romfs_file->GetSize(); | ||||
|             return Loader::ResultStatus::Success; | ||||
|  |  | |||
|  | @ -29,22 +29,22 @@ public: | |||
| 
 | ||||
| ResultVal<std::unique_ptr<FileBackend>> SaveDataArchive::OpenFile(const Path& path, | ||||
|                                                                   const Mode& mode) const { | ||||
|     NGLOG_DEBUG(Service_FS, "called path={} mode={:01X}", path.DebugStr(), mode.hex); | ||||
|     LOG_DEBUG(Service_FS, "called path={} mode={:01X}", path.DebugStr(), mode.hex); | ||||
| 
 | ||||
|     const PathParser path_parser(path); | ||||
| 
 | ||||
|     if (!path_parser.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|     if (mode.hex == 0) { | ||||
|         NGLOG_ERROR(Service_FS, "Empty open mode"); | ||||
|         LOG_ERROR(Service_FS, "Empty open mode"); | ||||
|         return ERROR_UNSUPPORTED_OPEN_FLAGS; | ||||
|     } | ||||
| 
 | ||||
|     if (mode.create_flag && !mode.write_flag) { | ||||
|         NGLOG_ERROR(Service_FS, "Create flag set but write flag not set"); | ||||
|         LOG_ERROR(Service_FS, "Create flag set but write flag not set"); | ||||
|         return ERROR_UNSUPPORTED_OPEN_FLAGS; | ||||
|     } | ||||
| 
 | ||||
|  | @ -52,18 +52,18 @@ ResultVal<std::unique_ptr<FileBackend>> SaveDataArchive::OpenFile(const Path& pa | |||
| 
 | ||||
|     switch (path_parser.GetHostStatus(mount_point)) { | ||||
|     case PathParser::InvalidMountPoint: | ||||
|         NGLOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         LOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         return ERROR_FILE_NOT_FOUND; | ||||
|     case PathParser::PathNotFound: | ||||
|         NGLOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         LOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         return ERROR_PATH_NOT_FOUND; | ||||
|     case PathParser::FileInPath: | ||||
|     case PathParser::DirectoryFound: | ||||
|         NGLOG_ERROR(Service_FS, "Unexpected file or directory in {}", full_path); | ||||
|         LOG_ERROR(Service_FS, "Unexpected file or directory in {}", full_path); | ||||
|         return ERROR_UNEXPECTED_FILE_OR_DIRECTORY; | ||||
|     case PathParser::NotFound: | ||||
|         if (!mode.create_flag) { | ||||
|             NGLOG_ERROR(Service_FS, "Non-existing file {} can't be open without mode create.", | ||||
|             LOG_ERROR(Service_FS, "Non-existing file {} can't be open without mode create.", | ||||
|                         full_path); | ||||
|             return ERROR_FILE_NOT_FOUND; | ||||
|         } else { | ||||
|  | @ -77,7 +77,7 @@ ResultVal<std::unique_ptr<FileBackend>> SaveDataArchive::OpenFile(const Path& pa | |||
| 
 | ||||
|     FileUtil::IOFile file(full_path, mode.write_flag ? "r+b" : "rb"); | ||||
|     if (!file.IsOpen()) { | ||||
|         NGLOG_CRITICAL(Service_FS, "(unreachable) Unknown error opening {}", full_path); | ||||
|         LOG_CRITICAL(Service_FS, "(unreachable) Unknown error opening {}", full_path); | ||||
|         return ERROR_FILE_NOT_FOUND; | ||||
|     } | ||||
| 
 | ||||
|  | @ -90,7 +90,7 @@ ResultCode SaveDataArchive::DeleteFile(const Path& path) const { | |||
|     const PathParser path_parser(path); | ||||
| 
 | ||||
|     if (!path_parser.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|  | @ -98,15 +98,15 @@ ResultCode SaveDataArchive::DeleteFile(const Path& path) const { | |||
| 
 | ||||
|     switch (path_parser.GetHostStatus(mount_point)) { | ||||
|     case PathParser::InvalidMountPoint: | ||||
|         NGLOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         LOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         return ERROR_FILE_NOT_FOUND; | ||||
|     case PathParser::PathNotFound: | ||||
|         NGLOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         LOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         return ERROR_PATH_NOT_FOUND; | ||||
|     case PathParser::FileInPath: | ||||
|     case PathParser::DirectoryFound: | ||||
|     case PathParser::NotFound: | ||||
|         NGLOG_ERROR(Service_FS, "File not found {}", full_path); | ||||
|         LOG_ERROR(Service_FS, "File not found {}", full_path); | ||||
|         return ERROR_FILE_NOT_FOUND; | ||||
|     case PathParser::FileFound: | ||||
|         break; // Expected 'success' case
 | ||||
|  | @ -116,7 +116,7 @@ ResultCode SaveDataArchive::DeleteFile(const Path& path) const { | |||
|         return RESULT_SUCCESS; | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_CRITICAL(Service_FS, "(unreachable) Unknown error deleting {}", full_path); | ||||
|     LOG_CRITICAL(Service_FS, "(unreachable) Unknown error deleting {}", full_path); | ||||
|     return ERROR_FILE_NOT_FOUND; | ||||
| } | ||||
| 
 | ||||
|  | @ -125,14 +125,14 @@ ResultCode SaveDataArchive::RenameFile(const Path& src_path, const Path& dest_pa | |||
| 
 | ||||
|     // TODO: Verify these return codes with HW
 | ||||
|     if (!path_parser_src.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid src path {}", src_path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid src path {}", src_path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|     const PathParser path_parser_dest(dest_path); | ||||
| 
 | ||||
|     if (!path_parser_dest.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid dest path {}", dest_path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid dest path {}", dest_path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|  | @ -155,7 +155,7 @@ static ResultCode DeleteDirectoryHelper(const Path& path, const std::string& mou | |||
|     const PathParser path_parser(path); | ||||
| 
 | ||||
|     if (!path_parser.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|  | @ -166,15 +166,15 @@ static ResultCode DeleteDirectoryHelper(const Path& path, const std::string& mou | |||
| 
 | ||||
|     switch (path_parser.GetHostStatus(mount_point)) { | ||||
|     case PathParser::InvalidMountPoint: | ||||
|         NGLOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         LOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         return ERROR_PATH_NOT_FOUND; | ||||
|     case PathParser::PathNotFound: | ||||
|     case PathParser::NotFound: | ||||
|         NGLOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         LOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         return ERROR_PATH_NOT_FOUND; | ||||
|     case PathParser::FileInPath: | ||||
|     case PathParser::FileFound: | ||||
|         NGLOG_ERROR(Service_FS, "Unexpected file or directory {}", full_path); | ||||
|         LOG_ERROR(Service_FS, "Unexpected file or directory {}", full_path); | ||||
|         return ERROR_UNEXPECTED_FILE_OR_DIRECTORY; | ||||
|     case PathParser::DirectoryFound: | ||||
|         break; // Expected 'success' case
 | ||||
|  | @ -184,7 +184,7 @@ static ResultCode DeleteDirectoryHelper(const Path& path, const std::string& mou | |||
|         return RESULT_SUCCESS; | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_ERROR(Service_FS, "Directory not empty {}", full_path); | ||||
|     LOG_ERROR(Service_FS, "Directory not empty {}", full_path); | ||||
|     return ERROR_DIRECTORY_NOT_EMPTY; | ||||
| } | ||||
| 
 | ||||
|  | @ -201,7 +201,7 @@ ResultCode SaveDataArchive::CreateFile(const FileSys::Path& path, u64 size) cons | |||
|     const PathParser path_parser(path); | ||||
| 
 | ||||
|     if (!path_parser.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|  | @ -209,17 +209,17 @@ ResultCode SaveDataArchive::CreateFile(const FileSys::Path& path, u64 size) cons | |||
| 
 | ||||
|     switch (path_parser.GetHostStatus(mount_point)) { | ||||
|     case PathParser::InvalidMountPoint: | ||||
|         NGLOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         LOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         return ERROR_FILE_NOT_FOUND; | ||||
|     case PathParser::PathNotFound: | ||||
|         NGLOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         LOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         return ERROR_PATH_NOT_FOUND; | ||||
|     case PathParser::FileInPath: | ||||
|         NGLOG_ERROR(Service_FS, "Unexpected file in path {}", full_path); | ||||
|         LOG_ERROR(Service_FS, "Unexpected file in path {}", full_path); | ||||
|         return ERROR_UNEXPECTED_FILE_OR_DIRECTORY; | ||||
|     case PathParser::DirectoryFound: | ||||
|     case PathParser::FileFound: | ||||
|         NGLOG_ERROR(Service_FS, "{} already exists", full_path); | ||||
|         LOG_ERROR(Service_FS, "{} already exists", full_path); | ||||
|         return ERROR_FILE_ALREADY_EXISTS; | ||||
|     case PathParser::NotFound: | ||||
|         break; // Expected 'success' case
 | ||||
|  | @ -237,7 +237,7 @@ ResultCode SaveDataArchive::CreateFile(const FileSys::Path& path, u64 size) cons | |||
|         return RESULT_SUCCESS; | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_ERROR(Service_FS, "Too large file"); | ||||
|     LOG_ERROR(Service_FS, "Too large file"); | ||||
|     return ResultCode(ErrorDescription::TooLarge, ErrorModule::FS, ErrorSummary::OutOfResource, | ||||
|                       ErrorLevel::Info); | ||||
| } | ||||
|  | @ -246,7 +246,7 @@ ResultCode SaveDataArchive::CreateDirectory(const Path& path) const { | |||
|     const PathParser path_parser(path); | ||||
| 
 | ||||
|     if (!path_parser.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|  | @ -254,17 +254,17 @@ ResultCode SaveDataArchive::CreateDirectory(const Path& path) const { | |||
| 
 | ||||
|     switch (path_parser.GetHostStatus(mount_point)) { | ||||
|     case PathParser::InvalidMountPoint: | ||||
|         NGLOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         LOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         return ERROR_FILE_NOT_FOUND; | ||||
|     case PathParser::PathNotFound: | ||||
|         NGLOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         LOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         return ERROR_PATH_NOT_FOUND; | ||||
|     case PathParser::FileInPath: | ||||
|         NGLOG_ERROR(Service_FS, "Unexpected file in path {}", full_path); | ||||
|         LOG_ERROR(Service_FS, "Unexpected file in path {}", full_path); | ||||
|         return ERROR_UNEXPECTED_FILE_OR_DIRECTORY; | ||||
|     case PathParser::DirectoryFound: | ||||
|     case PathParser::FileFound: | ||||
|         NGLOG_ERROR(Service_FS, "{} already exists", full_path); | ||||
|         LOG_ERROR(Service_FS, "{} already exists", full_path); | ||||
|         return ERROR_DIRECTORY_ALREADY_EXISTS; | ||||
|     case PathParser::NotFound: | ||||
|         break; // Expected 'success' case
 | ||||
|  | @ -274,7 +274,7 @@ ResultCode SaveDataArchive::CreateDirectory(const Path& path) const { | |||
|         return RESULT_SUCCESS; | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_CRITICAL(Service_FS, "(unreachable) Unknown error creating {}", mount_point); | ||||
|     LOG_CRITICAL(Service_FS, "(unreachable) Unknown error creating {}", mount_point); | ||||
|     return ResultCode(ErrorDescription::NoData, ErrorModule::FS, ErrorSummary::Canceled, | ||||
|                       ErrorLevel::Status); | ||||
| } | ||||
|  | @ -284,14 +284,14 @@ ResultCode SaveDataArchive::RenameDirectory(const Path& src_path, const Path& de | |||
| 
 | ||||
|     // TODO: Verify these return codes with HW
 | ||||
|     if (!path_parser_src.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid src path {}", src_path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid src path {}", src_path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|     const PathParser path_parser_dest(dest_path); | ||||
| 
 | ||||
|     if (!path_parser_dest.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid dest path {}", dest_path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid dest path {}", dest_path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|  | @ -313,7 +313,7 @@ ResultVal<std::unique_ptr<DirectoryBackend>> SaveDataArchive::OpenDirectory( | |||
|     const PathParser path_parser(path); | ||||
| 
 | ||||
|     if (!path_parser.IsValid()) { | ||||
|         NGLOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         LOG_ERROR(Service_FS, "Invalid path {}", path.DebugStr()); | ||||
|         return ERROR_INVALID_PATH; | ||||
|     } | ||||
| 
 | ||||
|  | @ -321,15 +321,15 @@ ResultVal<std::unique_ptr<DirectoryBackend>> SaveDataArchive::OpenDirectory( | |||
| 
 | ||||
|     switch (path_parser.GetHostStatus(mount_point)) { | ||||
|     case PathParser::InvalidMountPoint: | ||||
|         NGLOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         LOG_CRITICAL(Service_FS, "(unreachable) Invalid mount point {}", mount_point); | ||||
|         return ERROR_FILE_NOT_FOUND; | ||||
|     case PathParser::PathNotFound: | ||||
|     case PathParser::NotFound: | ||||
|         NGLOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         LOG_ERROR(Service_FS, "Path not found {}", full_path); | ||||
|         return ERROR_PATH_NOT_FOUND; | ||||
|     case PathParser::FileInPath: | ||||
|     case PathParser::FileFound: | ||||
|         NGLOG_ERROR(Service_FS, "Unexpected file in path {}", full_path); | ||||
|         LOG_ERROR(Service_FS, "Unexpected file in path {}", full_path); | ||||
|         return ERROR_UNEXPECTED_FILE_OR_DIRECTORY; | ||||
|     case PathParser::DirectoryFound: | ||||
|         break; // Expected 'success' case
 | ||||
|  |  | |||
|  | @ -45,7 +45,7 @@ Loader::ResultStatus TitleMetadata::Load(const std::string& file_path) { | |||
| 
 | ||||
|     Loader::ResultStatus result = Load(file_data); | ||||
|     if (result != Loader::ResultStatus::Success) | ||||
|         NGLOG_ERROR(Service_FS, "Failed to load TMD from file {}!", file_path); | ||||
|         LOG_ERROR(Service_FS, "Failed to load TMD from file {}!", file_path); | ||||
| 
 | ||||
|     return result; | ||||
| } | ||||
|  | @ -75,7 +75,7 @@ Loader::ResultStatus TitleMetadata::Load(const std::vector<u8> file_data, size_t | |||
|     size_t expected_size = | ||||
|         body_start + sizeof(Body) + tmd_body.content_count * sizeof(ContentChunk); | ||||
|     if (total_size < expected_size) { | ||||
|         NGLOG_ERROR(Service_FS, "Malformed TMD, expected size 0x{:x}, got 0x{:x}!", expected_size, | ||||
|         LOG_ERROR(Service_FS, "Malformed TMD, expected size 0x{:x}, got 0x{:x}!", expected_size, | ||||
|                     total_size); | ||||
|         return Loader::ResultStatus::ErrorInvalidFormat; | ||||
|     } | ||||
|  | @ -209,15 +209,15 @@ void TitleMetadata::AddContentChunk(const ContentChunk& chunk) { | |||
| } | ||||
| 
 | ||||
| void TitleMetadata::Print() const { | ||||
|     NGLOG_DEBUG(Service_FS, "{} chunks", static_cast<u32>(tmd_body.content_count)); | ||||
|     LOG_DEBUG(Service_FS, "{} chunks", static_cast<u32>(tmd_body.content_count)); | ||||
| 
 | ||||
|     // Content info describes ranges of content chunks
 | ||||
|     NGLOG_DEBUG(Service_FS, "Content info:"); | ||||
|     LOG_DEBUG(Service_FS, "Content info:"); | ||||
|     for (size_t i = 0; i < tmd_body.contentinfo.size(); i++) { | ||||
|         if (tmd_body.contentinfo[i].command_count == 0) | ||||
|             break; | ||||
| 
 | ||||
|         NGLOG_DEBUG(Service_FS, "    Index {:04X}, Command Count {:04X}", | ||||
|         LOG_DEBUG(Service_FS, "    Index {:04X}, Command Count {:04X}", | ||||
|                     static_cast<u32>(tmd_body.contentinfo[i].index), | ||||
|                     static_cast<u32>(tmd_body.contentinfo[i].command_count)); | ||||
|     } | ||||
|  | @ -230,14 +230,14 @@ void TitleMetadata::Print() const { | |||
|         if (count == 0) | ||||
|             continue; | ||||
| 
 | ||||
|         NGLOG_DEBUG(Service_FS, "Content chunks for content info index {}:", i); | ||||
|         LOG_DEBUG(Service_FS, "Content chunks for content info index {}:", i); | ||||
|         for (u16 j = index; j < index + count; j++) { | ||||
|             // Don't attempt to print content we don't have
 | ||||
|             if (j > tmd_body.content_count) | ||||
|                 break; | ||||
| 
 | ||||
|             const ContentChunk& chunk = tmd_chunks[j]; | ||||
|             NGLOG_DEBUG(Service_FS, "    ID {:08X}, Index {:04X}, Type {:04x}, Size {:016X}", | ||||
|             LOG_DEBUG(Service_FS, "    ID {:08X}, Index {:04X}, Type {:04x}, Size {:016X}", | ||||
|                         static_cast<u32>(chunk.id), static_cast<u32>(chunk.index), | ||||
|                         static_cast<u32>(chunk.type), static_cast<u64>(chunk.size)); | ||||
|         } | ||||
|  |  | |||
|  | @ -25,7 +25,7 @@ std::unique_ptr<CameraInterface> CreateCamera(const std::string& name, const std | |||
|     } | ||||
| 
 | ||||
|     if (name != "blank") { | ||||
|         NGLOG_ERROR(Service_CAM, "Unknown camera {}", name); | ||||
|         LOG_ERROR(Service_CAM, "Unknown camera {}", name); | ||||
|     } | ||||
|     return std::make_unique<BlankCamera>(); | ||||
| } | ||||
|  | @ -39,7 +39,7 @@ std::unique_ptr<CameraInterface> CreateCameraPreview(const std::string& name, | |||
|     } | ||||
| 
 | ||||
|     if (name != "blank") { | ||||
|         NGLOG_ERROR(Service_CAM, "Unknown camera {}", name); | ||||
|         LOG_ERROR(Service_CAM, "Unknown camera {}", name); | ||||
|     } | ||||
|     return std::make_unique<BlankCamera>(); | ||||
| } | ||||
|  |  | |||
|  | @ -31,7 +31,7 @@ public: | |||
|      * @param flip The image flip to apply | ||||
|      * @returns a unique_ptr to the created camera object. | ||||
|      * Note: The default implementation for this is to call Create(). Derived classes may have other | ||||
|      *       Implementations. For example, A dialog may be used instead of NGLOG_ERROR when error | ||||
|      *       Implementations. For example, A dialog may be used instead of LOG_ERROR when error | ||||
|      * occurs. | ||||
|      */ | ||||
|     virtual std::unique_ptr<CameraInterface> CreatePreview(const std::string& config, int width, | ||||
|  |  | |||
|  | @ -59,7 +59,7 @@ template <typename InputDeviceType> | |||
| void RegisterFactory(const std::string& name, std::shared_ptr<Factory<InputDeviceType>> factory) { | ||||
|     auto pair = std::make_pair(name, std::move(factory)); | ||||
|     if (!Impl::FactoryList<InputDeviceType>::list.insert(std::move(pair)).second) { | ||||
|         NGLOG_ERROR(Input, "Factory {} already registered", name); | ||||
|         LOG_ERROR(Input, "Factory {} already registered", name); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  | @ -71,7 +71,7 @@ void RegisterFactory(const std::string& name, std::shared_ptr<Factory<InputDevic | |||
| template <typename InputDeviceType> | ||||
| void UnregisterFactory(const std::string& name) { | ||||
|     if (Impl::FactoryList<InputDeviceType>::list.erase(name) == 0) { | ||||
|         NGLOG_ERROR(Input, "Factory {} not registered", name); | ||||
|         LOG_ERROR(Input, "Factory {} not registered", name); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  | @ -88,7 +88,7 @@ std::unique_ptr<InputDeviceType> CreateDevice(const std::string& params) { | |||
|     const auto pair = factory_list.find(engine); | ||||
|     if (pair == factory_list.end()) { | ||||
|         if (engine != "null") { | ||||
|             NGLOG_ERROR(Input, "Unknown engine name: {}", engine); | ||||
|             LOG_ERROR(Input, "Unknown engine name: {}", engine); | ||||
|         } | ||||
|         return std::make_unique<InputDeviceType>(); | ||||
|     } | ||||
|  |  | |||
|  | @ -164,7 +164,7 @@ static u8 HexCharToValue(u8 hex) { | |||
|         return hex - 'A' + 0xA; | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_ERROR(Debug_GDBStub, "Invalid nibble: {:c} {:02x}\n", hex, hex); | ||||
|     LOG_ERROR(Debug_GDBStub, "Invalid nibble: {:c} {:02x}\n", hex, hex); | ||||
|     return 0; | ||||
| } | ||||
| 
 | ||||
|  | @ -260,7 +260,7 @@ static u8 ReadByte() { | |||
|     u8 c; | ||||
|     size_t received_size = recv(gdbserver_socket, reinterpret_cast<char*>(&c), 1, MSG_WAITALL); | ||||
|     if (received_size != 1) { | ||||
|         NGLOG_ERROR(Debug_GDBStub, "recv failed : {}", received_size); | ||||
|         LOG_ERROR(Debug_GDBStub, "recv failed : {}", received_size); | ||||
|         Shutdown(); | ||||
|     } | ||||
| 
 | ||||
|  | @ -301,7 +301,7 @@ static void RemoveBreakpoint(BreakpointType type, PAddr addr) { | |||
| 
 | ||||
|     auto bp = p.find(addr); | ||||
|     if (bp != p.end()) { | ||||
|         NGLOG_DEBUG(Debug_GDBStub, "gdb: removed a breakpoint: {:08x} bytes at {:08x} of type {}\n", | ||||
|         LOG_DEBUG(Debug_GDBStub, "gdb: removed a breakpoint: {:08x} bytes at {:08x} of type {}\n", | ||||
|                     bp->second.len, bp->second.addr, static_cast<int>(type)); | ||||
|         p.erase(addr); | ||||
|     } | ||||
|  | @ -347,7 +347,7 @@ bool CheckBreakpoint(PAddr addr, BreakpointType type) { | |||
|         } | ||||
| 
 | ||||
|         if (bp->second.active && (addr >= bp->second.addr && addr < bp->second.addr + len)) { | ||||
|             NGLOG_DEBUG(Debug_GDBStub, | ||||
|             LOG_DEBUG(Debug_GDBStub, | ||||
|                         "Found breakpoint type {} @ {:08x}, range: {:08x} - {:08x} ({} bytes)\n", | ||||
|                         static_cast<int>(type), addr, bp->second.addr, bp->second.addr + len, len); | ||||
|             return true; | ||||
|  | @ -365,7 +365,7 @@ bool CheckBreakpoint(PAddr addr, BreakpointType type) { | |||
| static void SendPacket(const char packet) { | ||||
|     size_t sent_size = send(gdbserver_socket, &packet, 1, 0); | ||||
|     if (sent_size != 1) { | ||||
|         NGLOG_ERROR(Debug_GDBStub, "send failed"); | ||||
|         LOG_ERROR(Debug_GDBStub, "send failed"); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  | @ -383,7 +383,7 @@ static void SendReply(const char* reply) { | |||
| 
 | ||||
|     command_length = static_cast<u32>(strlen(reply)); | ||||
|     if (command_length + 4 > sizeof(command_buffer)) { | ||||
|         NGLOG_ERROR(Debug_GDBStub, "command_buffer overflow in SendReply"); | ||||
|         LOG_ERROR(Debug_GDBStub, "command_buffer overflow in SendReply"); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|  | @ -400,7 +400,7 @@ static void SendReply(const char* reply) { | |||
|     while (left > 0) { | ||||
|         int sent_size = send(gdbserver_socket, reinterpret_cast<char*>(ptr), left, 0); | ||||
|         if (sent_size < 0) { | ||||
|             NGLOG_ERROR(Debug_GDBStub, "gdb: send failed"); | ||||
|             LOG_ERROR(Debug_GDBStub, "gdb: send failed"); | ||||
|             return Shutdown(); | ||||
|         } | ||||
| 
 | ||||
|  | @ -411,7 +411,7 @@ static void SendReply(const char* reply) { | |||
| 
 | ||||
| /// Handle query command from gdb client.
 | ||||
| static void HandleQuery() { | ||||
|     NGLOG_DEBUG(Debug_GDBStub, "gdb: query '{}'\n", command_buffer + 1); | ||||
|     LOG_DEBUG(Debug_GDBStub, "gdb: query '{}'\n", command_buffer + 1); | ||||
| 
 | ||||
|     const char* query = reinterpret_cast<const char*>(command_buffer + 1); | ||||
| 
 | ||||
|  | @ -453,7 +453,7 @@ static void SendSignal(u32 signal) { | |||
|     std::string buffer = | ||||
|         Common::StringFromFormat("T%02x%02x:%08x;%02x:%08x;", latest_signal, 15, | ||||
|                                  htonl(Core::CPU().GetPC()), 13, htonl(Core::CPU().GetReg(13))); | ||||
|     NGLOG_DEBUG(Debug_GDBStub, "Response: {}", buffer); | ||||
|     LOG_DEBUG(Debug_GDBStub, "Response: {}", buffer); | ||||
|     SendReply(buffer.c_str()); | ||||
| } | ||||
| 
 | ||||
|  | @ -467,18 +467,18 @@ static void ReadCommand() { | |||
|         // ignore ack
 | ||||
|         return; | ||||
|     } else if (c == 0x03) { | ||||
|         NGLOG_INFO(Debug_GDBStub, "gdb: found break command\n"); | ||||
|         LOG_INFO(Debug_GDBStub, "gdb: found break command\n"); | ||||
|         halt_loop = true; | ||||
|         SendSignal(SIGTRAP); | ||||
|         return; | ||||
|     } else if (c != GDB_STUB_START) { | ||||
|         NGLOG_DEBUG(Debug_GDBStub, "gdb: read invalid byte {:02x}\n", c); | ||||
|         LOG_DEBUG(Debug_GDBStub, "gdb: read invalid byte {:02x}\n", c); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     while ((c = ReadByte()) != GDB_STUB_END) { | ||||
|         if (command_length >= sizeof(command_buffer)) { | ||||
|             NGLOG_ERROR(Debug_GDBStub, "gdb: command_buffer overflow\n"); | ||||
|             LOG_ERROR(Debug_GDBStub, "gdb: command_buffer overflow\n"); | ||||
|             SendPacket(GDB_STUB_NACK); | ||||
|             return; | ||||
|         } | ||||
|  | @ -491,7 +491,7 @@ static void ReadCommand() { | |||
|     u8 checksum_calculated = CalculateChecksum(command_buffer, command_length); | ||||
| 
 | ||||
|     if (checksum_received != checksum_calculated) { | ||||
|         NGLOG_ERROR( | ||||
|         LOG_ERROR( | ||||
|             Debug_GDBStub, | ||||
|             "gdb: invalid checksum: calculated {:02x} and read {:02x} for ${}# (length: {})\n", | ||||
|             checksum_calculated, checksum_received, command_buffer, command_length); | ||||
|  | @ -521,7 +521,7 @@ static bool IsDataAvailable() { | |||
|     t.tv_usec = 0; | ||||
| 
 | ||||
|     if (select(gdbserver_socket + 1, &fd_socket, nullptr, nullptr, &t) < 0) { | ||||
|         NGLOG_ERROR(Debug_GDBStub, "select failed"); | ||||
|         LOG_ERROR(Debug_GDBStub, "select failed"); | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|  | @ -651,7 +651,7 @@ static void ReadMemory() { | |||
|     u32 len = | ||||
|         HexToInt(start_offset, static_cast<u32>((command_buffer + command_length) - start_offset)); | ||||
| 
 | ||||
|     NGLOG_DEBUG(Debug_GDBStub, "gdb: addr: {:08x} len: {:08x}\n", addr, len); | ||||
|     LOG_DEBUG(Debug_GDBStub, "gdb: addr: {:08x} len: {:08x}\n", addr, len); | ||||
| 
 | ||||
|     if (len * 2 > sizeof(reply)) { | ||||
|         SendReply("E01"); | ||||
|  | @ -739,7 +739,7 @@ static bool CommitBreakpoint(BreakpointType type, PAddr addr, u32 len) { | |||
|     breakpoint.len = len; | ||||
|     p.insert({addr, breakpoint}); | ||||
| 
 | ||||
|     NGLOG_DEBUG(Debug_GDBStub, "gdb: added {} breakpoint: {:08x} bytes at {:08x}\n", | ||||
|     LOG_DEBUG(Debug_GDBStub, "gdb: added {} breakpoint: {:08x} bytes at {:08x}\n", | ||||
|                 static_cast<int>(type), breakpoint.len, breakpoint.addr); | ||||
| 
 | ||||
|     return true; | ||||
|  | @ -847,7 +847,7 @@ void HandlePacket() { | |||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_DEBUG(Debug_GDBStub, "Packet: {}", command_buffer); | ||||
|     LOG_DEBUG(Debug_GDBStub, "Packet: {}", command_buffer); | ||||
| 
 | ||||
|     switch (command_buffer[0]) { | ||||
|     case 'q': | ||||
|  | @ -861,7 +861,7 @@ void HandlePacket() { | |||
|         break; | ||||
|     case 'k': | ||||
|         Shutdown(); | ||||
|         NGLOG_INFO(Debug_GDBStub, "killed by gdb"); | ||||
|         LOG_INFO(Debug_GDBStub, "killed by gdb"); | ||||
|         return; | ||||
|     case 'g': | ||||
|         ReadRegisters(); | ||||
|  | @ -940,7 +940,7 @@ static void Init(u16 port) { | |||
|     breakpoints_write.clear(); | ||||
| 
 | ||||
|     // Start gdb server
 | ||||
|     NGLOG_INFO(Debug_GDBStub, "Starting GDB server on port {}...", port); | ||||
|     LOG_INFO(Debug_GDBStub, "Starting GDB server on port {}...", port); | ||||
| 
 | ||||
|     sockaddr_in saddr_server = {}; | ||||
|     saddr_server.sin_family = AF_INET; | ||||
|  | @ -953,28 +953,28 @@ static void Init(u16 port) { | |||
| 
 | ||||
|     int tmpsock = static_cast<int>(socket(PF_INET, SOCK_STREAM, 0)); | ||||
|     if (tmpsock == -1) { | ||||
|         NGLOG_ERROR(Debug_GDBStub, "Failed to create gdb socket"); | ||||
|         LOG_ERROR(Debug_GDBStub, "Failed to create gdb socket"); | ||||
|     } | ||||
| 
 | ||||
|     // Set socket to SO_REUSEADDR so it can always bind on the same port
 | ||||
|     int reuse_enabled = 1; | ||||
|     if (setsockopt(tmpsock, SOL_SOCKET, SO_REUSEADDR, (const char*)&reuse_enabled, | ||||
|                    sizeof(reuse_enabled)) < 0) { | ||||
|         NGLOG_ERROR(Debug_GDBStub, "Failed to set gdb socket option"); | ||||
|         LOG_ERROR(Debug_GDBStub, "Failed to set gdb socket option"); | ||||
|     } | ||||
| 
 | ||||
|     const sockaddr* server_addr = reinterpret_cast<const sockaddr*>(&saddr_server); | ||||
|     socklen_t server_addrlen = sizeof(saddr_server); | ||||
|     if (bind(tmpsock, server_addr, server_addrlen) < 0) { | ||||
|         NGLOG_ERROR(Debug_GDBStub, "Failed to bind gdb socket"); | ||||
|         LOG_ERROR(Debug_GDBStub, "Failed to bind gdb socket"); | ||||
|     } | ||||
| 
 | ||||
|     if (listen(tmpsock, 1) < 0) { | ||||
|         NGLOG_ERROR(Debug_GDBStub, "Failed to listen to gdb socket"); | ||||
|         LOG_ERROR(Debug_GDBStub, "Failed to listen to gdb socket"); | ||||
|     } | ||||
| 
 | ||||
|     // Wait for gdb to connect
 | ||||
|     NGLOG_INFO(Debug_GDBStub, "Waiting for gdb to connect...\n"); | ||||
|     LOG_INFO(Debug_GDBStub, "Waiting for gdb to connect...\n"); | ||||
|     sockaddr_in saddr_client; | ||||
|     sockaddr* client_addr = reinterpret_cast<sockaddr*>(&saddr_client); | ||||
|     socklen_t client_addrlen = sizeof(saddr_client); | ||||
|  | @ -985,9 +985,9 @@ static void Init(u16 port) { | |||
|         halt_loop = false; | ||||
|         step_loop = false; | ||||
| 
 | ||||
|         NGLOG_ERROR(Debug_GDBStub, "Failed to accept gdb client"); | ||||
|         LOG_ERROR(Debug_GDBStub, "Failed to accept gdb client"); | ||||
|     } else { | ||||
|         NGLOG_INFO(Debug_GDBStub, "Client connected.\n"); | ||||
|         LOG_INFO(Debug_GDBStub, "Client connected.\n"); | ||||
|         saddr_client.sin_addr.s_addr = ntohl(saddr_client.sin_addr.s_addr); | ||||
|     } | ||||
| 
 | ||||
|  | @ -1006,7 +1006,7 @@ void Shutdown() { | |||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_INFO(Debug_GDBStub, "Stopping GDB ..."); | ||||
|     LOG_INFO(Debug_GDBStub, "Stopping GDB ..."); | ||||
|     if (gdbserver_socket != -1) { | ||||
|         shutdown(gdbserver_socket, SHUT_RDWR); | ||||
|         gdbserver_socket = -1; | ||||
|  | @ -1016,7 +1016,7 @@ void Shutdown() { | |||
|     WSACleanup(); | ||||
| #endif | ||||
| 
 | ||||
|     NGLOG_INFO(Debug_GDBStub, "GDB stopped."); | ||||
|     LOG_INFO(Debug_GDBStub, "GDB stopped."); | ||||
| } | ||||
| 
 | ||||
| bool IsServerEnabled() { | ||||
|  |  | |||
|  | @ -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"); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -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); | ||||
|  |  | |||
|  | @ -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); | ||||
|  |  | |||
|  | @ -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); | ||||
|  |  | |||
|  | @ -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); | ||||
|  |  | |||
|  | @ -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; | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -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)); | ||||
|  |  | |||
|  | @ -115,7 +115,7 @@ 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}", | ||||
|         LOG_CRITICAL(Loader, "Mapping size overflowed: address=0x{:08X} size=0x{:X}", | ||||
|                        mapping.address, mapping.size); | ||||
|         return; | ||||
|     } | ||||
|  | @ -126,7 +126,7 @@ void HandleSpecialMapping(VMManager& address_space, const AddressMapping& mappin | |||
|                    mapping_limit <= area.vaddr_base + area.size; | ||||
|         }); | ||||
|     if (area == std::end(memory_areas)) { | ||||
|         NGLOG_ERROR(Loader, | ||||
|         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); | ||||
|  | @ -135,7 +135,7 @@ void HandleSpecialMapping(VMManager& address_space, const AddressMapping& mappin | |||
| 
 | ||||
|     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}", | ||||
|         LOG_ERROR(Loader, "MMIO mappings are not supported yet. phys_addr=0x{:08X}", | ||||
|                     area->paddr_base + offset_into_region); | ||||
|         return; | ||||
|     } | ||||
|  |  | |||
|  | @ -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); | ||||
|  |  | |||
|  | @ -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); | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  |  | |||
|  | @ -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; | ||||
|     } | ||||
|  |  | |||
|  | @ -106,14 +106,14 @@ 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", | ||||
|         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", | ||||
|         LOG_ERROR(Kernel, "cannot map id={}, address=0x{08X} name={}, permissions don't match", | ||||
|                     GetObjectId(), address, name); | ||||
|         return ERR_INVALID_COMBINATION; | ||||
|     } | ||||
|  | @ -121,7 +121,7 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi | |||
|     // 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", | ||||
|         LOG_ERROR(Kernel, "cannot map id={}, address=0x{:08X} name={}, permissions don't match", | ||||
|                     GetObjectId(), address, name); | ||||
|         return ERR_WRONG_PERMISSION; | ||||
|     } | ||||
|  | @ -137,7 +137,7 @@ 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", | ||||
|             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); | ||||
|  |  | |||
|  | @ -58,7 +58,7 @@ 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, | ||||
|     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); | ||||
|  | @ -74,7 +74,7 @@ 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}", | ||||
|         LOG_WARNING(Kernel_SVC, "ControlMemory with specified region not supported, region={:X}", | ||||
|                       region); | ||||
|     } | ||||
| 
 | ||||
|  | @ -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,7 +176,7 @@ 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, | ||||
|     LOG_TRACE(Kernel_SVC, | ||||
|                 "called memblock=0x{:08X}, addr=0x{:08X}, mypermissions=0x{:08X}, " | ||||
|                 "otherpermission={}", | ||||
|                 handle, addr, permissions, other_permissions); | ||||
|  | @ -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,7 +273,7 @@ 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, | ||||
|     LOG_TRACE(Kernel_SVC, "called handle=0x{:08X}({}:{}), nanoseconds={}", handle, | ||||
|                 object->GetTypeName(), object->GetName(), nano_seconds); | ||||
| 
 | ||||
|     if (object->ShouldWait(thread)) { | ||||
|  | @ -617,14 +617,14 @@ 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, | ||||
|     LOG_TRACE(Kernel_SVC, | ||||
|                 "called handle=0x{:08X}, address=0x{:08X}, type=0x{:08X}, value=0x{:08X}", handle, | ||||
|                 address, type, value); | ||||
| 
 | ||||
|  | @ -642,7 +642,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 +658,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,7 +684,7 @@ 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={}", | ||||
|     LOG_TRACE(Kernel_SVC, "called resource_limit={:08X}, names={:08X}, name_count={}", | ||||
|                 resource_limit_handle, names, name_count); | ||||
| 
 | ||||
|     SharedPtr<ResourceLimit> resource_limit = | ||||
|  | @ -704,7 +704,7 @@ 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={}", | ||||
|     LOG_TRACE(Kernel_SVC, "called resource_limit={:08X}, names={:08X}, name_count={}", | ||||
|                 resource_limit_handle, names, name_count); | ||||
| 
 | ||||
|     SharedPtr<ResourceLimit> resource_limit = | ||||
|  | @ -745,11 +745,11 @@ static ResultCode CreateThread(Handle* out_handle, u32 priority, u32 entry_point | |||
|     case THREADPROCESSORID_0: | ||||
|         break; | ||||
|     case THREADPROCESSORID_ALL: | ||||
|         NGLOG_INFO(Kernel_SVC, | ||||
|         LOG_INFO(Kernel_SVC, | ||||
|                    "Newly created thread is allowed to be run in any Core, unimplemented."); | ||||
|         break; | ||||
|     case THREADPROCESSORID_1: | ||||
|         NGLOG_ERROR(Kernel_SVC, | ||||
|         LOG_ERROR(Kernel_SVC, | ||||
|                     "Newly created thread must run in the SysCore (Core1), unimplemented."); | ||||
|         break; | ||||
|     default: | ||||
|  | @ -769,7 +769,7 @@ static ResultCode CreateThread(Handle* out_handle, u32 priority, u32 entry_point | |||
| 
 | ||||
|     Core::System::GetInstance().PrepareReschedule(); | ||||
| 
 | ||||
|     NGLOG_TRACE(Kernel_SVC, | ||||
|     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); | ||||
|  | @ -779,7 +779,7 @@ static ResultCode CreateThread(Handle* out_handle, u32 priority, u32 entry_point | |||
| 
 | ||||
| /// 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,7 +829,7 @@ 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}", | ||||
|     LOG_TRACE(Kernel_SVC, "called initial_locked={} : created handle=0x{:08X}", | ||||
|                 initial_locked ? "true" : "false", *out_handle); | ||||
| 
 | ||||
|     return RESULT_SUCCESS; | ||||
|  | @ -837,7 +837,7 @@ static ResultCode CreateMutex(Handle* out_handle, u32 initial_locked) { | |||
| 
 | ||||
| /// 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 +848,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 +860,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 +876,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 +892,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}", | ||||
|     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 +928,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,7 +943,7 @@ 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, | ||||
|     LOG_TRACE(Kernel_SVC, "called reset_type=0x{:08X} : created handle=0x{:08X}", reset_type, | ||||
|                 *out_handle); | ||||
|     return RESULT_SUCCESS; | ||||
| } | ||||
|  | @ -951,13 +951,13 @@ static ResultCode CreateEvent(Handle* out_handle, u32 reset_type) { | |||
| /// 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 +970,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 +986,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, | ||||
|     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 +1005,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 +1022,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 +1035,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 +1106,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 +1123,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 +1146,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 +1161,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 +1181,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 +1204,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 +1217,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 +1229,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 +1238,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 +1389,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 +1411,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); | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  |  | |||
|  | @ -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, | ||||
|         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,7 +375,7 @@ 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, | ||||
|             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); | ||||
|  |  | |||
|  | @ -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; | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -260,7 +260,7 @@ 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} {}{}{} {}", | ||||
|         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' : '-', | ||||
|  |  | |||
|  | @ -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,7 +153,7 @@ 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}", | ||||
|     LOG_WARNING(Service_AC, "(STUBBED) called unk=0x{:08X} descriptor=0x{:08X} param=0x{:08X}", | ||||
|                   unk, unk_descriptor, unk_param); | ||||
| } | ||||
| 
 | ||||
|  | @ -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); | ||||
|  |  | |||
|  | @ -143,7 +143,7 @@ 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, | ||||
|             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,7 +311,7 @@ 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}", | ||||
|                 LOG_ERROR(Service_AM, "CIA file installation aborted with error code {:08x}", | ||||
|                             result.Code().raw); | ||||
|                 return InstallStatus::ErrorAborted; | ||||
|             } | ||||
|  | @ -319,11 +319,11 @@ InstallStatus InstallCIA(const std::string& path, | |||
|         } | ||||
|         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,7 +385,7 @@ 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!", | ||||
|         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,7 +607,7 @@ 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={}", | ||||
|     LOG_WARNING(Service_AM, "(STUBBED) media_type={}, title_id=0x{:016x}, content_count={}", | ||||
|                   media_type, title_id, content_count); | ||||
| } | ||||
| 
 | ||||
|  | @ -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,7 +827,7 @@ void Module::Interface::ListDataTitleTicketInfos(Kernel::HLERequestContext& ctx) | |||
|     rb.Push(ticket_count); | ||||
|     rb.PushMappedBuffer(ticket_info_out); | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_AM, | ||||
|     LOG_WARNING(Service_AM, | ||||
|                   "(STUBBED) ticket_count=0x{:08X}, title_id=0x{:016x}, start_index=0x{:08X}", | ||||
|                   ticket_count, title_id, start_index); | ||||
| } | ||||
|  | @ -857,7 +857,7 @@ 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}", | ||||
|         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,7 +891,7 @@ 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}", | ||||
|     LOG_WARNING(Service_AM, "(STUBBED) ticket_list_count=0x{:08x}, ticket_index=0x{:08x}", | ||||
|                   ticket_list_count, ticket_index); | ||||
| } | ||||
| 
 | ||||
|  | @ -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) { | ||||
|  |  | |||
|  | @ -170,7 +170,7 @@ 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}", | ||||
|         LOG_DEBUG(Service_APT, "No applet was registered with the id {:03X}", | ||||
|                     static_cast<u32>(parameter.destination_id)); | ||||
|         return; | ||||
|     } | ||||
|  | @ -329,7 +329,7 @@ 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}", | ||||
|         LOG_WARNING(Service_APT, "applet has already been started id={:08X}", | ||||
|                       static_cast<u32>(applet_id)); | ||||
|         return RESULT_SUCCESS; | ||||
|     } else { | ||||
|  | @ -353,7 +353,7 @@ 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}", | ||||
|         LOG_WARNING(Service_APT, "applet has already been started id={:08X}", | ||||
|                       static_cast<u32>(applet_id)); | ||||
|         return RESULT_SUCCESS; | ||||
|     } else { | ||||
|  | @ -400,7 +400,7 @@ 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}", | ||||
|         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}); | ||||
|  | @ -408,7 +408,7 @@ ResultVal<AppletManager::AppletInfo> AppletManager::GetAppletInfo(AppletId app_i | |||
| 
 | ||||
|     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); | ||||
|     } | ||||
|  |  | |||
|  | @ -32,7 +32,7 @@ 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}", | ||||
|     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); | ||||
|  | @ -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,7 +306,7 @@ void Module::Interface::SendParameter(Kernel::HLERequestContext& ctx) { | |||
|     Kernel::SharedPtr<Kernel::Object> object = rp.PopGenericObject(); | ||||
|     std::vector<u8> buffer = rp.PopStaticBuffer(); | ||||
| 
 | ||||
|     NGLOG_DEBUG(Service_APT, | ||||
|     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), | ||||
|  | @ -329,7 +329,7 @@ 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}", | ||||
|     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,7 +357,7 @@ 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}", | ||||
|     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,7 +393,7 @@ 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, | ||||
|     LOG_DEBUG(Service_APT, | ||||
|                 "called check_sender={}, sender_appid={:#010X}, " | ||||
|                 "check_receiver={}, receiver_appid={:#010X}", | ||||
|                 check_sender, static_cast<u32>(sender_appid), check_receiver, | ||||
|  | @ -415,7 +415,7 @@ void Module::Interface::PrepareToStartApplication(Kernel::HLERequestContext& ctx | |||
|     IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); | ||||
|     rb.Push(RESULT_SUCCESS); // No error
 | ||||
| 
 | ||||
|     NGLOG_WARNING( | ||||
|     LOG_WARNING( | ||||
|         Service_APT, | ||||
|         "(STUBBED) called title_info1={:#010X}, title_info2={:#010X}, title_info3={:#010X}," | ||||
|         "title_info4={:#010X}, flags={:#010X}", | ||||
|  | @ -433,7 +433,7 @@ void Module::Interface::StartApplication(Kernel::HLERequestContext& ctx) { | |||
|     IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); | ||||
|     rb.Push(RESULT_SUCCESS); // No error
 | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_APT, | ||||
|     LOG_WARNING(Service_APT, | ||||
|                   "(STUBBED) called buffer1_size={:#010X}, buffer2_size={:#010X}, flag={:#010X}", | ||||
|                   buffer1_size, buffer2_size, flag); | ||||
| } | ||||
|  | @ -450,7 +450,7 @@ void Module::Interface::AppletUtility(Kernel::HLERequestContext& ctx) { | |||
|     IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); | ||||
|     rb.Push(RESULT_SUCCESS); // No error
 | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_APT, | ||||
|     LOG_WARNING(Service_APT, | ||||
|                   "(STUBBED) called command={:#010X}, input_size={:#010X}, output_size={:#010X}", | ||||
|                   utility_command, input_size, output_size); | ||||
| } | ||||
|  | @ -461,13 +461,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, | ||||
|     LOG_WARNING(Service_APT, "(STUBBED) called, cpu_percent={}, value={}", apt->cpu_percent, | ||||
|                   value); | ||||
| } | ||||
| 
 | ||||
|  | @ -476,21 +476,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 +507,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 +527,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 +538,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 +551,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,7 +582,7 @@ 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={}", | ||||
|     LOG_WARNING(Service_APT, "(STUBBED) called, screen_capture_post_permission={}", | ||||
|                   static_cast<u32>(apt->screen_capture_post_permission)); | ||||
| } | ||||
| 
 | ||||
|  | @ -592,7 +592,7 @@ 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={}", | ||||
|     LOG_WARNING(Service_APT, "(STUBBED) called, screen_capture_post_permission={}", | ||||
|                   static_cast<u32>(apt->screen_capture_post_permission)); | ||||
| } | ||||
| 
 | ||||
|  | @ -600,7 +600,7 @@ 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 +623,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,7 +632,7 @@ void Module::Interface::GetStartupArgument(Kernel::HLERequestContext& ctx) { | |||
| 
 | ||||
|     std::vector<u8> parameter(parameter_size, 0); | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_APT, | ||||
|     LOG_WARNING(Service_APT, | ||||
|                   "(STUBBED) called, startup_argument_type={}, parameter_size={:#010X}", | ||||
|                   static_cast<u32>(startup_argument_type), parameter_size); | ||||
| 
 | ||||
|  | @ -658,7 +658,7 @@ 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, | ||||
|     LOG_DEBUG(Service_APT, | ||||
|                 "called, output_size={}, input_size={}, nonce_offset={}, nonce_size={}", | ||||
|                 output_size, input_size, nonce_offset, nonce_size); | ||||
| 
 | ||||
|  | @ -704,7 +704,7 @@ 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, | ||||
|     LOG_DEBUG(Service_APT, | ||||
|                 "called, output_size={}, input_size={}, nonce_offset={}, nonce_size={}", | ||||
|                 output_size, input_size, nonce_offset, nonce_size); | ||||
| 
 | ||||
|  | @ -730,7 +730,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 +751,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 +760,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) | ||||
|  |  | |||
|  | @ -28,14 +28,14 @@ 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, | ||||
|     LOG_WARNING(Service_BOSS, | ||||
|                   "(STUBBED) unk_param={:#018X}, translation={:#010X}, unk_param4={:#010X}", | ||||
|                   unk_param, translation, unk_param4); | ||||
| } | ||||
|  | @ -51,7 +51,7 @@ void RegisterStorage(Service::Interface* self) { | |||
|     cmd_buff[0] = IPC::MakeHeader(0x2, 0x1, 0); | ||||
|     cmd_buff[1] = RESULT_SUCCESS.raw; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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); | ||||
|  | @ -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,7 +88,7 @@ void RegisterPrivateRootCa(Service::Interface* self) { | |||
|     cmd_buff[2] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[3] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     LOG_WARNING(Service_BOSS, | ||||
|                   "(STUBBED) translation={:#010X}, buff_addr{:#010X}, buff_size={:#010X}", | ||||
|                   translation, buff_addr, buff_size); | ||||
| } | ||||
|  | @ -112,7 +112,7 @@ void RegisterPrivateClientCert(Service::Interface* self) { | |||
|     cmd_buff[2] = (buff2_size << 4 | 0xA); | ||||
|     cmd_buff[3] = buff2_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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}", | ||||
|  | @ -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,7 +139,7 @@ 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, | ||||
|     LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}", unk_param1, | ||||
|                   unk_param2); | ||||
| } | ||||
| 
 | ||||
|  | @ -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,7 +179,7 @@ void RegisterTask(Service::Interface* self) { | |||
|     cmd_buff[2] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[3] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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); | ||||
|  | @ -199,7 +199,7 @@ void UnregisterTask(Service::Interface* self) { | |||
|     cmd_buff[2] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[3] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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); | ||||
|  | @ -219,7 +219,7 @@ void ReconfigureTask(Service::Interface* self) { | |||
|     cmd_buff[2] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[3] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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); | ||||
|  | @ -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,7 +246,7 @@ void GetStepIdList(Service::Interface* self) { | |||
|     cmd_buff[2] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[3] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     LOG_WARNING(Service_BOSS, | ||||
|                   "(STUBBED) translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}", | ||||
|                   translation, buff_addr, buff_size); | ||||
| } | ||||
|  | @ -269,7 +269,7 @@ void GetNsDataIdList(Service::Interface* self) { | |||
|     cmd_buff[4] = (buff_size << 4 | 0xC); | ||||
|     cmd_buff[5] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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}", | ||||
|  | @ -295,7 +295,7 @@ void GetOwnNsDataIdList(Service::Interface* self) { | |||
|     cmd_buff[4] = (buff_size << 4 | 0xC); | ||||
|     cmd_buff[5] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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}", | ||||
|  | @ -321,7 +321,7 @@ void GetNewDataNsDataIdList(Service::Interface* self) { | |||
|     cmd_buff[4] = (buff_size << 4 | 0xC); | ||||
|     cmd_buff[5] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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}", | ||||
|  | @ -347,7 +347,7 @@ void GetOwnNewDataNsDataIdList(Service::Interface* self) { | |||
|     cmd_buff[4] = (buff_size << 4 | 0xC); | ||||
|     cmd_buff[5] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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}", | ||||
|  | @ -369,7 +369,7 @@ void SendProperty(Service::Interface* self) { | |||
|     cmd_buff[2] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[3] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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); | ||||
|  | @ -388,7 +388,7 @@ void SendPropertyHandle(Service::Interface* self) { | |||
|     cmd_buff[2] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[3] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     LOG_WARNING(Service_BOSS, | ||||
|                   "(STUBBED) unk_param1={:#010X}, translation={:#010X}, " | ||||
|                   "buff_addr={:#010X}, buff_size={:#010X}", | ||||
|                   unk_param1, translation, buff_addr, buff_size); | ||||
|  | @ -408,7 +408,7 @@ void ReceiveProperty(Service::Interface* self) { | |||
|     cmd_buff[3] = (buff_size << 4 | 0xC); | ||||
|     cmd_buff[4] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     LOG_WARNING(Service_BOSS, | ||||
|                   "(STUBBED) unk_param1={:#010X}, buff_size={:#010X}, " | ||||
|                   "translation={:#010X}, buff_addr={:#010X}", | ||||
|                   unk_param1, buff_size, translation, buff_addr); | ||||
|  | @ -428,7 +428,7 @@ void UpdateTaskInterval(Service::Interface* self) { | |||
|     cmd_buff[2] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[3] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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); | ||||
|  | @ -447,7 +447,7 @@ void UpdateTaskCount(Service::Interface* self) { | |||
|     cmd_buff[2] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[3] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     LOG_WARNING(Service_BOSS, | ||||
|                   "(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, " | ||||
|                   "translation={:#010X}, buff_addr={:#010X}", | ||||
|                   buff_size, unk_param2, translation, buff_addr); | ||||
|  | @ -467,7 +467,7 @@ void GetTaskInterval(Service::Interface* self) { | |||
|     cmd_buff[3] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[4] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     LOG_WARNING(Service_BOSS, | ||||
|                   "(STUBBED) unk_param1={:#010X}, translation={:#010X}, " | ||||
|                   "buff_addr={:#010X}, buff_size={:#010X}", | ||||
|                   unk_param1, translation, buff_addr, buff_size); | ||||
|  | @ -487,7 +487,7 @@ void GetTaskCount(Service::Interface* self) { | |||
|     cmd_buff[3] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[4] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     LOG_WARNING(Service_BOSS, | ||||
|                   "(STUBBED) unk_param1={:#010X}, translation={:#010X}, " | ||||
|                   "buff_addr={:#010X}, buff_size={:#010X}", | ||||
|                   unk_param1, translation, buff_addr, buff_size); | ||||
|  | @ -507,7 +507,7 @@ void GetTaskServiceStatus(Service::Interface* self) { | |||
|     cmd_buff[3] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[4] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     LOG_WARNING(Service_BOSS, | ||||
|                   "(STUBBED) unk_param1={:#010X}, translation={:#010X}, " | ||||
|                   "buff_addr={:#010X}, buff_size={:#010X}", | ||||
|                   unk_param1, translation, buff_addr, buff_size); | ||||
|  | @ -526,7 +526,7 @@ void StartTask(Service::Interface* self) { | |||
|     cmd_buff[2] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[3] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     LOG_WARNING(Service_BOSS, | ||||
|                   "(STUBBED) unk_param1={:#010X}, translation={:#010X}, " | ||||
|                   "buff_addr={:#010X}, buff_size={:#010X}", | ||||
|                   unk_param1, translation, buff_addr, buff_size); | ||||
|  | @ -545,7 +545,7 @@ void StartTaskImmediate(Service::Interface* self) { | |||
|     cmd_buff[2] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[3] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     LOG_WARNING(Service_BOSS, | ||||
|                   "(STUBBED) unk_param1={:#010X}, translation={:#010X}, " | ||||
|                   "buff_addr={:#010X}, buff_size={:#010X}", | ||||
|                   unk_param1, translation, buff_addr, buff_size); | ||||
|  | @ -564,7 +564,7 @@ void CancelTask(Service::Interface* self) { | |||
|     cmd_buff[2] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[3] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     LOG_WARNING(Service_BOSS, | ||||
|                   "(STUBBED) unk_param1={:#010X}, translation={:#010X}, " | ||||
|                   "buff_addr={:#010X}, buff_size={:#010X}", | ||||
|                   unk_param1, translation, buff_addr, buff_size); | ||||
|  | @ -578,7 +578,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,7 +597,7 @@ void GetTaskState(Service::Interface* self) { | |||
|     cmd_buff[5] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[6] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     LOG_WARNING(Service_BOSS, | ||||
|                   "(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, " | ||||
|                   "translation={:#010X}, buff_addr={:#010X}", | ||||
|                   buff_size, unk_param2, translation, buff_addr); | ||||
|  | @ -619,7 +619,7 @@ void GetTaskResult(Service::Interface* self) { | |||
|     cmd_buff[5] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[6] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     LOG_WARNING(Service_BOSS, | ||||
|                   "(STUBBED) unk_param1={:#010X}, translation={:#010X}, " | ||||
|                   "buff_addr={:#010X}, buff_size={:#010X}", | ||||
|                   unk_param1, translation, buff_addr, buff_size); | ||||
|  | @ -641,7 +641,7 @@ void GetTaskCommErrorCode(Service::Interface* self) { | |||
|     cmd_buff[5] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[6] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     LOG_WARNING(Service_BOSS, | ||||
|                   "(STUBBED) unk_param1={:#010X}, translation={:#010X}, " | ||||
|                   "buff_addr={:#010X}, buff_size={:#010X}", | ||||
|                   unk_param1, translation, buff_addr, buff_size); | ||||
|  | @ -663,7 +663,7 @@ void GetTaskStatus(Service::Interface* self) { | |||
|     cmd_buff[3] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[4] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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); | ||||
|  | @ -684,7 +684,7 @@ void GetTaskError(Service::Interface* self) { | |||
|     cmd_buff[3] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[4] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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); | ||||
|  | @ -704,7 +704,7 @@ void GetTaskInfo(Service::Interface* self) { | |||
|     cmd_buff[2] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[3] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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); | ||||
|  | @ -718,7 +718,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,7 +736,7 @@ void GetNsDataHeaderInfo(Service::Interface* self) { | |||
|     cmd_buff[2] = (buff_size << 4 | 0xC); | ||||
|     cmd_buff[3] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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); | ||||
|  | @ -760,7 +760,7 @@ void ReadNsData(Service::Interface* self) { | |||
|     cmd_buff[4] = (buff_size << 4 | 0xC); | ||||
|     cmd_buff[5] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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}", | ||||
|  | @ -777,7 +777,7 @@ 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, | ||||
|     LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}", unk_param1, | ||||
|                   unk_param2); | ||||
| } | ||||
| 
 | ||||
|  | @ -790,7 +790,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,7 +802,7 @@ 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}", | ||||
|     LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, ns_data_new_flag={:#010X}", | ||||
|                   unk_param1, ns_data_new_flag); | ||||
| } | ||||
| 
 | ||||
|  | @ -815,7 +815,7 @@ 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}", | ||||
|     LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, ns_data_new_flag={:#010X}", | ||||
|                   unk_param1, ns_data_new_flag); | ||||
| } | ||||
| 
 | ||||
|  | @ -829,7 +829,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 +841,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,7 +856,7 @@ void RegisterStorageEntry(Service::Interface* self) { | |||
|     cmd_buff[0] = IPC::MakeHeader(0x2F, 0x1, 0); | ||||
|     cmd_buff[1] = RESULT_SUCCESS.raw; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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); | ||||
|  | @ -870,7 +870,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,7 +884,7 @@ void SetStorageOption(Service::Interface* self) { | |||
|     cmd_buff[0] = IPC::MakeHeader(0x31, 0x1, 0); | ||||
|     cmd_buff[1] = RESULT_SUCCESS.raw; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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); | ||||
|  | @ -900,7 +900,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,7 +916,7 @@ void StartBgImmediate(Service::Interface* self) { | |||
|     cmd_buff[2] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[3] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     LOG_WARNING(Service_BOSS, | ||||
|                   "(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, " | ||||
|                   "translation={:#010X}, buff_addr={:#010X}", | ||||
|                   unk_param1, translation, buff_addr, buff_size); | ||||
|  | @ -936,7 +936,7 @@ void GetTaskActivePriority(Service::Interface* self) { | |||
|     cmd_buff[3] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[4] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     LOG_WARNING(Service_BOSS, | ||||
|                   "(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, " | ||||
|                   "translation={:#010X}, buff_addr={:#010X}", | ||||
|                   unk_param1, translation, buff_addr, buff_size); | ||||
|  | @ -957,7 +957,7 @@ void RegisterImmediateTask(Service::Interface* self) { | |||
|     cmd_buff[3] = (buff_size << 4 | 0xA); | ||||
|     cmd_buff[4] = buff_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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); | ||||
|  | @ -982,7 +982,7 @@ void SetTaskQuery(Service::Interface* self) { | |||
|     cmd_buff[2] = (buff2_size << 4 | 0xA); | ||||
|     cmd_buff[3] = buff2_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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}", | ||||
|  | @ -1009,7 +1009,7 @@ void GetTaskQuery(Service::Interface* self) { | |||
|     cmd_buff[2] = (buff2_size << 4 | 0xC); | ||||
|     cmd_buff[3] = buff2_addr; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_BOSS, | ||||
|     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}", | ||||
|  |  | |||
|  | @ -86,7 +86,7 @@ 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={}", | ||||
|             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; | ||||
|  | @ -97,7 +97,7 @@ 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 ({})!", | ||||
|             LOG_ERROR(Service_CAM, "The destination size ({}) doesn't match the source ({})!", | ||||
|                         port.dest_size, trim_size); | ||||
|         } | ||||
| 
 | ||||
|  | @ -124,7 +124,7 @@ 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 ({})!", | ||||
|             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(), | ||||
|  | @ -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,12 +355,12 @@ 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={}", | ||||
|     LOG_DEBUG(Service_CAM, "called, addr=0x{:X}, port_select={}, image_size={}, trans_unit={}", | ||||
|                 dest, port_select.m_val, image_size, trans_unit); | ||||
| } | ||||
| 
 | ||||
|  | @ -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,11 +397,11 @@ 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={}", | ||||
|     LOG_WARNING(Service_CAM, "(STUBBED) called, port_select={}, lines={}, width={}, height={}", | ||||
|                   port_select.m_val, transfer_lines, width, height); | ||||
| } | ||||
| 
 | ||||
|  | @ -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,11 +452,11 @@ 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={}", | ||||
|     LOG_WARNING(Service_CAM, "(STUBBED)called, port_select={}, bytes={}, width={}, height={}", | ||||
|                   port_select.m_val, transfer_bytes, width, height); | ||||
| } | ||||
| 
 | ||||
|  | @ -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,11 +560,11 @@ 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={}", | ||||
|     LOG_DEBUG(Service_CAM, "called, port_select={}, x0={}, y0={}, x1={}, y1={}", | ||||
|                 port_select.m_val, x0, y0, x1, y1); | ||||
| } | ||||
| 
 | ||||
|  | @ -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,11 +607,11 @@ 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={}", | ||||
|     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); | ||||
| } | ||||
| 
 | ||||
|  | @ -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,12 +672,12 @@ 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, | ||||
|         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, | ||||
|     LOG_DEBUG(Service_CAM, "called, camera_select={}, context_select={}", camera_select.m_val, | ||||
|                 context_select.m_val); | ||||
| } | ||||
| 
 | ||||
|  | @ -699,12 +699,12 @@ 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, | ||||
|         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={}", | ||||
|     LOG_DEBUG(Service_CAM, "called, camera_select={}, flip={}, context_select={}", | ||||
|                 camera_select.m_val, static_cast<int>(flip), context_select.m_val); | ||||
| } | ||||
| 
 | ||||
|  | @ -732,12 +732,12 @@ 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, | ||||
|         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, | ||||
|     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, | ||||
|  | @ -762,12 +762,12 @@ 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, | ||||
|         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={}", | ||||
|     LOG_DEBUG(Service_CAM, "called, camera_select={}, size={}, context_select={}", | ||||
|                 camera_select.m_val, size, context_select.m_val); | ||||
| } | ||||
| 
 | ||||
|  | @ -784,11 +784,11 @@ 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={}", | ||||
|     LOG_WARNING(Service_CAM, "(STUBBED) called, camera_select={}, frame_rate={}", | ||||
|                   camera_select.m_val, static_cast<int>(frame_rate)); | ||||
| } | ||||
| 
 | ||||
|  | @ -810,12 +810,12 @@ 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, | ||||
|         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={}", | ||||
|     LOG_DEBUG(Service_CAM, "called, camera_select={}, effect={}, context_select={}", | ||||
|                 camera_select.m_val, static_cast<int>(effect), context_select.m_val); | ||||
| } | ||||
| 
 | ||||
|  | @ -837,12 +837,12 @@ 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, | ||||
|         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={}", | ||||
|     LOG_DEBUG(Service_CAM, "called, camera_select={}, format={}, context_select={}", | ||||
|                 camera_select.m_val, static_cast<int>(format), context_select.m_val); | ||||
| } | ||||
| 
 | ||||
|  | @ -854,7 +854,7 @@ 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={}", | ||||
|     LOG_WARNING(Service_CAM, "(STUBBED) called, camera_select1={}, camera_select2={}", | ||||
|                   camera_select1, camera_select2); | ||||
| } | ||||
| 
 | ||||
|  | @ -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,7 +918,7 @@ ResultCode Module::SetPackageParameter(const PackageParameterType& package) { | |||
|         } | ||||
|         return RESULT_SUCCESS; | ||||
|     } else { | ||||
|         NGLOG_ERROR(Service_CAM, "invalid camera_select={}, 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() { | ||||
|  |  | |||
|  | @ -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() { | ||||
|  |  | |||
|  | @ -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,7 +160,7 @@ 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", | ||||
|         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)); | ||||
|  | @ -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,21 +309,21 @@ 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", | ||||
|         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, | ||||
|         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, | ||||
|         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,14 +599,14 @@ 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 {}", | ||||
|             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); | ||||
|         } | ||||
|  |  | |||
|  | @ -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[] = { | ||||
|  |  | |||
|  | @ -17,7 +17,7 @@ static void IsChild(Interface* self) { | |||
|     cmd_buff[1] = RESULT_SUCCESS.raw; | ||||
|     cmd_buff[2] = 0; | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_DLP, "(STUBBED) called"); | ||||
|     LOG_WARNING(Service_DLP, "(STUBBED) called"); | ||||
| } | ||||
| 
 | ||||
| const Interface::FunctionInfo FunctionTable[] = { | ||||
|  |  | |||
|  | @ -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}", | ||||
|     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}", | ||||
|         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,7 +198,7 @@ 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, | ||||
|     LOG_TRACE(Service_DSP, "called address=0x{:08X}, size=0x{:X}, process=0x{:08X}", address, | ||||
|                 size, process); | ||||
| } | ||||
| 
 | ||||
|  | @ -230,13 +230,13 @@ 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}", | ||||
|             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, | ||||
|             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); | ||||
|  | @ -247,12 +247,12 @@ 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, | ||||
|         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}", | ||||
|         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,7 +295,7 @@ 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, | ||||
|         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); | ||||
|  | @ -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,7 +453,7 @@ 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, | ||||
|     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[] = { | ||||
|  |  | |||
|  | @ -132,29 +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, | ||||
|     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); | ||||
|     NGLOG_CRITICAL(Service_ERR, "TID: 0x{:08X}_0x{:08X}", errinfo_common.title_id_high, | ||||
|     LOG_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, | ||||
|     LOG_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, "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: {}", | ||||
|     LOG_CRITICAL(Service_ERR, "Fatal error type: {}", | ||||
|                    GetErrType(errinfo.errinfo_common.specifier)); | ||||
|     Core::System::GetInstance().SetStatus(Core::System::ResultStatus::ErrorUnknown); | ||||
| 
 | ||||
|  | @ -166,56 +166,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, | ||||
|                 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}", | ||||
|                 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}", | ||||
|                 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}", | ||||
|                 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: {}", | ||||
|         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}", | ||||
|             LOG_CRITICAL(Service_ERR, "FPEXC: 0x{:08X}", | ||||
|                            errtype.exception_data.exception_info.fpinst); | ||||
|             NGLOG_CRITICAL(Service_ERR, "FINST: 0x{:08X}", | ||||
|             LOG_CRITICAL(Service_ERR, "FINST: 0x{:08X}", | ||||
|                            errtype.exception_data.exception_info.fpinst); | ||||
|             NGLOG_CRITICAL(Service_ERR, "FINST2: 0x{:08X}", | ||||
|             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 +223,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; | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -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; | ||||
|  |  | |||
|  | @ -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,7 +86,7 @@ void File::Read(Kernel::HLERequestContext& ctx) { | |||
|     offset += file->offset; | ||||
| 
 | ||||
|     if (offset + length > backend->GetSize()) { | ||||
|         NGLOG_ERROR(Service_FS, | ||||
|         LOG_ERROR(Service_FS, | ||||
|                     "Reading from out of bounds offset=0x{:x} length=0x{:08X} file_size=0x{:x}", | ||||
|                     offset, length, backend->GetSize()); | ||||
|     } | ||||
|  | @ -119,7 +119,7 @@ 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, | ||||
|     LOG_TRACE(Service_FS, "Write {}: offset=0x{:x} length={}, flush=0x{:x}", GetName(), offset, | ||||
|                 length, flush); | ||||
| 
 | ||||
|     IPC::RequestBuilder rb = rp.MakeBuilder(2, 2); | ||||
|  | @ -181,7 +181,7 @@ 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", | ||||
|         LOG_WARNING(Service_FS, "Closing File backend but {} clients still connected", | ||||
|                       connected_sessions.size()); | ||||
| 
 | ||||
|     backend->Close(); | ||||
|  | @ -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,7 +404,7 @@ 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(), | ||||
|     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,13 +623,13 @@ 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 {}", | ||||
|         LOG_ERROR(Service_FS, "Can't instantiate SDMCWriteOnly archive with path {}", | ||||
|                     sdmc_directory); | ||||
| 
 | ||||
|     // Create the SaveData archive
 | ||||
|  | @ -650,7 +650,7 @@ 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 {}", | ||||
|         LOG_ERROR(Service_FS, "Can't instantiate ExtSaveData archive with path {}", | ||||
|                     extsavedata_factory->GetMountPoint()); | ||||
| 
 | ||||
|     auto sharedextsavedata_factory = | ||||
|  | @ -658,7 +658,7 @@ void RegisterArchiveTypes() { | |||
|     if (sharedextsavedata_factory->Initialize()) | ||||
|         RegisterArchiveType(std::move(sharedextsavedata_factory), ArchiveIdCode::SharedExtSaveData); | ||||
|     else | ||||
|         NGLOG_ERROR(Service_FS, "Can't instantiate SharedExtSaveData archive with path {}", | ||||
|         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
 | ||||
|  | @ -676,7 +676,7 @@ void RegisterArchiveTypes() { | |||
| void RegisterSelfNCCH(Loader::AppLoader& app_loader) { | ||||
|     auto itr = id_code_map.find(ArchiveIdCode::SelfNCCH); | ||||
|     if (itr == id_code_map.end()) { | ||||
|         NGLOG_ERROR( | ||||
|         LOG_ERROR( | ||||
|             Service_FS, | ||||
|             "Could not register a new NCCH because the SelfNCCH archive hasn't been created"); | ||||
|         return; | ||||
|  |  | |||
|  | @ -54,7 +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, | ||||
|     LOG_DEBUG(Service_FS, "path={}, mode={} attrs={}", file_path.DebugStr(), mode.hex, | ||||
|                 attributes); | ||||
| 
 | ||||
|     ResultVal<std::shared_ptr<File>> file_res = | ||||
|  | @ -66,7 +66,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,7 +88,7 @@ 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, | ||||
|     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); | ||||
|  | @ -97,7 +97,7 @@ void FS_USER::OpenFileDirectly(Kernel::HLERequestContext& ctx) { | |||
| 
 | ||||
|     ResultVal<ArchiveHandle> archive_handle = Service::FS::OpenArchive(archive_id, archive_path); | ||||
|     if (archive_handle.Failed()) { | ||||
|         NGLOG_ERROR(Service_FS, | ||||
|         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()); | ||||
|  | @ -114,7 +114,7 @@ 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={}", | ||||
|         LOG_ERROR(Service_FS, "failed to get a handle for file {} mode={} attributes={}", | ||||
|                     file_path.DebugStr(), mode.hex, attributes); | ||||
|     } | ||||
| } | ||||
|  | @ -130,7 +130,7 @@ 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), | ||||
|     LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(filename_type), | ||||
|                 filename_size, file_path.DebugStr()); | ||||
| 
 | ||||
|     IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); | ||||
|  | @ -155,7 +155,7 @@ 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( | ||||
|     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()); | ||||
|  | @ -177,7 +177,7 @@ 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, | ||||
|     LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size, | ||||
|                 dir_path.DebugStr()); | ||||
| 
 | ||||
|     IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); | ||||
|  | @ -196,7 +196,7 @@ 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, | ||||
|     LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size, | ||||
|                 dir_path.DebugStr()); | ||||
| 
 | ||||
|     IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); | ||||
|  | @ -217,7 +217,7 @@ void FS_USER::CreateFile(Kernel::HLERequestContext& ctx) { | |||
| 
 | ||||
|     FileSys::Path file_path(filename_type, filename); | ||||
| 
 | ||||
|     NGLOG_DEBUG(Service_FS, "type={} attributes={} size={:x} data={}", | ||||
|     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); | ||||
|  | @ -235,7 +235,7 @@ 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, | ||||
|     LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size, | ||||
|                 dir_path.DebugStr()); | ||||
| 
 | ||||
|     IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); | ||||
|  | @ -259,7 +259,7 @@ 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, | ||||
|     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()); | ||||
|  | @ -279,7 +279,7 @@ 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, | ||||
|     LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size, | ||||
|                 dir_path.DebugStr()); | ||||
| 
 | ||||
|     IPC::RequestBuilder rb = rp.MakeBuilder(1, 2); | ||||
|  | @ -292,7 +292,7 @@ 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={}", | ||||
|         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,7 +307,7 @@ 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), | ||||
|     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); | ||||
|  | @ -317,7 +317,7 @@ void FS_USER::OpenArchive(Kernel::HLERequestContext& ctx) { | |||
|         rb.PushRaw(*handle); | ||||
|     } else { | ||||
|         rb.Push<u64>(0); | ||||
|         NGLOG_ERROR(Service_FS, | ||||
|         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 +344,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,11 +364,11 @@ 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, {}", | ||||
|         LOG_ERROR(Service_FS, "tried to format an archive different than SaveData, {}", | ||||
|                     static_cast<u32>(archive_id)); | ||||
|         rb.Push(FileSys::ERROR_INVALID_PATH); | ||||
|         return; | ||||
|  | @ -376,7 +376,7 @@ void FS_USER::FormatSaveData(Kernel::HLERequestContext& ctx) { | |||
| 
 | ||||
|     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 +408,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,7 +438,7 @@ void FS_USER::CreateExtSaveData(Kernel::HLERequestContext& ctx) { | |||
|     u32 icon_size = rp.Pop<u32>(); | ||||
|     auto icon_buffer = rp.PopMappedBuffer(); | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_FS, | ||||
|     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); | ||||
|  | @ -464,7 +464,7 @@ 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, | ||||
|     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); | ||||
| 
 | ||||
|  | @ -477,7 +477,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 +501,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,7 +523,7 @@ void FS_USER::CreateLegacySystemSaveData(Kernel::HLERequestContext& ctx) { | |||
|     u32 file_buckets = rp.Pop<u32>(); | ||||
|     bool duplicate = rp.Pop<bool>(); | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_FS, | ||||
|     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, | ||||
|  | @ -539,7 +539,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 +553,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 +594,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 +617,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 +649,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,7 +666,7 @@ void FS_USER::SetSaveDataSecureValue(Kernel::HLERequestContext& ctx) { | |||
| 
 | ||||
|     // TODO: Generate and Save the Secure Value
 | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_FS, | ||||
|     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); | ||||
|  | @ -683,7 +683,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); | ||||
|  |  | |||
|  | @ -120,14 +120,14 @@ 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( | ||||
|         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 +144,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 +165,14 @@ 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( | ||||
|         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 +199,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 +237,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 +245,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,7 +319,7 @@ 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={}", | ||||
|     LOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}", | ||||
|                 address, size, process->process_id); | ||||
| } | ||||
| 
 | ||||
|  | @ -334,7 +334,7 @@ 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={}", | ||||
|     LOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}", | ||||
|                 address, size, process->process_id); | ||||
| } | ||||
| 
 | ||||
|  | @ -345,7 +345,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 +375,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 +388,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 +398,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 +436,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 +583,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 +668,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,7 +679,7 @@ void GSP_GPU::AcquireRight(Kernel::HLERequestContext& ctx) { | |||
| 
 | ||||
|     SessionData* session_data = GetSessionData(ctx.Session()); | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_GSP, "called flag={:08X} process={} thread_id={}", flag, | ||||
|     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 +713,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,7 +726,7 @@ 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={}", | ||||
|     LOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}", | ||||
|                 address, size, process->process_id); | ||||
| } | ||||
| 
 | ||||
|  | @ -738,7 +738,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) { | ||||
|  |  | |||
|  | @ -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) | ||||
|  |  | |||
|  | @ -165,7 +165,7 @@ void ExtraHID::OnDisconnect() { | |||
| 
 | ||||
| void ExtraHID::HandleConfigureHIDPollingRequest(const std::vector<u8>& request) { | ||||
|     if (request.size() != 3) { | ||||
|         NGLOG_ERROR(Service_IR, "Wrong request size ({}): {}", request.size(), | ||||
|         LOG_ERROR(Service_IR, "Wrong request size ({}): {}", request.size(), | ||||
|                     Common::ArrayToString(request.data(), request.size())); | ||||
|         return; | ||||
|     } | ||||
|  | @ -187,7 +187,7 @@ 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(), | ||||
|         LOG_ERROR(Service_IR, "Wrong request size ({}): {}", request_buf.size(), | ||||
|                     Common::ArrayToString(request_buf.data(), request_buf.size())); | ||||
|         return; | ||||
|     } | ||||
|  | @ -199,7 +199,7 @@ 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={})", | ||||
|         LOG_ERROR(Service_IR, "Read beyond the end of calibration data! (offset={}, size={})", | ||||
|                     offset, size); | ||||
|         return; | ||||
|     } | ||||
|  | @ -222,7 +222,7 @@ void ExtraHID::OnReceive(const std::vector<u8>& data) { | |||
|         HandleReadCalibrationDataRequest(data); | ||||
|         break; | ||||
|     default: | ||||
|         NGLOG_ERROR(Service_IR, "Unknown request: {}", | ||||
|         LOG_ERROR(Service_IR, "Unknown request: {}", | ||||
|                     Common::ArrayToString(data.data(), data.size())); | ||||
|         break; | ||||
|     } | ||||
|  |  | |||
|  | @ -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) { | ||||
|  |  | |||
|  | @ -183,7 +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={}", | ||||
|     LOG_TRACE(Service_IR, "called, data={}", | ||||
|                 Common::ArrayToString(payload.data(), payload.size())); | ||||
|     size_t size = payload.size(); | ||||
| 
 | ||||
|  | @ -225,7 +225,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,7 +251,7 @@ void IR_USER::InitializeIrNopShared(Kernel::HLERequestContext& ctx) { | |||
| 
 | ||||
|     rb.Push(RESULT_SUCCESS); | ||||
| 
 | ||||
|     NGLOG_INFO(Service_IR, | ||||
|     LOG_INFO(Service_IR, | ||||
|                "called, shared_buff_size={}, recv_buff_size={}, " | ||||
|                "recv_buff_packet_count={}, send_buff_size={}, " | ||||
|                "send_buff_packet_count={}, baud_rate={}", | ||||
|  | @ -275,7 +275,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 +283,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 +292,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 +301,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 +318,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 +327,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 +342,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 +357,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 +374,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) { | ||||
|  |  | |||
|  | @ -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,7 +550,7 @@ 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(), | ||||
|     LOG_INFO(Service_LDR, "CRO \"{}\" exports {} static anonymous symbols", ModuleName(), | ||||
|                offset_export_num); | ||||
|     for (u32 i = 0; i < offset_export_num; ++i) { | ||||
|         StaticAnonymousSymbolEntry 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(), | ||||
|         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, | ||||
|         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,12 +764,12 @@ ResultCode CROHelper::ApplyImportNamedSymbol(VAddr crs_address) { | |||
|                     u32 symbol_address = source.FindExportNamedSymbol(symbol_name); | ||||
| 
 | ||||
|                     if (symbol_address != 0) { | ||||
|                         NGLOG_TRACE(Service_LDR, "CRO \"{}\" imports \"{}\" from \"{}\"", | ||||
|                         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}", | ||||
|                             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,7 +859,7 @@ 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 \"{}\"", | ||||
|                     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; | ||||
|  | @ -867,27 +867,27 @@ ResultCode CROHelper::ApplyModuleImport(VAddr crs_address) { | |||
|                         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}", | ||||
|                             LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}", | ||||
|                                         result.raw); | ||||
|                             return result; | ||||
|                         } | ||||
|                     } | ||||
|                     NGLOG_INFO(Service_LDR, "CRO \"{}\" imports {} anonymous symbols from \"{}\"", | ||||
|                     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}", | ||||
|                             LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}", | ||||
|                                         result.raw); | ||||
|                             return result; | ||||
|                         } | ||||
|  | @ -904,7 +904,7 @@ ResultCode CROHelper::ApplyModuleImport(VAddr crs_address) { | |||
| } | ||||
| 
 | ||||
| ResultCode CROHelper::ApplyExportNamedSymbol(CROHelper target) { | ||||
|     NGLOG_DEBUG(Service_LDR, "CRO \"{}\" exports named symbols to \"{}\"", 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); | ||||
|  | @ -920,10 +920,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,7 +933,7 @@ ResultCode CROHelper::ApplyExportNamedSymbol(CROHelper target) { | |||
| } | ||||
| 
 | ||||
| ResultCode CROHelper::ResetExportNamedSymbol(CROHelper target) { | ||||
|     NGLOG_DEBUG(Service_LDR, "CRO \"{}\" unexports named symbols to \"{}\"", 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); | ||||
|  | @ -950,11 +950,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,7 +974,7 @@ 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, | ||||
|         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; | ||||
|  | @ -982,26 +982,26 @@ ResultCode CROHelper::ApplyModuleExport(CROHelper target) { | |||
|             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, | ||||
|         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,7 +1023,7 @@ 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, | ||||
|         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; | ||||
|  | @ -1031,12 +1031,12 @@ ResultCode CROHelper::ResetModuleExport(CROHelper target) { | |||
|             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, | ||||
|         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; | ||||
|  | @ -1044,7 +1044,7 @@ ResultCode CROHelper::ResetModuleExport(CROHelper target) { | |||
|             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,12 +1069,12 @@ 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 \"{}\"", | ||||
|                         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}", | ||||
|                             LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}", | ||||
|                                         result.raw); | ||||
|                             return result; | ||||
|                         } | ||||
|  | @ -1085,7 +1085,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 +1116,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 +1131,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 +1139,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 +1280,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 +1305,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 +1317,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 +1349,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 +1359,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; | ||||
|  |  | |||
|  | @ -58,7 +58,7 @@ 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, | ||||
|     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); | ||||
| 
 | ||||
|  | @ -66,44 +66,44 @@ void RO::Initialize(Kernel::HLERequestContext& ctx) { | |||
| 
 | ||||
|     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 +118,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 +126,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 +137,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 +145,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,7 +166,7 @@ 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}", | ||||
|     LOG_WARNING(Service_LDR, "(STUBBED) called, crr_buffer_ptr=0x{:08X}, crr_size=0x{:08X}", | ||||
|                   crr_buffer_ptr, crr_size); | ||||
| } | ||||
| 
 | ||||
|  | @ -178,7 +178,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,7 +196,7 @@ 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, | ||||
|     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={}, " | ||||
|  | @ -209,42 +209,42 @@ void RO::LoadCRO(Kernel::HLERequestContext& ctx, bool link_on_load_bug_fix) { | |||
| 
 | ||||
|     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 +252,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 +276,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 +285,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 +299,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 +316,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 +325,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 +343,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 +362,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,7 +372,7 @@ 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(), | ||||
|     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,7 +385,7 @@ 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}", | ||||
|     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 +394,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 +419,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 +429,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 +443,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 +458,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 +466,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 +500,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 +508,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 +542,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 +564,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); | ||||
|     } | ||||
|  |  | |||
|  | @ -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,7 +63,7 @@ struct MIC_U::Impl { | |||
|         IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); | ||||
|         rb.Push(RESULT_SUCCESS); | ||||
|         is_sampling = true; | ||||
|         NGLOG_WARNING(Service_MIC, | ||||
|         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), | ||||
|  | @ -76,7 +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={}", | ||||
|         LOG_WARNING(Service_MIC, "(STUBBED) called, sample_rate={}", | ||||
|                       static_cast<u32>(sample_rate)); | ||||
|     } | ||||
| 
 | ||||
|  | @ -85,7 +85,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 +93,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 +101,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 +110,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 +119,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 +128,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 +136,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,7 +147,7 @@ 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, | ||||
|         LOG_WARNING(Service_MIC, "(STUBBED) called, size=0x{:X}, buffer=0x{:08X}", size, | ||||
|                       buffer.GetId()); | ||||
|     } | ||||
| 
 | ||||
|  | @ -157,7 +157,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 +165,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 +174,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); | ||||
|  |  | |||
|  | @ -15,7 +15,7 @@ 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}", | ||||
|     LOG_WARNING(Service_NDM, "(STUBBED) exclusive_state=0x{:08X}", | ||||
|                   static_cast<u32>(exclusive_state)); | ||||
| } | ||||
| 
 | ||||
|  | @ -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) { | ||||
|  |  | |||
|  | @ -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); | ||||
| 
 | ||||
|  |  | |||
|  | @ -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) | ||||
|  |  | |||
|  | @ -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
 | ||||
|  |  | |||
|  | @ -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; | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -238,7 +238,7 @@ 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 {}", | ||||
|             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,7 +425,7 @@ 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 {}", | ||||
|             LOG_ERROR(Service_NWM, "Connection sequence aborted, because connection status is {}", | ||||
|                         connection_status.status); | ||||
|             return; | ||||
|         } | ||||
|  | @ -457,7 +457,7 @@ 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, | ||||
|                 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,7 +617,7 @@ void NWM_UDS::RecvBeaconBroadcastData(Kernel::HLERequestContext& ctx) { | |||
|     rb.Push(RESULT_SUCCESS); | ||||
|     rb.PushMappedBuffer(out_buffer); | ||||
| 
 | ||||
|     NGLOG_DEBUG(Service_NWM, | ||||
|     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); | ||||
|  | @ -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,7 +660,7 @@ 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, | ||||
|     LOG_DEBUG(Service_NWM, "called sharedmem_size=0x{:08X}, version=0x{:08X}", sharedmem_size, | ||||
|                 version); | ||||
| } | ||||
| 
 | ||||
|  | @ -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,13 +722,13 @@ 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, | ||||
|         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)); | ||||
|  |  | |||
|  | @ -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 {}; | ||||
|  |  | |||
|  | @ -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,7 +92,7 @@ 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, | ||||
|     LOG_WARNING(Service_PTM, "(STUBBED) called, from time(raw): 0x{:x}, for {} hours", start_time, | ||||
|                   hours); | ||||
| } | ||||
| 
 | ||||
|  | @ -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,14 +113,14 @@ 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, | ||||
|         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!"); | ||||
|     } | ||||
|  | @ -128,7 +128,7 @@ void CheckNew3DS(IPC::RequestBuilder& rb) { | |||
|     rb.Push(RESULT_SUCCESS); | ||||
|     rb.Push(is_new_3ds); | ||||
| 
 | ||||
|     NGLOG_WARNING(Service_PTM, "(STUBBED) called isNew3DS = 0x{:08x}", | ||||
|     LOG_WARNING(Service_PTM, "(STUBBED) called isNew3DS = 0x{:08x}", | ||||
|                   static_cast<u32>(is_new_3ds)); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -94,14 +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 {}", | ||||
|         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, "{}", | ||||
|     LOG_TRACE(Service, "{}", | ||||
|                 MakeFunctionString(itr->second.name, GetPortName().c_str(), cmd_buff)); | ||||
| 
 | ||||
|     itr->second.func(this); | ||||
|  | @ -159,7 +159,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 +180,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 +264,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
 | ||||
|  | @ -275,6 +275,6 @@ void Shutdown() { | |||
|     FS::ArchiveShutdown(); | ||||
| 
 | ||||
|     g_kernel_named_ports.clear(); | ||||
|     NGLOG_DEBUG(Service, "shutdown OK"); | ||||
|     LOG_DEBUG(Service, "shutdown OK"); | ||||
| } | ||||
| } // namespace Service
 | ||||
|  |  | |||
|  | @ -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,24 @@ 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, | ||||
|         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, | ||||
|         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 +141,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 +159,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,7 +179,7 @@ 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={}", | ||||
|     LOG_WARNING(Service_SRV, "(STUBBED) called, notification_id=0x{:X}, flags={}", | ||||
|                   notification_id, flags); | ||||
| } | ||||
| 
 | ||||
|  | @ -197,7 +197,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; | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -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; | ||||
|     } | ||||
|  |  | |||
|  | @ -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,7 +132,7 @@ 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={}", | ||||
|     LOG_DEBUG(Service_Y2R, "called block_alignment={}", | ||||
|                 static_cast<u8>(conversion.block_alignment)); | ||||
| } | ||||
| 
 | ||||
|  | @ -143,7 +143,7 @@ void Y2R_U::GetBlockAlignment(Kernel::HLERequestContext& ctx) { | |||
|     rb.Push(RESULT_SUCCESS); | ||||
|     rb.PushEnum(conversion.block_alignment); | ||||
| 
 | ||||
|     NGLOG_DEBUG(Service_Y2R, "called block_alignment={}", | ||||
|     LOG_DEBUG(Service_Y2R, "called block_alignment={}", | ||||
|                 static_cast<u8>(conversion.block_alignment)); | ||||
| } | ||||
| 
 | ||||
|  | @ -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,7 +230,7 @@ void Y2R_U::SetSendingY(Kernel::HLERequestContext& ctx) { | |||
|     IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); | ||||
|     rb.Push(RESULT_SUCCESS); | ||||
| 
 | ||||
|     NGLOG_DEBUG(Service_Y2R, | ||||
|     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, | ||||
|  | @ -249,7 +249,7 @@ void Y2R_U::SetSendingU(Kernel::HLERequestContext& ctx) { | |||
|     IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); | ||||
|     rb.Push(RESULT_SUCCESS); | ||||
| 
 | ||||
|     NGLOG_DEBUG(Service_Y2R, | ||||
|     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, | ||||
|  | @ -269,7 +269,7 @@ void Y2R_U::SetSendingV(Kernel::HLERequestContext& ctx) { | |||
|     IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); | ||||
|     rb.Push(RESULT_SUCCESS); | ||||
| 
 | ||||
|     NGLOG_DEBUG(Service_Y2R, | ||||
|     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, | ||||
|  | @ -289,7 +289,7 @@ void Y2R_U::SetSendingYUYV(Kernel::HLERequestContext& ctx) { | |||
|     IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); | ||||
|     rb.Push(RESULT_SUCCESS); | ||||
| 
 | ||||
|     NGLOG_DEBUG(Service_Y2R, | ||||
|     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, | ||||
|  | @ -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,7 +349,7 @@ void Y2R_U::SetReceiving(Kernel::HLERequestContext& ctx) { | |||
|     IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); | ||||
|     rb.Push(RESULT_SUCCESS); | ||||
| 
 | ||||
|     NGLOG_DEBUG(Service_Y2R, | ||||
|     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, | ||||
|  | @ -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,7 +414,7 @@ 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}]", | ||||
|     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]); | ||||
|  | @ -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,7 +567,7 @@ cleanup: | |||
|     IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); | ||||
|     rb.Push(result); | ||||
| 
 | ||||
|     NGLOG_DEBUG(Service_Y2R, | ||||
|     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), | ||||
|  | @ -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) { | ||||
|  |  | |||
|  | @ -46,7 +46,7 @@ public: | |||
| std::vector<u8> EncryptSignCCM(const std::vector<u8>& pdata, const CCMNonce& nonce, | ||||
|                                size_t slot_id) { | ||||
|     if (!IsNormalKeyAvailable(slot_id)) { | ||||
|         NGLOG_ERROR(HW_AES, "Key slot {} not available. Will use zero key.", slot_id); | ||||
|         LOG_ERROR(HW_AES, "Key slot {} not available. Will use zero key.", slot_id); | ||||
|     } | ||||
|     const AESKey normal = GetNormalKey(slot_id); | ||||
|     std::vector<u8> cipher(pdata.size() + CCM_MAC_SIZE); | ||||
|  | @ -59,7 +59,7 @@ std::vector<u8> EncryptSignCCM(const std::vector<u8>& pdata, const CCMNonce& non | |||
|                                  new CryptoPP::AuthenticatedEncryptionFilter( | ||||
|                                      e, new CryptoPP::ArraySink(cipher.data(), cipher.size()))); | ||||
|     } catch (const CryptoPP::Exception& e) { | ||||
|         NGLOG_ERROR(HW_AES, "FAILED with: {}", e.what()); | ||||
|         LOG_ERROR(HW_AES, "FAILED with: {}", e.what()); | ||||
|     } | ||||
|     return cipher; | ||||
| } | ||||
|  | @ -67,7 +67,7 @@ std::vector<u8> EncryptSignCCM(const std::vector<u8>& pdata, const CCMNonce& non | |||
| std::vector<u8> DecryptVerifyCCM(const std::vector<u8>& cipher, const CCMNonce& nonce, | ||||
|                                  size_t slot_id) { | ||||
|     if (!IsNormalKeyAvailable(slot_id)) { | ||||
|         NGLOG_ERROR(HW_AES, "Key slot {} not available. Will use zero key.", slot_id); | ||||
|         LOG_ERROR(HW_AES, "Key slot {} not available. Will use zero key.", slot_id); | ||||
|     } | ||||
|     const AESKey normal = GetNormalKey(slot_id); | ||||
|     const std::size_t pdata_size = cipher.size() - CCM_MAC_SIZE; | ||||
|  | @ -81,11 +81,11 @@ std::vector<u8> DecryptVerifyCCM(const std::vector<u8>& cipher, const CCMNonce& | |||
|             d, new CryptoPP::ArraySink(pdata.data(), pdata_size)); | ||||
|         CryptoPP::ArraySource as(cipher.data(), cipher.size(), true, new CryptoPP::Redirector(df)); | ||||
|         if (!df.GetLastResult()) { | ||||
|             NGLOG_ERROR(HW_AES, "FAILED"); | ||||
|             LOG_ERROR(HW_AES, "FAILED"); | ||||
|             return {}; | ||||
|         } | ||||
|     } catch (const CryptoPP::Exception& e) { | ||||
|         NGLOG_ERROR(HW_AES, "FAILED with: {}", e.what()); | ||||
|         LOG_ERROR(HW_AES, "FAILED with: {}", e.what()); | ||||
|         return {}; | ||||
|     } | ||||
|     return pdata; | ||||
|  |  | |||
|  | @ -91,7 +91,7 @@ void LoadPresetKeys() { | |||
|         std::vector<std::string> parts; | ||||
|         Common::SplitString(line, '=', parts); | ||||
|         if (parts.size() != 2) { | ||||
|             NGLOG_ERROR(HW_AES, "Failed to parse {}", line); | ||||
|             LOG_ERROR(HW_AES, "Failed to parse {}", line); | ||||
|             continue; | ||||
|         } | ||||
| 
 | ||||
|  | @ -100,7 +100,7 @@ void LoadPresetKeys() { | |||
|         try { | ||||
|             key = HexToKey(parts[1]); | ||||
|         } catch (const std::logic_error& e) { | ||||
|             NGLOG_ERROR(HW_AES, "Invalid key {}: {}", parts[1], e.what()); | ||||
|             LOG_ERROR(HW_AES, "Invalid key {}: {}", parts[1], e.what()); | ||||
|             continue; | ||||
|         } | ||||
| 
 | ||||
|  | @ -112,12 +112,12 @@ void LoadPresetKeys() { | |||
|         size_t slot_id; | ||||
|         char key_type; | ||||
|         if (std::sscanf(name.c_str(), "slot0x%zXKey%c", &slot_id, &key_type) != 2) { | ||||
|             NGLOG_ERROR(HW_AES, "Invalid key name {}", name); | ||||
|             LOG_ERROR(HW_AES, "Invalid key name {}", name); | ||||
|             continue; | ||||
|         } | ||||
| 
 | ||||
|         if (slot_id >= MaxKeySlotID) { | ||||
|             NGLOG_ERROR(HW_AES, "Out of range slot ID {:#X}", slot_id); | ||||
|             LOG_ERROR(HW_AES, "Out of range slot ID {:#X}", slot_id); | ||||
|             continue; | ||||
|         } | ||||
| 
 | ||||
|  | @ -132,7 +132,7 @@ void LoadPresetKeys() { | |||
|             key_slots.at(slot_id).SetNormalKey(key); | ||||
|             break; | ||||
|         default: | ||||
|             NGLOG_ERROR(HW_AES, "Invalid key type {}", key_type); | ||||
|             LOG_ERROR(HW_AES, "Invalid key type {}", key_type); | ||||
|             break; | ||||
|         } | ||||
|     } | ||||
|  |  | |||
|  | @ -40,7 +40,7 @@ inline void Read(T& var, const u32 raw_addr) { | |||
| 
 | ||||
|     // Reads other than u32 are untested, so I'd rather have them abort than silently fail
 | ||||
|     if (index >= Regs::NumIds() || !std::is_same<T, u32>::value) { | ||||
|         NGLOG_ERROR(HW_GPU, "unknown Read{} @ {:#010X}", sizeof(var) * 8, addr); | ||||
|         LOG_ERROR(HW_GPU, "unknown Read{} @ {:#010X}", sizeof(var) * 8, addr); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|  | @ -65,7 +65,7 @@ static Math::Vec4<u8> DecodePixel(Regs::PixelFormat input_format, const u8* src_ | |||
|         return Color::DecodeRGBA4(src_pixel); | ||||
| 
 | ||||
|     default: | ||||
|         NGLOG_ERROR(HW_GPU, "Unknown source framebuffer format {:x}", | ||||
|         LOG_ERROR(HW_GPU, "Unknown source framebuffer format {:x}", | ||||
|                     static_cast<u32>(input_format)); | ||||
|         return {0, 0, 0, 0}; | ||||
|     } | ||||
|  | @ -80,17 +80,17 @@ static void MemoryFill(const Regs::MemoryFillConfig& config) { | |||
| 
 | ||||
|     // TODO: do hwtest with these cases
 | ||||
|     if (!Memory::IsValidPhysicalAddress(start_addr)) { | ||||
|         NGLOG_CRITICAL(HW_GPU, "invalid start address {:#010X}", start_addr); | ||||
|         LOG_CRITICAL(HW_GPU, "invalid start address {:#010X}", start_addr); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     if (!Memory::IsValidPhysicalAddress(end_addr)) { | ||||
|         NGLOG_CRITICAL(HW_GPU, "invalid end address {:#010X}", end_addr); | ||||
|         LOG_CRITICAL(HW_GPU, "invalid end address {:#010X}", end_addr); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     if (end_addr <= start_addr) { | ||||
|         NGLOG_CRITICAL(HW_GPU, "invalid memory range from {:#010X} to {:#010X}", start_addr, | ||||
|         LOG_CRITICAL(HW_GPU, "invalid memory range from {:#010X} to {:#010X}", start_addr, | ||||
|                        end_addr); | ||||
|         return; | ||||
|     } | ||||
|  | @ -133,32 +133,32 @@ static void DisplayTransfer(const Regs::DisplayTransferConfig& config) { | |||
| 
 | ||||
|     // TODO: do hwtest with these cases
 | ||||
|     if (!Memory::IsValidPhysicalAddress(src_addr)) { | ||||
|         NGLOG_CRITICAL(HW_GPU, "invalid input address {:#010X}", src_addr); | ||||
|         LOG_CRITICAL(HW_GPU, "invalid input address {:#010X}", src_addr); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     if (!Memory::IsValidPhysicalAddress(dst_addr)) { | ||||
|         NGLOG_CRITICAL(HW_GPU, "invalid output address {:#010X}", dst_addr); | ||||
|         LOG_CRITICAL(HW_GPU, "invalid output address {:#010X}", dst_addr); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     if (config.input_width == 0) { | ||||
|         NGLOG_CRITICAL(HW_GPU, "zero input width"); | ||||
|         LOG_CRITICAL(HW_GPU, "zero input width"); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     if (config.input_height == 0) { | ||||
|         NGLOG_CRITICAL(HW_GPU, "zero input height"); | ||||
|         LOG_CRITICAL(HW_GPU, "zero input height"); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     if (config.output_width == 0) { | ||||
|         NGLOG_CRITICAL(HW_GPU, "zero output width"); | ||||
|         LOG_CRITICAL(HW_GPU, "zero output width"); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     if (config.output_height == 0) { | ||||
|         NGLOG_CRITICAL(HW_GPU, "zero output height"); | ||||
|         LOG_CRITICAL(HW_GPU, "zero output height"); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|  | @ -169,14 +169,14 @@ static void DisplayTransfer(const Regs::DisplayTransferConfig& config) { | |||
|     u8* dst_pointer = Memory::GetPhysicalPointer(dst_addr); | ||||
| 
 | ||||
|     if (config.scaling > config.ScaleXY) { | ||||
|         NGLOG_CRITICAL(HW_GPU, "Unimplemented display transfer scaling mode {}", | ||||
|         LOG_CRITICAL(HW_GPU, "Unimplemented display transfer scaling mode {}", | ||||
|                        config.scaling.Value()); | ||||
|         UNIMPLEMENTED(); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     if (config.input_linear && config.scaling != config.NoScale) { | ||||
|         NGLOG_CRITICAL(HW_GPU, "Scaling is only implemented on tiled input"); | ||||
|         LOG_CRITICAL(HW_GPU, "Scaling is only implemented on tiled input"); | ||||
|         UNIMPLEMENTED(); | ||||
|         return; | ||||
|     } | ||||
|  | @ -295,7 +295,7 @@ static void DisplayTransfer(const Regs::DisplayTransferConfig& config) { | |||
|                 break; | ||||
| 
 | ||||
|             default: | ||||
|                 NGLOG_ERROR(HW_GPU, "Unknown destination framebuffer format {:x}", | ||||
|                 LOG_ERROR(HW_GPU, "Unknown destination framebuffer format {:x}", | ||||
|                             static_cast<u32>(config.output_format.Value())); | ||||
|                 break; | ||||
|             } | ||||
|  | @ -309,12 +309,12 @@ static void TextureCopy(const Regs::DisplayTransferConfig& config) { | |||
| 
 | ||||
|     // TODO: do hwtest with invalid addresses
 | ||||
|     if (!Memory::IsValidPhysicalAddress(src_addr)) { | ||||
|         NGLOG_CRITICAL(HW_GPU, "invalid input address {:#010X}", src_addr); | ||||
|         LOG_CRITICAL(HW_GPU, "invalid input address {:#010X}", src_addr); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     if (!Memory::IsValidPhysicalAddress(dst_addr)) { | ||||
|         NGLOG_CRITICAL(HW_GPU, "invalid output address {:#010X}", dst_addr); | ||||
|         LOG_CRITICAL(HW_GPU, "invalid output address {:#010X}", dst_addr); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|  | @ -327,7 +327,7 @@ static void TextureCopy(const Regs::DisplayTransferConfig& config) { | |||
|     u32 remaining_size = Common::AlignDown(config.texture_copy.size, 16); | ||||
| 
 | ||||
|     if (remaining_size == 0) { | ||||
|         NGLOG_CRITICAL(HW_GPU, "zero size. Real hardware freezes on this."); | ||||
|         LOG_CRITICAL(HW_GPU, "zero size. Real hardware freezes on this."); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|  | @ -340,12 +340,12 @@ static void TextureCopy(const Regs::DisplayTransferConfig& config) { | |||
|     u32 output_width = output_gap == 0 ? remaining_size : config.texture_copy.output_width * 16; | ||||
| 
 | ||||
|     if (input_width == 0) { | ||||
|         NGLOG_CRITICAL(HW_GPU, "zero input width. Real hardware freezes on this."); | ||||
|         LOG_CRITICAL(HW_GPU, "zero input width. Real hardware freezes on this."); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     if (output_width == 0) { | ||||
|         NGLOG_CRITICAL(HW_GPU, "zero output width. Real hardware freezes on this."); | ||||
|         LOG_CRITICAL(HW_GPU, "zero output width. Real hardware freezes on this."); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|  | @ -392,7 +392,7 @@ inline void Write(u32 addr, const T data) { | |||
| 
 | ||||
|     // Writes other than u32 are untested, so I'd rather have them abort than silently fail
 | ||||
|     if (index >= Regs::NumIds() || !std::is_same<T, u32>::value) { | ||||
|         NGLOG_ERROR(HW_GPU, "unknown Write{} {:#010X} @ {:#010X}", sizeof(data) * 8, (u32)data, | ||||
|         LOG_ERROR(HW_GPU, "unknown Write{} {:#010X} @ {:#010X}", sizeof(data) * 8, (u32)data, | ||||
|                     addr); | ||||
|         return; | ||||
|     } | ||||
|  | @ -409,7 +409,7 @@ inline void Write(u32 addr, const T data) { | |||
| 
 | ||||
|         if (config.trigger) { | ||||
|             MemoryFill(config); | ||||
|             NGLOG_TRACE(HW_GPU, "MemoryFill from {:#010X} to {:#010X}", config.GetStartAddress(), | ||||
|             LOG_TRACE(HW_GPU, "MemoryFill from {:#010X} to {:#010X}", config.GetStartAddress(), | ||||
|                         config.GetEndAddress()); | ||||
| 
 | ||||
|             // It seems that it won't signal interrupt if "address_start" is zero.
 | ||||
|  | @ -442,7 +442,7 @@ inline void Write(u32 addr, const T data) { | |||
| 
 | ||||
|             if (config.is_texture_copy) { | ||||
|                 TextureCopy(config); | ||||
|                 NGLOG_TRACE(HW_GPU, | ||||
|                 LOG_TRACE(HW_GPU, | ||||
|                             "TextureCopy: {:#X} bytes from {:#010X}({}+{})-> " | ||||
|                             "{:#010X}({}+{}), flags {:#010X}", | ||||
|                             config.texture_copy.size, config.GetPhysicalInputAddress(), | ||||
|  | @ -452,7 +452,7 @@ inline void Write(u32 addr, const T data) { | |||
|                             config.texture_copy.output_gap * 16, config.flags); | ||||
|             } else { | ||||
|                 DisplayTransfer(config); | ||||
|                 NGLOG_TRACE(HW_GPU, | ||||
|                 LOG_TRACE(HW_GPU, | ||||
|                             "DisplayTransfer: {:#010X}({}x{})-> " | ||||
|                             "{:#010X}({}x{}), dst format {:x}, flags {:#010X}", | ||||
|                             config.GetPhysicalInputAddress(), config.input_width.Value(), | ||||
|  | @ -561,12 +561,12 @@ void Init() { | |||
|     vblank_event = CoreTiming::RegisterEvent("GPU::VBlankCallback", VBlankCallback); | ||||
|     CoreTiming::ScheduleEvent(frame_ticks, vblank_event); | ||||
| 
 | ||||
|     NGLOG_DEBUG(HW_GPU, "initialized OK"); | ||||
|     LOG_DEBUG(HW_GPU, "initialized OK"); | ||||
| } | ||||
| 
 | ||||
| /// Shutdown hardware
 | ||||
| void Shutdown() { | ||||
|     NGLOG_DEBUG(HW_GPU, "shutdown OK"); | ||||
|     LOG_DEBUG(HW_GPU, "shutdown OK"); | ||||
| } | ||||
| 
 | ||||
| } // namespace GPU
 | ||||
|  |  | |||
|  | @ -36,7 +36,7 @@ inline void Read(T& var, const u32 addr) { | |||
|         LCD::Read(var, addr); | ||||
|         break; | ||||
|     default: | ||||
|         NGLOG_ERROR(HW_Memory, "unknown Read{} @ {:#010X}", sizeof(var) * 8, addr); | ||||
|         LOG_ERROR(HW_Memory, "unknown Read{} @ {:#010X}", sizeof(var) * 8, addr); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  | @ -65,7 +65,7 @@ inline void Write(u32 addr, const T data) { | |||
|         LCD::Write(addr, data); | ||||
|         break; | ||||
|     default: | ||||
|         NGLOG_ERROR(HW_Memory, "unknown Write{} {:#010X} @ {:#010X}", sizeof(data) * 8, (u32)data, | ||||
|         LOG_ERROR(HW_Memory, "unknown Write{} {:#010X} @ {:#010X}", sizeof(data) * 8, (u32)data, | ||||
|                     addr); | ||||
|     } | ||||
| } | ||||
|  | @ -90,13 +90,13 @@ void Init() { | |||
|     AES::InitKeys(); | ||||
|     GPU::Init(); | ||||
|     LCD::Init(); | ||||
|     NGLOG_DEBUG(HW, "initialized OK"); | ||||
|     LOG_DEBUG(HW, "initialized OK"); | ||||
| } | ||||
| 
 | ||||
| /// Shutdown hardware
 | ||||
| void Shutdown() { | ||||
|     GPU::Shutdown(); | ||||
|     LCD::Shutdown(); | ||||
|     NGLOG_DEBUG(HW, "shutdown OK"); | ||||
|     LOG_DEBUG(HW, "shutdown OK"); | ||||
| } | ||||
| } // namespace HW
 | ||||
|  |  | |||
|  | @ -21,7 +21,7 @@ inline void Read(T& var, const u32 raw_addr) { | |||
| 
 | ||||
|     // Reads other than u32 are untested, so I'd rather have them abort than silently fail
 | ||||
|     if (index >= 0x400 || !std::is_same<T, u32>::value) { | ||||
|         NGLOG_ERROR(HW_LCD, "unknown Read{} @ {:#010X}", sizeof(var) * 8, addr); | ||||
|         LOG_ERROR(HW_LCD, "unknown Read{} @ {:#010X}", sizeof(var) * 8, addr); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|  | @ -35,7 +35,7 @@ inline void Write(u32 addr, const T data) { | |||
| 
 | ||||
|     // Writes other than u32 are untested, so I'd rather have them abort than silently fail
 | ||||
|     if (index >= 0x400 || !std::is_same<T, u32>::value) { | ||||
|         NGLOG_ERROR(HW_LCD, "unknown Write{} {:#010X} @ {:#010X}", sizeof(data) * 8, (u32)data, | ||||
|         LOG_ERROR(HW_LCD, "unknown Write{} {:#010X} @ {:#010X}", sizeof(data) * 8, (u32)data, | ||||
|                     addr); | ||||
|         return; | ||||
|     } | ||||
|  | @ -66,12 +66,12 @@ template void Write<u8>(u32 addr, const u8 data); | |||
| /// Initialize hardware
 | ||||
| void Init() { | ||||
|     memset(&g_regs, 0, sizeof(g_regs)); | ||||
|     NGLOG_DEBUG(HW_LCD, "initialized OK"); | ||||
|     LOG_DEBUG(HW_LCD, "initialized OK"); | ||||
| } | ||||
| 
 | ||||
| /// Shutdown hardware
 | ||||
| void Shutdown() { | ||||
|     NGLOG_DEBUG(HW_LCD, "shutdown OK"); | ||||
|     LOG_DEBUG(HW_LCD, "shutdown OK"); | ||||
| } | ||||
| 
 | ||||
| } // namespace LCD
 | ||||
|  |  | |||
|  | @ -172,7 +172,7 @@ static THREEDSX_Error Load3DSXFile(FileUtil::IOFile& file, u32 base_addr, | |||
|                 for (unsigned current_inprogress = 0; | ||||
|                      current_inprogress < remaining && pos < end_pos; current_inprogress++) { | ||||
|                     const auto& table = reloc_table[current_inprogress]; | ||||
|                     NGLOG_TRACE(Loader, "(t={},skip={},patch={})", current_segment_reloc_table, | ||||
|                     LOG_TRACE(Loader, "(t={},skip={},patch={})", current_segment_reloc_table, | ||||
|                                 static_cast<u32>(table.skip), static_cast<u32>(table.patch)); | ||||
|                     pos += table.skip; | ||||
|                     s32 num_patches = table.patch; | ||||
|  | @ -182,7 +182,7 @@ static THREEDSX_Error Load3DSXFile(FileUtil::IOFile& file, u32 base_addr, | |||
|                         u32 orig_data = *pos; | ||||
|                         u32 sub_type = orig_data >> (32 - 4); | ||||
|                         u32 addr = TranslateAddr(orig_data & ~0xF0000000, &loadinfo, offsets); | ||||
|                         NGLOG_TRACE(Loader, "Patching {:08X} <-- rel({:08X},{}) ({:08X})", in_addr, | ||||
|                         LOG_TRACE(Loader, "Patching {:08X} <-- rel({:08X},{}) ({:08X})", in_addr, | ||||
|                                     addr, current_segment_reloc_table, *pos); | ||||
|                         switch (current_segment_reloc_table) { | ||||
|                         case 0: { | ||||
|  | @ -234,9 +234,9 @@ static THREEDSX_Error Load3DSXFile(FileUtil::IOFile& file, u32 base_addr, | |||
|     code_set->entrypoint = code_set->code.addr; | ||||
|     code_set->memory = std::make_shared<std::vector<u8>>(std::move(program_image)); | ||||
| 
 | ||||
|     NGLOG_DEBUG(Loader, "code size:   {:#X}", loadinfo.seg_sizes[0]); | ||||
|     NGLOG_DEBUG(Loader, "rodata size: {:#X}", loadinfo.seg_sizes[1]); | ||||
|     NGLOG_DEBUG(Loader, "data size:   {:#X} (including {:#X} of bss)", loadinfo.seg_sizes[2], | ||||
|     LOG_DEBUG(Loader, "code size:   {:#X}", loadinfo.seg_sizes[0]); | ||||
|     LOG_DEBUG(Loader, "rodata size: {:#X}", loadinfo.seg_sizes[1]); | ||||
|     LOG_DEBUG(Loader, "data size:   {:#X} (including {:#X} of bss)", loadinfo.seg_sizes[2], | ||||
|                 hdr.bss_size); | ||||
| 
 | ||||
|     *out_codeset = code_set; | ||||
|  | @ -303,8 +303,8 @@ ResultStatus AppLoader_THREEDSX::ReadRomFS(std::shared_ptr<FileUtil::IOFile>& ro | |||
|         u32 romfs_offset = hdr.fs_offset; | ||||
|         u32 romfs_size = static_cast<u32>(file.GetSize()) - hdr.fs_offset; | ||||
| 
 | ||||
|         NGLOG_DEBUG(Loader, "RomFS offset:           {:#010X}", romfs_offset); | ||||
|         NGLOG_DEBUG(Loader, "RomFS size:             {:#010X}", romfs_size); | ||||
|         LOG_DEBUG(Loader, "RomFS offset:           {:#010X}", romfs_offset); | ||||
|         LOG_DEBUG(Loader, "RomFS size:             {:#010X}", romfs_size); | ||||
| 
 | ||||
|         // We reopen the file, to allow its position to be independent from file's
 | ||||
|         romfs_file = std::make_shared<FileUtil::IOFile>(filepath, "rb"); | ||||
|  | @ -316,7 +316,7 @@ ResultStatus AppLoader_THREEDSX::ReadRomFS(std::shared_ptr<FileUtil::IOFile>& ro | |||
| 
 | ||||
|         return ResultStatus::Success; | ||||
|     } | ||||
|     NGLOG_DEBUG(Loader, "3DSX has no RomFS"); | ||||
|     LOG_DEBUG(Loader, "3DSX has no RomFS"); | ||||
|     return ResultStatus::ErrorNotUsed; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -272,18 +272,18 @@ const char* ElfReader::GetSectionName(int section) const { | |||
| } | ||||
| 
 | ||||
| SharedPtr<CodeSet> ElfReader::LoadInto(u32 vaddr) { | ||||
|     NGLOG_DEBUG(Loader, "String section: {}", header->e_shstrndx); | ||||
|     LOG_DEBUG(Loader, "String section: {}", header->e_shstrndx); | ||||
| 
 | ||||
|     // Should we relocate?
 | ||||
|     relocate = (header->e_type != ET_EXEC); | ||||
| 
 | ||||
|     if (relocate) { | ||||
|         NGLOG_DEBUG(Loader, "Relocatable module"); | ||||
|         LOG_DEBUG(Loader, "Relocatable module"); | ||||
|         entryPoint += vaddr; | ||||
|     } else { | ||||
|         NGLOG_DEBUG(Loader, "Prerelocated executable"); | ||||
|         LOG_DEBUG(Loader, "Prerelocated executable"); | ||||
|     } | ||||
|     NGLOG_DEBUG(Loader, "{} segments:", header->e_phnum); | ||||
|     LOG_DEBUG(Loader, "{} segments:", header->e_phnum); | ||||
| 
 | ||||
|     // First pass : Get the bits into RAM
 | ||||
|     u32 base_addr = relocate ? vaddr : 0; | ||||
|  | @ -303,7 +303,7 @@ SharedPtr<CodeSet> ElfReader::LoadInto(u32 vaddr) { | |||
| 
 | ||||
|     for (unsigned int i = 0; i < header->e_phnum; ++i) { | ||||
|         Elf32_Phdr* p = &segments[i]; | ||||
|         NGLOG_DEBUG(Loader, "Type: {} Vaddr: {:08X} Filesz: {:08X} Memsz: {:08X} ", p->p_type, | ||||
|         LOG_DEBUG(Loader, "Type: {} Vaddr: {:08X} Filesz: {:08X} Memsz: {:08X} ", p->p_type, | ||||
|                     p->p_vaddr, p->p_filesz, p->p_memsz); | ||||
| 
 | ||||
|         if (p->p_type == PT_LOAD) { | ||||
|  | @ -316,13 +316,13 @@ SharedPtr<CodeSet> ElfReader::LoadInto(u32 vaddr) { | |||
|             } else if (permission_flags == (PF_R | PF_W)) { | ||||
|                 codeset_segment = &codeset->data; | ||||
|             } else { | ||||
|                 NGLOG_ERROR(Loader, "Unexpected ELF PT_LOAD segment id {} with flags {:X}", i, | ||||
|                 LOG_ERROR(Loader, "Unexpected ELF PT_LOAD segment id {} with flags {:X}", i, | ||||
|                             p->p_flags); | ||||
|                 continue; | ||||
|             } | ||||
| 
 | ||||
|             if (codeset_segment->size != 0) { | ||||
|                 NGLOG_ERROR(Loader, | ||||
|                 LOG_ERROR(Loader, | ||||
|                             "ELF has more than one segment of the same type. Skipping extra " | ||||
|                             "segment (id {})", | ||||
|                             i); | ||||
|  | @ -344,7 +344,7 @@ SharedPtr<CodeSet> ElfReader::LoadInto(u32 vaddr) { | |||
|     codeset->entrypoint = base_addr + header->e_entry; | ||||
|     codeset->memory = std::make_shared<std::vector<u8>>(std::move(program_image)); | ||||
| 
 | ||||
|     NGLOG_DEBUG(Loader, "Done loading."); | ||||
|     LOG_DEBUG(Loader, "Done loading."); | ||||
| 
 | ||||
|     return codeset; | ||||
| } | ||||
|  |  | |||
|  | @ -41,7 +41,7 @@ FileType IdentifyFile(FileUtil::IOFile& file) { | |||
| FileType IdentifyFile(const std::string& file_name) { | ||||
|     FileUtil::IOFile file(file_name, "rb"); | ||||
|     if (!file.IsOpen()) { | ||||
|         NGLOG_ERROR(Loader, "Failed to load file {}", file_name); | ||||
|         LOG_ERROR(Loader, "Failed to load file {}", file_name); | ||||
|         return FileType::Unknown; | ||||
|     } | ||||
| 
 | ||||
|  | @ -123,7 +123,7 @@ static std::unique_ptr<AppLoader> GetFileLoader(FileUtil::IOFile&& file, FileTyp | |||
| std::unique_ptr<AppLoader> GetLoader(const std::string& filename) { | ||||
|     FileUtil::IOFile file(filename, "rb"); | ||||
|     if (!file.IsOpen()) { | ||||
|         NGLOG_ERROR(Loader, "Failed to load file {}", filename); | ||||
|         LOG_ERROR(Loader, "Failed to load file {}", filename); | ||||
|         return nullptr; | ||||
|     } | ||||
| 
 | ||||
|  | @ -134,12 +134,12 @@ std::unique_ptr<AppLoader> GetLoader(const std::string& filename) { | |||
|     FileType filename_type = GuessFromExtension(filename_extension); | ||||
| 
 | ||||
|     if (type != filename_type) { | ||||
|         NGLOG_WARNING(Loader, "File {} has a different type than its extension.", filename); | ||||
|         LOG_WARNING(Loader, "File {} has a different type than its extension.", filename); | ||||
|         if (FileType::Unknown == type) | ||||
|             type = filename_type; | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_DEBUG(Loader, "Loading file {} as {}...", filename, GetFileTypeString(type)); | ||||
|     LOG_DEBUG(Loader, "Loading file {} as {}...", filename, GetFileTypeString(type)); | ||||
| 
 | ||||
|     return GetFileLoader(std::move(file), type, filename_filename, filename); | ||||
| } | ||||
|  |  | |||
|  | @ -156,7 +156,7 @@ ResultStatus AppLoader_NCCH::Load(Kernel::SharedPtr<Kernel::Process>& process) { | |||
|     ReadProgramId(ncch_program_id); | ||||
|     std::string program_id{Common::StringFromFormat("%016" PRIX64, ncch_program_id)}; | ||||
| 
 | ||||
|     NGLOG_INFO(Loader, "Program ID: {}", program_id); | ||||
|     LOG_INFO(Loader, "Program ID: {}", program_id); | ||||
| 
 | ||||
|     update_ncch.OpenFile(Service::AM::GetTitleContentPath(Service::FS::MediaType::SDMC, | ||||
|                                                           ncch_program_id | UPDATE_MASK)); | ||||
|  |  | |||
|  | @ -38,7 +38,7 @@ PageTable* GetCurrentPageTable() { | |||
| } | ||||
| 
 | ||||
| static void MapPages(PageTable& page_table, u32 base, u32 size, u8* memory, PageType type) { | ||||
|     NGLOG_DEBUG(HW_Memory, "Mapping {} onto {:08X}-{:08X}", (void*)memory, base * PAGE_SIZE, | ||||
|     LOG_DEBUG(HW_Memory, "Mapping {} onto {:08X}-{:08X}", (void*)memory, base * PAGE_SIZE, | ||||
|                 (base + size) * PAGE_SIZE); | ||||
| 
 | ||||
|     RasterizerFlushVirtualRegion(base << PAGE_BITS, size * PAGE_SIZE, | ||||
|  | @ -151,7 +151,7 @@ T Read(const VAddr vaddr) { | |||
|     PageType type = current_page_table->attributes[vaddr >> PAGE_BITS]; | ||||
|     switch (type) { | ||||
|     case PageType::Unmapped: | ||||
|         NGLOG_ERROR(HW_Memory, "unmapped Read{} @ 0x{:08X}", sizeof(T) * 8, vaddr); | ||||
|         LOG_ERROR(HW_Memory, "unmapped Read{} @ 0x{:08X}", sizeof(T) * 8, vaddr); | ||||
|         return 0; | ||||
|     case PageType::Memory: | ||||
|         ASSERT_MSG(false, "Mapped memory page without a pointer @ {:08X}", vaddr); | ||||
|  | @ -188,7 +188,7 @@ void Write(const VAddr vaddr, const T data) { | |||
|     PageType type = current_page_table->attributes[vaddr >> PAGE_BITS]; | ||||
|     switch (type) { | ||||
|     case PageType::Unmapped: | ||||
|         NGLOG_ERROR(HW_Memory, "unmapped Write{} 0x{:08X} @ 0x{:08X}", sizeof(data) * 8, (u32)data, | ||||
|         LOG_ERROR(HW_Memory, "unmapped Write{} 0x{:08X} @ 0x{:08X}", sizeof(data) * 8, (u32)data, | ||||
|                     vaddr); | ||||
|         return; | ||||
|     case PageType::Memory: | ||||
|  | @ -246,7 +246,7 @@ u8* GetPointer(const VAddr vaddr) { | |||
|         return GetPointerFromVMA(vaddr); | ||||
|     } | ||||
| 
 | ||||
|     NGLOG_ERROR(HW_Memory, "unknown GetPointer @ 0x{:08x}", vaddr); | ||||
|     LOG_ERROR(HW_Memory, "unknown GetPointer @ 0x{:08x}", vaddr); | ||||
|     return nullptr; | ||||
| } | ||||
| 
 | ||||
|  | @ -284,12 +284,12 @@ u8* GetPhysicalPointer(PAddr address) { | |||
|         }); | ||||
| 
 | ||||
|     if (area == std::end(memory_areas)) { | ||||
|         NGLOG_ERROR(HW_Memory, "unknown GetPhysicalPointer @ 0x{:08X}", address); | ||||
|         LOG_ERROR(HW_Memory, "unknown GetPhysicalPointer @ 0x{:08X}", address); | ||||
|         return nullptr; | ||||
|     } | ||||
| 
 | ||||
|     if (area->paddr_base == IO_AREA_PADDR) { | ||||
|         NGLOG_ERROR(HW_Memory, "MMIO mappings are not supported yet. phys_addr=0x{:08X}", address); | ||||
|         LOG_ERROR(HW_Memory, "MMIO mappings are not supported yet. phys_addr=0x{:08X}", address); | ||||
|         return nullptr; | ||||
|     } | ||||
| 
 | ||||
|  | @ -339,7 +339,7 @@ void RasterizerMarkRegionCached(PAddr start, u32 size, bool cached) { | |||
|         // the end address of VRAM, causing the Virtual->Physical translation to fail when flushing
 | ||||
|         // parts of the texture.
 | ||||
|         if (!maybe_vaddr) { | ||||
|             NGLOG_ERROR(HW_Memory, | ||||
|             LOG_ERROR(HW_Memory, | ||||
|                         "Trying to flush a cached region to an invalid physical address {:08X}", | ||||
|                         paddr); | ||||
|             continue; | ||||
|  | @ -485,7 +485,7 @@ void ReadBlock(const Kernel::Process& process, const VAddr src_addr, void* dest_ | |||
| 
 | ||||
|         switch (page_table.attributes[page_index]) { | ||||
|         case PageType::Unmapped: { | ||||
|             NGLOG_ERROR(HW_Memory, | ||||
|             LOG_ERROR(HW_Memory, | ||||
|                         "unmapped ReadBlock @ 0x{:08X} (start address = 0x{:08X}, size = {})", | ||||
|                         current_vaddr, src_addr, size); | ||||
|             std::memset(dest_buffer, 0, copy_amount); | ||||
|  | @ -554,7 +554,7 @@ void WriteBlock(const Kernel::Process& process, const VAddr dest_addr, const voi | |||
| 
 | ||||
|         switch (page_table.attributes[page_index]) { | ||||
|         case PageType::Unmapped: { | ||||
|             NGLOG_ERROR(HW_Memory, | ||||
|             LOG_ERROR(HW_Memory, | ||||
|                         "unmapped WriteBlock @ 0x{:08X} (start address = 0x{:08X}, size = {})", | ||||
|                         current_vaddr, dest_addr, size); | ||||
|             break; | ||||
|  | @ -607,7 +607,7 @@ void ZeroBlock(const Kernel::Process& process, const VAddr dest_addr, const size | |||
| 
 | ||||
|         switch (page_table.attributes[page_index]) { | ||||
|         case PageType::Unmapped: { | ||||
|             NGLOG_ERROR(HW_Memory, | ||||
|             LOG_ERROR(HW_Memory, | ||||
|                         "unmapped ZeroBlock @ 0x{:08X} (start address = 0x{:08X}, size = {})", | ||||
|                         current_vaddr, dest_addr, size); | ||||
|             break; | ||||
|  | @ -657,7 +657,7 @@ void CopyBlock(const Kernel::Process& process, VAddr dest_addr, VAddr src_addr, | |||
| 
 | ||||
|         switch (page_table.attributes[page_index]) { | ||||
|         case PageType::Unmapped: { | ||||
|             NGLOG_ERROR(HW_Memory, | ||||
|             LOG_ERROR(HW_Memory, | ||||
|                         "unmapped CopyBlock @ 0x{:08X} (start address = 0x{:08X}, size = {})", | ||||
|                         current_vaddr, src_addr, size); | ||||
|             ZeroBlock(process, dest_addr, copy_amount); | ||||
|  | @ -762,7 +762,7 @@ boost::optional<PAddr> TryVirtualToPhysicalAddress(const VAddr addr) { | |||
| PAddr VirtualToPhysicalAddress(const VAddr addr) { | ||||
|     auto paddr = TryVirtualToPhysicalAddress(addr); | ||||
|     if (!paddr) { | ||||
|         NGLOG_ERROR(HW_Memory, "Unknown virtual address @ 0x{:08X}", addr); | ||||
|         LOG_ERROR(HW_Memory, "Unknown virtual address @ 0x{:08X}", addr); | ||||
|         // To help with debugging, set bit on address so that it's obviously invalid.
 | ||||
|         return addr | 0x80000000; | ||||
|     } | ||||
|  |  | |||
|  | @ -127,7 +127,7 @@ bool Movie::IsRecordingInput() { | |||
| 
 | ||||
| void Movie::CheckInputEnd() { | ||||
|     if (current_byte + sizeof(ControllerState) > recorded_input.size()) { | ||||
|         NGLOG_INFO(Movie, "Playback finished"); | ||||
|         LOG_INFO(Movie, "Playback finished"); | ||||
|         play_mode = PlayMode::None; | ||||
|     } | ||||
| } | ||||
|  | @ -138,7 +138,7 @@ void Movie::Play(Service::HID::PadState& pad_state, s16& circle_pad_x, s16& circ | |||
|     current_byte += sizeof(ControllerState); | ||||
| 
 | ||||
|     if (s.type != ControllerStateType::PadAndCircle) { | ||||
|         NGLOG_ERROR(Movie, | ||||
|         LOG_ERROR(Movie, | ||||
|                     "Expected to read type {}, but found {}. Your playback will be out of sync", | ||||
|                     static_cast<int>(ControllerStateType::PadAndCircle), static_cast<int>(s.type)); | ||||
|         return; | ||||
|  | @ -167,7 +167,7 @@ void Movie::Play(Service::HID::TouchDataEntry& touch_data) { | |||
|     current_byte += sizeof(ControllerState); | ||||
| 
 | ||||
|     if (s.type != ControllerStateType::Touch) { | ||||
|         NGLOG_ERROR(Movie, | ||||
|         LOG_ERROR(Movie, | ||||
|                     "Expected to read type {}, but found {}. Your playback will be out of sync", | ||||
|                     static_cast<int>(ControllerStateType::Touch), static_cast<int>(s.type)); | ||||
|         return; | ||||
|  | @ -184,7 +184,7 @@ void Movie::Play(Service::HID::AccelerometerDataEntry& accelerometer_data) { | |||
|     current_byte += sizeof(ControllerState); | ||||
| 
 | ||||
|     if (s.type != ControllerStateType::Accelerometer) { | ||||
|         NGLOG_ERROR(Movie, | ||||
|         LOG_ERROR(Movie, | ||||
|                     "Expected to read type {}, but found {}. Your playback will be out of sync", | ||||
|                     static_cast<int>(ControllerStateType::Accelerometer), static_cast<int>(s.type)); | ||||
|         return; | ||||
|  | @ -201,7 +201,7 @@ void Movie::Play(Service::HID::GyroscopeDataEntry& gyroscope_data) { | |||
|     current_byte += sizeof(ControllerState); | ||||
| 
 | ||||
|     if (s.type != ControllerStateType::Gyroscope) { | ||||
|         NGLOG_ERROR(Movie, | ||||
|         LOG_ERROR(Movie, | ||||
|                     "Expected to read type {}, but found {}. Your playback will be out of sync", | ||||
|                     static_cast<int>(ControllerStateType::Gyroscope), static_cast<int>(s.type)); | ||||
|         return; | ||||
|  | @ -218,7 +218,7 @@ void Movie::Play(Service::IR::PadState& pad_state, s16& c_stick_x, s16& c_stick_ | |||
|     current_byte += sizeof(ControllerState); | ||||
| 
 | ||||
|     if (s.type != ControllerStateType::IrRst) { | ||||
|         NGLOG_ERROR(Movie, | ||||
|         LOG_ERROR(Movie, | ||||
|                     "Expected to read type {}, but found {}. Your playback will be out of sync", | ||||
|                     static_cast<int>(ControllerStateType::IrRst), static_cast<int>(s.type)); | ||||
|         return; | ||||
|  | @ -236,7 +236,7 @@ void Movie::Play(Service::IR::ExtraHIDResponse& extra_hid_response) { | |||
|     current_byte += sizeof(ControllerState); | ||||
| 
 | ||||
|     if (s.type != ControllerStateType::ExtraHidResponse) { | ||||
|         NGLOG_ERROR( | ||||
|         LOG_ERROR( | ||||
|             Movie, "Expected to read type {}, but found {}. Your playback will be out of sync", | ||||
|             static_cast<int>(ControllerStateType::ExtraHidResponse), static_cast<int>(s.type)); | ||||
|         return; | ||||
|  | @ -342,7 +342,7 @@ void Movie::Record(const Service::IR::ExtraHIDResponse& extra_hid_response) { | |||
| 
 | ||||
| bool Movie::ValidateHeader(const CTMHeader& header) { | ||||
|     if (header_magic_bytes != header.filetype) { | ||||
|         NGLOG_ERROR(Movie, "Playback file does not have valid header"); | ||||
|         LOG_ERROR(Movie, "Playback file does not have valid header"); | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|  | @ -351,25 +351,25 @@ bool Movie::ValidateHeader(const CTMHeader& header) { | |||
|     revision = Common::ToLower(revision); | ||||
| 
 | ||||
|     if (revision != Common::g_scm_rev) { | ||||
|         NGLOG_WARNING( | ||||
|         LOG_WARNING( | ||||
|             Movie, "This movie was created on a different version of Citra, playback may desync"); | ||||
|     } | ||||
| 
 | ||||
|     u64 program_id; | ||||
|     Core::System::GetInstance().GetAppLoader().ReadProgramId(program_id); | ||||
|     if (program_id != header.program_id) { | ||||
|         NGLOG_WARNING(Movie, "This movie was recorded using a ROM with a different program id"); | ||||
|         LOG_WARNING(Movie, "This movie was recorded using a ROM with a different program id"); | ||||
|     } | ||||
| 
 | ||||
|     return true; | ||||
| } | ||||
| 
 | ||||
| void Movie::SaveMovie() { | ||||
|     NGLOG_INFO(Movie, "Saving movie"); | ||||
|     LOG_INFO(Movie, "Saving movie"); | ||||
|     FileUtil::IOFile save_record(Settings::values.movie_record, "wb"); | ||||
| 
 | ||||
|     if (!save_record.IsGood()) { | ||||
|         NGLOG_ERROR(Movie, "Unable to open file to save movie"); | ||||
|         LOG_ERROR(Movie, "Unable to open file to save movie"); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|  | @ -387,13 +387,13 @@ void Movie::SaveMovie() { | |||
|     save_record.WriteBytes(recorded_input.data(), recorded_input.size()); | ||||
| 
 | ||||
|     if (!save_record.IsGood()) { | ||||
|         NGLOG_ERROR(Movie, "Error saving movie"); | ||||
|         LOG_ERROR(Movie, "Error saving movie"); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void Movie::Init() { | ||||
|     if (!Settings::values.movie_play.empty()) { | ||||
|         NGLOG_INFO(Movie, "Loading Movie for playback"); | ||||
|         LOG_INFO(Movie, "Loading Movie for playback"); | ||||
|         FileUtil::IOFile save_record(Settings::values.movie_play, "rb"); | ||||
|         u64 size = save_record.GetSize(); | ||||
| 
 | ||||
|  | @ -407,13 +407,13 @@ void Movie::Init() { | |||
|                 current_byte = 0; | ||||
|             } | ||||
|         } else { | ||||
|             NGLOG_ERROR(Movie, "Failed to playback movie: Unable to open '{}'", | ||||
|             LOG_ERROR(Movie, "Failed to playback movie: Unable to open '{}'", | ||||
|                         Settings::values.movie_play); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     if (!Settings::values.movie_record.empty()) { | ||||
|         NGLOG_INFO(Movie, "Enabling Movie recording"); | ||||
|         LOG_INFO(Movie, "Enabling Movie recording"); | ||||
|         play_mode = PlayMode::Recording; | ||||
|     } | ||||
| } | ||||
|  |  | |||
|  | @ -50,14 +50,14 @@ u64 GetTelemetryId() { | |||
|     if (FileUtil::Exists(filename)) { | ||||
|         FileUtil::IOFile file(filename, "rb"); | ||||
|         if (!file.IsOpen()) { | ||||
|             NGLOG_ERROR(Core, "failed to open telemetry_id: {}", filename); | ||||
|             LOG_ERROR(Core, "failed to open telemetry_id: {}", filename); | ||||
|             return {}; | ||||
|         } | ||||
|         file.ReadBytes(&telemetry_id, sizeof(u64)); | ||||
|     } else { | ||||
|         FileUtil::IOFile file(filename, "wb"); | ||||
|         if (!file.IsOpen()) { | ||||
|             NGLOG_ERROR(Core, "failed to open telemetry_id: {}", filename); | ||||
|             LOG_ERROR(Core, "failed to open telemetry_id: {}", filename); | ||||
|             return {}; | ||||
|         } | ||||
|         telemetry_id = GenerateTelemetryId(); | ||||
|  | @ -73,7 +73,7 @@ u64 RegenerateTelemetryId() { | |||
| 
 | ||||
|     FileUtil::IOFile file(filename, "wb"); | ||||
|     if (!file.IsOpen()) { | ||||
|         NGLOG_ERROR(Core, "failed to open telemetry_id: {}", filename); | ||||
|         LOG_ERROR(Core, "failed to open telemetry_id: {}", filename); | ||||
|         return {}; | ||||
|     } | ||||
|     file.WriteBytes(&new_telemetry_id, sizeof(u64)); | ||||
|  |  | |||
|  | @ -159,7 +159,7 @@ void Recorder::Finish(const std::string& filename) { | |||
|                 throw "Failed to write stream element"; | ||||
|         } | ||||
|     } catch (const char* str) { | ||||
|         NGLOG_ERROR(HW_GPU, "Writing CiTrace file failed: {}", str); | ||||
|         LOG_ERROR(HW_GPU, "Writing CiTrace file failed: {}", str); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue