Changeset a27ba3f in rtems


Ignore:
Timestamp:
Jan 8, 2021, 4:13:42 PM (3 months ago)
Author:
Kinsey Moore <kinsey.moore@…>
Branches:
master
Children:
f662420
Parents:
9951cee
git-author:
Kinsey Moore <kinsey.moore@…> (01/08/21 16:13:42)
git-committer:
Joel Sherrill <joel@…> (03/05/21 14:43:15)
Message:

bsps/aarch64: Add support for EL2 start

Add the stub necessary to boot on AArch64 under EL2 and drop to EL1 for
normal operation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bsps/aarch64/shared/start/start.S

    r9951cee ra27ba3f  
    9999        msr SCTLR_EL1, x0
    100100
     101#ifdef BSP_START_IN_HYP_SUPPORT
     102        /* Drop from EL2 to EL1 */
     103
     104        /* Configure HCR_EL2 */
     105        mrs x0, HCR_EL2
     106        /* Set EL1 Execution state to AArch64 */
     107        orr x0, x0, #(1<<31)
     108        /* Disable ID traps */
     109        bic x0, x0, #(1<<15)
     110        bic x0, x0, #(1<<16)
     111        bic x0, x0, #(1<<17)
     112        bic x0, x0, #(1<<18)
     113        msr HCR_EL2, x0
     114
     115        /* Set to EL1h mode for eret */
     116        mov x0, #0b00101
     117        msr SPSR_EL2, x0
     118
     119        /* Set EL1 entry point */
     120        adr x0, _el1_start
     121        msr ELR_EL2, x0
     122        eret
     123_el1_start:
     124#endif
     125
    101126#ifdef RTEMS_SMP
    102127        /* Read MPIDR and get current processor index */
Note: See TracChangeset for help on using the changeset viewer.