title: Relocation of PCIe Expasion ROM
body: <p>As per PCIe FW spec 3.1 says </p>
  
  <blockquote>
    <p>Prior to returning control to the BIOS, the Expansion ROM code moves the run-time code</p>
  </blockquote>
  
  <p>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</p>
  
  <blockquote>
    <p>The system firmware must write-protect the region where the PCI Expansion ROM run-time code
    resides in the new range.</p>
  </blockquote>
  
  <p>So are there some steps needed or something to be taken care of, while copying the expansion ROM to runtime location ?</p>
  
  <p>Regards,</p>
  
  <p>Arka</p>