[coreboot-gerrit] Change in coreboot[master]: [test only, do not merge] add some printks in src/device

Iru Cai (Code Review) gerrit at coreboot.org
Thu Jun 15 18:09:31 CEST 2017


Iru Cai has uploaded this change for review. ( https://review.coreboot.org/20226


Change subject: [test only, do not merge] add some printks in src/device
......................................................................

[test only, do not merge] add some printks in src/device

Change-Id: I1bfc49cc3205a2d3ed3141120fc30a28f85dcc29
---
M src/device/device.c
M src/device/device_util.c
M src/device/pci_device.c
3 files changed, 43 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/20226/1

diff --git a/src/device/device.c b/src/device/device.c
index 0231ec7..7695bf1 100644
--- a/src/device/device.c
+++ b/src/device/device.c
@@ -233,9 +233,19 @@
 				       dev_path(curdev));
 			continue;
 		}
+
+		printk(BIOS_SPEW, "going to post_log_path\n");
+
 		post_log_path(curdev);
+
+		printk(BIOS_SPEW, "post_log_path returned\n");
+
+		printk(BIOS_SPEW, "curdev->ops->read_resources\n");
+
 		curdev->ops->read_resources(curdev);
 
+		printk(BIOS_SPEW, "curdev->ops->read_resources returned\n");
+
 		/* Read in the resources behind the current device's links. */
 		for (link = curdev->link_list; link; link = link->next)
 			read_resources(link);
diff --git a/src/device/device_util.c b/src/device/device_util.c
index 859de31..1005db4 100644
--- a/src/device/device_util.c
+++ b/src/device/device_util.c
@@ -443,6 +443,9 @@
 static void free_resource(device_t dev, struct resource *res,
 			  struct resource *prev)
 {
+
+	printk(BIOS_SPEW, "free_resource\n");
+
 	if (prev)
 		prev->next = res->next;
 	else
@@ -463,6 +466,10 @@
 {
 	struct resource *res, *next, *prev = NULL;
 
+	printk(BIOS_SPEW, "compact_resources\n");
+
+	printk(BIOS_SPEW, "dev = %p, dev->resource_list = %p\n", dev, dev->resource_list);
+
 	/* Move all of the free resources to the end */
 	for (res = dev->resource_list; res; res = next) {
 		next = res->next;
@@ -471,6 +478,8 @@
 		else
 			prev = res;
 	}
+
+	printk(BIOS_SPEW, "compact_resources returns.\n");
 }
 
 /**
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index e423151..26c7763 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -180,6 +180,8 @@
 	unsigned long value, attr;
 	resource_t moving, limit;
 
+	printk(BIOS_SPEW, "enter pci_get_resource\n");
+
 	/* Initialize the resources to nothing. */
 	resource = new_resource(dev, index);
 
@@ -354,6 +356,8 @@
 	}
 
 	compact_resources(dev);
+
+	printk(BIOS_SPEW, "pci_read_bases returns.\n");
 }
 
 static void pci_record_bridge_resource(struct device *dev, resource_t moving,
@@ -433,19 +437,39 @@
 
 void pci_dev_read_resources(struct device *dev)
 {
+	printk(BIOS_SPEW, "enter pci_dev_read_resources\n");
+
+	printk(BIOS_SPEW, "going to pci_read_bases\n");
+
 	pci_read_bases(dev, 6);
+
+	printk(BIOS_SPEW, "going to pci_get_rom_resources\n");
+
 	pci_get_rom_resource(dev, PCI_ROM_ADDRESS);
 }
 
 void pci_bus_read_resources(struct device *dev)
 {
+	printk(BIOS_SPEW, "enter pci_bus_read_resources\n");
+
+	printk(BIOS_SPEW, "going to pci_bridge_read_bases\n");
+
 	pci_bridge_read_bases(dev);
+
+	printk(BIOS_SPEW, "going to pci_read_bases\n");
+
 	pci_read_bases(dev, 2);
+
+	printk(BIOS_SPEW, "going to pci_get_rom_resource\n");
+
 	pci_get_rom_resource(dev, PCI_ROM_ADDRESS1);
+	printk(BIOS_SPEW, "return from pci_bus_read_resources\n");
 }
 
 void pci_domain_read_resources(struct device *dev)
 {
+	printk(BIOS_SPEW, "pci_domain_read_resources\n");
+
 	struct resource *res;
 
 	/* Initialize the system-wide I/O space constraints. */

-- 
To view, visit https://review.coreboot.org/20226
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1bfc49cc3205a2d3ed3141120fc30a28f85dcc29
Gerrit-Change-Number: 20226
Gerrit-PatchSet: 1
Gerrit-Owner: Iru Cai <mytbk920423 at gmail.com>



More information about the coreboot-gerrit mailing list