mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
pci: return correct I/O port base from BAR
The base address of I/O ports has a different encoding than those of I/O memory. This needs to be encountered in the PCI config helper utilities. Fix genodelabs/genode#4576
This commit is contained in:
committed by
Christian Helmuth
parent
49c6e01049
commit
5bf3e72d37
@@ -129,8 +129,12 @@ struct Pci::Config : Genode::Mmio
|
||||
|
||||
Genode::uint64_t addr()
|
||||
{
|
||||
return (bit64() ? ((Genode::uint64_t)read<Upper_bits>()<<32) : 0UL)
|
||||
| Bar_32bit::Memory_base::masked(read<Bar_32bit>());
|
||||
if (memory())
|
||||
return (bit64()
|
||||
? ((Genode::uint64_t)read<Upper_bits>()<<32) : 0UL)
|
||||
| Bar_32bit::Memory_base::masked(read<Bar_32bit>());
|
||||
else
|
||||
return Bar_32bit::Io_base::masked(read<Bar_32bit>());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user