Yinghai sent this to the list two years ago.
It is really useful for debugging MCP55.
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
#include <unistd.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/io.h>
int main(int argc, char *argv[])
{
unsigned int io_addr, io_val;
int result, i;
if (argc!=2) {
printf ("usage : %s <io_addr>\n", argv[0]);
return -1;
}
io_addr = strtol (argv[1], 0, 0);
result = iopl(3);
if (result!=0) {
perror ("iopl:");
return (-1);
}
for (i=0; i<0x100; i++) {
io_val = inb(io_addr);
printf(" %.8x : %.8x\n", io_addr, io_val);
io_addr++;
}
return 0;
}
--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot