The copy_from_user
and related functions get the address from some untrusted user space program; they protect against invalid addresses by installing a special exception handler.
(See this answer for details.)
You could do the same, but this would protect only against addresses that the kernel has marked as invalid in the page tables; accesses to some random device's MMIO range might have unpredictable results.
If you want to search for something in some BIOS ROM, remap that memory like any other PCI resource.
If you want to search for something in main memory, you could use some function like ioremap
or kmap
to get a valid virtual address for a specific physical address.