Commit graph

76 commits

Author SHA1 Message Date
Eladash 1915fe75a4 VSH: Stubs 2020-02-08 23:07:03 +03:00
Nekotekina 327bb2d8f0 Modernize PPU logging (ppu_log variable) 2020-02-01 11:52:24 +03:00
Nekotekina 21f7b0ff0f Remove HLE log channel 2020-02-01 11:52:24 +03:00
Eladash e4ba096190 VSH: sys_mmapper
* Implement syscalls sys_mmapper_allocate_shared_memory_ext, sys_mmapper_allocate_shared_memory_from_container_ext.
* Implement multi-process shared memory allocations.
2020-01-24 20:08:30 +00:00
Eladash 01035d35bd sys_process: Fix sys_process_get_id, add error_code (#7246) 2020-01-14 21:32:41 +03:00
Eladash c2eb9a583d Implement ps3 application root flags detection 2019-12-31 22:22:06 +03:00
Eladash b8220ec12f Stub sys_spu_thread_group_log 2019-11-28 01:54:45 +03:00
Nekotekina ec8c5453bc Fix sys_cond_wait
Schedule PPU thread before relocking.
Don't lock mutex in notify functions.
2019-08-27 15:13:01 +03:00
Nekotekina fd839243ec Revert PR 6405 2019-08-27 14:05:38 +03:00
eladash 050339bb3e PPU/LV2: Make thread-lists scheduling atomic 2019-08-17 22:46:36 +03:00
Eladash 72fb3ba794 perf hotfix for sys_timer_usleep 2019-08-01 23:38:09 +03:00
Eladash 997e3046e3 vm/sys_overlay Improvements
- Implement sys_overlay_load_module_by_fd.
- Implement special segment allocation when ppc_seg flag is specified.
2019-07-28 14:23:58 +03:00
Eladash 85b1152e29 Timers scaling and fixes 2019-07-23 00:09:01 +01:00
Rui Pinheiro 070c3af50f Initial sys_config implementation 2019-07-22 02:44:45 +03:00
JohnHolmesII 23094b48bb Fix warnings related to -Wswitch
Add default cases.
Move default breaks to newline
Add proper handling in some instances.
Add missing enums to switches
2019-06-28 01:40:52 +03:00
Lassi Hämäläinen 499035512b Split Emu/Memory into more logical headers
- Add vm_locking.h and vm_reservation.h and move relevant functions
  and types to these headers.
- Change include order and make vm_ptr.h, vm_var.h and vm_ref.h headers
  usable invidually and them including vm.h instead of other way around
- Because usage of vm::ptr now requires including vm_ptr.h instead of
  vm.h updated multiple #includes
- Added additional #includes to vm_reservation.h and vm_locking to
  where vm::reservation_* and locking related functions are used
2019-06-25 17:11:10 +03:00
Inviuz 52a12185a0 Initial sys_overlay 2019-04-10 23:25:09 +03:00
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