My coworkers and I have a custom-made PCB with two 54450 processors on it, each with its own SDRAM chip. However, there was a mistake in designing the PCB, and the SDRAM's DM signals are switched (DM3 on the processor goes to DM2 on the RAM, and vice versa.) As a result, all byte writes to the RAM are swapped. For example, writing 0x12 to location 0x40000000 and 0x34 to 0x40000001 swaps these two values, meaning 0x40000000 returns 0x34 and 0x40000001 returns 0x12. Word and longword writes still work correctly.
This is obviously not suitable for running code that does anything useful. The mistake will obviously be fixed in the next revision of the board, but that could be months from now, meaning our project could be dead in the water for months. I've been asked to find a workaround in the meantime. Using only the internal SRAM is not an option, because we are running a full-blown Linux operating system, and the SRAM is only 32KB, nowhere near enough to support the kernel and all of our applications. So, I have to find a way to make this hostile RAM environment work.
We've tried manually re-soldering the connections on the PCB, but this has created other problems with the RAM, so I have to find a way to do it in software. Is there a configuration register somewhere that will cause the processor to swap addresses whenever it tries to do a byte write to the SDRAM? I'm starting to think this is an impossible problem to solve without fixing the DM signals the way they should be, but I was hoping somebody might have a solution. Thanks.