pci: definition of pci_addr_t and pci_size_t
PATCH v2 1/1 pci: definition of pci_addr_t and pci_size_t
Currently the size of pci_addr_t and pci_size_t depends on CONFIG_SYS_PCI_64BIT. For qemu_arm64_defconfig with 4 GiB RAM this leads to an error
pci_hose_phys_to_bus: invalid physical address
which is due to the truncation of the bus address in _dm_pci_phys_to_bus.
Defining CONFIG_SYS_PCI_64BIT is not a solution as this results in an error
PCI: Failed autoconfig bar 10
So let's use unsigned long for pci_addr_t and pci_size_t if CONFIG_SYS_PCI_64BIT is not defined.
Considering that 32bit U-Boot is used to launch some 64bit x86 systems we cannot do without CONFIG_SYS_PCI_64BIT requiring u64 as type.
---
v2
Do not change CONFIG_SYS_PCI_64BIT=y case.
--- include/pci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/pci.h +2 -2
@@ -488,8 +488,8 @@typedef u64 pci_addr_t ;typedef u64 pci_size_t ;#else -typedef u32 pci_addr_t ; -typedef u32 pci_size_t ; +typedef unsigned long pci_addr_t ; +typedef unsigned long pci_size_t ;#endif struct pci_region {
--
2.24.1
PATCH v2 1/1 pci: definition of pci_addr_t and pci_size_t
Quoted 19 lines · Heinrich Schuchardt
Currently the size of
pci_addr_tandpci_size_tdepends onCONFIG_SYS_PCI_64BIT. Forqemu_arm64_defconfigwith 4 GiB RAM this leads to an error
pci_hose_phys_to_bus: invalid physical addresswhich is due to the truncation of the bus address in
_dm_pci_phys_to_bus.Defining
CONFIG_SYS_PCI_64BITis not a solution as this results in an errorPCI: Failed autoconfig bar 10
So let's use unsigned long for
pci_addr_tandpci_size_tifCONFIG_SYS_PCI_64BITis not defined.Considering that 32bit U-Boot is used to launch some 64bit x86 systems we cannot do without
CONFIG_SYS_PCI_64BITrequiring u64 as type.
Quoted 7 lines
Signed-off-by Heinrich Schuchardt <[email protected]>---
v2
Do not changeCONFIG_SYS_PCI_64BIT=ycase.--- include/pci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
PATCH v2 1/1 pci: definition of pci_addr_t and pci_size_t
In reply to Heinrich SchuchardtQuoted 12 lines · Heinrich Schuchardt
Currently the size of
pci_addr_tandpci_size_tdepends onCONFIG_SYS_PCI_64BIT. Forqemu_arm64_defconfigwith 4 GiB RAM this leads to an error
pci_hose_phys_to_bus: invalid physical addresswhich is due to the truncation of the bus address in
_dm_pci_phys_to_bus.Defining
CONFIG_SYS_PCI_64BITis not a solution as this results in an errorPCI: Failed autoconfig bar 10
Quoted 8 lines
So let's use unsigned long for
pci_addr_tandpci_size_tifCONFIG_SYS_PCI_64BITis not defined.Considering that 32bit U-Boot is used to launch some 64bit x86 systems we cannot do without
CONFIG_SYS_PCI_64BITrequiring u64 as type.Signed-off-by Heinrich Schuchardt <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200213/847d9066/attachment.sig>