Commit Graph

25 Commits

Author SHA1 Message Date
Zephyron 9ae0eeeb87 Revert incorrect copyright attribution for non-contributed files
- In commit b3facaa6bb, the copyright header was
  updated to include "Citron Homebrew Project" across multiple files, regardless
  of whether any contributions were made.

- This commit removes the incorrect attribution and reverts the copyright header
  to its previous state.

- Copyright attribution should only be added when meaningful contributions have
  been made to the file.

- This commit ensures proper compliance with copyright standards and maintains
  correct attribution to the respective contributors.

- Special thanks to Tachi for pointing out the need for these corrections and
  ensuring that proper attribution practices are followed.
2025-01-14 15:33:24 +10:00
Zephyron 66b6d5b2da
core: Improve device memory and buffer queue handling
This commit makes several improvements to device memory management and buffer
queue handling:

DeviceMemoryManager:
- Add null pointer and size checks for ReadBlock
- Fill unmapped memory with a known pattern (0xCC) instead of zeros
- Add better error logging for invalid memory accesses
- Add null pointer check for source pointer in memcpy

BufferQueueProducer:
- Improve error handling in WaitForFreeSlotThenRelock
- Add proper abandoned state checking during wait conditions
- Clean up and simplify buffer scanning logic
- Improve logging messages with more descriptive information
- Remove redundant buffer count validation
- Fix potential infinite loop condition during wait

These changes improve stability and error handling while making the code more
maintainable and debuggable. The use of a known pattern for unmapped memory
helps identify uninitialized memory access issues.
2025-01-06 20:04:35 +10:00
Zephyron b3facaa6bb
chore: update project references and add Citron copyright
- Replaced all references to the old project name with Citron.
- Added Citron copyright information alongside existing notices in all files.
2024-12-31 17:07:49 +10:00
Narr the Reg 2b3f1d3fc5
Merge pull request #13000 from liamwhite/skip-null-memory
device_memory_manager: skip unregistered interfaces on invalidate
2024-02-22 11:34:23 -06:00
FearlessTobi 310c1f50be scope_exit: Make constexpr
Allows the use of the macro in constexpr-contexts.
Also avoids some potential problems when nesting braces inside it.
2024-02-19 16:00:46 +01:00
Liam 461eaca7e8 device_memory_manager: skip unregistered interfaces on invalidate 2024-02-12 20:02:59 -05:00
Fernando Sahmkow ae833aa9c0 SMMU: Ensure the backing address range matches the current 2024-02-07 23:47:42 +01:00
Fernando Sahmkow d57165df45 Device Memory Manager: ensure raster protection only within mapped device addresses. 2024-01-31 16:38:51 +01:00
Fernando Sahmkow 738e9a79a0 DeviceMemory: Make counter types configurable 2024-01-31 16:38:51 +01:00
Liam 8f848f43e9 smmu: use new range mutex construction for protecting counters 2024-01-31 16:38:51 +01:00
Liam 550cadbee4 device_memory_manager: fix ScratchBuffer indexing 2024-01-22 14:07:33 -05:00
Liam 748465f5a5 device_memory_manager: use unique_lock for update 2024-01-18 21:12:30 -05:00
Liam beb438bb0b nvdrv: use static typing for SessionId, smmu Asid types 2024-01-18 21:12:30 -05:00
Fernando Sahmkow 0672847330 SMMU: Fix Right Shift UB. 2024-01-18 21:12:30 -05:00
Fernando Sahmkow a874ab0133 SMMU: Fix 8Gb layout. 2024-01-18 21:12:30 -05:00
Fernando Sahmkow 590d9b7e1d Core: Clang format and other small issues. 2024-01-18 21:12:30 -05:00
Fernando Sahmkow d8f1ce2f76 SMMU: Add continuity tracking optimization. 2024-01-18 21:12:30 -05:00
Fernando Sahmkow 9b11b9dce5 SMMU: Simplify and remove old code. 2024-01-18 21:12:30 -05:00
Fernando Sahmkow 303cd31162 SMMU: Add Android compatibility 2024-01-18 21:12:30 -05:00
Fernando Sahmkow 0adc09e0af GPU-SMMU: Estimate game leak and preallocate device region. 2024-01-18 21:12:30 -05:00
Fernando Sahmkow bad705f245 SMMU: Fix Unregister on MultiAddress 2024-01-18 21:12:30 -05:00
Fernando Sahmkow 34a8d0cc8e SMMU: Implement physical memory mirroring 2024-01-18 21:12:30 -05:00
Fernando Sahmkow 0a2536a0df SMMU: Initial adaptation to video_core. 2024-01-18 21:12:30 -05:00
Fernando Sahmkow c85d7ccd79 SMMU: Implement backing CPU page protect/unprotect 2024-01-18 21:12:30 -05:00
Fernando Sahmkow 2f0418c101 Core: Initial implementation of device memory mapping 2024-01-18 21:12:30 -05:00