Showing changes from revision #3 to #4:
Added | Removed | Changed
int HAL_PCIAddresses(pcimem *buffer, int bufsize)
Entry | |
---|---|
buffer | Buffer pointer |
bufsize | Size of buffer |
Exit | |
---|---|
- | Returns number of bytes written to buffer |
This is an internal call for use by the PCI module and should not be used by user software. User software should use the PCI SWIs instead of talking to the HAL directly.
This call reads information about the PCI address space.
struct pcimem { int32_t int64_t mem_to_phys_offset; // Number to add to PCI memory address to get ARM physical address int32_t mem_lowest; // Lowest PCI memory address available for allocation int32_t mem_highest; // Highest (inclusive) PCI memory address available for allocation int32_t int64_t io_to_phys_offset; // Number to add to PCI I/O address to get ARM physical address int32_t io_lowest; // Lowest PCI memory address available for allocation int32_t io_highest; // Highest (inclusive) PCI memory address available for allocation int32_t int64_t ram_to_pci_mem_offst; // Value to add to physical RAM address to get PCI memory address }
As shown the pcimem structure totals 40 bytes. An earlier layout of 28 bytes, where the 64b address offsets used 32b values, was formerly used. New designs should use 64b values in preference.