Commit graph

387 commits

Author SHA1 Message Date
Eladash
14ac70dfbf Avoid using _sys_ppu_thread_exit in _sys_interrupt_thread_disestablish 2019-08-13 04:56:00 +03:00
Eladash
6d3fc3a386 core config: Expose min/max ranges of integral settings and use it 2019-08-13 04:56:00 +03:00
Eladash
cd4e895c04 Use error_code in mmapper_thread_recover_page_fault 2019-08-13 04:56:00 +03:00
Eladash
629d8e3a51 Fix sys_time_get_current_time() date 2019-08-13 04:56:00 +03:00
Eladash
0a5b6ad928 Add missing EALIGN check for sys_mmapper_search_and_map 2019-08-11 21:43:13 +03:00
Eladash
a832581201 Fix sys_vm address boundary checks (fix vsize) 2019-08-11 21:43:13 +03:00
Eladash
96527eee5b idm: Fix bug in ID searching
* ID checking now checks if (id % step) == 0
* Extend possible ID range to allow UINT32_MAX (as long as base is non-zero)
2019-08-11 21:43:13 +03:00
Eladash
5c904bf3e2 Fix max allocations for DECR mode (sys_memory) 2019-08-11 21:43:13 +03:00
Eladash
cbcd06d1dc ppu: Stack size allocation improvements 2019-08-11 21:43:13 +03:00
Eladash
3ce18fd960 Implement vm::page_executable (#6330)
Fixes segfaults when attenpting to set segfaults on non-executable memory.
2019-08-11 21:04:17 +03:00
Eladash
94d33003a3 Write zero in attr->pad (sys_memory_get_page_attribute)
Its included in lv2 as well.
2019-08-10 19:47:37 +03:00
Eladash
25e47e0de0 Fix vm::check_addr memory state check 2019-08-10 19:47:37 +03:00
Eladash
c219417f62 sys_vm: Fix sys_vm_invalidate 2019-08-03 14:29:17 +01:00
Eladash
72fb3ba794 perf hotfix for sys_timer_usleep 2019-08-01 23:38:09 +03:00
eladash
e40b76b253 sys_lwcond: Extract protocol from lwmutex at creation
This is the only reason theres a need to specify lwmutex_sq id at creation. unlike sys_cond, lwcond isn't connected to lwmutex at the lv2 level.
SYS_SYNC_RETRY fix is done explicitly at the firmware level.
This fixes issues when the original lwcond and lwmutexol data got corrupted or deallocated, this can happen when the program simply memcpy the control data to somewhere else.
Or if it uses direct lv2 the lwcond conrol param can even be NULL which will make it access violate when dereferncing it. (This param is unchecked and can be anything)
2019-07-29 21:58:04 +03:00
eladash
7508ae6e65 Add EAGAIN check for sys_memory_contianer_create 2019-07-29 21:55:59 +03:00
eladash
1e5e0f3b5e make sys_fs_closedir atomic 2019-07-29 21:55:59 +03:00
Nekotekina
949f33c8a4 Fix sys_config_get_io_event syscall name 2019-07-29 21:55:59 +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
fcc75c8b0f rsx: Write atomically semaphore updates and fix zcull timestamp 2019-07-26 21:27:55 +03:00
Eladash
c53f0dd7b5 rsx: Fix gcm unmap events 2019-07-26 21:27:55 +03:00
Eladash
85b1152e29 Timers scaling and fixes 2019-07-23 00:09:01 +01:00
Eladash
d17be2c2ec Fix similar bug in sys_rsx_context_iomap
TODO: Is there an rsxmem unmap event for those cases?
2019-07-22 15:16:43 +03:00
Eladash
cf4d715284 typo fix (to squash) 2019-07-22 15:16:43 +03:00
Eladash
2b721b9e29 correctness fix
Not that it really matters because of gcm's lwmutex but just in case the syscall is useb directly.
2019-07-22 15:16:43 +03:00
Eladash
492c9e3c7c Fix sys_rsx_context_iounmap partial unmapping 2019-07-22 15:16:43 +03:00
Rui Pinheiro
070c3af50f Initial sys_config implementation 2019-07-22 02:44:45 +03:00
Nekotekina
cfa1416d64 sys_spu: add vm::temporary_unlock 2019-07-14 18:33:23 +03:00
Nekotekina
1a1eff66bc sys_timer: add vm::temporary_unlock 2019-07-14 18:21:56 +03:00
Nekotekina
bc1617758c sys_semaphore: add vm::temporary_unlock 2019-07-14 18:18:03 +03:00
Nekotekina
6126a98111 sys_rwlock: add vm::temporary_unlock 2019-07-14 18:14:15 +03:00
Nekotekina
e1293b14f8 sys_net: add vm::temporary_unlock 2019-07-14 18:11:00 +03:00
Nekotekina
f5ee8c1292 sys_interrupt: add vm::temporary_unlock 2019-07-14 18:08:18 +03:00
Nekotekina
0a88a23bf5 sys_event: add vm::temporary_unlock 2019-07-14 18:06:02 +03:00
Nekotekina
cbfa6cc91f sys_vm: add vm::temporary_unlock 2019-07-14 17:55:26 +03:00
Nekotekina
38d4e3c184 sys_mmapper: add vm::temporary_unlock 2019-07-14 17:51:03 +03:00
Nekotekina
7398cfc950 sys_event_flag: add vm::temporary_unlock 2019-07-14 17:37:58 +03:00
Eladash
3de885c7a6 Dealloc exec cache after sys_prx/overlay_unload_module
Must come before vm::dealloc of it.
2019-07-13 16:59:58 +03:00
Eladash
c4d8ef4340 rsx: Allow to configure vblank rate
Removed "HLE protection" hack from sys_rsx_context_attribute
2019-07-12 00:19:56 +03:00
Nekotekina
d1db6a6827 Revert incorrect usage of le_t in name_u64 2019-07-09 12:07:58 +03:00
Eladash
6fba3dd90c Misc correctness improvement
Use let_<u64> for name_64 and prefer it when possible.
2019-07-09 11:52:34 +03:00
Eladash
4c2fb54b99 Fix possible inconsistencies for sys_memory mem stats report 2019-07-04 22:35:22 +03:00
msuih
690cdff0d3 Minor fixes
- Fix a typo in OpenAL
- Fix typo in cellHttp.h
- Unused variables in catch
- Use 64-bit shifts
- Use use_count with shared pointers, unique is depracated and getting removed
- Explicitly cast boolean to int
- Signed/unsigned issues with loop variables
- Fix missing return statement (the code path is unreachable, but compiler wants a return)
- */ ouside of comment
- Fix duplicate layout name
2019-07-01 04:33:23 +03:00
msuih
d57124d075 Explicitly cast size_t to integer types 2019-07-01 04:33:23 +03:00
Eladash
43f919c04b Fixup after #6143 (#6146)
vm::spu max address was overflowing resulting in issues, so cast to u64 where needed. Fixes #6145.
    Use vm::get_addr instead of manually substructing vm::base(0) from pointer in texture cache code.
    Prefer std::atomic_thread_fence over _mm_?fence(), adjust usage to be more correct.
    Used sequantially consistent ordering in semaphore_release for TSX path as well.
    Improved memory ordering for sys_rsx_context_iounmap/map.
    Fixed sync bugs in HLE gcm because of not using atomic instructions.
    Use release memory barrier in lwsync for PPU LLVM, according to this xbox360 programming guide lwsync is a hw release memory barrier.
    Also use release barrier where lwsync was originally used in liblv2 sys_lwmutex and cellSync.
    Use acquire barrier for isync instruction, see https://devblogs.microsoft.com/oldnewthing/20180814-00/?p=99485
2019-06-29 18:48:42 +03:00
Eladash
1ee7b91646 Refactoring (#6143)
Prefer vm::ptr<>::ptr over vm::get_addr.
    Prefer vm::_ptr/base over vm::g_base_addr with offset.
    Added methods atomic_t<>::bts and atomic_t<>::btr .
    Removed obsolute rsx:🧵:Read/WriteIO32 methods.
    Removed wrong check in semaphore_release.
    Added handling for PUTRx commands for RawSPU MFC proxy.
    Prefer overloaded methods of v128 instead of _mm_... in VPKSHUS ppu interpreter precise.
    Fixed more potential overflows that may result in wrong behaviour.
    Added io/size alignment check for sys_rsx_context_iounmap.
    Added rsx::constants::local_mem_base which represents RSX local memory base address.
    Removed obsolute rsx:🧵:main_mem_addr/ioSize/ioAddress members.
2019-06-29 01:27:49 +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
Malcolm Jestadt
31afd046b0 lv2: sys_timer_usleep improvements for linux
-The minimum quantum on linux appears to be 50 microseconds by default, not 100
-Do not wait for the last quantum to avoid sleeping too long
2019-06-25 20:20:05 +01:00
Lassi Hämäläinen
c963c51a60 Remove unnecessary header includes
- Manually removed lot of unneeded #includes to clean code and reduce
  compilation time
- Reordered some of the #includes to be in more logical order
2019-06-25 17:11:10 +03:00
Lassi Hämäläinen
e9e87b8bd9 Add missing #includes to header files
- Multiple header files where missing #includes to other headers that
  where used in the header. Correct header was included in correct
  order in source files which caused everything to compile.
- Added missing #includes so header files correctly include all their
  dependencies and fixes problems with IDEs being unable to parse
  headers correctly due to missing symbols
2019-06-25 17:11:10 +03:00