Commit graph

59 commits

Author SHA1 Message Date
eladash
4a28319edf Implement SPU page faults notifications
* Implement both RawSPU and threaded SPU page fault recovery
* Guard page_fault_notification_entries access with a mutex
* Add missing lock in sys_ppu_thread_recover_page_fault/get_page_fault_context
* Fix EINVAL check in sys_ppu_thread_recover_page_fault, previously when the event was not found begin() was erased and
CELL_OK was returned.
* Fixed page fault recovery waiting logic:
- Do not rely on a single thread_ctrl notification (unsafe)
- Avoided a race where ::awake(ppu) can be called before ::sleep(ppu) therefore nop-ing out the notification
* Avoid inconsistencies with vm flags on page fault cause detection
* Fix sys_mmapper_enable_page_fault_notification EBUSY check
from RE it's allowed to register the same queue twice (on a different area) but not to enable page fault notifications twice
2019-03-12 13:28:31 +03:00
eladash
d4459af4b3 Implement _sys_lwmutex_unlock (SYS_SYNC_RETRY mode) 2019-02-27 22:16:08 +03:00
eladash
3332a10052 ppu: Fix threads scheduler
*Set priority under a lock
*Fix yield command making threads going out of scheduler control by removing it from the queue (not a bug that affects compatibility)
2018-11-07 13:06:29 +03:00
Nekotekina
1b37e775be Migration to named_thread<>
Add atomic_t<>::try_dec instead of fetch_dec_sat
Add atomic_t<>::try_inc
GDBDebugServer is broken (needs rewrite)
Removed old_thread class (former named_thread)
Removed storing/rethrowing exceptions from thread
Emu.Stop doesn't inject an exception anymore
task_stack helper class removed
thread_base simplified (no shared_from_this)
thread_ctrl::spawn simplified (creates detached thread)
Implemented overrideable thread detaching logic
Disabled cellAdec, cellDmux, cellFsAio
SPUThread renamed to spu_thread
RawSPUThread removed, spu_thread used instead
Disabled deriving from ppu_thread
Partial support for thread renaming
lv2_timer... simplified, screw it
idm/fxm: butchered support for on_stop/on_init
vm: improved allocation structure (added size)
2018-10-19 22:22:35 +03:00
Nekotekina
306f95a9ae New named_thread template (preview)
Old class named_thread renamed to old_thread
It's too hard to move in a single commit
2018-09-27 14:04:16 +03:00
Nekotekina
fb5cdf9769 atomic_t<>: extend fetch_op to support cancellation
Use std::invoke inside atomic_op/fetch_op
Remove op_fetch because it's easily replaced
Add fetch_dec_sat algorithm (conditional decrement)
2018-09-08 00:32:04 +03:00
scribam
02ba529eea sys_usbd: add sys_usbd_event_port_send function 2018-09-05 19:53:09 +03:00
Nekotekina
ca5158a03e Cleanup semaphore<> (sema.h) and mutex.h (shared_mutex)
Remove semaphore_lock and writer_lock classes, replace with std::lock_guard
Change semaphore<> interface to Lockable (+ exotic try_unlock method)
2018-09-03 23:00:36 +03:00
Nekotekina
8abe6489ed Mega-cleanup for atomic_t<> and named bit-sets bs_t<>
Remove "atomic operator" classes
Remove test, test_and_set, test_and_reset, test_and_complement global functions
Simplify atomic_t<> with constexpr if, remove some garbage
Redesign bs_t<> to use class, mark its methods constexpr
Implement atomic_bs_t<> for optimizations
Remove unused __bitwise_ops concept (should be in other header anyway)
Bitsets can now be tested via safe bool conversion
2018-09-03 21:40:36 +03:00
Maxetto
05c1f192f5 Update new LV2 names (#4886) 2018-08-11 16:46:44 +04:00
Chris Weermann (TGE)
c5dcef52fa Implement sys_dbg_read_process_memory and sys_dbg_write_process_memory 2018-07-10 01:47:47 +04:00
Maxetto
dca6f1f863 Update some lv2 syscall names (#4490) 2018-05-06 14:21:50 +04:00
Nekotekina
d392379c7a Use vm::passive_lock for SPU threads 2018-04-06 15:47:00 +03:00
elad
877b296fc3 hle: return enosys on unpresented syscalls 2018-02-16 21:57:31 +04:00
elad
95c6ac699b hle: gpio syscalls
* add sys_gpio_get, sys_gpio_set
2018-02-12 04:29:07 +04:00
Zion Nimchuk
b9b06143d2 Silence some warnings in some files in Utilities 2017-11-30 18:07:19 +03:00
Robbie
47b121a700 PPU Page Faults (#3309)
I guess I'll merge it and fix some issues later myself.
2017-10-08 23:37:54 +03:00
Nekotekina
e5f756205c sys_net full rewrite
Implement sys_net syscalls
Clean libnet functions
Use libnet.sprx
Use libhttp.sprx
Use libssl.sprx
Use librudp.sprx
Implement sys_ss_random_number_generator
2017-10-05 19:51:37 +03:00
Nekotekina
669b1385cc Move sys_process_exit 2017-09-19 15:07:07 +03:00
Talkashie
ca6064b109 sys_usbd stuff (#3346)
* Create sys_usbd.cpp

* Create sys_usbd.h

* Update lv2.cpp
2017-09-02 04:21:42 +03:00
Nekotekina
8f9410ceff Implemented syscall sys_event_port_connect_ipc 2017-08-31 22:10:22 +03:00
Nekotekina
90b8346312 Implemented syscall _sys_spu_image_get_segments 2017-08-31 21:39:12 +03:00
Nekotekina
adf119e960 sys_rwlock_runlock fixed
Registered _sys_rwlock_trywlock
2017-07-23 16:01:52 +03:00
Nekotekina
3f9affd2ad Stub some SPU syscalls 2017-07-23 11:03:38 +03:00
RipleyTom
d793f8ad78 Implements sys_fs_disk_free 2017-07-04 16:16:32 +03:00
Nekotekina
8034196c25 ppu_syscall_code type added (for fmt) 2017-06-26 16:56:13 +03:00
Nekotekina
1196e9decc PPU LLVM: remove unnecessary code 2017-06-26 16:56:13 +03:00
Nekotekina
aea094730b PPU LLVM: paradigm shift
For now, compile only one block at time
Use tail calls to move between blocks
Fully write PPU context (except CIA)

This fixes many compatibility problems
2017-06-23 20:09:33 +03:00
scribam
4d294e7a69 Stub sys_rsxaudio_ functions 2017-06-22 20:08:21 +03:00
Nekotekina
f010b5b235 Configuration simplified 2017-05-20 16:01:48 +03:00
Nekotekina
88fef183a3 config.yml: Log section optimized 2017-05-15 14:37:05 +03:00
Nekotekina
8df95dbe39 Stub sys_fs syscalls 2017-05-11 19:05:41 +03:00
Nekotekina
08c955d177 Remove AutoPause.cpp 2017-05-11 19:05:41 +03:00
Nekotekina
8209e6c1e3 ppu_initialize_syscalls draft 2017-05-11 19:05:41 +03:00
Nekotekina
b0a83cdb56 sys_fs_lsn_get_cda_size stub 2017-04-26 20:26:29 +03:00
Nekotekina
a95a63a58a sys_fs_lsn_lock implemented 2017-04-26 02:27:35 +03:00
Nekotekina
256dfc5729 sys_fs_fsync implemented
sys_fs_fdatasync implemented as equal function
2017-04-26 02:27:34 +03:00
Nekotekina
2fd58dc7e8 sys_prx updated 2017-04-16 17:44:19 +03:00
Ani
94ab3ae7cf Misc (#2614)
* cellSysmodule: Register libad modules

Register libad_core, libad_async, libad_billboard_util

* Misc

sys_ss_get_console_open_psid (Called on Project Diva F 2nd),
sys_ss_get_console_id
Stub cellWebBrowserGetUsrdataOnGameExit for Professional Baseball
Spirits 2015
Fix two logs on GcmSys
2017-04-13 19:30:25 +03:00
scribam
9ba0a9189b Update sys_spu
- Implement sys_spu_thread_group_set_priority
- Implement sys_spu_thread_group_get_priority
2017-04-10 04:08:55 +03:00
Inviuz
c729d6d65a Use sys_vm_memory_map plus add default value for sys_allocate (#2560)
for different memory map(unconfirmed) also handle default action.
Fixes unknown syscall 313 error
Issue 2510
2017-03-21 16:02:00 +03:00
Nekotekina
4739eb3601 Reservation fix 2017-03-11 15:48:43 +03:00
Nekotekina
5e3bacbd9b New reservations
Memory system cleanup
sys_memory_get_page_attribute
2017-03-10 15:51:40 +03:00
clienthax
bd85f23ed9 Stub sys_gamepad ycon interface (#2435)
* Attempt to add sys_gamepad...

* Stub ycon methods

Signed-off-by: clienthax <clienthax@gmail.com>
2017-02-28 19:15:11 +03:00
Nekotekina
9000407a77 cpu_thread::test_state added
lv2_obj::sleep adjustment
synchronization fixes
2017-02-22 13:23:21 +03:00
Nekotekina
598c90f376 PPU thread scheduler 2017-02-13 22:26:11 +03:00
Nekotekina
bf6854d121 LV2_LOCK removed 2017-02-05 16:35:10 +03:00
Nekotekina
68f0393cf3 sys_interrupt... 2017-02-04 20:39:04 +03:00
Nekotekina
a5a2d43d7c Thread.cpp refinement
Hide thread mutex
Safe notify() method
Other refactoring
2017-01-29 19:52:19 +03:00
Nekotekina
4ecf05aa13 cellFsUtime implemented 2017-01-26 20:01:16 +03:00