mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
7b336e8570
To support pcie switch, we need a correct way to calculate pci bridge window. This patch is refactoring configure_bridge_window() for preparation. This patch does 3 things: 1. The original code does not calculate bridge window correctly. For the following bar_ranges, the old version would fail: [[0xd0400000, 0x1000, false], [0xd0000000, 0x100000, false], [0xd0100000, 0x1000, false]], [0xd0200000, 0x200000, false]] This patch fixes this bug. 2. We need to round bridge window base down to 1MB aligned, round window size up to 1MB aligned. 3. Since bridge window are also bar ranges, we need to return the configured bridge window so that parent bridge can use it. BUG=b:199986018 TEST=./tools/presubmit Change-Id: Iff26fdd7e500671688897652ac16aff792882707 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3503102 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |