As per PCIe FW spec 3.1 says
Prior to returning control to the BIOS, the Expansion ROM code moves the run-time code
What I am currently doing is copying the expansion ROM binary from the temporary location to runtime location(both of which supplied by BIOS in CS and BX respectively) byte by byte, and I am disabling the interrupts during this copy and enabling after done, I am also updating the byte checksum so that BIOS treats it as valid image, what is happening is after processing some initial BIOS calls, at a certain point system is restarting, so I was doubting an binary corruption but as per PCIe FW spec 3.1
The system firmware must write-protect the region where the PCI Expansion ROM run-time code resides in the new range.
So are there some steps needed or something to be taken care of, while copying the expansion ROM to runtime location ?
Regards,
Arka