diff options
author | Furquan Shaikh <furquan@google.com> | 2014-09-07 18:27:16 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-03-28 07:04:30 +0100 |
commit | 33dbfd434e587b0b38d32d5fd0064db0ca397eac (patch) | |
tree | 04210409463c890dc0f8a6dba44b9c587c21e517 /src | |
parent | e1b87a103290115831226713b1711dcc956ae43d (diff) |
arm64 libhelpers: Add helper functions for writing sp_elx
BUG=chrome-os-partner:30785
BRANCH=None
TEST=Compiles successfully
Change-Id: Id9367b1fc836b7b8c8fd15b372673853493f67d4
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 561e9c4ec2b0657846d50bbc893ef7541230f932
Original-Change-Id: Ie950e893b01456c23af14304bd4dd8f61af9f244
Original-Signed-off-by: Furquan Shaikh <furquan@google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/216905
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: http://review.coreboot.org/9064
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/arm64/armv8/lib/pstate.c | 10 | ||||
-rw-r--r-- | src/arch/arm64/include/armv8/arch/lib_helpers.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/arch/arm64/armv8/lib/pstate.c b/src/arch/arm64/armv8/lib/pstate.c index d2f3649ee9..ecec387fa9 100644 --- a/src/arch/arm64/armv8/lib/pstate.c +++ b/src/arch/arm64/armv8/lib/pstate.c @@ -325,6 +325,16 @@ void raw_write_sp_el3(uint64_t sp_el3) raw_write_spsel(spsel); } +uint64_t raw_read_sp_elx(uint32_t el) +{ + SWITCH_CASE_READ(raw_read_sp, sp, uint64_t, el); +} + +void raw_write_sp_elx(uint64_t sp_elx, uint32_t el) +{ + SWITCH_CASE_WRITE(raw_write_sp, sp_elx, el); +} + /* SPSR */ uint32_t raw_read_spsr_abt(void) { diff --git a/src/arch/arm64/include/armv8/arch/lib_helpers.h b/src/arch/arm64/include/armv8/arch/lib_helpers.h index 014926d8fe..4fcef28f11 100644 --- a/src/arch/arm64/include/armv8/arch/lib_helpers.h +++ b/src/arch/arm64/include/armv8/arch/lib_helpers.h @@ -217,6 +217,8 @@ uint32_t raw_read_spsel(void); void raw_write_spsel(uint32_t spsel); uint64_t raw_read_sp_el3(void); void raw_write_sp_el3(uint64_t sp_el3); +uint64_t raw_read_sp_elx(uint32_t el); +void raw_write_sp_elx(uint64_t sp_elx, uint32_t el); uint32_t raw_read_spsr_abt(void); void raw_write_spsr_abt(uint32_t spsr_abt); uint32_t raw_read_spsr_el1(void); |