Skip to content
Commit 185aed75 authored by Paul Mundt's avatar Paul Mundt
Browse files

sh: Provide a sane valid_phys_addr_range() to prevent TLB reset with PMB.



With the PMB enabled, only P1SEG and up are covered by the PMB mappings,
meaning that situations where out-of-bounds physical addresses are read
from will lead to TLB reset after the PMB miss, allowing for use cases
like dd if=/dev/mem to reset the TLB.

Fix this up to make sure the reference is between __MEMORY_START (phys)
and __pa(high_memory). This is coherent across all variants of sh/sh64
with and without MMU, though the PMB bug itself is only applicable to
SH-4A parts.

Reported-by: default avatarHideo Saito <saito@densan.co.jp>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent ade7a9b4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment