.. | .. |
---|
66 | 66 | */ |
---|
67 | 67 | |
---|
68 | 68 | ENTRY(_main) |
---|
69 | | - /* |
---|
70 | | - * Enable instruction cache (if required), stack pointer, |
---|
71 | | - * data access alignment checks and SError. |
---|
72 | | - */ |
---|
73 | | -#ifdef CONFIG_SPL_BUILD |
---|
74 | | - mov x1, #CR_I |
---|
75 | | -#else |
---|
76 | | - mov x1, #0 |
---|
77 | | -#endif |
---|
78 | | - switch_el x2, 3f, 2f, 1f |
---|
79 | | -3: mrs x0, sctlr_el3 |
---|
80 | | - orr x0, x0, x1 |
---|
81 | | - msr sctlr_el3, x0 |
---|
82 | | -#ifndef CONFIG_SUPPORT_USBPLUG |
---|
83 | | - msr daifclr, #4 /* Enable SError. SCR_EL3.EA=1 was already set in start.S */ |
---|
84 | | -#endif |
---|
85 | | - b 0f |
---|
86 | | -2: mrs x0, sctlr_el2 |
---|
87 | | - orr x0, x0, x1 |
---|
88 | | - msr sctlr_el2, x0 |
---|
89 | | - |
---|
90 | | - mrs x0, hcr_el2 |
---|
91 | | - orr x0, x0, #HCR_EL2_TGE |
---|
92 | | - orr x0, x0, #HCR_EL2_AMO |
---|
93 | | -#if CONFIG_IS_ENABLED(IRQ) |
---|
94 | | - orr x0, x0, #HCR_EL2_IMO |
---|
95 | | -#endif |
---|
96 | | - msr hcr_el2, x0 |
---|
97 | | - msr daifclr, #4 |
---|
98 | | - b 0f |
---|
99 | | -1: mrs x0, sctlr_el1 |
---|
100 | | - orr x0, x0, x1 |
---|
101 | | - msr sctlr_el1, x0 |
---|
102 | | - msr daifclr, #4 |
---|
103 | | -0: |
---|
104 | | - isb |
---|
105 | 69 | |
---|
106 | 70 | /* |
---|
107 | 71 | * Set up initial C runtime environment and call board_init_f(0). |
---|