mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
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> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@789 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
committed by
Blue Swirl
parent
75d49e26b4
commit
33eabc0730
@@ -603,7 +603,8 @@ static void pci_set_assigned_addresses(phandle_t phandle,
|
||||
|
||||
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 @@ static void pci_set_reg(phandle_t phandle,
|
||||
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],
|
||||
|
||||
Reference in New Issue
Block a user