From b922dff414e29f90fcbef19f3b94b78b06badb1a Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sun, 17 May 2020 23:19:55 -0700 Subject: [PATCH] exo2: tweak debug for better logging --- .../program/source/smc/secmon_smc_handler.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/exosphere2/program/source/smc/secmon_smc_handler.cpp b/exosphere2/program/source/smc/secmon_smc_handler.cpp index 4a27bf6d8..f1cd4b37a 100644 --- a/exosphere2/program/source/smc/secmon_smc_handler.cpp +++ b/exosphere2/program/source/smc/secmon_smc_handler.cpp @@ -233,8 +233,8 @@ namespace ams::secmon::smc { constinit std::atomic g_logged = 0; - constexpr int LogMin = 0x100; - constexpr int LogMax = 0x120; + constexpr int LogMin = 0x200; + constexpr int LogMax = 0x400; constexpr size_t LogBufSize = 0x5000; @@ -269,20 +269,20 @@ namespace ams::secmon::smc { } void HandleSmc(int type, SmcArguments &args) { - if (type == HandlerType_User) { - DebugLog(args); - } - /* Get the table. */ const auto &table = GetHandlerTable(static_cast(type), args.r[0]); + if (std::addressof(table) == std::addressof(g_handler_tables[HandlerType_User])) { + DebugLog(args); + } + /* Get the handler info. */ const auto &info = GetHandlerInfo(table, args.r[0]); /* Set the invocation result. */ args.r[0] = static_cast(InvokeSmcHandler(info, args)); - if (type == HandlerType_User) { + if (std::addressof(table) == std::addressof(g_handler_tables[HandlerType_User])) { DebugLog(args); }