This is off-topic but I'm hoping someone here will know the answer. In the linux kernel I need to make a module that will map the BOOTROM of an RTL8139 based network card into PCI memory somewhere. I need to write the pci config longword at offset 0x30 with the bus address. I can arbitrarily pick one such as 0xd2000000 and the bootrom appears as expected, but I don't want to step on anything else that might be using that memory area. How can I allocate a block of memory in pci address space to know where to safely map in the bootrom? Also I'll want to free the allocation on module exit.
Apologies/thanks as the case may be. -Dave