diff --git a/source/entry2.S b/source/entry2.S index d03e704..38ace24 100644 --- a/source/entry2.S +++ b/source/entry2.S @@ -9,18 +9,11 @@ #include "asm.h" -.data -hello_world: - .ascii "Hello, world!\0" - - globalfunc entry2 ADRP x0, dummy_vectors MSR VBAR_EL2, x0 ADRP x0, _stack_start MOV sp, x0 - BL pl011_init - ADR x0, hello_world - BL pl011_puts + BL main B . endfunc entry2 diff --git a/source/main.c b/source/main.c new file mode 100644 index 0000000..c77e219 --- /dev/null +++ b/source/main.c @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2019 Ash Wilding. All rights reserved. + * + * SPDX-License-Identifier: MIT + * + * + * EL2 hypervisor main(). + */ + +#include "pl011.h" + +void main( void ) { + pl011_init(); + pl011_puts("Hello, world!\0"); +}