Somebody asked me about the flash_on utility for the cua motherboard. You can
try the following code.
Ronnie
===============================================================================
#include <errno.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/io.h>
main()
{
char b;
/* get io privilege access PCI configuration space */
if (iopl(3) != 0) {
perror("Can not set io priviliage");
exit(1);
}
/* BIOS region r/w reg 0x84~0x87 */
outl(0x80000084, 0xcf8);
outl(0x3ffffff8, 0x0cfc);
/* Enable 0xFFF8000~0xFFFF0000 decoding reg 0x7f */
outl(0x8000387c, 0x0cf8);
b = inb(0x0cff) | 0x01;
outb(b, 0xcff);
/* Flash write enable reg 0x47 */
outl(0x80003844, 0x0cf8);
outb(0x7f, 0xcff);
}