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

Commit

Permalink
fix: sp_addr2
Browse files Browse the repository at this point in the history
  • Loading branch information
specialfish9 committed Sep 12, 2022
1 parent 65d5af5 commit 3adbefa
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/vm_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ inline void init_supp_structures(void)
void f2(){}
void f3(){}
unsigned int var3;
unsigned int var4;
unsigned int var5;

inline void tlb_exc_handler(void)
{
Expand All @@ -115,9 +117,6 @@ inline void tlb_exc_handler(void)
unsigned int cause =
CAUSE_GET_EXCCODE(act_proc_sup->sup_exceptState[PGFAULTEXCEPT].cause);

var3 = cause;
f3();

if (cause == EXC_MOD) {
LOG("EXECMOD");
safe_kill();
Expand Down Expand Up @@ -230,10 +229,12 @@ inline void tlb_exc_handler(void)
/* Disabilito gli interrupt per eseguire in modo atomico */
toggle_int(FALSE);

/* TODO rename */
unsigned int sp_addr2 = (unsigned int)0x20020 + (chosen_frame * PAGESIZE);
/* Aggiorno la page table del processo segnando la pagina valida e mettendo il nuovo pfn */
act_proc_sup->sup_privatePgTbl[mpg_no].pte_entryLO = (sp_addr2 << ENTRYLO_PFN_BIT) | ENTRYLO_VALID | ENTRYLO_DIRTY;
act_proc_sup->sup_privatePgTbl[mpg_no].pte_entryLO = sp_addr | ENTRYLO_VALID | ENTRYLO_DIRTY;

var4 = sp_addr;
var3 = act_proc_sup->sup_privatePgTbl[mpg_no].pte_entryLO;
f3();

/* Aggiorno il TLB */
update_tlb(act_proc_sup->sup_privatePgTbl[mpg_no].pte_entryHI,
Expand Down

0 comments on commit 3adbefa

Please sign in to comment.