[coreboot-gerrit] Patch merged into coreboot/master: 6233681 arm64: Decouple MMU functions from memranges

gerrit at coreboot.org gerrit at coreboot.org
Tue Jun 2 11:34:25 CEST 2015


the following patch was just integrated into master:
commit 623368113c7fb0a7382cb28ecfba5384cd4f12a0
Author: Julius Werner <jwerner at chromium.org>
Date:   Mon May 18 13:11:12 2015 -0700

    arm64: Decouple MMU functions from memranges
    
    The current arm64 MMU interface is difficult to use in pre-RAM
    environments. It is based on the memranges API which makes use of
    malloc(), and early stages usually don't have a heap. It is also built
    as a one-shot interface that requires all memory ranges to be laid out
    beforehand, which is a problem when existing areas need to change (e.g.
    after initializing DRAM).
    
    The long-term goal of this patch is to completely switch to a
    configure-as-you-go interface based on the mmu_config_range() function,
    similar to what ARM32 does. As a first step this feature is added
    side-by-side to the existing interface so that existing SoC
    implementations continue to work and can be slowly ported over one by
    one. Like the ARM32 version it does not garbage collect page tables that
    become unused, so repeated mapping at different granularities will
    exhaust the available table space (this is presumed to be a reasonable
    limitation for a firmware environment and keeps the code much simpler).
    
    Also do some cleanup, align comments between coreboot and libpayload for
    easier diffing, and change all error cases to assert()s. Right now the
    code just propagates error codes up the stack until it eventually
    reaches a function that doesn't check them anymore. MMU configuration
    errors (essentially just misaligned requests and running out of table
    space) should always be compile-time programming errors, so failing hard
    and fast seems like the best way to deal with them.
    
    BRANCH=None
    BUG=None
    TEST=Compile-tested rush_ryu. Booted on Oak and hacked MMU init to use
    mmu_config_range() insted of memranges. Confirmed that CRCs over all page
    tables before and after the change are equal.
    
    Change-Id: I93585b44a277c1d96d31ee9c3dd2522b5e10085b
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Original-Commit-Id: f10fcba107aba1f3ea239471cb5a4f9239809539
    Original-Change-Id: I6a2a11e3b94e6ae9e1553871f0cccd3b556b3e65
    Original-Signed-off-by: Julius Werner <jwerner at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/271991
    Original-Reviewed-by: Aaron Durbin <adurbin at chromium.org>
    Reviewed-on: http://review.coreboot.org/10304
    Tested-by: build bot (Jenkins)
    Reviewed-by: Paul Menzel <paulepanter at users.sourceforge.net>
    Reviewed-by: Stefan Reinauer <stefan.reinauer at coreboot.org>


See http://review.coreboot.org/10304 for details.

-gerrit



More information about the coreboot-gerrit mailing list