Merge pull request #215 from shadps4-emu/miscFixAgain

Misc fixes (mostly LLE)
This commit is contained in:
psucien 2024-06-26 14:15:07 +02:00 committed by GitHub
commit 3532fd1c9c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 108 additions and 12 deletions

View file

@ -105,7 +105,7 @@ int PS4_SYSV_ABI sceKernelOpen(const char* path, int flags, u16 mode) {
}
int PS4_SYSV_ABI posix_open(const char* path, int flags, /* SceKernelMode*/ u16 mode) {
LOG_INFO(Kernel_Fs, "posix open redirect to sceKernelOpen\n");
LOG_INFO(Kernel_Fs, "posix open redirect to sceKernelOpen");
int result = sceKernelOpen(path, flags, mode);
// Posix calls different only for their return values
ASSERT(result >= 0);

View file

@ -88,7 +88,7 @@ int PS4_SYSV_ABI sceKernelMmap(void* addr, u64 len, int prot, int flags, int fd,
void* PS4_SYSV_ABI posix_mmap(void* addr, u64 len, int prot, int flags, int fd, u64 offset) {
void* ptr;
LOG_INFO(Kernel_Vmm, "posix mmap redirect to sceKernelMmap\n");
LOG_INFO(Kernel_Vmm, "posix mmap redirect to sceKernelMmap");
// posix call the difference is that there is a different behaviour when it doesn't return 0 or
// SCE_OK
const VAddr ret_addr = (VAddr)__builtin_return_address(0);
@ -288,9 +288,21 @@ int PS4_SYSV_ABI sceKernelUuidCreate(OrbisKernelUuid* orbisUuid) {
return 0;
}
char* PS4_SYSV_ABI sceKernelGetFsSandboxRandomWord() {
char* path = "sys";
return path;
}
int PS4_SYSV_ABI posix_connect() {
return -1;
}
void LibKernel_Register(Core::Loader::SymbolsResolver* sym) {
// obj
LIB_OBJ("f7uOxY9mM1U", "libkernel", 1, "libkernel", 1, 1, &g_stack_chk_guard);
// misc
LIB_FUNCTION("JGfTMBOdUJo", "libkernel", 1, "libkernel", 1, 1, sceKernelGetFsSandboxRandomWord);
LIB_FUNCTION("XVL8So3QJUk", "libkernel", 1, "libkernel", 1, 1, posix_connect);
// memory
LIB_FUNCTION("OMDRKKAZ8I4", "libkernel", 1, "libkernel", 1, 1, sceKernelDebugRaiseException);
LIB_FUNCTION("rTXw65xmLIA", "libkernel", 1, "libkernel", 1, 1, sceKernelAllocateDirectMemory);