Commit Graph

121 Commits

Author SHA1 Message Date
crueter bbcd8aded6
Revert "[heap_tracker] Use ankerl map instead of rb tree (#249)" (#382)
This reverts commit c9a3baab5d.

this commit caused issues in ender magnolia or something, need to make
sure I didn't mess up the revert

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/382
Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev>
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@outlook.com>
2025-09-04 16:04:42 +02:00
lizzie c9a3baab5d
[heap_tracker] Use ankerl map instead of rb tree (#249)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/249
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
2025-08-27 05:00:38 +02:00
darktux 616619c8f7 Port changes from Early Access 2025-04-04 03:40:46 +02:00
Fernando Sahmkow a70f35d0bf Core: Invert guest memory depandancy 2024-01-18 21:12:30 -05:00
Fernando Sahmkow b206089ea7 Core: Clang format and other small issues. 2024-01-18 21:12:30 -05:00
Fernando Sahmkow 355bbea52d SMMU: Add Android compatibility 2024-01-18 21:12:30 -05:00
Fernando Sahmkow 9db159da71 SMMU: Initial adaptation to video_core. 2024-01-18 21:12:30 -05:00
liamwhite 6282725a54 Merge pull request #12543 from FernandoS27/stop-liking-posts-from-ur-friends-ex
VideoCore: A few fixes to DMA and swapchain
2024-01-01 15:02:20 -05:00
Fernando Sahmkow d9b2778306 Vulkan: Only recreate swapchain if the frame is bigger than the swap image. 2023-12-31 21:03:46 +01:00
Fernando Sahmkow a81686eff8 MaxwellDMA: Don't flush the outputs of a dma copy. 2023-12-31 21:00:01 +01:00
Liam c366d8e8d9 core: track separate heap allocation for linux 2023-12-25 23:30:56 -05:00
Liam 3d5c6a73cb core: refactor emulated cpu core activation 2023-12-04 10:37:16 -05:00
GPUCode 1e5a1d1702 Address more review comments 2023-11-25 00:47:43 -05:00
Liam 19619b1b14 arm: Implement native code execution backend 2023-11-25 00:46:47 -05:00
GPUCode 2590906d14 core: Respect memory permissions in Map 2023-11-25 00:46:15 -05:00
Liam 3e4076c2ac general: fix apple clang build 2023-08-09 22:38:37 -04:00
Liam 7073afff3b memory: minimize dependency on process 2023-07-22 11:19:29 -04:00
Kelebek1 42638691b5 Use spans over guest memory where possible instead of copying data. 2023-07-02 23:09:48 +01:00
Fernando Sahmkow 4f68a8f45a Memory Tracking: Optimize tracking to only use atomic writes when contested with the host GPU 2023-06-28 21:32:45 +02:00
Liam 6eaef51cf2 memory: rename global memory references to application memory 2023-03-23 20:28:47 -04:00
Liam 156516e399 kernel: use KTypedAddress for addresses 2023-03-22 09:35:16 -04:00
Liam e313e4f1ae kernel: implement FlushProcessDataCache 2022-11-12 11:27:04 -05:00
Fernando Sahmkow 6a3eca65ea MemoryManager: Fix errors popping out. 2022-10-06 21:00:53 +02:00
Kyle Kienapfel ea00332a67 code: dodge PAGE_SIZE #define
Some header files, specifically for OSX and Musl libc define PAGE_SIZE to be a number
This is great except in yuzu we're using PAGE_SIZE as a variable

Specific example
`static constexpr u64 PAGE_SIZE = u64(1) << PAGE_BITS;`

PAGE_SIZE PAGE_BITS PAGE_MASK are all similar variables.
Simply deleted the underscores, and then added YUZU_ prefix

Might be worth noting that there are multiple uses in different classes/namespaces
This list may not be exhaustive

Core::Memory   12 bits (4096)
QueryCacheBase 12 bits
ShaderCache    14 bits (16384)
TextureCache   20 bits (1048576, or 1MB)

Fixes #8779
2022-08-19 16:08:40 -07:00
Andrea Pappacoda 6a2efdda2f chore: make yuzu REUSE compliant
[REUSE] is a specification that aims at making file copyright
information consistent, so that it can be both human and machine
readable. It basically requires that all files have a header containing
copyright and licensing information. When this isn't possible, like
when dealing with binary assets, generated files or embedded third-party
dependencies, it is permitted to insert copyright information in the
`.reuse/dep5` file.

Oh, and it also requires that all the licenses used in the project are
present in the `LICENSES` folder, that's why the diff is so huge.
This can be done automatically with `reuse download --all`.

The `reuse` tool also contains a handy subcommand that analyzes the
project and tells whether or not the project is (still) compliant,
`reuse lint`.

Following REUSE has a few advantages over the current approach:

- Copyright information is easy to access for users / downstream
- Files like `dist/license.md` do not need to exist anymore, as
  `.reuse/dep5` is used instead
- `reuse lint` makes it easy to ensure that copyright information of
  files like binary assets / images is always accurate and up to date

To add copyright information of files that didn't have it I looked up
who committed what and when, for each file. As yuzu contributors do not
have to sign a CLA or similar I couldn't assume that copyright ownership
was of the "yuzu Emulator Project", so I used the name and/or email of
the commit author instead.

[REUSE]: https://reuse.software

Follow-up to b2eb103829
2022-07-27 12:53:49 +02:00
Kelebek1 be1f5f1d9f Project Andio 2022-07-22 01:11:32 +01:00
Liam 8d2abc710c core/debugger: memory breakpoint support 2022-06-16 13:18:07 -04:00
Liam 2ee161a0bf core/debugger: Implement new GDB stub debugger 2022-06-01 00:01:25 -04:00
yzct12345 fa26e226de memory: Address lioncash's review 2021-08-05 20:29:43 +00:00
yzct12345 cbe093e865 memory: Clean up code 2021-08-05 20:11:14 +00:00
bunnei 227f9e5ab2 hle: kernel: Use host memory allocations for KSlabMemory.
- There are some issues with the current workaround, we will just use host memory until we have a complete kernel memory implementation.
2021-05-20 21:41:52 -07:00
bunnei ad048de3d6 hle: kernel: Rename Process to KProcess. 2021-05-05 16:40:52 -07:00
bunnei 4aebdea6cf core: memory: Add a work-around to allocate and access kernel memory regions by vaddr. 2021-05-05 16:40:50 -07:00
bunnei a706a6a08e core: memory: Add templated GetPointer methods. 2021-02-18 16:16:24 -08:00
MerryMage e3490b55c1 memory: Remove MemoryHook 2021-01-01 11:34:38 +00:00
Fernando Sahmkow 5eac520ae3 ARM/Memory: Correct Exclusive Monitor and Implement Exclusive Memory Writes. 2020-06-27 11:35:37 -04:00
Fernando Sahmkow 7ee76003ad General: Recover Prometheus project from harddrive failure
This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host 
Timing, Reworks the Kernel's Scheduler, Introduce Idle State and 
Suspended State, Recreates the bootmanager, Initializes Multicore 
system.
2020-06-27 11:35:06 -04:00
bunnei 43321c1a69 core: memory: Updates for new VMM. 2020-04-17 00:59:34 -04:00
bunnei 5b9e69e7fe core: memory: Move to Core::Memory namespace.
- helpful to disambiguate Kernel::Memory namespace.
2020-04-17 00:59:28 -04:00
Fernando Sahmkow f00f6bbdb6 Memory: Address Feedback. 2020-04-08 13:40:46 -04:00
Fernando Sahmkow 3728c7160f Buffer Cache: Use vAddr instead of physical memory. 2020-04-06 09:23:06 -04:00
Markus Wick 4042bd107b core/memory: Create a special MapMemoryRegion for physical memory.
This allows us to create a fastmem arena within the memory.cpp helpers.
2020-01-18 08:38:47 +01:00
Lioncash 50906bcf42 core/memory; Migrate over SetCurrentPageTable() to the Memory class
Now that literally every other API function is converted over to the
Memory class, we can just move the file-local page table into the Memory
implementation class, finally getting rid of global state within the
memory code.
2019-11-26 21:55:39 -05:00
Lioncash b5f69f4cc9 core/memory: Migrate over Write{8, 16, 32, 64, Block} to the Memory class
The Write functions are used slightly less than the Read functions,
which make these a bit nicer to move over.

The only adjustments we really need to make here are to Dynarmic's
exclusive monitor instance. We need to keep a reference to the currently
active memory instance to perform exclusive read/write operations.
2019-11-26 21:55:39 -05:00
Lioncash cc3d6fdf73 core/memory: Migrate over Read{8, 16, 32, 64, Block} to the Memory class
With all of the trivial parts of the memory interface moved over, we can
get right into moving over the bits that are used.

Note that this does require the use of GetInstance from the global
system instance to be used within hle_ipc.cpp and the gdbstub. This is
fine for the time being, as they both already rely on the global system
instance in other functions. These will be removed in a change directed
at both of these respectively.

For now, it's sufficient, as it still accomplishes the goal of
de-globalizing the memory code.
2019-11-26 21:55:39 -05:00
Lioncash 9e3cbf71fc core/memory: Migrate over ZeroBlock() and CopyBlock() to the Memory class
These currently aren't used anywhere in the codebase, so these are very
trivial to move over to the Memory class.
2019-11-26 21:55:38 -05:00
Lioncash ad85ba53dd core/memory: Migrate over RasterizerMarkRegionCached() to the Memory class
This is only used within the accelerated rasterizer in two places, so
this is also a very trivial migration.
2019-11-26 21:55:38 -05:00
Lioncash 8d306269d0 core/memory: Migrate over ReadCString() to the Memory class
This only had one usage spot, so this is fairly straightforward to
convert over.
2019-11-26 21:55:38 -05:00
Lioncash 7110e6a128 core/memory: Migrate over GetPointer()
With all of the interfaces ready for migration, it's trivial to migrate
over GetPointer().
2019-11-26 21:55:38 -05:00
Lioncash 811191a9c9 core/memory: Migrate over address checking functions to the new Memory class
A fairly straightforward migration. These member functions can just be
mostly moved verbatim with minor changes. We already have the necessary
plumbing in places that they're used.

IsKernelVirtualAddress() can remain a non-member function, since it
doesn't rely on class state in any form.
2019-11-26 21:53:34 -05:00