Skip to content
  • Caleb Connolly's avatar
    mach-snapdragon: carve out no-map regions · 135086ba
    Caleb Connolly authored
    
    
    On Qualcomm platforms, the TZ may already have certain memory regions
    under protection by the time U-Boot starts. There is a rare case on some
    platforms where the prefetcher might speculatively access one of these
    regions resulting in a board crash (TZ traps and then resets the board).
    
    We shouldn't be accessing these regions from within U-Boot anyway, so
    let's mark them all with PTE_TYPE_FAULT to prevent any speculative
    access and correctly trap in EL1 rather than EL3.
    
    This is quite costly with caches off (takes ~2 seconds on SDM845 vs 35ms
    with caches on). So to minimise the impact this is only enabled on
    QCS404 for now (where the issue is known to occur).
    
    In the future, we should try to find a more efficient way to handle
    this, perhaps by turning on the MMU in stages.
    
    Signed-off-by: default avatarCaleb Connolly <caleb.connolly@linaro.org>
    135086ba
Loading