0001
0002
0003
0004
0005
0006
0007
0008 #include <linux/linkage.h>
0009 #include <asm/assembler.h>
0010 #include <asm/kvm_asm.h>
0011
0012 .macro invalid_vector label
0013 SYM_CODE_START_LOCAL(\label)
0014 .align 7
0015 b \label
0016 SYM_CODE_END(\label)
0017 .endm
0018
0019 .macro el1_sync_vector
0020 SYM_CODE_START_LOCAL(el1_sync)
0021 .align 7
0022 cmp x0, #HVC_SET_VECTORS
0023 b.ne 1f
0024 msr vbar_el2, x1
0025 mov x0, xzr
0026 eret
0027 1: cmp x0, #HVC_SOFT_RESTART
0028 b.ne 2f
0029 mov x0, x2
0030 mov x2, x4
0031 mov x4, x1
0032 mov x1, x3
0033 br x4
0034 2:
0035 mov_q x0, HVC_STUB_ERR
0036 eret
0037 SYM_CODE_END(el1_sync)
0038 .endm
0039
0040 SYM_CODE_START(trans_pgd_stub_vectors)
0041 invalid_vector hyp_stub_el2t_sync_invalid // Synchronous EL2t
0042 invalid_vector hyp_stub_el2t_irq_invalid // IRQ EL2t
0043 invalid_vector hyp_stub_el2t_fiq_invalid // FIQ EL2t
0044 invalid_vector hyp_stub_el2t_error_invalid // Error EL2t
0045
0046 invalid_vector hyp_stub_el2h_sync_invalid // Synchronous EL2h
0047 invalid_vector hyp_stub_el2h_irq_invalid // IRQ EL2h
0048 invalid_vector hyp_stub_el2h_fiq_invalid // FIQ EL2h
0049 invalid_vector hyp_stub_el2h_error_invalid // Error EL2h
0050
0051 el1_sync_vector // Synchronous 64-bit EL1
0052 invalid_vector hyp_stub_el1_irq_invalid // IRQ 64-bit EL1
0053 invalid_vector hyp_stub_el1_fiq_invalid // FIQ 64-bit EL1
0054 invalid_vector hyp_stub_el1_error_invalid // Error 64-bit EL1
0055
0056 invalid_vector hyp_stub_32b_el1_sync_invalid // Synchronous 32-bit EL1
0057 invalid_vector hyp_stub_32b_el1_irq_invalid // IRQ 32-bit EL1
0058 invalid_vector hyp_stub_32b_el1_fiq_invalid // FIQ 32-bit EL1
0059 invalid_vector hyp_stub_32b_el1_error_invalid // Error 32-bit EL1
0060 .align 11
0061 SYM_INNER_LABEL(__trans_pgd_stub_vectors_end, SYM_L_LOCAL)
0062 SYM_CODE_END(trans_pgd_stub_vectors)
0063
0064 # Check the trans_pgd_stub_vectors didn't overflow
0065 .org . - (__trans_pgd_stub_vectors_end - trans_pgd_stub_vectors) + SZ_2K