Skip to content

Commit

Permalink
Add main.c and branch to main() from entry2()
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwio committed Feb 24, 2019
1 parent cc71806 commit 8502090
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
9 changes: 1 addition & 8 deletions source/entry2.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 15 additions & 0 deletions source/main.c
Original file line number Diff line number Diff line change
@@ -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");
}

0 comments on commit 8502090

Please sign in to comment.