[coreboot-gerrit] New patch to review for coreboot: 4a18d8b kontron/ktqm77: Allow disabling onboard NICs
Patrick Georgi (patrick@georgi-clan.de)
gerrit at coreboot.org
Thu Aug 15 14:58:54 CEST 2013
Patrick Georgi (patrick at georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3870
-gerrit
commit 4a18d8b3cc971cc994af69e684438cab94807a11
Author: Patrick Georgi <patrick.georgi at secunet.com>
Date: Thu Aug 15 14:57:09 2013 +0200
kontron/ktqm77: Allow disabling onboard NICs
Two new nvram variables control disabling the two non-ME NICs
on the mainboard. This is implemented by disabling their PCIe bridge.
Change-Id: I086f0d79de3ad0b53fa0ec40648d63378070e3bd
Signed-off-by: Patrick Georgi <patrick.georgi at secunet.com>
---
src/mainboard/kontron/ktqm77/cmos.layout | 4 +++-
src/mainboard/kontron/ktqm77/mainboard.c | 17 +++++++++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/src/mainboard/kontron/ktqm77/cmos.layout b/src/mainboard/kontron/ktqm77/cmos.layout
index 15d8e45..47cd60f 100644
--- a/src/mainboard/kontron/ktqm77/cmos.layout
+++ b/src/mainboard/kontron/ktqm77/cmos.layout
@@ -99,7 +99,9 @@ entries
512 328 s 0 boot_devices
840 8 h 0 boot_default
848 1 e 9 cmos_defaults_loaded
-#849 7 r 0 unused
+849 1 e 2 ethernet1
+850 1 e 2 ethernet2
+#851 5 r 0 unused
# coreboot config options: mainboard specific options
856 2 e 8 fan1_mode
diff --git a/src/mainboard/kontron/ktqm77/mainboard.c b/src/mainboard/kontron/ktqm77/mainboard.c
index 454976c..3829d72 100644
--- a/src/mainboard/kontron/ktqm77/mainboard.c
+++ b/src/mainboard/kontron/ktqm77/mainboard.c
@@ -161,6 +161,23 @@ static void mainboard_enable(device_t dev)
mainboard_interrupt_handlers(0x15, &int15_handler);
#endif
verb_setup();
+
+ unsigned disable = 0;
+ if ((get_option(&disable, "ethernet1") == 0) && disable) {
+ device_t nic = dev_find_slot(0, PCI_DEVFN(0x1c, 2));
+ if (nic) {
+ printk(BIOS_DEBUG, "DISABLE FIRST NIC!\n");
+ nic->enabled = 0;
+ }
+ }
+ disable = 0;
+ if ((get_option(&disable, "ethernet2") == 0) && disable) {
+ device_t nic = dev_find_slot(0, PCI_DEVFN(0x1c, 3));
+ if (nic) {
+ printk(BIOS_DEBUG, "DISABLE SECOND NIC!\n");
+ nic->enabled = 0;
+ }
+ }
}
struct chip_operations mainboard_ops = {
More information about the coreboot-gerrit
mailing list