• J
    ACPI / PPTT: Filthy hack to find _a_ backwards reference in the PPTT [ROTTEN] · 0ed11dc4
    James Morse 提交于
    hulk inclusion
    category: feature
    feature: ARM MPAM support
    bugzilla: 48265
    CVE: NA
    
    --------------------------------
    
    The alpha MPAM table contains a pointer to the PPTT cache, which it
    expects to be unique, which isn't guaranteed.
    
    Ideally we'd take a cache-id, but the hardware doesn't have a
    suitable property, instead arm64 will generate an id from the cpu
    affinity ids.
    
    To find the cache id we need to find the cacheinfo structure, which
    we can do if we have a pptt cpu_node (different to the cache node),
    as this is the fw_token used to match the Processor Container that
    contains all the CPUs that share this cache.
    
    How can we find the expected-to-be-unique cpu_node from the cache_node?
    ... add acpi_pptt_find_cache_backwards() to find a PPTT processor node
    given a PPTT cache node. This is totally broken as many processor nodes
    may point at the same PPTT cache indicating different instances of the
    cache. (e.g. all the L1 caches are the same shape, but they aren't the
    same cache).
    
    This only works if you cooked your PPTT table to look like this.
    
    Signed-off-by: James Morse <james.morse@arm.com> # ... but its still GPLv2
    Signed-off-by: NWang ShaoBo <bobo.shaobowang@huawei.com>
    Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    Reviewed-by: NCheng Jian <cj.chengjian@huawei.com>
    Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
    0ed11dc4
pptt.c 26.1 KB