Commit 9e2b259c authored by James Morse's avatar James Morse Committed by Zheng Zengkai
Browse files

ACPI / PPTT: Filthy hack to find _a_ backwards reference in the PPTT [ROTTEN]



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: default avatarWang ShaoBo <bobo.shaobowang@huawei.com>
Reviewed-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: default avatarCheng Jian <cj.chengjian@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent d2b82e02
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment