aboutsummaryrefslogtreecommitdiff
path: root/pk/bbl.c
blob: f4f0f066981b4c973fce3533dcb79222db9fec40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "pk.h"
#include "vm.h"

void run_loaded_program(struct mainvars* args)
{
  if (!current.is_supervisor)
    panic("bbl can't run user binaries; try using pk instead");

    supervisor_vm_init();
#ifdef PK_ENABLE_LOGO
    print_logo();
#endif
    write_csr(mepc, current.entry);
    asm volatile("eret");
    __builtin_unreachable();
}