#include #include #include #include #include #define PAGE_SIZE (4 * 1024) #define KERNEL_PHY_ADDR 0x77128000 int main() { char *buf; int fd; fd = open(“/dev/mem”,O_RDWR); if (fd == -1) perror(“open”); buf = mmap(0, PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, KERNEL_PHY_ADDR); if (buf == MAP_FAILED) perror(“mmap”); puts(buf); munmap(buf,PAGE_SIZE); close(fd); return 0; }