Git Product home page Git Product logo

Comments (4)

yuriks avatar yuriks commented on June 5, 2024

The way the emulator handles memory access (using VAddrs to control hardware access) is flawed, so I think that's where this inconsistency comes from. The page in 3dbrew has the ranges overlapping too, but note how it says that these mappings depend on the exheader. So fact is that different processes will have different things mapped in these addresses. We can't really resolve this unless we move to a proper virtual memory scheme, I think. For now we can probably just chop off the I/O range, since we shouldn't be using it directly.

from citra.

neobrain avatar neobrain commented on June 5, 2024

Yeah, as @yuriks said, our way of dealing with memory access is completely broken.
As it stands, our internal memory representation is based on virtual memory - hence we have things like the GSP memory as the "fundamental" objects representing FCRAM internally. All accesses to physical addresses first need to be reverse-translated to virtual addresses, and just hope that there are no clashes going on. This is critical because the addresses submitted in GPU command lists are physical ones.

Instead of the current implementation, we should IMO store physical memory regions internally, and implement a dummy MMU miming a memory layout like http://3dbrew.org/wiki/Virtual_address_mapping_FW0B (or some more recent FW version) to translate physical to virtual addresses.

from citra.

neobrain avatar neobrain commented on June 5, 2024

Small correction: The FW0B virtual address mapping of course is kernel address space, while we would rather want to hardcode the NATIVE_FIRM userland memory layout as described on http://3dbrew.org/wiki/Memory_layout#ARM11_User-land_memory_regions for now.

from citra.

lioncash avatar lioncash commented on June 5, 2024

This isn't an issue anymore considering this code was rewritten a while ago.

from citra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.