]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commit
xen/arm: Don't use copy_from_paddr for DTB relocation
authorLuca Fancellu <luca.fancellu@arm.com>
Wed, 26 Feb 2025 21:52:56 +0000 (21:52 +0000)
committerMichal Orzel <michal.orzel@amd.com>
Tue, 4 Mar 2025 07:54:45 +0000 (08:54 +0100)
commit2bcbcedaf9475757b3bb5104982edb2acbdd1eee
tree701480477b75e77e7027c34e08fc65d3b6641958
parent274effbec245732e910d41f61a43dc07bc3e77ce
xen/arm: Don't use copy_from_paddr for DTB relocation

Currently the early stage of the Arm boot maps the DTB using
early_fdt_map() using PAGE_HYPERVISOR_RO which is cacheable
read-only memory, later during DTB relocation the function
copy_from_paddr() is used to map pages in the same range on
the fixmap but using PAGE_HYPERVISOR_WC which is non-cacheable
read-write memory.

The Arm specifications, ARM DDI0487L.a, section B2.11 "Mismatched
memory attributes" discourage using mismatched attributes for
aliases of the same location.

Given that there is nothing preventing the relocation since the region
is already mapped, fix that by open-coding copy_from_paddr inside
relocate_fdt, without mapping on the fixmap.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
xen/arch/arm/setup.c