• P
    target/arm: Provide fault type enum and FSR conversion functions · 1fa498fe
    Peter Maydell 提交于
    Currently get_phys_addr() and its various subfunctions return
    a hard-coded fault status register value for translation
    failures. This is awkward because FSR values these days may
    be either long-descriptor format or short-descriptor format.
    Worse, the right FSR type to use doesn't depend only on the
    translation table being walked -- some cases, like fault
    info reported to AArch32 EL2 for some kinds of ATS operation,
    must be in long-descriptor format even if the translation
    table being walked was short format. We can't get those cases
    right with our current approach.
    
    Provide fields in the ARMMMUFaultInfo struct which allow
    get_phys_addr() to provide sufficient information for a caller to
    construct an FSR value themselves, and utility functions which do
    this for both long and short format FSR values, as a first step in
    switching get_phys_addr() and its children to only returning the
    failure cause in the ARMMMUFaultInfo struct.
    Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
    Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
    Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
    Tested-by: NStefano Stabellini <sstabellini@kernel.org>
    Message-id: 1512503192-2239-2-git-send-email-peter.maydell@linaro.org
    1fa498fe
internals.h 23.2 KB