@@ -2085,16 +2085,6 @@ int KernelStartModule(SceUID moduleId, u32 argsize, u32 argAddr, u32 returnValue
2085
2085
entryAddr = module->nm .module_start_func ;
2086
2086
if (module->nm .module_start_thread_attr != 0 )
2087
2087
attribute = module->nm .module_start_thread_attr ;
2088
- } else if (entryAddr == (u32)-1 || entryAddr == module->memoryBlockAddr - 1 ) {
2089
- if (smoption) {
2090
- // TODO: Does sceKernelStartModule() really give an error when no entry only if you pass options?
2091
- attribute = smoption->attribute ;
2092
- } else {
2093
- // TODO: Why are we just returning the module ID in this case?
2094
- WARN_LOG (SCEMODULE, " sceKernelStartModule(): module has no start or entry func" );
2095
- module->nm .status = MODULE_STATUS_STARTED;
2096
- return moduleId;
2097
- }
2098
2088
}
2099
2089
2100
2090
if (Memory::IsValidAddress (entryAddr)) {
@@ -2110,14 +2100,16 @@ int KernelStartModule(SceUID moduleId, u32 argsize, u32 argAddr, u32 returnValue
2110
2100
stacksize = module->nm .module_start_thread_stacksize ;
2111
2101
}
2112
2102
2103
+ // TODO: Why do we skip smoption->attribute here?
2104
+
2113
2105
SceUID threadID = __KernelCreateThread (module->nm .name , moduleId, entryAddr, priority, stacksize, attribute, 0 , (module->nm .attribute & 0x1000 ) != 0 );
2114
2106
__KernelStartThreadValidate (threadID, argsize, argAddr);
2115
2107
__KernelSetThreadRA (threadID, NID_MODULERETURN);
2116
2108
2117
2109
if (needsWait) {
2118
2110
*needsWait = true ;
2119
2111
}
2120
- } else if (entryAddr == 0 ) {
2112
+ } else if (entryAddr == 0 || entryAddr == (u32)- 1 ) {
2121
2113
INFO_LOG (SCEMODULE, " sceKernelStartModule(%d,asize=%08x,aptr=%08x,retptr=%08x): no entry address" , moduleId, argsize, argAddr, returnValueAddr);
2122
2114
module->nm .status = MODULE_STATUS_STARTED;
2123
2115
} else {
0 commit comments