message: add memory allocation function for io devices
diff: @@ -57,6 +57,20 @@ pub fn print_information() {
  arch::mm::virtualmem::print_information();
  }
  +pub fn allocate_iomem(sz: usize) -> usize {
  + let size = align_up!(sz, BasePageSize::SIZE);
  +
  + let physical_address = arch::mm::physicalmem::allocate(size);
  + let virtual_address = arch::mm::virtualmem::allocate(size);
  +
  + let count = size / BasePageSize::SIZE;
  + let mut flags = PageTableEntryFlags::empty();
  + flags.normal().writable().execute_disable();
  + arch::mm::paging::map::<BasePageSize>(virtual_address, physical_address, count, flags);
  +
  + virtual_address
  +}
  +
  pub fn allocate(sz: usize, execute_disable: bool) -> usize {
  let size = align_up!(sz, BasePageSize::SIZE);
  