mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00: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:
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>());
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user