From 0d619da1d390944350535acee9d0c1a49b887a29 Mon Sep 17 00:00:00 2001 From: Christoffer Dall Date: Thu, 5 May 2011 08:54:10 +0200 Subject: Change the Hyp API to prepare for simpler version Move the writing of the HVBAR to the top, so we can simply strip off the rest afterwards. --- monitor.S | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/monitor.S b/monitor.S index fd2742e..0c17017 100644 --- a/monitor.S +++ b/monitor.S @@ -52,6 +52,7 @@ @ Jump table for the SMC hypervisor API calls @ _hyp_funcs: + .long _write_hvbar .long _read_httbr .long _write_httbr .long _read_htcr @@ -64,8 +65,6 @@ _hyp_funcs: .long _write_hsctlr .long _read_hypsp .long _write_hypsp - .long _read_hvbar - .long _write_hvbar @ @ Switch to non-secure mode @@ -78,6 +77,16 @@ _non_sec: mcr p15, 0, r0, c1, c1, 0 movs pc, lr + @ + @ Read/Write HVBAR + @ +_read_hvbar: + mrc p15, 4, r0, c12, c0, 0 + movs pc, lr +_write_hvbar: + mcr p15, 4, r0, c12, c0, 0 + movs pc, lr + @ @ Read/Write HTTBR @ @@ -133,13 +142,3 @@ _read_hypsp: _write_hypsp: mov sp, r0 movs pc, lr - - @ - @ Read/Write HVBAR - @ -_read_hvbar: - mrc p15, 4, r0, c12, c0, 0 - movs pc, lr -_write_hvbar: - mcr p15, 4, r0, c12, c0, 0 - movs pc, lr -- cgit v1.2.3