Are you sure you want to convert the multiboot structure in kernel
space? There are libraries in userspace that can do the parsing and
the conversion, and on the hurd this could be done with a translator
which would also be pretty.

On top of that, it is pretty sure that on other architectures will use
a flattened device tree that would be yet another format to convert.

In regards to your question, I think you should use the gnumach mem
device and it works only at page granularity

device_open(device_master, D_READ | D_WRITE, "mem", &device);
device_map(device, VM_PROT_READ | VM_PROT_WRITE, physical_page_base,
mapped_size, &pager, 0);
vm_map(task, &virtual_address, mapped_size, 0, TRUE, pager, 0, FALSE,
VM_PROT_READ | VM_PROT_WRITE, VM_PROT_READ | VM_PROT_WRITE,
VM_INHERIT_NONE);

Reply via email to