
README states that CONFIG_SYS_SDRAM_BASE should be the physical address of the base of SDRAM memory. This is expected by some code such as the PCI layer, which uses CONFIG_SYS_SDRAM_BASE to set up a region for system memory. Other code such as the image loading code used by bootm or the generic board_f.c expect CONFIG_SYS_SDRAM_BASE to be directly accessible by the CPU, which necessitates that it be a virtual address.
Where virtual & physical addresses aren't identity mapped, as is the case for MIPS, we cannot possibly satisfy both. Until now MIPS has used a virtual CONFIG_SYS_SDRAM_BASE. This series fixes up the mess by doing a few things:
- Ensuring that we provide virt_to_phys() on all architectures.
- Fixing code that expects to use CONFIG_SYS_SDRAM_BASE as a virtual address to instead convert it to a physical address using virt_to_phys().
- Converts MIPS code & all MIPS boards to provide a physical CONFIG_SYS_SDRAM_BASE, which typically is zero.
Paul Burton (27): Provide a generic io.h & address mapping functions arc: Use asm-generic/io.h arm: Use asm-generic/io.h blackfin: Use asm-generic/io.h m68k: Use asm-generic/io.h microblaze: Use asm-generic/io.h nds32: Use asm-generic/io.h openrisc: Use asm-generic/io.h sh: Use asm-generic/io.h sparc: Use asm-generic/io.h x86: Use asm-generic/io.h xtensa: Use asm-generic/io.h mips: Use asm-generic/io.h mips: Fix map_physmem for cached mappings nios2: Use asm-generic/io.h powerpc: Use asm-generic/io.h sandbox: Use asm-generic/io.h board_f: Account for CONFIG_SYS_SDRAM_BASE being physical image: Account for CONFIG_SYS_SDRAM_BASE being physical image: Use ram_top, not bi_memsize, in getenv_bootm_size mips: Use ram_top, not bi_memsize, in arch_lmb_reserve mips: Ensure stack is at a virtual address boston: Provide physical CONFIG_SYS_SDRAM_BASE malta: Use a physical CONFIG_SYS_SDRAM_BASE xilfpga: Use a physical CONFIG_SYS_SDRAM_BASE mips: Use a physical CONFIG_SYS_SDRAM_BASE for remaining boards mips: Remove virt_to_phys call on bi_memstart
arch/arc/include/asm/io.h | 29 +---------- arch/arm/include/asm/io.h | 30 +---------- arch/blackfin/include/asm/io.h | 31 +---------- arch/m68k/include/asm/io.h | 29 +---------- arch/microblaze/include/asm/io.h | 29 +---------- arch/mips/cpu/start.S | 3 +- arch/mips/include/asm/io.h | 19 +++---- arch/mips/lib/bootm.c | 4 +- arch/nds32/include/asm/io.h | 32 ++---------- arch/nios2/include/asm/io.h | 15 +++--- arch/openrisc/include/asm/io.h | 35 +------------ arch/powerpc/include/asm/io.h | 25 ++------- arch/sandbox/cpu/cpu.c | 12 ++++- arch/sandbox/include/asm/io.h | 17 +++--- arch/sh/include/asm/io.h | 29 +---------- arch/sparc/include/asm/io.h | 30 +---------- arch/x86/include/asm/io.h | 31 +---------- arch/xtensa/include/asm/io.h | 25 +-------- board/imgtec/boston/ddr.c | 8 +-- common/board_f.c | 4 +- common/image.c | 6 +-- include/asm-generic/io.h | 110 +++++++++++++++++++++++++++++++++++++++ include/configs/ap121.h | 2 +- include/configs/ap143.h | 2 +- include/configs/boston.h | 21 ++++---- include/configs/dbau1x00.h | 2 +- include/configs/imgtec_xilfpga.h | 4 +- include/configs/malta.h | 18 ++++--- include/configs/pb1x00.h | 2 +- include/configs/pic32mzdask.h | 2 +- include/configs/qemu-mips.h | 2 +- include/configs/qemu-mips64.h | 2 +- include/configs/tplink_wdr4300.h | 2 +- include/configs/vct.h | 2 +- 34 files changed, 208 insertions(+), 406 deletions(-) create mode 100644 include/asm-generic/io.h