File tree Expand file tree Collapse file tree 3 files changed +23
-10
lines changed
src/platform/aarch64-virt Expand file tree Collapse file tree 3 files changed +23
-10
lines changed Original file line number Diff line number Diff line change 33
44#include "drivers/pl011.h"
55
6+ long
7+ gicr_base (void )
8+ {
9+ return GIC_GICR_BASE ;
10+ }
11+
12+
613static void __attribute__((constructor (101 )))
714board_init_early (void )
815{
@@ -15,15 +22,12 @@ board_init_early(void)
1522 printf ("ID_AA64MMFR0_EL1 = %lx\n" , wut );
1623}
1724
18-
19- #include <mios/cli.h>
20-
21- static error_t
22- cmd_el2 (cli_t * cli , int argc , char * * argv )
25+ void
26+ reboot (void )
2327{
24- extern void (* el2_trampoline )(void );
25- el2_trampoline ();
26- return 0 ;
27- }
28+ printf ("Reboot not implemented, stalling forever\n" );
2829
29- CLI_CMD_DEF ("el2" , cmd_el2 );
30+ while (1 ) {
31+ asm volatile ("wfi" );
32+ }
33+ }
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ include ${SRC}/cpu/aarch64/aarch64.mk
1212
1313SRCS += \
1414 ${P}/aarch64-virt.c \
15+ ${P}/asm.s \
1516
1617ENABLE_TASK_ACCOUNTING := no
1718
Original file line number Diff line number Diff line change 1+ .section .init,"ax" ,%progbits
2+ .global putc
3+ putc:
4+ ldr x1, =0x09000000
5+ 1: ldr w2, [x1, #0x18]
6+ tbnz w2, #5, 1b
7+ str x0, [x1]
8+ ret
You can’t perform that action at this time.
0 commit comments