Skip to content

Commit

Permalink
mm,pmm: remove map_used_memory() completely
Browse files Browse the repository at this point in the history
Finally, this ugly hack goes away.

Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
  • Loading branch information
wipawel committed Nov 21, 2023
1 parent 86cb29e commit 90a0494
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
3 changes: 1 addition & 2 deletions include/mm/pmm.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <mm/regions.h>

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;

Expand Down Expand Up @@ -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 */
Expand Down
13 changes: 0 additions & 13 deletions mm/pmm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 90a0494

Please sign in to comment.