So the kernel sets the dma_ops to the Xen SWIOTLB, and it
allocates an extra 64MB chunk of memory for the GART, which is not
used, and ... somehow all of the ioremap_nocache functions stop working
correctly. Maybe the ioremap_nocache does use some of that memory that
the gart_iommu_hole_init allocated?
With this patch, the GART is forcefully disabled, and the kernel boots fine
(with 6GB, 8GB, etc).
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
* The order of these functions is important for
* fall-back/fail-over reasons
*/
+ xen_swiotlb_init();
+
gart_iommu_hole_init();
detect_calgary();
amd_iommu_detect();
- xen_swiotlb_init();
-
pci_swiotlb_init();
}
#include <xen/page.h>
#include <xen/xen-ops.h>
+
+#include <linux/pci.h>
+#include <asm/gart.h>
+
#define OFFSET(val,align) ((unsigned long) \
( (val) & ( (align) - 1)))
xen_swiotlb_init_with_default_size(64 * (1<<20)); /* default to 64MB */
dma_ops = &xen_swiotlb_dma_ops;
iommu_detected = 1;
+#ifdef CONFIG_GART_IOMMU
+ gart_iommu_aperture_disabled = 1;
+#endif
+
}
}