From 90a0494a8e3164301bdf31f0ab83c20eb5f8f382 Mon Sep 17 00:00:00 2001 From: Pawel Wieczorkiewicz Date: Tue, 31 Oct 2023 14:41:06 +0100 Subject: [PATCH] mm,pmm: remove map_used_memory() completely Finally, this ugly hack goes away. Signed-off-by: Pawel Wieczorkiewicz --- include/mm/pmm.h | 3 +-- mm/pmm.c | 13 ------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/include/mm/pmm.h b/include/mm/pmm.h index 79f193d9..246c225c 100644 --- a/include/mm/pmm.h +++ b/include/mm/pmm.h @@ -31,7 +31,7 @@ #include struct frame_flags { - uint16_t : 11, mapped : 1, uncacheable : 1, free : 1, pagetable : 1; + uint16_t : 12, uncacheable : 1, free : 1, pagetable : 1; }; typedef struct frame_flags frame_flags_t; @@ -83,7 +83,6 @@ extern frame_t *find_free_paddr_frame(paddr_t paddr); extern frame_t *find_busy_paddr_frame(paddr_t paddr); extern frame_t *find_paddr_frame(paddr_t paddr); -extern void map_used_memory(void); extern void map_frames_array(void); /* Static definitions */ diff --git a/mm/pmm.c b/mm/pmm.c index 6158614a..6622f805 100644 --- a/mm/pmm.c +++ b/mm/pmm.c @@ -638,19 +638,6 @@ void put_free_frames(mfn_t mfn, unsigned int order) { spin_unlock(&lock); } -void map_used_memory(void) { - frame_t *frame; - - for_each_order (order) { - list_for_each_entry (frame, &busy_frames[order], list) { - if (!frame->flags.mapped) { - kmap(frame->mfn, order, L4_PROT, L3_PROT, L2_PROT, L1_PROT); - frame->flags.mapped = true; - } - } - } -} - void map_frames_array(void) { frames_array_t *array;