Commit graph

62 commits

Author SHA1 Message Date
Nekotekina 86fc842c89 TSX: new fallback method (time-based)
Basically, using timestamp counter.
Rewritten vm::reservation_op with the same principle.
Rewritten another transaction helper.
Add two new settings for configuring fallbacks.
Two limits are specified in nanoseconds (first and second).
Fix PUTLLC reload logic (prevent reusing garbage).
2020-10-31 15:34:14 +03:00
Nekotekina ba26e16411 Rename vm::reservation_light_op -> light_op
Rename vm::reservation_peek_op -> peek_op
Also remove overkill assertion for cpu_flag::temp.
2020-10-31 15:08:49 +03:00
Megamouse 2cee26c3e7 Cleanup some includes 2020-10-31 11:53:46 +01:00
Nekotekina 605d57c541 sys_event: cleanup (replace vm::temporary_unlock)
Also made minor changes in sys_rsx.cpp.
Removed unused exception std headers.
2020-10-30 17:49:07 +03:00
Nekotekina 13de773486 Remove some vm::reservation_lock instances 2020-10-27 17:56:19 +03:00
Eladash 1e7bf218e0 CellSpurs: Minor fixes 2020-10-25 16:43:38 +03:00
Eladash 5185ddb8b5
CellSpurs: JobChain functions and some more (#9080) 2020-10-16 18:35:20 +01:00
Nekotekina 346a1d4433 vm: rewrite reservation bits
Implement classic unique/shared locking concept.
Implement vm::reservation_light_op.
2020-10-10 13:58:48 +03:00
Nekotekina 89f1248140 Implement vm::reservation_op
Implement vm::reservation_peek (memory load)
Implement vm::unsafe_ptr_cast helper
Example use in cellSpurs.cpp
Fix dma_lockb value and description
2020-10-07 20:11:59 +03:00
Eladash c628147521 cellSpurs: Implement more HLE functions (part 1) 2020-10-07 01:12:21 +03:00
Eladash a5cff8b186 kernel-explorer: Initial SPURS debugger 2020-10-06 14:20:23 +03:00
Eladash 2a258dc21e
Fix GCC compilation (#9035) 2020-10-05 06:39:56 +01:00
Eladash ec1244bb82 Minor cellSpurs fixup 2020-10-04 19:54:56 +03:00
Eladash a0b387e0a9 cellSpurs: Fix HLE workload signalling, taskset fixes 2020-10-03 22:35:59 +03:00
Eladash 1f28bee86a cellSpurs: Add error codes formatting (unused) 2020-10-01 18:16:13 +03:00
Eladash aed560b630 Implemnt various HLE CellSpurs functions 2020-10-01 18:16:13 +03:00
Eladash 019d2d5dcf Implement HLE cellSpursAddUrgentCommand 2020-08-27 23:52:37 +01:00
Eladash 9cb4402c16 Make error_code::value member private 2020-06-27 09:02:55 +01:00
Nekotekina f72af2973d Replace utils::popcnt32 with std::popcount
Cleanup includes.
2020-04-14 16:05:58 +03:00
Nekotekina 032e7c0491 Replace utils::cntlz{32,64} with std::countl_zero 2020-04-14 16:05:58 +03:00
Nekotekina Aux1 250736ece5 Fix warnings in emucore 2020-03-04 21:23:34 +03:00
Nekotekina 92e3eaf3ff Fix signed-unsigned comparisons and mark warning as error (part 2). 2020-02-19 22:54:58 +03:00
Nekotekina 771eff273b First part of fixing sign-compare warning (inside be_t). 2020-02-19 22:54:58 +03:00
Megamouse fe75311be2 move config structs to own files and clean up some headers 2020-02-17 15:08:17 +03:00
Eladash 01035d35bd sys_process: Fix sys_process_get_id, add error_code (#7246) 2020-01-14 21:32:41 +03:00
Eladash 9690854e58 Some cleanup
* Prefer default initializer over std::memset 0 when possible and more readable.
* Use std::format in trophy files name obtaining.
* Use vm::ptr<>::operator bool() instead of comparing vm::ptr to vm::null or using addr().
* Add a few std::memset calls in hle where it matters (or in some places just to document an actual firmware memcpy call).
2019-12-31 22:27:27 +03:00
Nekotekina 321f7e7197 Fix missing-braces warnings 2019-12-13 03:21:43 +03:00
Nekotekina 185c067d5b C-style cast cleanup V 2019-12-03 17:23:00 +03:00
Eladash 4b82006984 ppu: Improve LWSYNC
Block load<->load reordering as real lwsync.
2019-08-13 04:56:00 +03:00
Nekotekina cfa1416d64 sys_spu: add vm::temporary_unlock 2019-07-14 18:33:23 +03:00
Nekotekina bc1617758c sys_semaphore: add vm::temporary_unlock 2019-07-14 18:18:03 +03:00
Nekotekina 0a88a23bf5 sys_event: add vm::temporary_unlock 2019-07-14 18:06:02 +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 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
Nekotekina d021d9e14a sys_mutex: add vm::temporary_unlock 2019-06-19 20:39:39 +03:00
Nekotekina 89a31292dc sys_cond: add vm::temporary_unlock 2019-06-19 20:39:29 +03:00
eladash 84d42ecb65 Add EFAULT checks to spu_thread_group_join, ppu_thread_join
Order of checks is based on firmware
2019-02-10 00:16:57 +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 73d35b0236 Remove CALL_FUNC, implement ppu_execute<>() 2018-10-19 22:22:35 +03:00
Nekotekina ed9fb8405b Move rotate/cntlz/cnttz helpers to Utilities/asm.h 2018-09-08 00:32:04 +03:00
Nekotekina ee96807305 Remove explicit_bool_t, ignore, multicast<>
Remove vm::ptr operator %
This was a bad idea but explicit_bool_t was created almost for it
Other removed types are unused and have little to no meaning
2018-09-08 00:32:04 +03:00
Nekotekina ce4c4696dd Try to get rid of SIZE_32 macro 2018-09-03 21:40:36 +03:00
Nekotekina 363811981d Reintroduce LOG_CHANNEL
Groundwork for further improvements
2018-08-25 15:39:00 +03:00
Nekotekina aa5dc5455e _sys_spu_image_import implemented
vm:var<T[]> improved (begin/end)
sys_spu_image_import rewritten
2017-08-27 03:00:10 +03:00
Jake 21dd715b42 sys_rsx: implement support for lle-gcm 2017-08-02 01:33:12 +03:00
Nekotekina d86858da64 Fix tabs 2017-06-24 14:25:11 +03:00
Nekotekina 88fef183a3 config.yml: Log section optimized 2017-05-15 14:37:05 +03:00
Nekotekina 402df68235 sys_spu_image loading rewritten 2017-04-16 17:44:20 +03:00
scribam 7c2af5ceae Register cellSpursRemoveSystemWorkloadForUtility
Before
! LDR: **** cellSpurs export: [0x31F5196B] at 0x13ab56c

After
! LDR: **** cellSpurs export: [cellSpursRemoveSystemWorkloadForUtility] at 0x13ab56c
2017-04-07 16:13:14 +03:00
Nekotekina 9000407a77 cpu_thread::test_state added
lv2_obj::sleep adjustment
synchronization fixes
2017-02-22 13:23:21 +03:00