[coreboot] SerialICE 1.0 - QEMU stops responding
Daniel Liu
daliu87 at gmail.com
Thu Aug 6 01:03:15 CEST 2009
Hi Stefan,
I think I found the issue. In the function serialice.c:76
serialice_write(), if writing a character fails, the program will be
stuck in the readback while loop:
write(fd, buffer + i, 1);
while (read(fd, &c, 1) != 1) ;
I changed the write to keep trying until the write succeeds, which
fixed the issue for now.
static int serialice_write(int fd, const void *buf, size_t nbyte)
{
char *buffer = (char *) buf;
char c;
int i;
for (i = 0; i < (int)nbyte; i++) {
while (write(fd, buffer + i, 1) != 1) ;
while (read(fd, &c, 1) != 1) ;
if (c != buffer[i]) {
printf("Readback error! %x/%x\n", c, buffer[i]);
}
}
return nbyte;
}
-Daniel Liu
More information about the coreboot
mailing list