libpayload arm64: Add support for read and write registers at current EL in assembly

In order to ease the process of reading and writing any register at current EL,
provide read_current and write_current assembly macros. These are included in
arch/lib_helpers.h under the __ASSEMBLY__ macro condition. This is done to allow
the same header file to be included by .c and .S files.

TEST=Compiles successfully for ryu

Change-Id: I79241a944b68ebb24865e745a9835f54ab6d1a8f
Signed-off-by: Patrick Georgi <>
Original-Commit-Id: 2b55fbde466126c4de7f5f7bb2d1427196be842f
Original-Change-Id: I678ab89c4aa1b08898166e135b5ab2d6453bb5e8
Original-Signed-off-by: Furquan Shaikh <>
Original-Tested-by: Furquan Shaikh <>
Original-Reviewed-by: Aaron Durbin <>
Original-Commit-Queue: Furquan Shaikh <>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <>
1 file changed