Feat: lab 3
This commit is contained in:
@@ -42,20 +42,7 @@ void _print_time(uint64_t)
|
||||
uint64_t cntpct_el0, cntfrq_el0;
|
||||
R_SYSREG(cntpct_el0, cntpct_el0);
|
||||
R_SYSREG(cntfrq_el0, cntfrq_el0);
|
||||
DEBUG_EXCEP(cntpct_el0 / cntpct_el0);
|
||||
}
|
||||
|
||||
void main(void *dtb)
|
||||
{
|
||||
file_node_t *initrd_root = 0x0;
|
||||
init(dtb, &initrd_root);
|
||||
|
||||
LOG("system booting in");
|
||||
_print_time(0x0);
|
||||
|
||||
uint64_t cntpct_el0, cntfrq_el0;
|
||||
R_SYSREG(cntpct_el0, cntpct_el0);
|
||||
R_SYSREG(cntfrq_el0, cntfrq_el0);
|
||||
DEBUG_EXCEP(cntpct_el0 / cntfrq_el0);
|
||||
|
||||
task_t task = {
|
||||
.firing_tick = cntpct_el0 + 2 * cntfrq_el0,
|
||||
@@ -67,6 +54,15 @@ void main(void *dtb)
|
||||
};
|
||||
|
||||
add_task(task);
|
||||
}
|
||||
|
||||
void main(void *dtb)
|
||||
{
|
||||
file_node_t *initrd_root = 0x0;
|
||||
init(dtb, &initrd_root);
|
||||
|
||||
LOG("system booting in");
|
||||
_print_time(0x0);
|
||||
|
||||
uint64_t el;
|
||||
R_SYSREG(el, CurrentEL);
|
||||
|
||||
Reference in New Issue
Block a user