Merge pull request #22259 from hrydgard/firmware-modules-load-high

Firmware modules: Load to high memory
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2026-09-08 13:44:14 -06:00
commit 2845de3a4d
5 files changed
+48 -8

No files matched your search

+2 -2
View File
@@ -1927,14 +1927,14 @@ static PSPModule *__KernelLoadELFFromPtr(const u8 *ptr, size_t elfSize, u32 load
return module;
}
SceUID KernelLoadModule(const std::string &filename, std::string *error_string) {
SceUID KernelLoadModule(const std::string &filename, std::string *error_string, bool fromTop) {
std::vector<uint8_t> buffer;
if (pspFileSystem.ReadEntireFile(filename, buffer) < 0)
return SCE_KERNEL_ERROR_NOFILE;
u32 error = SCE_KERNEL_ERROR_ILLEGAL_OBJECT;
u32 magic;
PSPModule *module = __KernelLoadELFFromPtr(&buffer[0], buffer.size(), 0, false, error_string, &magic, filename, error);
PSPModule *module = __KernelLoadELFFromPtr(&buffer[0], buffer.size(), 0, fromTop, error_string, &magic, filename, error);
if (module == nullptr)
return error;