arm64 libhelpers: Add helper functions for writing sp_elx

BUG=chrome-os-partner:30785
BRANCH=None
TEST=Compiles successfully

Change-Id: Ie950e893b01456c23af14304bd4dd8f61af9f244
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/216905
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
This commit is contained in:
Furquan Shaikh 2014-09-07 18:27:16 -07:00 committed by chrome-internal-fetch
commit 561e9c4ec2
2 changed files with 12 additions and 0 deletions

View file

@ -333,6 +333,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)
{

View file

@ -225,6 +225,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);