[coreboot-gerrit] Change in coreboot[master]: amd/sb/sb700: Allocate wide LPC I/O devices where possible

Timothy Pearson (Code Review) gerrit at coreboot.org
Sun Aug 27 06:10:54 CEST 2017


Timothy Pearson has uploaded this change for review. ( https://review.coreboot.org/21217


Change subject: amd/sb/sb700: Allocate wide LPC I/O devices where possible
......................................................................

amd/sb/sb700: Allocate wide LPC I/O devices where possible

When more than 2 wide I/O LPC devices were requested, none of
the devices were actually allocated.  Furthermore, even though
more than three wide I/O devices are not permitted, it is better
to allocate the first three than to allocate none.

Always allocate the first three wide I/O devices from the wide
I/O request list.

Change-Id: I004bd0be31c91b76ae2a5e72690b44dca2fd9297
Signed-off-by: Timothy Pearson <tpearson at raptorengineering.com>
---
M src/southbridge/amd/sb700/lpc.c
1 file changed, 5 insertions(+), 2 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/21217/1

diff --git a/src/southbridge/amd/sb700/lpc.c b/src/southbridge/amd/sb700/lpc.c
index 8ee0395..98d6256 100644
--- a/src/southbridge/amd/sb700/lpc.c
+++ b/src/southbridge/amd/sb700/lpc.c
@@ -217,8 +217,11 @@
 						reg_x |= (1 << 23);
 						break;
 					default:
-						if (var_num >= 3)
+						if (var_num >= 3) {
+							printk(BIOS_WARNING, "%s: Ignoring resource %s [base=0x%08x, end=0x%08x] due to"
+										"I/O window exhaustion\n", __func__, dev_path(child), base, end);
 							continue;	/* only 3 var ; compact them ? */
+						}
 						switch (var_num) {
 						case 0:
 							reg_x |= (1 << 2);
@@ -232,7 +235,6 @@
 							break;
 						case 2:
 							reg_x |= (1 << 25);
-							reg_x |= (1 << 24);
 							if ((end - base) < 16)
 								wiosize |= (1 << 3);
 							break;
@@ -248,6 +250,7 @@
 	pci_write_config32(dev, 0x48, reg_x);
 	/* Set WideIO for as many IOs found (fall through is on purpose) */
 	switch (var_num) {
+	default:
 	case 2:
 		pci_write_config16(dev, 0x90, reg_var[2]);
 	case 1:

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I004bd0be31c91b76ae2a5e72690b44dca2fd9297
Gerrit-Change-Number: 21217
Gerrit-PatchSet: 1
Gerrit-Owner: Timothy Pearson <tpearson at raptorengineering.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170827/e7883f58/attachment.html>


More information about the coreboot-gerrit mailing list