Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30772
Change subject: [WIP] device/pci_device: Do not break tree topology
......................................................................
[WIP] device/pci_device: Do not break tree topology
Function pci_scan_bus() breaks bus->children link
in the devicetree topology while scanning a bus.
While the scan is in progress, accessing PCI
devices with number higher than what is being probed
was not possible.
Change-Id: I7bb497f7390628dd2f0310b380f199783a888c4c
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
M src/device/pci_device.c
1 file changed, 23 insertions(+), 27 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/30772/1
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index e35c22c..5aedeb6 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -998,24 +998,23 @@
* @return Pointer to the device structure found or NULL if we have not
* allocated a device for this devfn yet.
*/
-static struct device *pci_scan_get_dev(struct device **list, unsigned int devfn)
+static struct device *pci_scan_get_dev(struct bus *bus, unsigned int devfn)
{
- struct device *dev;
+ struct device *dev, **prev;
- dev = 0;
- for (; *list; list = &(*list)->sibling) {
- if ((*list)->path.type != DEVICE_PATH_PCI) {
- printk(BIOS_ERR, "child %s not a PCI device\n",
- dev_path(*list));
- continue;
- }
- if ((*list)->path.pci.devfn == devfn) {
+ prev = &bus->children;
+ for (dev = bus->children; dev; dev = dev->sibling) {
+ if ((dev->path.type == DEVICE_PATH_PCI) &&
+ (dev->path.pci.devfn == devfn)) {
/* Unlink from the list. */
- dev = *list;
- *list = (*list)->sibling;
+ *prev = dev->sibling;
dev->sibling = NULL;
break;
+ } else {
+ printk(BIOS_ERR, "child %s not a PCI device\n",
+ dev_path(dev));
}
+ prev = &dev->sibling;
}
/*
@@ -1027,15 +1026,15 @@
if (dev) {
struct device *child;
- /* Find the last child of our parent. */
- for (child = dev->bus->children; child && child->sibling;)
+ /* Find the last child on the bus. */
+ for (child = bus->children; child && child->sibling;)
child = child->sibling;
- /* Place the device on the list of children of its parent. */
+ /* Place the device as last on the bus. */
if (child)
child->sibling = dev;
else
- dev->bus->children = dev;
+ bus->children = dev;
}
return dev;
@@ -1180,7 +1179,7 @@
unsigned max_devfn)
{
unsigned int devfn;
- struct device *old_devices;
+ struct device *left;
printk(BIOS_DEBUG, "PCI: pci_scan_bus for bus %02x\n", bus->secondary);
@@ -1193,9 +1192,6 @@
max_devfn=0xff;
}
- old_devices = bus->children;
- bus->children = NULL;
-
post_code(0x24);
/*
@@ -1206,7 +1202,7 @@
struct device *dev;
/* First thing setup the device structure. */
- dev = pci_scan_get_dev(&old_devices, devfn);
+ dev = pci_scan_get_dev(bus, devfn);
/* See if a device is present and setup the device structure. */
dev = pci_probe_dev(dev, bus, devfn);
@@ -1228,13 +1224,13 @@
* Warn if any leftover static devices are are found.
* There's probably a problem in devicetree.cb.
*/
- if (old_devices) {
- struct device *left;
- printk(BIOS_WARNING, "PCI: Left over static devices:\n");
- for (left = old_devices; left; left = left->sibling)
- printk(BIOS_WARNING, "%s\n", dev_path(left));
- printk(BIOS_WARNING, "PCI: Check your devicetree.cb.\n");
+ printk(BIOS_WARNING, "PCI: Left over static devices:\n");
+ for (left = bus->children; left; left = left->sibling) {
+ if (left->vendor == 0x0) {
+ printk(BIOS_WARNING, "%s\n", dev_path(left));
+ printk(BIOS_WARNING, "PCI: Check your devicetree.cb.\n");
+ }
}
/*
--
To view, visit https://review.coreboot.org/c/coreboot/+/30772
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I7bb497f7390628dd2f0310b380f199783a888c4c
Gerrit-Change-Number: 30772
Gerrit-PatchSet: 1
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-MessageType: newchange
DevMaster64 has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30768
Change subject: mb/asus/h61m-cs: Add missing licenses
......................................................................
mb/asus/h61m-cs: Add missing licenses
Change-Id: I9e3207b4ba1df424bb8f9c810a21f92de94a687e
---
M src/mainboard/asus/h61m-cs/acpi/platform.asl
M src/mainboard/asus/h61m-cs/dsdt.asl
2 files changed, 32 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/30768/1
diff --git a/src/mainboard/asus/h61m-cs/acpi/platform.asl b/src/mainboard/asus/h61m-cs/acpi/platform.asl
index 0222986..f701deb 100644
--- a/src/mainboard/asus/h61m-cs/acpi/platform.asl
+++ b/src/mainboard/asus/h61m-cs/acpi/platform.asl
@@ -1,3 +1,19 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 DevMaster64 <realdevmaster64(a)gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
Method(_WAK,1)
{
Return(Package(){0,0})
diff --git a/src/mainboard/asus/h61m-cs/dsdt.asl b/src/mainboard/asus/h61m-cs/dsdt.asl
index 02a5e32..135f8a0 100644
--- a/src/mainboard/asus/h61m-cs/dsdt.asl
+++ b/src/mainboard/asus/h61m-cs/dsdt.asl
@@ -1,3 +1,19 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 DevMaster64 <realdevmaster64(a)gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
#define BRIGHTNESS_UP \_SB.PCI0.GFX0.INCB
#define BRIGHTNESS_DOWN \_SB.PCI0.GFX0.DECB
#define ACPI_VIDEO_DEVICE \_SB.PCI0.GFX0
--
To view, visit https://review.coreboot.org/c/coreboot/+/30768
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9e3207b4ba1df424bb8f9c810a21f92de94a687e
Gerrit-Change-Number: 30768
Gerrit-PatchSet: 1
Gerrit-Owner: DevMaster64 <realdevmaster64(a)gmail.com>
Gerrit-MessageType: newchange
Hello Mike Banon,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/30759
to review the following change.
Change subject: gizmosphere/gizmo2/Kconfig: select HUDSON_IMC_ENABLE
......................................................................
gizmosphere/gizmo2/Kconfig: select HUDSON_IMC_ENABLE
Gizmo 2 could use IMC for the onboard fan control.
Signed-off-by: Mike Banon <mikebdp2(a)gmail.com>
Change-Id: I448620ab4e0329c759b3f924b08c2dfe904d08e8
---
M src/mainboard/gizmosphere/gizmo2/Kconfig
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/30759/1
diff --git a/src/mainboard/gizmosphere/gizmo2/Kconfig b/src/mainboard/gizmosphere/gizmo2/Kconfig
index f5c9481..94158ba 100644
--- a/src/mainboard/gizmosphere/gizmo2/Kconfig
+++ b/src/mainboard/gizmosphere/gizmo2/Kconfig
@@ -28,6 +28,7 @@
select HAVE_ACPI_TABLES
select BOARD_ROMSIZE_KB_4096
select GFXUMA
+ select HUDSON_IMC_ENABLE
config MAINBOARD_DIR
string
--
To view, visit https://review.coreboot.org/c/coreboot/+/30759
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I448620ab4e0329c759b3f924b08c2dfe904d08e8
Gerrit-Change-Number: 30759
Gerrit-PatchSet: 1
Gerrit-Owner: mikeb mikeb <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-MessageType: newchange