From e2d60b0acb410327ed487892657f374e07ac70fb Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Sat, 18 Mar 2023 21:25:40 +0100 Subject: dimemory: Add the target address space to translate, wrap the constants divtlb: Wrap the constants --- docs/source/techspecs/device_memory_interface.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'docs/source/techspecs') diff --git a/docs/source/techspecs/device_memory_interface.rst b/docs/source/techspecs/device_memory_interface.rst index 2eae46f3906..6056cce81de 100644 --- a/docs/source/techspecs/device_memory_interface.rst +++ b/docs/source/techspecs/device_memory_interface.rst @@ -152,14 +152,17 @@ Indicates whether a given space actually exists. .. code-block:: C++ - bool translate(int spacenum, int intention, offs_t &address); + bool translate(int spacenum, int intention, offs_t &address, address_space *&target_space); Does a logical to physical address translation through the device's MMU. spacenum gives the space number, intention for the type of the -future access (``TRANSLATE_(READ\|WRITE\|FETCH)(\|_USER\|_DEBUG)``) -and address is an in/out parameter holding the address to translate on -entry and the translated version on return. Should return ``true`` if -the translation went correctly, or ``false`` if the address is unmapped. +future access (``TR_(READ\|WRITE\|FETCH)``), address is an in/out +parameter holding the address to translate on entry and the translated +version on return, and finally target_space is the actual space the +access would end up in, which may be in a different device. Should +return ``true`` if the translation went correctly, or ``false`` if the +address is unmapped. The call must not change the state of the +device. Note that for some historical reason, the device itself must override the virtual method ``memory_translate`` with the same signature. -- cgit v1.2.3-70-g09d2