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

Change-Id: I51749b6e4ae7b1ffbaae28d915cd100a28959f26
Signed-off-by: Patrick Georgi <>
Original-Commit-Id: c11c7287f507fa398cbbee75abc2bd11140ef19b
Original-Change-Id: I1258850438624abfe3b1ed7240df0db0e7905be6
Original-Signed-off-by: Furquan Shaikh <>
Original-Reviewed-by: Aaron Durbin <>
Original-Reviewed-by: Tom Warren <>
Original-Tested-by: Furquan Shaikh <>
Original-Commit-Queue: Furquan Shaikh <>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <>
1 file changed