5

I have an Intel based host system with a PCIe daughter card that my company has designed. We are able to have it be enumerated to allow memory to be shared with the intel processor. I am looking to make the daughter card memory space, accessible over PCIe, to be recognized as bootable by the BIOS/UEFI.

I could go the path of implementing one of the many HCI standards but that seems like it would be slow as this daughter card is driven by a processor and the HCI would have to be implemented in software. A more specific question would be, is there a known bootable memory format that the BIOS/UEFI can recognize after the daughter card is enumerated? Googling has not yielded much success for me and these standards, and how the bios or UEFI conform to said standards during boot appear to be tribal knowledge and hard to discover.

Other details:

  • I want to boot either Linux or Vxworks on the host CPU.
  • Both images reside in nonvolatile memory on the daughter card.
  • The daughter card processor is responsible for presenting the image in shared memory over PCIe to the host CPU.
  • You could almost consider the daughter card as a NVMe or SATA SSD expansion card as far as the host CPU would be aware but the daughter card is responsible for more functionality than just booting the host CPU which is why those types of devices do not work for my application.
penguin4hire
  • 288
  • 1
  • 2
  • 14
  • Do you mean you want the host CPU to run instructions from that memory space? If the card has its own CPU that's bootable, can't you just have it boot itself on power-on? (Sorry if this is nonsense, I don't develop cards or write PCIe drivers. I assume "bootable" has some specific technical meaning in this context that I'm not aware of.) – Peter Cordes Sep 25 '19 at 00:10
  • @peter I actually want to boot Linux on the host CPU but the Linux image is stored in memory on the daughter card. I will update my notes to clarify. – penguin4hire Sep 25 '19 at 00:43
  • Perhaps you could expose some kind of simple storage device containing a stub bootloader that jumps to the PCIe memory you want to execute. Then it will show up in the BIOS's boot menu list of devices, allowing users of your card to config their BIOS to boot from it or not. e.g. maybe a USB controller with USB mass storage attached? Or a floppy controller? Or maybe put the stub bootloader in a standard boot ROM that jumps to the right address in your PCIe read/writeable memory? – Peter Cordes Sep 25 '19 at 01:16

1 Answers1

3

A clean way of doing this would be to have your device expose a PCI Option ROM (Section 14.4.2 in UEFI 2.8). You could fairly easily implement a basic SIMPLE_FILESYSTEM_PROTOCOL exposing the images as files in a filesystem. There is no need to emulate an HCI.

unixsmurf
  • 5,852
  • 1
  • 33
  • 40