If you want to access the BIOS from userspace, do this to map 64
kbytes of memory starting at address 0xf00000 into user space:
#include <unistd.h>
#include <sys/mman.h>
unsigned char *virt;
fd = open("/dev/mem", O_RDWR);
virt = mmap(NULL, 64*1024, PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_SHARED, fd, 0xf0000);
if (virt == MAP_FAILED)
panic("mmap failed");
printf("memory address f000:0x1234 contains 0x%x\n", virt[0x1234]);
/Christer
-- If it's tourist season, why can't we shoot them?- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/