File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 77#include "string.h"
88#include "irq.h"
99
10+
1011static const char * banner [] = {
1112 "========================================\r\n" ,
1213 " AstraKernel v0.1.0\r\n" ,
@@ -36,12 +37,12 @@ static void init_message(void)
3637void irq_sanity_check (void )
3738{
3839 irq_disable ();
39- unsigned before = irq_count ;
40+ unsigned before = tick ;
4041
4142 irq_enable ();
4243 irq_disable ();
4344
44- unsigned after = irq_count ;
45+ unsigned after = tick ;
4546
4647 if (before == after )
4748 {
@@ -53,13 +54,20 @@ void irq_sanity_check(void)
5354 }
5455}
5556
57+ /* The following macros are for testing purposes. */
58+ #define SANITY_CHECK irq_sanity_check()
59+ #define CALL_SVC_0 __asm__ volatile ("svc #0")
60+
5661// Entry point for the kernel
5762void kernel_main (void )
5863{
5964 clear ();
6065
61- irq_sanity_check ();
62- __asm__ volatile ("svc #0" );
66+ /* TEST */
67+ SANITY_CHECK ;
68+ CALL_SVC_0 ;
69+
70+ /* Back to normal operations */
6371 init_message ();
6472
6573 char input_buffer [100 ];
You can’t perform that action at this time.
0 commit comments