[coreboot-gerrit] Patch merged into coreboot/master: arch/arm64: mmu: Spot check TTB memory attributes

gerrit at coreboot.org gerrit at coreboot.org
Wed Feb 10 09:39:27 CET 2016


the following patch was just integrated into master:
commit 372d0ff1d12b23f3c724f7c35fa57e4858dc0db6
Author: Julius Werner <jwerner at chromium.org>
Date:   Tue Jan 26 19:17:53 2016 -0800

    arch/arm64: mmu: Spot check TTB memory attributes
    
    On ARM64, the memory type for accessing page table descriptors during
    address translation is governed by the Translation Control Register
    (TCR). When the MMU code accesses the same descriptors to change page
    mappings, it uses the standard memory type rules (defined by the page
    table descriptor for the page that contains that table, or 'device' if
    the MMU is off).
    
    Accessing the same memory with different memory types can lead to all
    kinds of fun and hard to debug effects. In particular, if the TCR says
    "cacheable" and the page tables say "uncacheable", page table walks will
    pull stale entries into the cache and later mmu_config_range() calls
    will write directly to memory, bypassing those cache lines. This means
    the translations will not get updated even after a TLB flush, and later
    cache flushes/evictions may write the stale entries back to memory.
    
    Since page table configuration is currently always done from SoC code,
    we can't generally ensure that the TTB is always mapped as cacheable.
    We can however save developers of future SoCs a lot of headaches and
    time by spot checking the attributes when the MMU gets enabled, as this
    patch does.
    
    BRANCH=None
    BUG=None
    TEST=Booted Oak. Manually tested get_pte() with a few addresses.
    
    Change-Id: I3afd29dece848c4b5f759ce2f00ca2b7433374da
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Original-Commit-Id: f3947f4bb0abf4466006d5e3a962bbcb8919b12d
    Original-Change-Id: I1008883e5ed4cc37d30cae5777a60287d3d01af0
    Original-Signed-off-by: Julius Werner <jwerner at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/323862
    Original-Reviewed-by: Aaron Durbin <adurbin at chromium.org>
    Reviewed-on: https://review.coreboot.org/13595
    Tested-by: build bot (Jenkins)
    Reviewed-by: Stefan Reinauer <stefan.reinauer at coreboot.org>


See https://review.coreboot.org/13595 for details.

-gerrit



More information about the coreboot-gerrit mailing list