htc: ObserverThread (mostly), system now boots + works with htc in bg

This commit is contained in:
Michael Scire 2021-02-10 04:22:19 -08:00 committed by SciresM
parent 79a3f442d6
commit 4d86863f2c
6 changed files with 83 additions and 7 deletions

View file

@ -42,6 +42,25 @@ namespace ams {
using namespace ams;
#define AMS_HTC_USE_FATAL_ERROR 1
#if AMS_HTC_USE_FATAL_ERROR
extern "C" {
/* Exception handling. */
alignas(16) u8 __nx_exception_stack[ams::os::MemoryPageSize];
u64 __nx_exception_stack_size = sizeof(__nx_exception_stack);
void __libnx_exception_handler(ThreadExceptionDump *ctx);
}
void __libnx_exception_handler(ThreadExceptionDump *ctx) {
ams::CrashHandler(ctx);
}
#endif
namespace ams::htc {
namespace {
@ -87,6 +106,8 @@ void __appInit(void) {
sm::DoWithSession([&]() {
R_ABORT_UNLESS(setsysInitialize());
R_ABORT_UNLESS(setcalInitialize());
R_ABORT_UNLESS(pscmInitialize());
R_ABORT_UNLESS(fsInitialize());
});