mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-11 13:22:33 +00:00
pistachio: size-aligned I/O mem mapping in core
This commit circumvents faulty behaviour of base-pistachio, if the PCI config space gets requested megabyte-wise. It occurs that we get a mapping sequence in between sigma0, core and component, like the following: 0xe1000000 => 0xbf001000 => 0x10b000, with the consequence that the component stalls when accessing the latter one. By requesting I/O memory aligned to the size, the faulty behaviour vanishes. Ref #4686
This commit is contained in:
parent
424ed1b79a
commit
b596db3eed
@ -66,10 +66,10 @@ addr_t Io_mem_session_component::_map_local(addr_t base, size_t size)
|
||||
if (is_conventional_memory(base))
|
||||
return base;
|
||||
|
||||
/* align large I/O dataspaces on a super-page boundary within core */
|
||||
/* align large I/O dataspaces to super page size, otherwise to size */
|
||||
size_t const align = (size >= get_super_page_size())
|
||||
? get_super_page_size_log2()
|
||||
: get_page_size_log2();
|
||||
? get_super_page_size_log2()
|
||||
: log2(size);
|
||||
|
||||
return platform().region_alloc().alloc_aligned(size, align).convert<addr_t>(
|
||||
[&] (void *ptr) { return (addr_t)ptr; },
|
||||
|
Loading…
x
Reference in New Issue
Block a user