]> xenbits.xensource.com Git - xen.git/commit
xen/arm64: head: only use the macro load_paddr() in the MMU code
authorJulien Grall <julien@xen.org>
Tue, 17 Oct 2023 12:52:19 +0000 (13:52 +0100)
committerJulien Grall <jgrall@amazon.com>
Thu, 16 Nov 2023 14:03:19 +0000 (14:03 +0000)
commit046f13a2b3b4f66a10cc395d45bcf8dc6793f537
tree895b743dbaca321a3c66e28171346cd092053306
parentc419d2dd351c170ab7b44459b7f121599b23293d
xen/arm64: head: only use the macro load_paddr() in the MMU code

The macro load_paddr() requires to know the offset between the
physical location of Xen and the virtual location.

When using the MPU, x20 will always be 0. Rather than wasting
a register for a compile-time constant value, it would be best if
we can avoid using load_paddr() altogether in the common head.S code.

The current use of load_paddr() are equivalent to adr_l() because
the MMU is off.

All the use of load_paddr() in arm64/head.S are now replaced with
adr_l(). With that, load_paddr() can now be moved in arm64/mmu/head.S.

For now, x20 is still unconditionally set. But this could change
in the future if needed.

Signed-off-by: Julien Grall <julien@xen.org>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
xen/arch/arm/arm64/head.S
xen/arch/arm/arm64/mmu/head.S
xen/arch/arm/include/asm/arm64/macros.h