From 8958501acbb9163658181e0d0c973d180c508d3c Mon Sep 17 00:00:00 2001 From: sum2012 Date: Fri, 21 Feb 2014 05:32:55 +0800 Subject: [PATCH 1/3] Support kernal mode Module Fix #5527 https://github.com/hrydgard/ppsspp/pull/5512/files No need --- Core/HLE/sceKernelModule.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index 21f505727e..e92023db53 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -1485,10 +1485,10 @@ u32 sceKernelLoadModule(const char *name, u32 flags, u32 optionAddr) return -1; } - // Module was blacklisted or couldn't be decrypted, which means it's a kernel module we don't want to run. + // Module was blacklisted or couldn't be decrypted, which means it's a kernel module. // Let's just act as if it worked. NOTICE_LOG(LOADER, "Module %s is blacklisted or undecryptable - we lie about success", name); - return 1; + return __KernelLoadExec(name, 0, &error_string); } if (lmoption) { From b8a8cc0049c6e60d78f0cc07a0618b5e7bc23deb Mon Sep 17 00:00:00 2001 From: sum2012 Date: Fri, 21 Feb 2014 06:00:41 +0800 Subject: [PATCH 2/3] Update log information - menthion we try __KernelLoadExec --- Core/HLE/sceKernelModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index e92023db53..6b6bf7a3c2 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -1487,7 +1487,7 @@ u32 sceKernelLoadModule(const char *name, u32 flags, u32 optionAddr) // Module was blacklisted or couldn't be decrypted, which means it's a kernel module. // Let's just act as if it worked. - NOTICE_LOG(LOADER, "Module %s is blacklisted or undecryptable - we lie about success", name); + NOTICE_LOG(LOADER, "Module %s is blacklisted or undecryptable - we try __KernelLoadExec", name); return __KernelLoadExec(name, 0, &error_string); } From 98e952ea6e8a8e105c51a96e78af634197d17128 Mon Sep 17 00:00:00 2001 From: sum2012 Date: Fri, 21 Feb 2014 07:14:40 +0800 Subject: [PATCH 3/3] Only can use __KernelLoadExec when load BOOT.BIN --- Core/HLE/sceKernelModule.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index 6b6bf7a3c2..1346aab6b2 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -1485,10 +1485,18 @@ u32 sceKernelLoadModule(const char *name, u32 flags, u32 optionAddr) return -1; } - // Module was blacklisted or couldn't be decrypted, which means it's a kernel module. - // Let's just act as if it worked. - NOTICE_LOG(LOADER, "Module %s is blacklisted or undecryptable - we try __KernelLoadExec", name); - return __KernelLoadExec(name, 0, &error_string); + if (info.name == "BOOT.BIN") + { + NOTICE_LOG(LOADER, "Module %s is blacklisted or undecryptable - we try __KernelLoadExec", name) + return __KernelLoadExec(name, 0, &error_string); + } + else + { + // Module was blacklisted or couldn't be decrypted, which means it's a kernel module we don't want to run.. + // Let's just act as if it worked. + NOTICE_LOG(LOADER, "Module %s is blacklisted or undecryptable - we lie about success", name) + return 1; + } } if (lmoption) {