Hi @BrianM
Glad you got your NVME SSD working from Linux in this thread and have made progress on porting it to u-boot. This is very interesting as we had hoped to access our PCI-E NVME disk from u-boot also, however due to the lack of Arria 10 PCI-E support in u-boot we abandoned that idea and instead went for a Linux bootstrap approach.
We did revisit this recently through an Intel support case as our options were either PCI-E/NVME support in u-boot or a bootstrap Linux with the ability to kexec to a full Linux from the SSD. Unfortunately neither option is supported and would require additional development or porting. The main concern we had with pushing PCI-E (and therefore NVME and Linux file system) support into u-boot was how much larger it made the image. We have a much tighter requirement on flash size than you do (2MB IIRC from the other thread) and so can’t afford too much u-boot bloat. We would also need to do some additional driver development in u-boot to access some custom FPGA fabric cores as part of the boot process.
Out of interest how much larger is u-boot now you have PCI-E, NVME and a file system driver built into it? If the Cyclone V PCI-E root port is the same as the Arria 10 one then I would be most interested in the port you did as it may solve the issue we have, assuming u-boot is not too big.
Not entirely sure why your NVME driver is not able to access the disk at its BAR0. I assume your H2F bridge is at 0xd0000000 hence the 0xd010001c address with 0x00100000 as the BAR? You said you were able to access other regions within the H2F so that suggests its not a bridge issue. I know for the Arria 10 that the bridge command only enables or disables bridges which are already marked with the init-val = <1>; in the u-boot device tree, so its more of an enable mask rather than an absolute enable. Not sure if that’s the same for the Cyclone V.
Does the PCI-E root port need to set up anything as a result of reading back the BAR size, if it does and that was wrong I suppose that might cause the read failure. THe fact it works from Linux perhaps suggests that there is a missing step in the set up when in the u-boot environment which is not the case for the Linux environment.