Commit 1ebcfe91 authored by Samuel Thibault's avatar Samuel Thibault
Browse files

hurd: Fix map_dev_mem from non-zero address



device_map needs to create a big-enough object so it can then be mapped.
Signed-off-by: Samuel Thibault's avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
parent b82b7792
......@@ -248,7 +248,8 @@ map_dev_mem(void **dest, size_t mem_offset, size_t mem_size, int write)
if (mem_size % pagesize)
mem_size += pagesize - (mem_size % pagesize);
err = device_map (devmem, prot, 0x0, mem_size, &pager, 0);
/* XXX: Mach should be fixed into supporting non-zero offset */
err = device_map (devmem, prot, 0x0, mem_offset + mem_size, &pager, 0);
if (err)
return err;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment