Commit graph

686 commits

Author SHA1 Message Date
Eladash
a029a94c73 SPU: Use waitable atomics for SPU channels interface 2020-07-23 13:45:58 +03:00
Eladash
c37bc3c55c SPU: Make spu_thread::offset private 2020-07-19 17:58:49 +03:00
Eladash
af1ceb1151 SPU LLVM: LS Memory Mirrors (Optimize loads/stores) 2020-07-18 02:01:33 +03:00
Eladash
d9750e8f9f SPU/PPU reservations: Optimizations for reservation locks and check_state() (non-TSX) 2020-07-09 03:17:35 +01:00
Derrik Touve
cb08c53f2f
sys_net: Use np_handler dns if possible for sys_net_infoctl (#8557)
Without this, cellHttpSendRequest will use the hardcoded dns 192.168.1.1, which won't work if you're not on that network.
2020-07-07 08:25:29 +02:00
Eladash
2483cc6f8d Fix race in Crypto/unedat.cpp, Make NPDRM keys usage atomic 2020-06-28 23:26:10 +01:00
Eladash
e45d37073a debugger: Shortend SPU/PPU thread names 2020-06-24 17:44:06 +02:00
Eladash
d86c9a2549 sys_mmapper: rewrite page fault thread notifications
* Fix a corner case where SPU thread has the same ID as a PPU thread.
* Fix a potential deadlock on Emu.Stop() while sending event in EBUSY loop.
* Thread specific notifications.
2020-06-18 20:13:54 +03:00
Eladash
5fda9a4efb sus_lwcond_signal_all: use protocol specified in lwmutex
Trying to fix a nearly impossible corner case.
2020-06-15 17:08:57 +03:00
Eladash
314dc4c5de sys_cond: Fix spurious EBUSY in sys_cond_destroy
Increment waiters count inside IDM's mutex lock scope.
2020-06-15 17:08:57 +03:00
Eladash
a0f0f58fc5 sys_event_queue: Fix IPC support 2020-06-15 17:08:57 +03:00
Eladash
92b7c56f29 sys_cond/mutex: Fix race between sys_cond_create and sys_mutex, Fix IPC support in sys_cond/mutex 2020-06-15 17:08:57 +03:00
Eladash
5430892052
sys_vm: Limit total process vsize to 256MB (#8431) 2020-06-14 15:27:34 +01:00
Eladash
aa4fdff82c Fix lv2_obj::name64 regression 2020-06-14 02:25:29 +03:00
Eladash
e1f8573c68 sys_net: Fix sys_net_bnet_setsockopt page faults 2020-06-12 22:39:13 +03:00
Eladash
4bc157881d sys_net: Stub sys_net_infoctl command 9 2020-06-12 22:39:13 +03:00
Eladash
6892399699 kernel_explorer: More Improvements 2020-06-12 09:28:23 +02:00
Eladash
b9cb181691 sys_memory: Improve allocation/deallocation syscalls 2020-06-11 20:03:32 +03:00
Eladash
c36c425fb9 kernel explorer: Improvements 2020-06-08 05:46:36 +03:00
Nekotekina
3d7c38ff9d Remove lambda in sys_net_bnet_poll 2020-06-07 22:44:07 +03:00
Ani
9657b3f1d4
Fix sys_net_bnet_poll regression (#8337)
Co-authored-by: Eladash <elad3356p@gmail.com>
2020-06-04 17:30:11 +01:00
Eladash
675fde69aa Avoid copying std::shared_ptr in sys_semaphore 2020-05-31 21:02:52 +03:00
Eladash
865180e63e sys_mmapper: Fix possible memory leak on error of create_lv2_shm 2020-05-24 19:24:07 +03:00
Eladash
3265772ae4 idm: Implement creation/destruction invalidation counter
* "Ensures" newely created IDs won't have the same ID as old destroyed objects for lv2_obj. (256 tries cycle)

Similar to how the kernel implements it.
2020-05-24 19:24:07 +03:00
Eladash
377e2ce3e8
rsx: Write 4-byte long data to all semaphores (#8246)
* rsx: Write 4-byte long data to all semaphores
2020-05-17 17:48:35 +03:00
Eladash
8a0425570c
rsx: Fix data written to RSX semaphores and the initial data of them (#8235) 2020-05-16 09:55:56 +01:00
Eladash
7680466e0d Minor EFAULT fix in sys_semaphore_get_value/sys_event_flag_get
ESRCH preceeds EFAULT in both syscalls.
2020-05-13 19:36:44 +03:00
Eladash
9266507e4c SPU: Implement spu_channel_(4_)t::try_read 2020-05-13 19:36:44 +03:00
Eladash
8cca113ef4 sys_spu: Add short sleep in sys_spu_thread_group_terminate 2020-05-13 19:36:44 +03:00
Eladash
7ff25588f4 sys_spu: Minor cleanup of group termination process 2020-05-13 19:36:44 +03:00
Eladash
f95b81574f
sys_spu: Fix race in sys_spu_thread_group_destroy and other minor fixes (#8182)
* sys_spu: Fix race in sys_spu_thread_group_destroy and other minor fixes

* SPU: Wait for all threads to have error codes if exited by sys_spu_thread_exit

On last thread in group to run.

* sys_spu: Fix sys_spu_thread_group_start

* fixup ad fix sys_spu_thread_group_terminate

idk why "- !group->running" was put in the first place but its probably no longer relevant due to other changes and was causing other issues such as not always waiting for last SPU thread to set group state to INITIALIZED.
2020-05-11 21:24:04 +03:00
Eladash
bd61347b21 sys_spu: reset group exit status in sys_spu_thread_group_start 2020-05-10 03:46:11 +01:00
Eladash
09797c3584 sys_spu: Improve sys_spu_thread_get_exit_status 2020-05-10 03:46:11 +01:00
Nekotekina
907adc817e Fix some warnings (GCC) 2020-05-05 21:55:22 +03:00
Eladash
edde748519 sys_event_queue: Fix forced event queue destruction
Add missing last existence check at sys_spu_thread_(try)receive_event and lv2_event_queue::send.
2020-05-04 01:10:19 +03:00
Eladash
37ce7056ac lv2: Minor optimization for "awake all" threads in sleep queue 2020-05-04 01:10:19 +03:00
Eladash
b84b8f4db4 sys_cond_signal_all: Use SYS_SYNC_PRIORITY protocol to signal threads 2020-05-04 01:10:19 +03:00
Eladash
72bef8dd7f PPU: Clear reservation on context switch
Ensure that only 2 PPU reservations exist at maximum at a time.
2020-05-02 14:57:38 +03:00
Eladash
2b75df22d9 sys_event_queue: Fix ports disconnection after queue destruction 2020-04-30 18:58:42 +03:00
Eladash
f4f0fb88b1 kernel explorer: Add more information about SPU/PPU threads 2020-04-29 15:32:16 +03:00
Eladash
dd6825a7bd Fix sys_ppu_thread_start error checking, fix rare bug in sys_ppu_thread_create
* Correct error code to EBUSY.
* lv2_obj::awake was called even when EBSUY should be returned.
* Fix sys_ppu_thread_create for a newly created thread with the same id as ppu_thread::id_base. (can happen if main thread exited before its creation)
2020-04-29 08:58:09 +03:00
Eladash
c1dc6838fa Fix sys_ppu_thread_get_priority page faults 2020-04-29 07:57:47 +03:00
Eladash
791ec95313 sys_rwlock: Do not allow SYS_SYNC_PRIORITY_INHERIT 2020-04-29 05:56:47 +03:00
Eladash
fe7933b0d2 Make ESTAT consistent in sys_spu_thread_group_terminate 2020-04-28 14:58:17 +03:00
Eladash
256c74def2 sys_rsx: Fix error code instead of success on invalid context 2020-04-23 14:01:04 +03:00
Eladash
c48ccc6f3c sys_rsx: Fix zcull bind error checking regression 2020-04-23 14:01:04 +03:00
Eladash
8c747bf0a2 sys_rsx: More error checks for ZCULL area binding
And clamp zcull offset to 256MB, it's unknown if only the error check clamps or it is clamped entirely.
2020-04-21 16:18:32 +01:00
Eladash
1cb3bf6dab Minor fixup for unimplemented syscall args dump 2020-04-19 10:56:42 +01:00
Eladash
6210507a37 sys_rsx: Fix tiles on MAIN memory error checking 2020-04-18 10:20:03 +03:00
Eladash
a3f2dfa232 sys_isolated_spu 2020-04-17 11:41:50 +01:00