From ca2e77b321faf3207da52dc402946c6b5f364203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kr=C3=B3l?= Date: Fri, 4 May 2018 16:09:47 +0200 Subject: [PATCH 1/2] enabling-iommu-in-coreboot-for-pcengines-apu2: initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Piotr Król --- ...ng-iommu-in-coreboot-for-pcengines-apu2.md | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 _posts/04-05-2018-enabling-iommu-in-coreboot-for-pcengines-apu2.md diff --git a/_posts/04-05-2018-enabling-iommu-in-coreboot-for-pcengines-apu2.md b/_posts/04-05-2018-enabling-iommu-in-coreboot-for-pcengines-apu2.md new file mode 100644 index 000000000..af90dc3b4 --- /dev/null +++ b/_posts/04-05-2018-enabling-iommu-in-coreboot-for-pcengines-apu2.md @@ -0,0 +1,58 @@ +--- +author: Piotr Król +layout: post +published: true +post_date: 2018-05-22 15:00:00 + +tags: + - coreboot + - apu2 + - iommu + - virtualization +categories: + - Firmware +--- + +In [last post](TBD) I introduced latest version of `pxe-server` project which +contain all necessary components to boot Xen on PC Engines apu2 over PXE. In +this post I would like to present IOMMU enabling process that I get through. + +Base components of this work are [Kyösti Mälkki patches](http://xen.1045712.n5.nabble.com/Enabling-AMD-Vi-IOMMU-panics-Xen-td5731305.html) +and Timothy Pearson patches +[1](https://review.coreboot.org/#/c/coreboot/+/15186/), +[2](https://review.coreboot.org/#/c/coreboot/+/15165/) and +[3](https://review.coreboot.org/#/c/coreboot/+/15164/). + +# Kyösti patches + +Using first patches I was able to enable IOMMU with some features. `xl dmesg` +give me: + +``` +(XEN) AMD-Vi: IOMMU Extended Features: +(XEN) - Peripheral Page Service Request +(XEN) - Guest Translation +(XEN) - Invalidate All Command +(XEN) - Guest APIC supported +(XEN) - Performance Counters +(XEN) AMD-Vi: IOMMU 0 Enabled. +(XEN) I/O virtualisation enabled +(XEN) - Dom0 mode: Relaxed +``` + +It looks like FACS address in FADT is incorrect: + +``` +(XEN) ACPI: 32/64X FACS address mismatch in FADT - cffae240/0000000000000000, using 32 +(XEN) ACPI: wakeup_vec[cffae24c], vec_size[20] +``` + +There is also some complain about missing ACPI table for IOMMU: + +``` +(XEN) 0000:00:00.2 not found in ACPI tables; using same IOMMU as function 0 +``` + +# Timothy patches + +# Testing IOMMU features From e621e4f0a3d11a36b1633d728421f6a73f4e20fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kr=C3=B3l?= Date: Mon, 7 May 2018 12:06:09 +0200 Subject: [PATCH 2/2] enabling-iommu-in-coreboot-for-pcengines-apu2: add note about test results MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Piotr Król --- ...-05-2018-enabling-iommu-in-coreboot-for-pcengines-apu2.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/_posts/04-05-2018-enabling-iommu-in-coreboot-for-pcengines-apu2.md b/_posts/04-05-2018-enabling-iommu-in-coreboot-for-pcengines-apu2.md index af90dc3b4..eb54c4532 100644 --- a/_posts/04-05-2018-enabling-iommu-in-coreboot-for-pcengines-apu2.md +++ b/_posts/04-05-2018-enabling-iommu-in-coreboot-for-pcengines-apu2.md @@ -53,6 +53,7 @@ There is also some complain about missing ACPI table for IOMMU: (XEN) 0000:00:00.2 not found in ACPI tables; using same IOMMU as function 0 ``` -# Timothy patches +This patch series takes IVRS ACPI table from AGESA. What seems to be completely +different approach from patches published by Timothy where whole table is +created from scratch. -# Testing IOMMU features