This basically introduces the MICROPY_MACHINE_MEM_GET_READ_ADDR and MICROPY_MACHINE_MEM_GET_WRITE_ADDR macros. If one of them is not defined, then a default identity function is provided.
This leaves behind the common functionality in extmod/machine_mem.c which can be used by all ports.