File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ #include "uart.h"
2+ #include "pmap.h"
3+ #include "rpsio.h"
4+ #include "rpslib.h"
5+
6+ extern void jump_to_el1 ();
7+ extern u_long get_current_el ();
8+
9+ void el2_main (void )
10+ {
11+ // initialize uart
12+ uart_init ();
13+
14+ // create page dir and page map
15+ vm_init ();
16+
17+ // fill page map
18+ page_init ();
19+
20+ // jump to el1
21+ printf ("Now in EL%lx. Jumping to EL1...\n" , get_current_el ());
22+ jump_to_el1 ();
23+
24+ panic ("failed to jump" );
25+ }
Original file line number Diff line number Diff line change 1+ #ifndef _SYSCONFIG_H_
2+ #define _SYSCONFIG_H_
3+
4+ #define MAXPA (512 * 1024 * 1024)
5+ #define KSTKSIZE (60 * 1024 * 1024)
6+
7+ #define EL2STACKTOP 0x04000000
8+ #define KSTACKTOP (EL3STACKTOP - 0x400000)
9+ #define UTOP (UPAGES + 0x300000)
10+ #define UPAGES (UVPT + 0x1000)
11+ #define UVPT 0x02000000
12+ #define KERNBASE 0x00080000
13+
14+ #endif // _SYSCONFIG_H_
15+
You can’t perform that action at this time.
0 commit comments