[coreboot-gerrit] New patch to review for coreboot: allocator: Page align memory mapped PCI resources
Nico Huber (nico.h@gmx.de)
gerrit at coreboot.org
Wed Oct 21 15:55:18 CEST 2015
Nico Huber (nico.h at gmx.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/12111
-gerrit
commit ad89912085b9f5f03dc37f7f6efaee520b3b5319
Author: Nico Huber <nico.huber at secunet.com>
Date: Wed Oct 21 15:43:41 2015 +0200
allocator: Page align memory mapped PCI resources
To help hypervisors to assign PCI devices individually to virtualization
guests, page align dynamically allocated MMIO resources.
Change-Id: I2b7115070e1ccad64565feff025289732c3b5e66
Signed-off-by: Nico Huber <nico.huber at secunet.com>
---
src/device/pci_device.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index f2e4d5d..97540a6 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -211,6 +211,12 @@ struct resource *pci_get_resource(struct device *dev, unsigned long index)
resource->gran += 1;
}
resource->limit = limit = moving | (resource->size - 1);
+
+ if ((attr & PCI_BASE_ADDRESS_SPACE) == 0 &&
+ resource->align < 12)
+ /* At least page align to allow
+ individual mapping of devices. */
+ resource->align = 12;
}
/*
More information about the coreboot-gerrit
mailing list