mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-15 17:58:46 +02:00
32dfdfbb01
coreboot/default: update t480 patches to set 38 see: https://review.coreboot.org/c/coreboot/+/83274/38 I was previously using: https://review.coreboot.org/c/coreboot/+/83274/25 Matt DeViller aka MrChromeBox, recently took over the patch set, tidying up and re-factoring the code so that it's more suitable for upstream. Several hacky behaviours were removed, for example the MEC1663 code is now its own code in coreboot, rather than being bolted onto the H8s code. Certain T480-specific changes made to global parts of the coreboot code are now done only on the tree itself. Mate Kukri has also tested Matt's recent updates. More testing still needed on Nvidia dGPU models, which never worked before anyway; Intel GPU models should still work. Thermas zone handling is also improved. See patch: https://review.coreboot.org/c/coreboot/+/88415/1 https://review.coreboot.org/c/coreboot/+/88416/2 Functionally, this is mostly the same as before. As I said, Matt has focused on code cleanup, so that the board can be properly upstreamed. Hopefully this will be merged soon, in coreboot-main. Besides this, the following upstream changes were imported: * 8b52167a9f arch/x86: Add support for cooperative multitasking on x86_64 * 569b7a8861 Docs/releases: Finalize 25.06 release notes * 5db8bf0cfa mb/trulo/var/pujjolo: Enable USB3 WWAN device * e013c9586c mb/trulo/var/pujjolo: Modify mipi camera parameters * 7b8520ab69 mb/trulo/var/pujjolo: Update fingerprint enable pin status * f74027d5ae mb/google/nissa/var/craask: Add elan touchscreen support * 396a883a0c mb/hp/snb_ivb_desktops: Include PS/2 controller ASL code for MS Windows * 18c067d392 mb/google/fatcat/var/kinmen: Add Synaptics touchpad * 2f5b384ba5 soc/mediatek/mt8189: Enable EARLY_MMU_INIT to improve boot time * d5bce8c420 mb/hp: Add HP 260 G1 DM Business PC (Haswell) * 48c6f66fa4 mb/google/ocelot: Update TPM_TIS_ACPI_INTERRUPT value in Kconfig * 0660fe50de mb/google/ocelot: Update GPE configuration * 5b3063802e mb/google/fatcat/var/kinmen: Fix touchscreen IRQ setting * 6c4e502fdd mb/google/nissa/var/pujjocento: Reduce PL4 to 38W with no battery * 6e92554ab6 mb/trulo/var/pujjolo: Modify FW_CONFIG for mipi camera * 4f5f75da34 mb/trulo/var/pujjolo: Correct USB3 Type-A OC pins * a1dfd39e04 mb/google/fatcat/var/kinmen: Add AUDIO_UNKNOWN and probe for ALC721 * 306544b427 mb/google/fatcat/var/francka: Add AUDIO_UNKNOWN and audio probes * edf47d44cd mb/google/fatcat/var/fatcat: Disable Audio for invalid Audio FW_CONFIG * 454079c3bc lib/cbfs: Ensure cache buffer alignment in ramstage * 0ef670a66a mb/google/ocelot/var/ocelot: Configure FPS related changes * 6ab37f0e0e mb/google/ocelot/var/ocelot: Add FW_CONFIG for Finger Print * 3f61df24d5 mb/google/ocelot/var/ocelot: Add FW_CONFIG for Storage * bb95a26cda mb/google/ocelot/var/ocelot: Add FW_CONFIG for WiFi * 410b3c697f mb/google/ocelot/var/ocelot: Add FW_CONIG for ISH * afaf4c3d7b mb/google/brya/variants/pujjolo: Update ISH GPIOs and add ISH firmware name * f6de6f8933 mb/google/fatcat: Drop redundant SNDW GPIO mapping * 584fdd6572 soc/mediatek/mt8196: Remove redundant bootblock.c from Makefile.mk * 24ea6937f2 soc/intel/apollolake: Add the Kconfig options for IFWI Boot Profile * c68645cd88 util/supermicro: Fix mem leak in get_line_as_int error conditions * 05396238da libpayload/drivers: Fix mem-leak in cbmem_console error condition * 1219981177 drivers/emu/qemu: Add a comment about fw_cfg assumptions * d866e72b3a mb/google/fatcat/var/kinmen: Set CRFP to use GPIO for status * 4367daae20 drivers/spi: Add option to generate proper PowerResource _STA * 03c331399c mb/google/nissa/var/craask: Add focaltech touchscreen support * b3d7c40fb5 mb/siemens/mc_rpl: Remove code for board_id * 5de16ed1b8 mb/siemens/mc_rpl: Remove unused embedded controller code * a1067ec6de mb/siemens/mc_rpl: Remove unneeded code to select a VBT name in CBFS * 463cda84d2 mb/siemens/mc_rpl: Remove unused Type-C data definition * dcbe591201 mb/siemens/mc_rpl: Use SPD data from HWInfo instead of from CBFS * 6c059f8af3 IVB mainboards: Drop 1024M option for gfx_uma_size * 3b61dbaa06 mb/asus/p8z77-m_pro: Remove incorrect gfx_uma_size options * 2b7115b139 mb/hp/snb_ivb_desktops: Add gfx_uma_size options up to 512MB * d99769bbde mb/hp/snb_ivb_desktops/variants: enable 4th sata port on tested models * 95784dbafb mb/google/ocelot/var/ocelot: Add FW_CONFIG for Audio * f323adb19f soc/mediatek/mt8189: Increase SPI NOR clock rate from 26MHz to 52MHz * 689af47b52 commonlib: Add pvmfw related timestamps * f1d06a5ad4 soc/intel/common/block/memory: Provide a way to use SPD data from memory * 11b1dc0a97 Reapply "util/cbmem: Consolidate CBMEM and coreboot table access" * 13f1c6118e Documentation: Update cbmem.md with more information * 07267d19ce arch/x86/postcar_loader: Add comment line for reloc_params assignment * e94ac6e655 mb/google/nissa/var/pujjocento: Reduce PL4 to 38 W with no battery * 2eaec1b53a sbom: Fix build with merged bootblock and romstage * 267f08dafd MAINTAINERS: Add KunYi Chen as maintainer for LattePanda Mu Signed-off-by: Leah Rowe <leah@libreboot.org>
293 lines
8.7 KiB
Diff
293 lines
8.7 KiB
Diff
From 73dc0d08dc11f297681123f91754722dac35c293 Mon Sep 17 00:00:00 2001
|
|
From: Leah Rowe <info@minifree.org>
|
|
Date: Sat, 2 Mar 2024 22:51:09 +0000
|
|
Subject: [PATCH 11/43] nb/intel/haswell: make IOMMU a runtime option
|
|
|
|
When I tested graphics cards on a coreboot port for Dell
|
|
OptiPlex 9020 SFF, I could not use a graphics card unless
|
|
I set iommu=off on the Linux cmdline.
|
|
|
|
Coreboot's current behaviour is to check whether the CPU
|
|
has vt-d support and, if it does, initialise the IOMMU.
|
|
|
|
This patch maintains the current behaviour by default, but
|
|
allows the user to turn *off* the IOMMU, even if vt-d is
|
|
supported by the host CPU.
|
|
|
|
If iommu=Disable is specified, the check will not be
|
|
performed, and the IOMMU will be left disabled. This option
|
|
has been added to all current Haswell boards, though it is
|
|
recommended to leave the IOMMU turned on in most setups.
|
|
|
|
Signed-off-by: Leah Rowe <info@minifree.org>
|
|
---
|
|
src/mainboard/asrock/b85m_pro4/cmos.default | 1 +
|
|
src/mainboard/asrock/b85m_pro4/cmos.layout | 3 +++
|
|
src/mainboard/asrock/h81m-hds/cmos.default | 1 +
|
|
src/mainboard/asrock/h81m-hds/cmos.layout | 6 ++++++
|
|
src/mainboard/dell/optiplex_9020/cmos.default | 1 +
|
|
src/mainboard/dell/optiplex_9020/cmos.layout | 6 ++++++
|
|
src/mainboard/google/beltino/cmos.layout | 5 +++++
|
|
src/mainboard/google/slippy/cmos.layout | 5 +++++
|
|
src/mainboard/intel/baskingridge/cmos.layout | 4 ++++
|
|
src/mainboard/lenovo/haswell/cmos.default | 1 +
|
|
src/mainboard/lenovo/haswell/cmos.layout | 3 +++
|
|
src/mainboard/supermicro/x10slm-f/cmos.default | 1 +
|
|
src/mainboard/supermicro/x10slm-f/cmos.layout | 6 ++++++
|
|
src/northbridge/intel/haswell/early_init.c | 5 +++++
|
|
14 files changed, 48 insertions(+)
|
|
|
|
diff --git a/src/mainboard/asrock/b85m_pro4/cmos.default b/src/mainboard/asrock/b85m_pro4/cmos.default
|
|
index 01bf20ad16..dfc8b80fb0 100644
|
|
--- a/src/mainboard/asrock/b85m_pro4/cmos.default
|
|
+++ b/src/mainboard/asrock/b85m_pro4/cmos.default
|
|
@@ -4,3 +4,4 @@ boot_option=Fallback
|
|
debug_level=Debug
|
|
nmi=Enable
|
|
power_on_after_fail=Disable
|
|
+iommu=Enable
|
|
diff --git a/src/mainboard/asrock/b85m_pro4/cmos.layout b/src/mainboard/asrock/b85m_pro4/cmos.layout
|
|
index efdc333fc2..c9883ea71d 100644
|
|
--- a/src/mainboard/asrock/b85m_pro4/cmos.layout
|
|
+++ b/src/mainboard/asrock/b85m_pro4/cmos.layout
|
|
@@ -11,6 +11,7 @@
|
|
395 4 e 4 debug_level
|
|
408 1 e 1 nmi
|
|
409 2 e 5 power_on_after_fail
|
|
+ 412 1 e 6 iommu
|
|
984 16 h 0 check_sum
|
|
# -----------------------------------------------------------------
|
|
|
|
@@ -38,6 +39,8 @@
|
|
5 0 Disable
|
|
5 1 Enable
|
|
5 2 Keep
|
|
+ 6 0 Disable
|
|
+ 6 1 Enable
|
|
# -----------------------------------------------------------------
|
|
|
|
# -----------------------------------------------------------------
|
|
diff --git a/src/mainboard/asrock/h81m-hds/cmos.default b/src/mainboard/asrock/h81m-hds/cmos.default
|
|
index 01bf20ad16..dfc8b80fb0 100644
|
|
--- a/src/mainboard/asrock/h81m-hds/cmos.default
|
|
+++ b/src/mainboard/asrock/h81m-hds/cmos.default
|
|
@@ -4,3 +4,4 @@ boot_option=Fallback
|
|
debug_level=Debug
|
|
nmi=Enable
|
|
power_on_after_fail=Disable
|
|
+iommu=Enable
|
|
diff --git a/src/mainboard/asrock/h81m-hds/cmos.layout b/src/mainboard/asrock/h81m-hds/cmos.layout
|
|
index c9ba76c78f..95ee3d36fb 100644
|
|
--- a/src/mainboard/asrock/h81m-hds/cmos.layout
|
|
+++ b/src/mainboard/asrock/h81m-hds/cmos.layout
|
|
@@ -21,6 +21,9 @@ entries
|
|
408 1 e 1 nmi
|
|
409 2 e 5 power_on_after_fail
|
|
|
|
+# enable or disable iommu
|
|
+412 1 e 6 iommu
|
|
+
|
|
# coreboot config options: check sums
|
|
984 16 h 0 check_sum
|
|
|
|
@@ -52,6 +55,9 @@ enumerations
|
|
5 1 Enable
|
|
5 2 Keep
|
|
|
|
+6 0 Disable
|
|
+6 1 Enable
|
|
+
|
|
# -----------------------------------------------------------------
|
|
checksums
|
|
|
|
diff --git a/src/mainboard/dell/optiplex_9020/cmos.default b/src/mainboard/dell/optiplex_9020/cmos.default
|
|
index 6c4a2a1be7..8000eea8c0 100644
|
|
--- a/src/mainboard/dell/optiplex_9020/cmos.default
|
|
+++ b/src/mainboard/dell/optiplex_9020/cmos.default
|
|
@@ -4,3 +4,4 @@ debug_level=Debug
|
|
nmi=Disable
|
|
power_on_after_fail=Disable
|
|
fan_full_speed=Disable
|
|
+iommu=Enable
|
|
diff --git a/src/mainboard/dell/optiplex_9020/cmos.layout b/src/mainboard/dell/optiplex_9020/cmos.layout
|
|
index d10ad95b23..4a1496a878 100644
|
|
--- a/src/mainboard/dell/optiplex_9020/cmos.layout
|
|
+++ b/src/mainboard/dell/optiplex_9020/cmos.layout
|
|
@@ -21,6 +21,9 @@ entries
|
|
408 1 e 1 nmi
|
|
409 2 e 5 power_on_after_fail
|
|
|
|
+# turn iommu on or off
|
|
+411 1 e 6 iommu
|
|
+
|
|
# coreboot config options: EC
|
|
412 1 e 1 fan_full_speed
|
|
|
|
@@ -55,6 +58,9 @@ enumerations
|
|
5 1 Enable
|
|
5 2 Keep
|
|
|
|
+6 0 Disable
|
|
+6 1 Enable
|
|
+
|
|
# -----------------------------------------------------------------
|
|
checksums
|
|
|
|
diff --git a/src/mainboard/google/beltino/cmos.layout b/src/mainboard/google/beltino/cmos.layout
|
|
index 78d44c1415..c143979ae1 100644
|
|
--- a/src/mainboard/google/beltino/cmos.layout
|
|
+++ b/src/mainboard/google/beltino/cmos.layout
|
|
@@ -19,6 +19,9 @@ entries
|
|
408 1 e 1 nmi
|
|
409 2 e 7 power_on_after_fail
|
|
|
|
+# enable or disable iommu
|
|
+412 1 e 8 iommu
|
|
+
|
|
# coreboot config options: bootloader
|
|
#Used by ChromeOS:
|
|
416 128 r 0 vbnv
|
|
@@ -47,6 +50,8 @@ enumerations
|
|
7 0 Disable
|
|
7 1 Enable
|
|
7 2 Keep
|
|
+8 0 Disable
|
|
+8 1 Enable
|
|
# -----------------------------------------------------------------
|
|
checksums
|
|
|
|
diff --git a/src/mainboard/google/slippy/cmos.layout b/src/mainboard/google/slippy/cmos.layout
|
|
index 78d44c1415..c143979ae1 100644
|
|
--- a/src/mainboard/google/slippy/cmos.layout
|
|
+++ b/src/mainboard/google/slippy/cmos.layout
|
|
@@ -19,6 +19,9 @@ entries
|
|
408 1 e 1 nmi
|
|
409 2 e 7 power_on_after_fail
|
|
|
|
+# enable or disable iommu
|
|
+412 1 e 8 iommu
|
|
+
|
|
# coreboot config options: bootloader
|
|
#Used by ChromeOS:
|
|
416 128 r 0 vbnv
|
|
@@ -47,6 +50,8 @@ enumerations
|
|
7 0 Disable
|
|
7 1 Enable
|
|
7 2 Keep
|
|
+8 0 Disable
|
|
+8 1 Enable
|
|
# -----------------------------------------------------------------
|
|
checksums
|
|
|
|
diff --git a/src/mainboard/intel/baskingridge/cmos.layout b/src/mainboard/intel/baskingridge/cmos.layout
|
|
index 78d44c1415..f2c602f541 100644
|
|
--- a/src/mainboard/intel/baskingridge/cmos.layout
|
|
+++ b/src/mainboard/intel/baskingridge/cmos.layout
|
|
@@ -19,6 +19,8 @@ entries
|
|
408 1 e 1 nmi
|
|
409 2 e 7 power_on_after_fail
|
|
|
|
+412 1 e 8 iommu
|
|
+
|
|
# coreboot config options: bootloader
|
|
#Used by ChromeOS:
|
|
416 128 r 0 vbnv
|
|
@@ -47,6 +49,8 @@ enumerations
|
|
7 0 Disable
|
|
7 1 Enable
|
|
7 2 Keep
|
|
+8 0 Disable
|
|
+8 1 Enable
|
|
# -----------------------------------------------------------------
|
|
checksums
|
|
|
|
diff --git a/src/mainboard/lenovo/haswell/cmos.default b/src/mainboard/lenovo/haswell/cmos.default
|
|
index 08db97c5a9..cc6b363cd9 100644
|
|
--- a/src/mainboard/lenovo/haswell/cmos.default
|
|
+++ b/src/mainboard/lenovo/haswell/cmos.default
|
|
@@ -14,3 +14,4 @@ trackpoint=Enable
|
|
backlight=Keyboard
|
|
enable_dual_graphics=Disable
|
|
usb_always_on=Disable
|
|
+iommu=Enable
|
|
diff --git a/src/mainboard/lenovo/haswell/cmos.layout b/src/mainboard/lenovo/haswell/cmos.layout
|
|
index 27915d3ab7..59df76b64c 100644
|
|
--- a/src/mainboard/lenovo/haswell/cmos.layout
|
|
+++ b/src/mainboard/lenovo/haswell/cmos.layout
|
|
@@ -23,6 +23,7 @@ entries
|
|
|
|
# coreboot config options: EC
|
|
411 1 e 8 first_battery
|
|
+413 1 e 14 iommu
|
|
415 1 e 1 wlan
|
|
416 1 e 1 trackpoint
|
|
417 1 e 1 fn_ctrl_swap
|
|
@@ -72,6 +73,8 @@ enumerations
|
|
13 0 Disable
|
|
13 1 AC and battery
|
|
13 2 AC only
|
|
+14 0 Disable
|
|
+14 1 Enable
|
|
|
|
# -----------------------------------------------------------------
|
|
checksums
|
|
diff --git a/src/mainboard/supermicro/x10slm-f/cmos.default b/src/mainboard/supermicro/x10slm-f/cmos.default
|
|
index 7ce38fb5d7..6049e7938a 100644
|
|
--- a/src/mainboard/supermicro/x10slm-f/cmos.default
|
|
+++ b/src/mainboard/supermicro/x10slm-f/cmos.default
|
|
@@ -5,3 +5,4 @@ debug_level=Debug
|
|
nmi=Enable
|
|
power_on_after_fail=Keep
|
|
hide_ast2400=Disable
|
|
+iommu=Enable
|
|
diff --git a/src/mainboard/supermicro/x10slm-f/cmos.layout b/src/mainboard/supermicro/x10slm-f/cmos.layout
|
|
index 38ba87aa45..24d39e97ee 100644
|
|
--- a/src/mainboard/supermicro/x10slm-f/cmos.layout
|
|
+++ b/src/mainboard/supermicro/x10slm-f/cmos.layout
|
|
@@ -21,6 +21,9 @@ entries
|
|
408 1 e 1 nmi
|
|
409 2 e 5 power_on_after_fail
|
|
|
|
+# enable or disable iommu
|
|
+412 1 e 6 iommu
|
|
+
|
|
# coreboot config options: mainboard
|
|
416 1 e 1 hide_ast2400
|
|
|
|
@@ -55,6 +58,9 @@ enumerations
|
|
5 1 Enable
|
|
5 2 Keep
|
|
|
|
+6 0 Disable
|
|
+6 1 Enable
|
|
+
|
|
# -----------------------------------------------------------------
|
|
checksums
|
|
|
|
diff --git a/src/northbridge/intel/haswell/early_init.c b/src/northbridge/intel/haswell/early_init.c
|
|
index e47deb5da6..1a7e0b1076 100644
|
|
--- a/src/northbridge/intel/haswell/early_init.c
|
|
+++ b/src/northbridge/intel/haswell/early_init.c
|
|
@@ -5,6 +5,7 @@
|
|
#include <device/mmio.h>
|
|
#include <device/pci_def.h>
|
|
#include <device/pci_ops.h>
|
|
+#include <option.h>
|
|
|
|
#include "haswell.h"
|
|
|
|
@@ -157,6 +158,10 @@ static void haswell_setup_misc(void)
|
|
static void haswell_setup_iommu(void)
|
|
{
|
|
const u32 capid0_a = pci_read_config32(HOST_BRIDGE, CAPID0_A);
|
|
+ u8 enable_iommu = get_uint_option("iommu", 1);
|
|
+
|
|
+ if (!enable_iommu)
|
|
+ return;
|
|
|
|
if (capid0_a & VTD_DISABLE)
|
|
return;
|
|
--
|
|
2.39.5
|
|
|