On 2016-08-16 08:56, Benedikt Spranger wrote:
> The PCI device BAR configuration generated by "jailhouse config create"
> of the following device is broken:
>
> 05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
> RTL8111/8168/8411 P
> CI Express Gigabit Ethernet Controller (rev 06)
> Subsystem: Device 7470:3468
> Flags: bus master, fast devsel, latency 0
> I/O ports at d000 [size=256]
> Memory at f3204000 (64-bit, non-prefetchable) [size=4K]
> Memory at f3200000 (64-bit, prefetchable) [size=16K]
> Capabilities: [40] Power Management version 3
> Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
> Capabilities: [70] Express Endpoint, MSI 01
> Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
> Capabilities: [d0] Vital Product Data
> Capabilities: [100] Advanced Error Reporting
> Capabilities: [140] Virtual Channel
> Capabilities: [160] Device Serial Number 1a-0e-00-00-68-4c-e0-00
>
> ...
> .bar_mask = {
> 0xffffff00, 0x00000000, 0xfffff000,
> 0xffffffff, 0x00000000, 0xffffc000,
> },
> ...
>
> Fix the config generation script:
> ...
> .bar_mask = {
> 0xffffff00, 0x00000000, 0xfffff000,
> 0xffffffff, 0xffffc000, 0xffffffff,
> },
> ...
>
> Signed-off-by: Benedikt Spranger <[email protected]>
> ---
> tools/jailhouse-config-create | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/tools/jailhouse-config-create b/tools/jailhouse-config-create
> index f0d65ed..fc9552c 100755
> --- a/tools/jailhouse-config-create
> +++ b/tools/jailhouse-config-create
> @@ -174,11 +174,16 @@ class PCIBARs:
> if flags & PCIBARs.IORESOURCE_IO:
> mask = ~(int(end, 16) - int(start, 16))
> elif flags & PCIBARs.IORESOURCE_MEM:
> - mask = ~(int(end, 16) - int(start, 16))
> if flags & PCIBARs.IORESOURCE_MEM_64:
> + mask = int(end, 16) - int(start, 16)
> + (start, end, flags) = f.readline().split()
> + mask |= (int(end, 16) - int(start, 16)) << 32
> + mask = ~(mask)
> self.mask.append(mask & 0xffffffff)
> mask >>= 32
> n += 1
> + else:
> + mask = ~(int(end, 16) - int(start, 16))
> else:
> mask = 0
> self.mask.append(mask & 0xffffffff)
>
Thanks, queued.
Jan
--
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux
--
You received this message because you are subscribed to the Google Groups
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.