#include "utils.hpp"
#include "serial.hpp"
-namespace detail {
- template <typename F> concept func_on_mem = std::invocable<F, os::phys_ptr<os::paging::page>, os::phys_ptr<os::paging::page>>;
-}
-
void remove_some_mem(os::phys_ptr<os::paging::page> mem_start,
os::phys_ptr<os::paging::page> mem_end,
os::phys_ptr<os::paging::page> remove_start,
os::phys_ptr<os::paging::page> remove_end,
- detail::func_on_mem auto callback
+ std::invocable<os::phys_ptr<os::paging::page>, os::phys_ptr<os::paging::page>> auto callback
) {
if (remove_start <= mem_start && mem_start < remove_end && remove_end < mem_end) {
// Removes start:
os::halt();
}
-
os::paging::page_allocator page_allocator{([]() {
os::phys_ptr<os::paging::page> ram_ptr = nullptr;
asm("mov $page_list_one_past_end - 0xFFFFFFFF80000000,%0" : "=ri"(ram_ptr));