[coreboot-gerrit] Change in coreboot[master]: soc/amd/common/block/pci: Fix validation of pointer

Richard Spiegel (Code Review) gerrit at coreboot.org
Mon Dec 18 17:53:01 CET 2017


Richard Spiegel has uploaded this change for review. ( https://review.coreboot.org/22934


Change subject: soc/amd/common/block/pci: Fix validation of pointer
......................................................................

soc/amd/common/block/pci: Fix validation of pointer

Procedure write_pci_int_table() does not validates intr_data_ptr. It must
be validated together with picr_data_ptr and idx_name.

BUG=b:69868534
TEST=Build fake kahlee with intr_data_ptr not initialized, boot and see
error message. Than build correct kahlee and verify that error message
is gone.

Change-Id: I5ee9a362600dbd6325254d7431172501181b52b0
Signed-off-by: Richard Spiegel <richard.spiegel at silverbackltd.com>
---
M src/soc/amd/common/block/pci/amd_pci_util.c
1 file changed, 4 insertions(+), 3 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/22934/1

diff --git a/src/soc/amd/common/block/pci/amd_pci_util.c b/src/soc/amd/common/block/pci/amd_pci_util.c
index c5659cb..74bb533 100644
--- a/src/soc/amd/common/block/pci/amd_pci_util.c
+++ b/src/soc/amd/common/block/pci/amd_pci_util.c
@@ -59,11 +59,12 @@
 	const struct irq_idx_name *idx_name;
 
 	idx_name = sb_get_apic_reg_association(&limit);
-	if (picr_data_ptr == NULL || idx_name == NULL) {
+	if (picr_data_ptr == NULL || intr_data_ptr == NULL ||
+	    idx_name == NULL) {
 		printk(BIOS_ERR, "Warning: Can't write PCI_INTR 0xC00/0xC01"
 				" registers because\n"
-				"'mainboard_picr_data' or"
-				" irq_association' tables are NULL\n");
+				"'mainboard_picr_data' or 'mainboard_intr_data'"
+				" or 'irq_association'\ntables are NULL\n");
 		return;
 	}
 

-- 
To view, visit https://review.coreboot.org/22934
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ee9a362600dbd6325254d7431172501181b52b0
Gerrit-Change-Number: 22934
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Spiegel <richard.spiegel at silverbackltd.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171218/2294a5fe/attachment.html>


More information about the coreboot-gerrit mailing list