Skip to content

Commit

Permalink
mm: use proper API to allocate a new page
Browse files Browse the repository at this point in the history
  • Loading branch information
HidenoriMatsubayashi committed May 5, 2023
1 parent 8e0e649 commit 212d9da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mm/kmm_trap.cc
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#include "mm/kmm_trap.h"

#include "kernel/sched/sched.h"
#include "mm/pgtable_stage1.h"
#include "mm/pgtable_stage2.h"
#include "mm/user_heap/umm_zalloc.h"

namespace evisor {

bool HandleMmTrapMemoryAccessFault(va_t addr) {
auto& sched = Sched::Get();
auto* tsk = sched.GetCurrentTask();
auto page = reinterpret_cast<va_t>(umm_zalloc(PAGE_SIZE));
auto page = reinterpret_cast<va_t>(PgTableStage1::PageAllocate());
if (!page) {
return false;
}
Expand Down

0 comments on commit 212d9da

Please sign in to comment.