mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
xen/arm: Introduce and use GLOBAL() in asm code.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
1c413bf7f2
commit
604ab14cde
7 files changed
+12
-20
No files matched your search
@@ -23,18 +23,16 @@
|
||||
#include EARLY_PRINTK_INC
|
||||
#endif
|
||||
|
||||
.globl early_putch
|
||||
/* Print a character on the UART - this function is called by C
|
||||
* r0: character to print */
|
||||
early_putch:
|
||||
GLOBAL(early_putch)
|
||||
ldr r1, =FIXMAP_ADDR(FIXMAP_CONSOLE) /* r1 := VA UART base address */
|
||||
early_uart_ready r1, r2
|
||||
early_uart_transmit r1, r0
|
||||
mov pc, lr
|
||||
|
||||
.globl early_flush
|
||||
/* Flush the UART - this function is called by C */
|
||||
early_flush:
|
||||
GLOBAL(early_flush)
|
||||
ldr r1, =FIXMAP_ADDR(FIXMAP_CONSOLE) /* r1 := VA UART base address */
|
||||
early_uart_ready r1, r2
|
||||
mov pc, lr
|
||||
|
||||
@@ -65,9 +65,8 @@ trap_##trap: \
|
||||
bic sp, #7; /* Align the stack pointer (noop on guest trap) */ \
|
||||
b do_trap_##trap
|
||||
|
||||
.globl hyp_traps_vector
|
||||
.align 5
|
||||
hyp_traps_vector:
|
||||
GLOBAL(hyp_traps_vector)
|
||||
.word 0 /* 0x00 - Reset */
|
||||
b trap_undefined_instruction /* 0x04 - Undefined Instruction */
|
||||
b trap_supervisor_call /* 0x08 - Supervisor Call */
|
||||
|
||||
@@ -29,8 +29,7 @@
|
||||
* TODO: Move this code either later (via platform specific desc) or in a bootwrapper
|
||||
* r5: Machine ID
|
||||
* Clobber r0 r2 */
|
||||
.globl kick_cpus
|
||||
kick_cpus:
|
||||
GLOBAL(kick_cpus)
|
||||
ldr r0, =MACH_TYPE_SMDK5250
|
||||
teq r5, r0 /* Are we running on the arndale? */
|
||||
beq kick_cpus_arndale
|
||||
@@ -79,9 +78,7 @@ kick_cpus_sgi:
|
||||
* integration with the bootloader/firmware so that Xen always starts
|
||||
* in Hyp mode.
|
||||
* Clobber r0 - r4 */
|
||||
|
||||
.globl enter_hyp_mode
|
||||
enter_hyp_mode:
|
||||
GLOBAL(enter_hyp_mode)
|
||||
mov r3, lr /* Put return address in non-banked reg */
|
||||
cpsid aif, #0x16 /* Enter Monitor mode */
|
||||
mrc CP32(r0, SCR)
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
#include <asm/asm_defns.h>
|
||||
#include <asm/arm32/processor.h>
|
||||
|
||||
.globl v7_init
|
||||
v7_init:
|
||||
GLOBAL(v7_init)
|
||||
/* Set up the SMP bit in ACTLR */
|
||||
mrc CP32(r0, ACTLR)
|
||||
orr r0, r0, #(ACTLR_V7_SMP) /* enable SMP bit */
|
||||
|
||||
@@ -23,18 +23,16 @@
|
||||
#include EARLY_PRINTK_INC
|
||||
#endif
|
||||
|
||||
.globl early_putch
|
||||
/* Print a character on the UART - this function is called by C
|
||||
* x0: character to print */
|
||||
early_putch:
|
||||
GLOBAL(early_putch)
|
||||
ldr x15, =FIXMAP_ADDR(FIXMAP_CONSOLE)
|
||||
early_uart_ready x15, 1
|
||||
early_uart_transmit x15, w0
|
||||
ret
|
||||
|
||||
.globl early_flush
|
||||
/* Flush the UART - this function is called by C */
|
||||
early_flush:
|
||||
GLOBAL(early_flush)
|
||||
ldr x15, =FIXMAP_ADDR(FIXMAP_CONSOLE) /* x15 := VA UART base address */
|
||||
early_uart_ready x15, 1
|
||||
ret
|
||||
|
||||
@@ -34,9 +34,7 @@
|
||||
* integration with the bootloader/firmware so that Xen always starts
|
||||
* at EL2.
|
||||
*/
|
||||
|
||||
.globl enter_el2_mode
|
||||
enter_el2_mode:
|
||||
GLOBAL(enter_el2_mode)
|
||||
mov x0, #0x30 // RES1
|
||||
orr x0, x0, #(1 << 0) // Non-secure EL1
|
||||
orr x0, x0, #(1 << 8) // HVC enable
|
||||
|
||||
@@ -63,6 +63,9 @@
|
||||
.globl name; \
|
||||
ALIGN; \
|
||||
name:
|
||||
#define GLOBAL(name) \
|
||||
.globl name; \
|
||||
name:
|
||||
#define END(name) \
|
||||
.size name, .-name
|
||||
#define ENDPROC(name) \
|
||||
|
||||