j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: blueswirl Date: Thu May 27 22:12:23 2010 New Revision: 789 URL: http://tracker.coreboot.org/trac/openbios/changeset/789
Log: pci: allow BARs with zero assigned address
- consider only PCI BARs with non-zero region size when pupulating "reg" and "assigned-addresses" properties
Signed-off-by: Igor V. Kovalenko igor.v.kovalenko@gmail.com Signed-off-by: Blue Swirl blauwirbel@gmail.com
Modified: trunk/openbios-devel/drivers/pci.c
Modified: trunk/openbios-devel/drivers/pci.c ============================================================================== --- trunk/openbios-devel/drivers/pci.c Thu May 27 22:12:19 2010 (r788) +++ trunk/openbios-devel/drivers/pci.c Thu May 27 22:12:23 2010 (r789) @@ -603,7 +603,8 @@
ncells = 0; for (i = 0; i < num_bars; i++) { - if (!config->assigned[i] || !config->sizes[i]) + /* consider only bars with non-zero region size */ + if (!config->sizes[i]) continue; pci_decode_pci_addr(config->assigned[i], &flags, &space_code, &mask); @@ -662,7 +663,8 @@ ncells += pci_encode_size(props + ncells, 0);
for (i = 0; i < num_bars; i++) { - if (!config->assigned[i] || !config->sizes[i]) + /* consider only bars with non-zero region size */ + if (!config->sizes[i]) continue;
pci_decode_pci_addr(config->regions[i],