Skip to content
This repository has been archived by the owner on Sep 19, 2022. It is now read-only.

Commit

Permalink
prima de spacar fora tuto
Browse files Browse the repository at this point in the history
  • Loading branch information
specialfish9 committed Jul 17, 2022
1 parent 442a88e commit 45b8ef0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/init_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ inline void instantiator_proc(void)
context_t context[2];
context[0].pc = (memaddr)tlb_exc_handler;
context[1].pc = (memaddr)support_exec_handler;

/* Timer enabled, interupts on and kernel mode */
context[0].status = (STATUS_TE | STATUS_IM_MASK | STATUS_KUp | STATUS_IEc) ^ STATUS_KUp;
context[1].status = (STATUS_TE | STATUS_IM_MASK | STATUS_KUp | STATUS_IEc) ^ STATUS_KUp;

/* Set stack ptr to the end of the stack minus 1 */
context[0].stackPtr = (memaddr) &tp_supps[i].sup_stackTLB[500 - 1];
context[1].stackPtr = (memaddr) &tp_supps[i].sup_stackGen[500 - 1];
Expand Down
5 changes: 5 additions & 0 deletions src/kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ void exception_handler(void)
scheduler_next();
}

static unsigned int debugK;
static unsigned int debugK2;

void uTLB_RefillHandler(void)
{
Expand All @@ -185,6 +187,9 @@ void uTLB_RefillHandler(void)
pg_n = PAGE_N(missing_page);
LOGi("TLBREFILL", missing_page);

debugK = missing_page = exc_state->entry_hi >> VPNSHIFT;
debugK2 = ENTRYHI_GET_VPN(missing_page = exc_state->entry_hi);

missing_entry = act_proc->p_supportStruct->sup_privatePgTbl[pg_n];

/* 2) Scrivi l'entry nel TLB */
Expand Down
1 change: 0 additions & 1 deletion src/sys_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ inline void safe_kill(void)
{
int pid;
pcb_t *pcb;
size_tt i, j;

/* Recuperiamo il pid */
pid = SYSCALL(GETPROCESSID, 0, 0, 0);
Expand Down

0 comments on commit 45b8ef0

Please sign in to comment.