linux/arch/mips
Chuanhong Guo 139c949f7f MIPS: ralink: mt7621: add memory detection support
mt7621 has the following memory map:
0x0-0x1c000000: lower 448m memory
0x1c000000-0x2000000: peripheral registers
0x20000000-0x2400000: higher 64m memory

detect_memory_region in arch/mips/kernel/setup.c only adds the first
memory region and isn't suitable for 512m memory detection because
it may accidentally read the memory area for peripheral registers.

This commit adds memory detection capability for mt7621:
  1. Add the highmem area when 512m is detected.
  2. Guard memcmp from accessing peripheral registers:
     This only happens when a user decided to change kernel load address
     to 256m or higher address. Since this is a quite unusual case, we
     just skip 512m testing and return 256m as memory size.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
[Minor commit message reword, make mt7621_memory_detect static]
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2021-03-29 11:18:54 +02:00
..
alchemy driver core: lift dma_default_coherent into common code 2021-02-13 09:51:45 +01:00
ar7 MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
ath25 MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
ath79 MIPS: of: Introduce helper function to get DTB 2021-02-04 13:34:51 +01:00
bcm47xx MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
bcm63xx MIPS: BCM63xx: Spello fix in the file clk.c 2021-03-10 15:21:43 +01:00
bmips MIPS: bmips: include <linux/dma-direct.h> for phys_to_dma 2021-03-06 08:43:40 +01:00
boot MIPS: Loongson64: DeviceTree for Loongson-2K1000 2021-03-25 10:44:00 +01:00
cavium-octeon mips: cavium: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE 2021-03-06 08:43:40 +01:00
cobalt MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
configs MIPS: Loongson64: Add a Loongson-2K1000 default config file 2021-03-25 10:44:01 +01:00
crypto crypto: mips/poly1305 - enable for all MIPS processors 2021-03-08 11:52:17 +01:00
dec MIPS: DEC: Restore bootmem reservation for firmware working memory area 2020-10-14 23:57:57 +02:00
fw MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
generic MIPS: of: Introduce helper function to get DTB 2021-02-04 13:34:51 +01:00
include MIPS: ralink: mt7621: add memory detection support 2021-03-29 11:18:54 +02:00
ingenic MIPS: jz4740: Rename jz4740 folders to ingenic 2020-09-18 16:35:05 +02:00
jazz MIPS: jazz: always allow little-endian builds 2021-01-22 13:53:21 +01:00
kernel mips: kernel: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe() 2021-03-14 14:09:49 +01:00
kvm MIPS: Remove KVM_TE support 2021-03-10 15:18:48 +01:00
lantiq MIPS: of: Introduce helper function to get DTB 2021-02-04 13:34:51 +01:00
lib arch: mips: update references to current linux-mips list 2021-02-23 13:24:38 +01:00
loongson2ef - added support for Nintendo N64 2021-02-21 13:18:26 -08:00
loongson32 MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
loongson64 MIPS: loongson64: fix bug when PAGE_SIZE > 16KB 2021-03-25 10:48:42 +01:00
math-emu
mm MIPS: clean up CONFIG_MIPS_PGD_C0_CONTEXT handling 2021-03-14 14:08:15 +01:00
mti-malta MIPS: Remove KVM_GUEST support 2021-03-10 15:18:40 +01:00
n64 mips: Add N64 machine type 2021-01-22 11:40:00 +01:00
net bpf: Rename BPF_XADD and prepare to encode other atomics in .imm 2021-01-14 18:34:29 -08:00
netlogic MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
pci MIPS: PCI: Fix a typo 2021-03-24 10:29:45 +01:00
pic32 MIPS: of: Introduce helper function to get DTB 2021-02-04 13:34:51 +01:00
pistachio driver core: lift dma_default_coherent into common code 2021-02-13 09:51:45 +01:00
power
ralink MIPS: ralink: mt7621: add memory detection support 2021-03-29 11:18:54 +02:00
rb532 MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
sgi-ip22
sgi-ip27 MIPS: SGI-IP27: fix spelling in Copyright 2021-03-06 08:43:39 +01:00
sgi-ip30 MIPS: SGI-IP30: Move irq bits to better header files 2020-09-21 22:15:49 +02:00
sgi-ip32 arch: mips: update references to current linux-mips list 2021-02-23 13:24:38 +01:00
sibyte MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
sni MIPS: SNI: Fix spurious interrupts 2020-09-16 22:40:58 +02:00
tools
txx9 MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
vdso Kbuild updates for v5.12 2021-02-25 10:17:31 -08:00
vr41xx MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
Kbuild
Kbuild.platforms mips: Add N64 machine type 2021-01-22 11:40:00 +01:00
Kconfig arch: mips: fix unmet dependency for MTD_COMPLEX_MAPPINGS 2021-03-29 11:17:38 +02:00
Kconfig.debug arch: mips: fix unmet dependency for DEBUG_INFO 2021-03-29 11:17:23 +02:00
Makefile - added support for Nintendo N64 2021-02-21 13:18:26 -08:00
Makefile.postlink