diff options
Diffstat (limited to 'tools')
55 files changed, 2140 insertions, 864 deletions
diff --git a/tools/blktap/drivers/tapdisk.c b/tools/blktap/drivers/tapdisk.c index 993e09b155..75f06c701c 100644 --- a/tools/blktap/drivers/tapdisk.c +++ b/tools/blktap/drivers/tapdisk.c @@ -641,7 +641,7 @@ static void get_io_request(struct td_state *s) if (!run) return; /*We have received signal to close*/ rp = info->fe_ring.sring->req_prod; - rmb(); + xen_rmb(); for (j = info->fe_ring.req_cons; j != rp; j++) { int done = 0, start_seg = 0; diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index 735a77b0e6..9573333c08 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -60,6 +60,8 @@ extern int log_reload; extern int log_guest; extern int log_hv; +extern int log_time_hv; +extern int log_time_guest; extern char *log_dir; static int log_hv_fd = -1; @@ -99,6 +101,50 @@ struct domain static struct domain *dom_head; +static int write_all(int fd, const char* buf, size_t len) +{ + while (len) { + ssize_t ret = write(fd, buf, len); + if (ret == -1 && errno == EINTR) + continue; + if (ret <= 0) + return -1; + len -= ret; + buf += ret; + } + + return 0; +} + +static int write_with_timestamp(int fd, const char *data, size_t sz) +{ + char buf[sz+1]; + char ts[32]; + time_t now = time(NULL); + const struct tm *tmnow = localtime(&now); + size_t tslen = strftime(ts, sizeof(ts), "[%d-%m-%Y %H:%M:%S] ", tmnow); + + memcpy(buf, data, sz); + while (sz > 0 && buf[sz-1] == '\r') + sz--; // Don't print trailing \r's + if (sz > 0 && buf[sz-1] != '\n') + buf[sz++] = '\n'; // Force ending newline + data = buf; + + while (sz > 0) { + const char *nl = strchr(data, '\n') + 1; + size_t towrite = nl - data; + if (write_all(fd, ts, tslen) < 0) + return -1; + if (write_all(fd, data, towrite)) + return -1; + sz -= towrite; + data = nl; + } + + return 0; +} + static void buffer_append(struct domain *dom) { struct buffer *buffer = &dom->buffer; @@ -107,7 +153,7 @@ static void buffer_append(struct domain *dom) cons = intf->out_cons; prod = intf->out_prod; - mb(); + xen_mb(); size = prod - cons; if ((size == 0) || (size > sizeof(intf->out))) @@ -126,7 +172,7 @@ static void buffer_append(struct domain *dom) buffer->data[buffer->size++] = intf->out[ MASK_XENCONS_IDX(cons++, intf->out)]; - mb(); + xen_mb(); intf->out_cons = cons; xc_evtchn_notify(dom->xce_handle, dom->local_port); @@ -135,10 +181,13 @@ static void buffer_append(struct domain *dom) * and handle_tty_write will stop being called. */ if (dom->log_fd != -1) { - int len = write(dom->log_fd, - buffer->data + buffer->size - size, - size); - if (len < 0) + int logret; + if (log_time_guest) { + logret = write_with_timestamp(dom->log_fd, buffer->data + buffer->size - size, size); + } else { + logret = write_all(dom->log_fd, buffer->data + buffer->size - size, size); + } + if (logret < 0) dolog(LOG_ERR, "Write to log failed on domain %d: %d (%s)\n", dom->domid, errno, strerror(errno)); } @@ -195,6 +244,15 @@ static int create_hv_log(void) if (fd == -1) dolog(LOG_ERR, "Failed to open log %s: %d (%s)", logfile, errno, strerror(errno)); + if (fd != -1 && log_time_hv) { + if (write_with_timestamp(fd, "Logfile Opened", + strlen("Logfile Opened")) < 0) { + dolog(LOG_ERR, "Failed to log opening timestamp " + "in %s: %d (%s)", logfile, errno, + strerror(errno)); + return -1; + } + } return fd; } @@ -229,6 +287,15 @@ static int create_domain_log(struct domain *dom) if (fd == -1) dolog(LOG_ERR, "Failed to open log %s: %d (%s)", logfile, errno, strerror(errno)); + if (fd != -1 && log_time_guest) { + if (write_with_timestamp(fd, "Logfile Opened", + strlen("Logfile Opened")) < 0) { + dolog(LOG_ERR, "Failed to log opening timestamp " + "in %s: %d (%s)", logfile, errno, + strerror(errno)); + return -1; + } + } return fd; } @@ -683,7 +750,7 @@ static int ring_free_bytes(struct domain *dom) cons = intf->in_cons; prod = intf->in_prod; - mb(); + xen_mb(); space = prod - cons; if (space > sizeof(intf->in)) @@ -730,7 +797,7 @@ static void handle_tty_read(struct domain *dom) intf->in[MASK_XENCONS_IDX(prod++, intf->in)] = msg[i]; } - wmb(); + xen_wmb(); intf->in_prod = prod; xc_evtchn_notify(dom->xce_handle, dom->local_port); } else { @@ -817,11 +884,16 @@ static void handle_hv_logs(void) if ((port = xc_evtchn_pending(xce_handle)) == -1) return; - if (xc_readconsolering(xc_handle, &bufptr, &size, 0, 1, &index) == 0) { - int len = write(log_hv_fd, buffer, size); - if (len < 0) - dolog(LOG_ERR, "Failed to write hypervisor log: %d (%s)", - errno, strerror(errno)); + if (xc_readconsolering(xc_handle, &bufptr, &size, 0, 1, &index) == 0 && size > 0) { + int logret; + if (log_time_guest) + logret = write_with_timestamp(log_hv_fd, buffer, size); + else + logret = write_all(log_hv_fd, buffer, size); + + if (logret < 0) + dolog(LOG_ERR, "Failed to write hypervisor log: " + "%d (%s)", errno, strerror(errno)); } (void)xc_evtchn_unmask(xce_handle, port); diff --git a/tools/console/daemon/main.c b/tools/console/daemon/main.c index ea0648f400..c66642ff46 100644 --- a/tools/console/daemon/main.c +++ b/tools/console/daemon/main.c @@ -35,6 +35,8 @@ int log_reload = 0; int log_guest = 0; int log_hv = 0; +int log_time_hv = 0; +int log_time_guest = 0; char *log_dir = NULL; static void handle_hup(int sig) @@ -44,7 +46,7 @@ static void handle_hup(int sig) static void usage(char *name) { - printf("Usage: %s [-h] [-V] [-v] [-i] [--log=none|guest|hv|all] [--log-dir=DIR] [--pid-file=PATH]\n", name); + printf("Usage: %s [-h] [-V] [-v] [-i] [--log=none|guest|hv|all] [--log-dir=DIR] [--pid-file=PATH] [-t, --timestamp=none|guest|hv|all]\n", name); } static void version(char *name) @@ -54,7 +56,7 @@ static void version(char *name) int main(int argc, char **argv) { - const char *sopts = "hVvi"; + const char *sopts = "hVvit:"; struct option lopts[] = { { "help", 0, 0, 'h' }, { "version", 0, 0, 'V' }, @@ -63,6 +65,7 @@ int main(int argc, char **argv) { "log", 1, 0, 'l' }, { "log-dir", 1, 0, 'r' }, { "pid-file", 1, 0, 'p' }, + { "timestamp", 1, 0, 't' }, { 0 }, }; bool is_interactive = false; @@ -103,6 +106,19 @@ int main(int argc, char **argv) case 'p': pidfile = strdup(optarg); break; + case 't': + if (!strcmp(optarg, "all")) { + log_time_hv = 1; + log_time_guest = 1; + } else if (!strcmp(optarg, "hv")) { + log_time_hv = 1; + } else if (!strcmp(optarg, "guest")) { + log_time_guest = 1; + } else if (!strcmp(optarg, "none")) { + log_time_guest = 0; + log_time_hv = 0; + } + break; case '?': fprintf(stderr, "Try `%s --help' for more information\n", diff --git a/tools/firmware/hvmloader/acpi/build.c b/tools/firmware/hvmloader/acpi/build.c index 247c3b5928..e33cc04795 100644 --- a/tools/firmware/hvmloader/acpi/build.c +++ b/tools/firmware/hvmloader/acpi/build.c @@ -62,11 +62,18 @@ static int uart_exists(uint16_t uart_base) return ((b == 0) && (c == 0xf)); } +static int hpet_exists(unsigned long hpet_base) +{ + uint32_t hpet_id = *(uint32_t *)hpet_base; + return ((hpet_id >> 16) == 0x8086); +} + static int construct_bios_info_table(uint8_t *buf) { struct bios_info { uint8_t com1_present:1; uint8_t com2_present:1; + uint8_t hpet_present:1; uint32_t pci_min, pci_len; } *bios_info = (struct bios_info *)buf; @@ -75,6 +82,8 @@ static int construct_bios_info_table(uint8_t *buf) bios_info->com1_present = uart_exists(0x3f8); bios_info->com2_present = uart_exists(0x2f8); + bios_info->hpet_present = hpet_exists(ACPI_HPET_ADDRESS); + bios_info->pci_min = 0xf0000000; bios_info->pci_len = 0x0c000000; @@ -272,9 +281,12 @@ static int construct_secondary_tables(uint8_t *buf, unsigned long *table_ptrs) } /* HPET. */ - hpet = (struct acpi_20_hpet *)&buf[offset]; - offset += construct_hpet(hpet); - table_ptrs[nr_tables++] = (unsigned long)hpet; + if ( hpet_exists(ACPI_HPET_ADDRESS) ) + { + hpet = (struct acpi_20_hpet *)&buf[offset]; + offset += construct_hpet(hpet); + table_ptrs[nr_tables++] = (unsigned long)hpet; + } /* Processor Object SSDT. */ table_ptrs[nr_tables++] = (unsigned long)&buf[offset]; diff --git a/tools/firmware/hvmloader/acpi/dsdt.asl b/tools/firmware/hvmloader/acpi/dsdt.asl index f5c2fefda5..fde51ac0ad 100644 --- a/tools/firmware/hvmloader/acpi/dsdt.asl +++ b/tools/firmware/hvmloader/acpi/dsdt.asl @@ -49,6 +49,7 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, "Xen", "HVM", 0) Field(BIOS, ByteAcc, NoLock, Preserve) { UAR1, 1, UAR2, 1, + HPET, 1, Offset(4), PMIN, 32, PLEN, 32 @@ -296,6 +297,13 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, "Xen", "HVM", 0) Device(HPET) { Name(_HID, EISAID("PNP0103")) Name(_UID, 0) + Method (_STA, 0, NotSerialized) { + If(LEqual(\_SB.HPET, 0)) { + Return(0x00) + } Else { + Return(0x0F) + } + } Name(_CRS, ResourceTemplate() { DWordMemory( ResourceConsumer, PosDecode, MinFixed, MaxFixed, diff --git a/tools/firmware/hvmloader/acpi/dsdt.c b/tools/firmware/hvmloader/acpi/dsdt.c index ab34c068bb..54088c6746 100644 --- a/tools/firmware/hvmloader/acpi/dsdt.c +++ b/tools/firmware/hvmloader/acpi/dsdt.c @@ -5,15 +5,15 @@ * Copyright (C) 2000 - 2006 Intel Corporation * Supports ACPI Specification Revision 3.0a * - * Compilation of "dsdt.asl" - Mon Jan 21 14:11:31 2008 + * Compilation of "dsdt.asl" - Mon Feb 11 13:31:53 2008 * * C source code output * */ unsigned char AmlCode[] = { - 0x44,0x53,0x44,0x54,0x6F,0x0E,0x00,0x00, /* 00000000 "DSDTo..." */ - 0x02,0xE1,0x58,0x65,0x6E,0x00,0x00,0x00, /* 00000008 "..Xen..." */ + 0x44,0x53,0x44,0x54,0x8E,0x0E,0x00,0x00, /* 00000000 "DSDT...." */ + 0x02,0x6E,0x58,0x65,0x6E,0x00,0x00,0x00, /* 00000008 ".nXen..." */ 0x48,0x56,0x4D,0x00,0x00,0x00,0x00,0x00, /* 00000010 "HVM....." */ 0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ 0x07,0x07,0x06,0x20,0x08,0x50,0x4D,0x42, /* 00000020 "... .PMB" */ @@ -27,452 +27,456 @@ unsigned char AmlCode[] = 0x04,0x0A,0x07,0x0A,0x07,0x00,0x00,0x08, /* 00000060 "........" */ 0x50,0x49,0x43,0x44,0x00,0x14,0x0C,0x5F, /* 00000068 "PICD..._" */ 0x50,0x49,0x43,0x01,0x70,0x68,0x50,0x49, /* 00000070 "PIC.phPI" */ - 0x43,0x44,0x10,0x44,0xDF,0x5F,0x53,0x42, /* 00000078 "CD.D._SB" */ + 0x43,0x44,0x10,0x43,0xE1,0x5F,0x53,0x42, /* 00000078 "CD.C._SB" */ 0x5F,0x5B,0x80,0x42,0x49,0x4F,0x53,0x00, /* 00000080 "_[.BIOS." */ 0x0C,0x00,0xA0,0x0E,0x00,0x0A,0x10,0x5B, /* 00000088 ".......[" */ - 0x81,0x1C,0x42,0x49,0x4F,0x53,0x01,0x55, /* 00000090 "..BIOS.U" */ + 0x81,0x21,0x42,0x49,0x4F,0x53,0x01,0x55, /* 00000090 ".!BIOS.U" */ 0x41,0x52,0x31,0x01,0x55,0x41,0x52,0x32, /* 00000098 "AR1.UAR2" */ - 0x01,0x00,0x1E,0x50,0x4D,0x49,0x4E,0x20, /* 000000A0 "...PMIN " */ - 0x50,0x4C,0x45,0x4E,0x20,0x5B,0x82,0x49, /* 000000A8 "PLEN [.I" */ - 0x04,0x4D,0x45,0x4D,0x30,0x08,0x5F,0x48, /* 000000B0 ".MEM0._H" */ - 0x49,0x44,0x0C,0x41,0xD0,0x0C,0x02,0x08, /* 000000B8 "ID.A...." */ - 0x5F,0x43,0x52,0x53,0x11,0x33,0x0A,0x30, /* 000000C0 "_CRS.3.0" */ - 0x8A,0x2B,0x00,0x00,0x0D,0x03,0x00,0x00, /* 000000C8 ".+......" */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000D0 "........" */ - 0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF, /* 000000D8 "........" */ - 0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E0 "........" */ + 0x01,0x48,0x50,0x45,0x54,0x01,0x00,0x1D, /* 000000A0 ".HPET..." */ + 0x50,0x4D,0x49,0x4E,0x20,0x50,0x4C,0x45, /* 000000A8 "PMIN PLE" */ + 0x4E,0x20,0x5B,0x82,0x49,0x04,0x4D,0x45, /* 000000B0 "N [.I.ME" */ + 0x4D,0x30,0x08,0x5F,0x48,0x49,0x44,0x0C, /* 000000B8 "M0._HID." */ + 0x41,0xD0,0x0C,0x02,0x08,0x5F,0x43,0x52, /* 000000C0 "A...._CR" */ + 0x53,0x11,0x33,0x0A,0x30,0x8A,0x2B,0x00, /* 000000C8 "S.3.0.+." */ + 0x00,0x0D,0x03,0x00,0x00,0x00,0x00,0x00, /* 000000D0 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000D8 "........" */ + 0x00,0x00,0x00,0xFF,0xFF,0x09,0x00,0x00, /* 000000E0 "........" */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E8 "........" */ - 0x0A,0x00,0x00,0x00,0x00,0x00,0x79,0x00, /* 000000F0 "......y." */ - 0x5B,0x82,0x45,0xD7,0x50,0x43,0x49,0x30, /* 000000F8 "[.E.PCI0" */ - 0x08,0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0, /* 00000100 "._HID.A." */ - 0x0A,0x03,0x08,0x5F,0x55,0x49,0x44,0x00, /* 00000108 "..._UID." */ - 0x08,0x5F,0x41,0x44,0x52,0x00,0x08,0x5F, /* 00000110 "._ADR.._" */ - 0x42,0x42,0x4E,0x00,0x14,0x4E,0x0C,0x5F, /* 00000118 "BBN..N._" */ - 0x43,0x52,0x53,0x00,0x08,0x50,0x52,0x54, /* 00000120 "CRS..PRT" */ - 0x30,0x11,0x42,0x07,0x0A,0x6E,0x88,0x0D, /* 00000128 "0.B..n.." */ - 0x00,0x02,0x0E,0x00,0x00,0x00,0x00,0x00, /* 00000130 "........" */ - 0xFF,0x00,0x00,0x00,0x00,0x01,0x47,0x01, /* 00000138 "......G." */ - 0xF8,0x0C,0xF8,0x0C,0x01,0x08,0x88,0x0D, /* 00000140 "........" */ - 0x00,0x01,0x0C,0x03,0x00,0x00,0x00,0x00, /* 00000148 "........" */ - 0xF7,0x0C,0x00,0x00,0xF8,0x0C,0x88,0x0D, /* 00000150 "........" */ - 0x00,0x01,0x0C,0x03,0x00,0x00,0x00,0x0D, /* 00000158 "........" */ - 0xFF,0xFF,0x00,0x00,0x00,0xF3,0x87,0x17, /* 00000160 "........" */ - 0x00,0x00,0x0C,0x03,0x00,0x00,0x00,0x00, /* 00000168 "........" */ - 0x00,0x00,0x0A,0x00,0xFF,0xFF,0x0B,0x00, /* 00000170 "........" */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00, /* 00000178 "........" */ - 0x87,0x17,0x00,0x00,0x0C,0x03,0x00,0x00, /* 00000180 "........" */ - 0x00,0x00,0x00,0x00,0x00,0xF0,0xFF,0xFF, /* 00000188 "........" */ - 0xFF,0xF4,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000190 "........" */ - 0x00,0x05,0x79,0x00,0x8A,0x50,0x52,0x54, /* 00000198 "..y..PRT" */ - 0x30,0x0A,0x5C,0x4D,0x4D,0x49,0x4E,0x8A, /* 000001A0 "0.\MMIN." */ - 0x50,0x52,0x54,0x30,0x0A,0x60,0x4D,0x4D, /* 000001A8 "PRT0.`MM" */ - 0x41,0x58,0x8A,0x50,0x52,0x54,0x30,0x0A, /* 000001B0 "AX.PRT0." */ - 0x68,0x4D,0x4C,0x45,0x4E,0x70,0x50,0x4D, /* 000001B8 "hMLENpPM" */ - 0x49,0x4E,0x4D,0x4D,0x49,0x4E,0x70,0x50, /* 000001C0 "INMMINpP" */ - 0x4C,0x45,0x4E,0x4D,0x4C,0x45,0x4E,0x72, /* 000001C8 "LENMLENr" */ - 0x4D,0x4D,0x49,0x4E,0x4D,0x4C,0x45,0x4E, /* 000001D0 "MMINMLEN" */ - 0x4D,0x4D,0x41,0x58,0x74,0x4D,0x4D,0x41, /* 000001D8 "MMAXtMMA" */ - 0x58,0x01,0x4D,0x4D,0x41,0x58,0xA4,0x50, /* 000001E0 "X.MMAX.P" */ - 0x52,0x54,0x30,0x08,0x42,0x55,0x46,0x41, /* 000001E8 "RT0.BUFA" */ - 0x11,0x09,0x0A,0x06,0x23,0x20,0x0C,0x18, /* 000001F0 "....# .." */ - 0x79,0x00,0x08,0x42,0x55,0x46,0x42,0x11, /* 000001F8 "y..BUFB." */ - 0x09,0x0A,0x06,0x23,0x00,0x00,0x18,0x79, /* 00000200 "...#...y" */ - 0x00,0x8B,0x42,0x55,0x46,0x42,0x01,0x49, /* 00000208 "..BUFB.I" */ - 0x52,0x51,0x56,0x5B,0x82,0x48,0x08,0x4C, /* 00000210 "RQV[.H.L" */ - 0x4E,0x4B,0x41,0x08,0x5F,0x48,0x49,0x44, /* 00000218 "NKA._HID" */ - 0x0C,0x41,0xD0,0x0C,0x0F,0x08,0x5F,0x55, /* 00000220 ".A...._U" */ - 0x49,0x44,0x01,0x14,0x1C,0x5F,0x53,0x54, /* 00000228 "ID..._ST" */ - 0x41,0x00,0x7B,0x50,0x49,0x52,0x41,0x0A, /* 00000230 "A.{PIRA." */ - 0x80,0x60,0xA0,0x08,0x93,0x60,0x0A,0x80, /* 00000238 ".`...`.." */ - 0xA4,0x0A,0x09,0xA1,0x04,0xA4,0x0A,0x0B, /* 00000240 "........" */ - 0x14,0x0B,0x5F,0x50,0x52,0x53,0x00,0xA4, /* 00000248 ".._PRS.." */ - 0x42,0x55,0x46,0x41,0x14,0x11,0x5F,0x44, /* 00000250 "BUFA.._D" */ - 0x49,0x53,0x00,0x7D,0x50,0x49,0x52,0x41, /* 00000258 "IS.}PIRA" */ - 0x0A,0x80,0x50,0x49,0x52,0x41,0x14,0x1A, /* 00000260 "..PIRA.." */ - 0x5F,0x43,0x52,0x53,0x00,0x7B,0x50,0x49, /* 00000268 "_CRS.{PI" */ - 0x52,0x41,0x0A,0x0F,0x60,0x79,0x01,0x60, /* 00000270 "RA..`y.`" */ - 0x49,0x52,0x51,0x56,0xA4,0x42,0x55,0x46, /* 00000278 "IRQV.BUF" */ - 0x42,0x14,0x1B,0x5F,0x53,0x52,0x53,0x01, /* 00000280 "B.._SRS." */ - 0x8B,0x68,0x01,0x49,0x52,0x51,0x31,0x82, /* 00000288 ".h.IRQ1." */ - 0x49,0x52,0x51,0x31,0x60,0x76,0x60,0x70, /* 00000290 "IRQ1`v`p" */ - 0x60,0x50,0x49,0x52,0x41,0x5B,0x82,0x49, /* 00000298 "`PIRA[.I" */ - 0x08,0x4C,0x4E,0x4B,0x42,0x08,0x5F,0x48, /* 000002A0 ".LNKB._H" */ - 0x49,0x44,0x0C,0x41,0xD0,0x0C,0x0F,0x08, /* 000002A8 "ID.A...." */ - 0x5F,0x55,0x49,0x44,0x0A,0x02,0x14,0x1C, /* 000002B0 "_UID...." */ - 0x5F,0x53,0x54,0x41,0x00,0x7B,0x50,0x49, /* 000002B8 "_STA.{PI" */ - 0x52,0x42,0x0A,0x80,0x60,0xA0,0x08,0x93, /* 000002C0 "RB..`..." */ - 0x60,0x0A,0x80,0xA4,0x0A,0x09,0xA1,0x04, /* 000002C8 "`......." */ - 0xA4,0x0A,0x0B,0x14,0x0B,0x5F,0x50,0x52, /* 000002D0 "....._PR" */ - 0x53,0x00,0xA4,0x42,0x55,0x46,0x41,0x14, /* 000002D8 "S..BUFA." */ - 0x11,0x5F,0x44,0x49,0x53,0x00,0x7D,0x50, /* 000002E0 "._DIS.}P" */ - 0x49,0x52,0x42,0x0A,0x80,0x50,0x49,0x52, /* 000002E8 "IRB..PIR" */ - 0x42,0x14,0x1A,0x5F,0x43,0x52,0x53,0x00, /* 000002F0 "B.._CRS." */ - 0x7B,0x50,0x49,0x52,0x42,0x0A,0x0F,0x60, /* 000002F8 "{PIRB..`" */ - 0x79,0x01,0x60,0x49,0x52,0x51,0x56,0xA4, /* 00000300 "y.`IRQV." */ - 0x42,0x55,0x46,0x42,0x14,0x1B,0x5F,0x53, /* 00000308 "BUFB.._S" */ - 0x52,0x53,0x01,0x8B,0x68,0x01,0x49,0x52, /* 00000310 "RS..h.IR" */ - 0x51,0x31,0x82,0x49,0x52,0x51,0x31,0x60, /* 00000318 "Q1.IRQ1`" */ - 0x76,0x60,0x70,0x60,0x50,0x49,0x52,0x42, /* 00000320 "v`p`PIRB" */ - 0x5B,0x82,0x49,0x08,0x4C,0x4E,0x4B,0x43, /* 00000328 "[.I.LNKC" */ - 0x08,0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0, /* 00000330 "._HID.A." */ - 0x0C,0x0F,0x08,0x5F,0x55,0x49,0x44,0x0A, /* 00000338 "..._UID." */ - 0x03,0x14,0x1C,0x5F,0x53,0x54,0x41,0x00, /* 00000340 "..._STA." */ - 0x7B,0x50,0x49,0x52,0x43,0x0A,0x80,0x60, /* 00000348 "{PIRC..`" */ - 0xA0,0x08,0x93,0x60,0x0A,0x80,0xA4,0x0A, /* 00000350 "...`...." */ - 0x09,0xA1,0x04,0xA4,0x0A,0x0B,0x14,0x0B, /* 00000358 "........" */ - 0x5F,0x50,0x52,0x53,0x00,0xA4,0x42,0x55, /* 00000360 "_PRS..BU" */ - 0x46,0x41,0x14,0x11,0x5F,0x44,0x49,0x53, /* 00000368 "FA.._DIS" */ - 0x00,0x7D,0x50,0x49,0x52,0x43,0x0A,0x80, /* 00000370 ".}PIRC.." */ - 0x50,0x49,0x52,0x43,0x14,0x1A,0x5F,0x43, /* 00000378 "PIRC.._C" */ - 0x52,0x53,0x00,0x7B,0x50,0x49,0x52,0x43, /* 00000380 "RS.{PIRC" */ - 0x0A,0x0F,0x60,0x79,0x01,0x60,0x49,0x52, /* 00000388 "..`y.`IR" */ - 0x51,0x56,0xA4,0x42,0x55,0x46,0x42,0x14, /* 00000390 "QV.BUFB." */ - 0x1B,0x5F,0x53,0x52,0x53,0x01,0x8B,0x68, /* 00000398 "._SRS..h" */ - 0x01,0x49,0x52,0x51,0x31,0x82,0x49,0x52, /* 000003A0 ".IRQ1.IR" */ - 0x51,0x31,0x60,0x76,0x60,0x70,0x60,0x50, /* 000003A8 "Q1`v`p`P" */ - 0x49,0x52,0x43,0x5B,0x82,0x49,0x08,0x4C, /* 000003B0 "IRC[.I.L" */ - 0x4E,0x4B,0x44,0x08,0x5F,0x48,0x49,0x44, /* 000003B8 "NKD._HID" */ - 0x0C,0x41,0xD0,0x0C,0x0F,0x08,0x5F,0x55, /* 000003C0 ".A...._U" */ - 0x49,0x44,0x0A,0x04,0x14,0x1C,0x5F,0x53, /* 000003C8 "ID...._S" */ - 0x54,0x41,0x00,0x7B,0x50,0x49,0x52,0x44, /* 000003D0 "TA.{PIRD" */ - 0x0A,0x80,0x60,0xA0,0x08,0x93,0x60,0x0A, /* 000003D8 "..`...`." */ - 0x80,0xA4,0x0A,0x09,0xA1,0x04,0xA4,0x0A, /* 000003E0 "........" */ - 0x0B,0x14,0x0B,0x5F,0x50,0x52,0x53,0x00, /* 000003E8 "..._PRS." */ - 0xA4,0x42,0x55,0x46,0x41,0x14,0x11,0x5F, /* 000003F0 ".BUFA.._" */ - 0x44,0x49,0x53,0x00,0x7D,0x50,0x49,0x52, /* 000003F8 "DIS.}PIR" */ - 0x44,0x0A,0x80,0x50,0x49,0x52,0x44,0x14, /* 00000400 "D..PIRD." */ - 0x1A,0x5F,0x43,0x52,0x53,0x00,0x7B,0x50, /* 00000408 "._CRS.{P" */ - 0x49,0x52,0x44,0x0A,0x0F,0x60,0x79,0x01, /* 00000410 "IRD..`y." */ - 0x60,0x49,0x52,0x51,0x56,0xA4,0x42,0x55, /* 00000418 "`IRQV.BU" */ - 0x46,0x42,0x14,0x1B,0x5F,0x53,0x52,0x53, /* 00000420 "FB.._SRS" */ - 0x01,0x8B,0x68,0x01,0x49,0x52,0x51,0x31, /* 00000428 "..h.IRQ1" */ - 0x82,0x49,0x52,0x51,0x31,0x60,0x76,0x60, /* 00000430 ".IRQ1`v`" */ - 0x70,0x60,0x50,0x49,0x52,0x44,0x5B,0x82, /* 00000438 "p`PIRD[." */ - 0x3A,0x48,0x50,0x45,0x54,0x08,0x5F,0x48, /* 00000440 ":HPET._H" */ - 0x49,0x44,0x0C,0x41,0xD0,0x01,0x03,0x08, /* 00000448 "ID.A...." */ - 0x5F,0x55,0x49,0x44,0x00,0x08,0x5F,0x43, /* 00000450 "_UID.._C" */ - 0x52,0x53,0x11,0x1F,0x0A,0x1C,0x87,0x17, /* 00000458 "RS......" */ - 0x00,0x00,0x0D,0x01,0x00,0x00,0x00,0x00, /* 00000460 "........" */ - 0x00,0x00,0xD0,0xFE,0xFF,0x03,0xD0,0xFE, /* 00000468 "........" */ - 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00, /* 00000470 "........" */ - 0x79,0x00,0x14,0x16,0x5F,0x50,0x52,0x54, /* 00000478 "y..._PRT" */ - 0x00,0xA0,0x0A,0x50,0x49,0x43,0x44,0xA4, /* 00000480 "...PICD." */ - 0x50,0x52,0x54,0x41,0xA4,0x50,0x52,0x54, /* 00000488 "PRTA.PRT" */ - 0x50,0x08,0x50,0x52,0x54,0x50,0x12,0x49, /* 00000490 "P.PRTP.I" */ - 0x36,0x3C,0x12,0x0D,0x04,0x0C,0xFF,0xFF, /* 00000498 "6<......" */ - 0x01,0x00,0x00,0x4C,0x4E,0x4B,0x42,0x00, /* 000004A0 "...LNKB." */ - 0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x01,0x00, /* 000004A8 "........" */ - 0x01,0x4C,0x4E,0x4B,0x43,0x00,0x12,0x0E, /* 000004B0 ".LNKC..." */ - 0x04,0x0C,0xFF,0xFF,0x01,0x00,0x0A,0x02, /* 000004B8 "........" */ - 0x4C,0x4E,0x4B,0x44,0x00,0x12,0x0E,0x04, /* 000004C0 "LNKD...." */ - 0x0C,0xFF,0xFF,0x01,0x00,0x0A,0x03,0x4C, /* 000004C8 ".......L" */ - 0x4E,0x4B,0x41,0x00,0x12,0x0D,0x04,0x0C, /* 000004D0 "NKA....." */ - 0xFF,0xFF,0x02,0x00,0x00,0x4C,0x4E,0x4B, /* 000004D8 ".....LNK" */ - 0x43,0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF, /* 000004E0 "C......." */ - 0x02,0x00,0x01,0x4C,0x4E,0x4B,0x44,0x00, /* 000004E8 "...LNKD." */ - 0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x02,0x00, /* 000004F0 "........" */ - 0x0A,0x02,0x4C,0x4E,0x4B,0x41,0x00,0x12, /* 000004F8 "..LNKA.." */ - 0x0E,0x04,0x0C,0xFF,0xFF,0x02,0x00,0x0A, /* 00000500 "........" */ - 0x03,0x4C,0x4E,0x4B,0x42,0x00,0x12,0x0D, /* 00000508 ".LNKB..." */ - 0x04,0x0C,0xFF,0xFF,0x03,0x00,0x00,0x4C, /* 00000510 ".......L" */ - 0x4E,0x4B,0x44,0x00,0x12,0x0D,0x04,0x0C, /* 00000518 "NKD....." */ - 0xFF,0xFF,0x03,0x00,0x01,0x4C,0x4E,0x4B, /* 00000520 ".....LNK" */ - 0x41,0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF, /* 00000528 "A......." */ - 0x03,0x00,0x0A,0x02,0x4C,0x4E,0x4B,0x42, /* 00000530 "....LNKB" */ - 0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x03, /* 00000538 "........" */ - 0x00,0x0A,0x03,0x4C,0x4E,0x4B,0x43,0x00, /* 00000540 "...LNKC." */ - 0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x04,0x00, /* 00000548 "........" */ - 0x00,0x4C,0x4E,0x4B,0x41,0x00,0x12,0x0D, /* 00000550 ".LNKA..." */ - 0x04,0x0C,0xFF,0xFF,0x04,0x00,0x01,0x4C, /* 00000558 ".......L" */ - 0x4E,0x4B,0x42,0x00,0x12,0x0E,0x04,0x0C, /* 00000560 "NKB....." */ - 0xFF,0xFF,0x04,0x00,0x0A,0x02,0x4C,0x4E, /* 00000568 "......LN" */ - 0x4B,0x43,0x00,0x12,0x0E,0x04,0x0C,0xFF, /* 00000570 "KC......" */ - 0xFF,0x04,0x00,0x0A,0x03,0x4C,0x4E,0x4B, /* 00000578 ".....LNK" */ - 0x44,0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF, /* 00000580 "D......." */ - 0x05,0x00,0x00,0x4C,0x4E,0x4B,0x42,0x00, /* 00000588 "...LNKB." */ - 0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x05,0x00, /* 00000590 "........" */ - 0x01,0x4C,0x4E,0x4B,0x43,0x00,0x12,0x0E, /* 00000598 ".LNKC..." */ - 0x04,0x0C,0xFF,0xFF,0x05,0x00,0x0A,0x02, /* 000005A0 "........" */ - 0x4C,0x4E,0x4B,0x44,0x00,0x12,0x0E,0x04, /* 000005A8 "LNKD...." */ - 0x0C,0xFF,0xFF,0x05,0x00,0x0A,0x03,0x4C, /* 000005B0 ".......L" */ - 0x4E,0x4B,0x41,0x00,0x12,0x0D,0x04,0x0C, /* 000005B8 "NKA....." */ - 0xFF,0xFF,0x06,0x00,0x00,0x4C,0x4E,0x4B, /* 000005C0 ".....LNK" */ - 0x43,0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF, /* 000005C8 "C......." */ - 0x06,0x00,0x01,0x4C,0x4E,0x4B,0x44,0x00, /* 000005D0 "...LNKD." */ - 0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x06,0x00, /* 000005D8 "........" */ - 0x0A,0x02,0x4C,0x4E,0x4B,0x41,0x00,0x12, /* 000005E0 "..LNKA.." */ - 0x0E,0x04,0x0C,0xFF,0xFF,0x06,0x00,0x0A, /* 000005E8 "........" */ - 0x03,0x4C,0x4E,0x4B,0x42,0x00,0x12,0x0D, /* 000005F0 ".LNKB..." */ - 0x04,0x0C,0xFF,0xFF,0x07,0x00,0x00,0x4C, /* 000005F8 ".......L" */ - 0x4E,0x4B,0x44,0x00,0x12,0x0D,0x04,0x0C, /* 00000600 "NKD....." */ - 0xFF,0xFF,0x07,0x00,0x01,0x4C,0x4E,0x4B, /* 00000608 ".....LNK" */ - 0x41,0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF, /* 00000610 "A......." */ - 0x07,0x00,0x0A,0x02,0x4C,0x4E,0x4B,0x42, /* 00000618 "....LNKB" */ - 0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x07, /* 00000620 "........" */ - 0x00,0x0A,0x03,0x4C,0x4E,0x4B,0x43,0x00, /* 00000628 "...LNKC." */ - 0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x08,0x00, /* 00000630 "........" */ - 0x00,0x4C,0x4E,0x4B,0x41,0x00,0x12,0x0D, /* 00000638 ".LNKA..." */ - 0x04,0x0C,0xFF,0xFF,0x08,0x00,0x01,0x4C, /* 00000640 ".......L" */ - 0x4E,0x4B,0x42,0x00,0x12,0x0E,0x04,0x0C, /* 00000648 "NKB....." */ - 0xFF,0xFF,0x08,0x00,0x0A,0x02,0x4C,0x4E, /* 00000650 "......LN" */ - 0x4B,0x43,0x00,0x12,0x0E,0x04,0x0C,0xFF, /* 00000658 "KC......" */ - 0xFF,0x08,0x00,0x0A,0x03,0x4C,0x4E,0x4B, /* 00000660 ".....LNK" */ - 0x44,0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF, /* 00000668 "D......." */ - 0x09,0x00,0x00,0x4C,0x4E,0x4B,0x42,0x00, /* 00000670 "...LNKB." */ - 0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x09,0x00, /* 00000678 "........" */ - 0x01,0x4C,0x4E,0x4B,0x43,0x00,0x12,0x0E, /* 00000680 ".LNKC..." */ - 0x04,0x0C,0xFF,0xFF,0x09,0x00,0x0A,0x02, /* 00000688 "........" */ - 0x4C,0x4E,0x4B,0x44,0x00,0x12,0x0E,0x04, /* 00000690 "LNKD...." */ - 0x0C,0xFF,0xFF,0x09,0x00,0x0A,0x03,0x4C, /* 00000698 ".......L" */ - 0x4E,0x4B,0x41,0x00,0x12,0x0D,0x04,0x0C, /* 000006A0 "NKA....." */ - 0xFF,0xFF,0x0A,0x00,0x00,0x4C,0x4E,0x4B, /* 000006A8 ".....LNK" */ - 0x43,0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF, /* 000006B0 "C......." */ - 0x0A,0x00,0x01,0x4C,0x4E,0x4B,0x44,0x00, /* 000006B8 "...LNKD." */ - 0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x0A,0x00, /* 000006C0 "........" */ - 0x0A,0x02,0x4C,0x4E,0x4B,0x41,0x00,0x12, /* 000006C8 "..LNKA.." */ - 0x0E,0x04,0x0C,0xFF,0xFF,0x0A,0x00,0x0A, /* 000006D0 "........" */ - 0x03,0x4C,0x4E,0x4B,0x42,0x00,0x12,0x0D, /* 000006D8 ".LNKB..." */ - 0x04,0x0C,0xFF,0xFF,0x0B,0x00,0x00,0x4C, /* 000006E0 ".......L" */ - 0x4E,0x4B,0x44,0x00,0x12,0x0D,0x04,0x0C, /* 000006E8 "NKD....." */ - 0xFF,0xFF,0x0B,0x00,0x01,0x4C,0x4E,0x4B, /* 000006F0 ".....LNK" */ - 0x41,0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF, /* 000006F8 "A......." */ - 0x0B,0x00,0x0A,0x02,0x4C,0x4E,0x4B,0x42, /* 00000700 "....LNKB" */ - 0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x0B, /* 00000708 "........" */ - 0x00,0x0A,0x03,0x4C,0x4E,0x4B,0x43,0x00, /* 00000710 "...LNKC." */ - 0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x0C,0x00, /* 00000718 "........" */ - 0x00,0x4C,0x4E,0x4B,0x41,0x00,0x12,0x0D, /* 00000720 ".LNKA..." */ - 0x04,0x0C,0xFF,0xFF,0x0C,0x00,0x01,0x4C, /* 00000728 ".......L" */ - 0x4E,0x4B,0x42,0x00,0x12,0x0E,0x04,0x0C, /* 00000730 "NKB....." */ - 0xFF,0xFF,0x0C,0x00,0x0A,0x02,0x4C,0x4E, /* 00000738 "......LN" */ - 0x4B,0x43,0x00,0x12,0x0E,0x04,0x0C,0xFF, /* 00000740 "KC......" */ - 0xFF,0x0C,0x00,0x0A,0x03,0x4C,0x4E,0x4B, /* 00000748 ".....LNK" */ - 0x44,0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF, /* 00000750 "D......." */ - 0x0D,0x00,0x00,0x4C,0x4E,0x4B,0x42,0x00, /* 00000758 "...LNKB." */ - 0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x0D,0x00, /* 00000760 "........" */ - 0x01,0x4C,0x4E,0x4B,0x43,0x00,0x12,0x0E, /* 00000768 ".LNKC..." */ - 0x04,0x0C,0xFF,0xFF,0x0D,0x00,0x0A,0x02, /* 00000770 "........" */ - 0x4C,0x4E,0x4B,0x44,0x00,0x12,0x0E,0x04, /* 00000778 "LNKD...." */ - 0x0C,0xFF,0xFF,0x0D,0x00,0x0A,0x03,0x4C, /* 00000780 ".......L" */ - 0x4E,0x4B,0x41,0x00,0x12,0x0D,0x04,0x0C, /* 00000788 "NKA....." */ - 0xFF,0xFF,0x0E,0x00,0x00,0x4C,0x4E,0x4B, /* 00000790 ".....LNK" */ - 0x43,0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF, /* 00000798 "C......." */ - 0x0E,0x00,0x01,0x4C,0x4E,0x4B,0x44,0x00, /* 000007A0 "...LNKD." */ - 0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x0E,0x00, /* 000007A8 "........" */ - 0x0A,0x02,0x4C,0x4E,0x4B,0x41,0x00,0x12, /* 000007B0 "..LNKA.." */ - 0x0E,0x04,0x0C,0xFF,0xFF,0x0E,0x00,0x0A, /* 000007B8 "........" */ - 0x03,0x4C,0x4E,0x4B,0x42,0x00,0x12,0x0D, /* 000007C0 ".LNKB..." */ - 0x04,0x0C,0xFF,0xFF,0x0F,0x00,0x00,0x4C, /* 000007C8 ".......L" */ - 0x4E,0x4B,0x44,0x00,0x12,0x0D,0x04,0x0C, /* 000007D0 "NKD....." */ - 0xFF,0xFF,0x0F,0x00,0x01,0x4C,0x4E,0x4B, /* 000007D8 ".....LNK" */ - 0x41,0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF, /* 000007E0 "A......." */ - 0x0F,0x00,0x0A,0x02,0x4C,0x4E,0x4B,0x42, /* 000007E8 "....LNKB" */ - 0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x0F, /* 000007F0 "........" */ - 0x00,0x0A,0x03,0x4C,0x4E,0x4B,0x43,0x00, /* 000007F8 "...LNKC." */ - 0x08,0x50,0x52,0x54,0x41,0x12,0x41,0x2F, /* 00000800 ".PRTA.A/" */ - 0x3C,0x12,0x0B,0x04,0x0C,0xFF,0xFF,0x01, /* 00000808 "<......." */ - 0x00,0x00,0x00,0x0A,0x14,0x12,0x0B,0x04, /* 00000810 "........" */ - 0x0C,0xFF,0xFF,0x01,0x00,0x01,0x00,0x0A, /* 00000818 "........" */ - 0x15,0x12,0x0C,0x04,0x0C,0xFF,0xFF,0x01, /* 00000820 "........" */ - 0x00,0x0A,0x02,0x00,0x0A,0x16,0x12,0x0C, /* 00000828 "........" */ - 0x04,0x0C,0xFF,0xFF,0x01,0x00,0x0A,0x03, /* 00000830 "........" */ - 0x00,0x0A,0x17,0x12,0x0B,0x04,0x0C,0xFF, /* 00000838 "........" */ - 0xFF,0x02,0x00,0x00,0x00,0x0A,0x18,0x12, /* 00000840 "........" */ - 0x0B,0x04,0x0C,0xFF,0xFF,0x02,0x00,0x01, /* 00000848 "........" */ - 0x00,0x0A,0x19,0x12,0x0C,0x04,0x0C,0xFF, /* 00000850 "........" */ - 0xFF,0x02,0x00,0x0A,0x02,0x00,0x0A,0x1A, /* 00000858 "........" */ - 0x12,0x0C,0x04,0x0C,0xFF,0xFF,0x02,0x00, /* 00000860 "........" */ - 0x0A,0x03,0x00,0x0A,0x1B,0x12,0x0B,0x04, /* 00000868 "........" */ - 0x0C,0xFF,0xFF,0x03,0x00,0x00,0x00,0x0A, /* 00000870 "........" */ - 0x1C,0x12,0x0B,0x04,0x0C,0xFF,0xFF,0x03, /* 00000878 "........" */ - 0x00,0x01,0x00,0x0A,0x1D,0x12,0x0C,0x04, /* 00000880 "........" */ - 0x0C,0xFF,0xFF,0x03,0x00,0x0A,0x02,0x00, /* 00000888 "........" */ - 0x0A,0x1E,0x12,0x0C,0x04,0x0C,0xFF,0xFF, /* 00000890 "........" */ - 0x03,0x00,0x0A,0x03,0x00,0x0A,0x1F,0x12, /* 00000898 "........" */ - 0x0B,0x04,0x0C,0xFF,0xFF,0x04,0x00,0x00, /* 000008A0 "........" */ - 0x00,0x0A,0x20,0x12,0x0B,0x04,0x0C,0xFF, /* 000008A8 ".. ....." */ - 0xFF,0x04,0x00,0x01,0x00,0x0A,0x21,0x12, /* 000008B0 "......!." */ - 0x0C,0x04,0x0C,0xFF,0xFF,0x04,0x00,0x0A, /* 000008B8 "........" */ - 0x02,0x00,0x0A,0x22,0x12,0x0C,0x04,0x0C, /* 000008C0 "..."...." */ - 0xFF,0xFF,0x04,0x00,0x0A,0x03,0x00,0x0A, /* 000008C8 "........" */ - 0x23,0x12,0x0B,0x04,0x0C,0xFF,0xFF,0x05, /* 000008D0 "#......." */ - 0x00,0x00,0x00,0x0A,0x24,0x12,0x0B,0x04, /* 000008D8 "....$..." */ - 0x0C,0xFF,0xFF,0x05,0x00,0x01,0x00,0x0A, /* 000008E0 "........" */ - 0x25,0x12,0x0C,0x04,0x0C,0xFF,0xFF,0x05, /* 000008E8 "%......." */ - 0x00,0x0A,0x02,0x00,0x0A,0x26,0x12,0x0C, /* 000008F0 ".....&.." */ - 0x04,0x0C,0xFF,0xFF,0x05,0x00,0x0A,0x03, /* 000008F8 "........" */ - 0x00,0x0A,0x27,0x12,0x0B,0x04,0x0C,0xFF, /* 00000900 "..'....." */ - 0xFF,0x06,0x00,0x00,0x00,0x0A,0x28,0x12, /* 00000908 "......(." */ - 0x0B,0x04,0x0C,0xFF,0xFF,0x06,0x00,0x01, /* 00000910 "........" */ - 0x00,0x0A,0x29,0x12,0x0C,0x04,0x0C,0xFF, /* 00000918 "..)....." */ - 0xFF,0x06,0x00,0x0A,0x02,0x00,0x0A,0x2A, /* 00000920 ".......*" */ - 0x12,0x0C,0x04,0x0C,0xFF,0xFF,0x06,0x00, /* 00000928 "........" */ - 0x0A,0x03,0x00,0x0A,0x2B,0x12,0x0B,0x04, /* 00000930 "....+..." */ - 0x0C,0xFF,0xFF,0x07,0x00,0x00,0x00,0x0A, /* 00000938 "........" */ - 0x2C,0x12,0x0B,0x04,0x0C,0xFF,0xFF,0x07, /* 00000940 ",......." */ - 0x00,0x01,0x00,0x0A,0x2D,0x12,0x0C,0x04, /* 00000948 "....-..." */ - 0x0C,0xFF,0xFF,0x07,0x00,0x0A,0x02,0x00, /* 00000950 "........" */ - 0x0A,0x2E,0x12,0x0C,0x04,0x0C,0xFF,0xFF, /* 00000958 "........" */ - 0x07,0x00,0x0A,0x03,0x00,0x0A,0x2F,0x12, /* 00000960 "....../." */ - 0x0B,0x04,0x0C,0xFF,0xFF,0x08,0x00,0x00, /* 00000968 "........" */ - 0x00,0x0A,0x11,0x12,0x0B,0x04,0x0C,0xFF, /* 00000970 "........" */ - 0xFF,0x08,0x00,0x01,0x00,0x0A,0x12,0x12, /* 00000978 "........" */ - 0x0C,0x04,0x0C,0xFF,0xFF,0x08,0x00,0x0A, /* 00000980 "........" */ - 0x02,0x00,0x0A,0x13,0x12,0x0C,0x04,0x0C, /* 00000988 "........" */ - 0xFF,0xFF,0x08,0x00,0x0A,0x03,0x00,0x0A, /* 00000990 "........" */ - 0x14,0x12,0x0B,0x04,0x0C,0xFF,0xFF,0x09, /* 00000998 "........" */ - 0x00,0x00,0x00,0x0A,0x15,0x12,0x0B,0x04, /* 000009A0 "........" */ - 0x0C,0xFF,0xFF,0x09,0x00,0x01,0x00,0x0A, /* 000009A8 "........" */ - 0x16,0x12,0x0C,0x04,0x0C,0xFF,0xFF,0x09, /* 000009B0 "........" */ - 0x00,0x0A,0x02,0x00,0x0A,0x17,0x12,0x0C, /* 000009B8 "........" */ - 0x04,0x0C,0xFF,0xFF,0x09,0x00,0x0A,0x03, /* 000009C0 "........" */ - 0x00,0x0A,0x18,0x12,0x0B,0x04,0x0C,0xFF, /* 000009C8 "........" */ - 0xFF,0x0A,0x00,0x00,0x00,0x0A,0x19,0x12, /* 000009D0 "........" */ - 0x0B,0x04,0x0C,0xFF,0xFF,0x0A,0x00,0x01, /* 000009D8 "........" */ - 0x00,0x0A,0x1A,0x12,0x0C,0x04,0x0C,0xFF, /* 000009E0 "........" */ - 0xFF,0x0A,0x00,0x0A,0x02,0x00,0x0A,0x1B, /* 000009E8 "........" */ - 0x12,0x0C,0x04,0x0C,0xFF,0xFF,0x0A,0x00, /* 000009F0 "........" */ - 0x0A,0x03,0x00,0x0A,0x1C,0x12,0x0B,0x04, /* 000009F8 "........" */ - 0x0C,0xFF,0xFF,0x0B,0x00,0x00,0x00,0x0A, /* 00000A00 "........" */ - 0x1D,0x12,0x0B,0x04,0x0C,0xFF,0xFF,0x0B, /* 00000A08 "........" */ - 0x00,0x01,0x00,0x0A,0x1E,0x12,0x0C,0x04, /* 00000A10 "........" */ - 0x0C,0xFF,0xFF,0x0B,0x00,0x0A,0x02,0x00, /* 00000A18 "........" */ - 0x0A,0x1F,0x12,0x0C,0x04,0x0C,0xFF,0xFF, /* 00000A20 "........" */ - 0x0B,0x00,0x0A,0x03,0x00,0x0A,0x20,0x12, /* 00000A28 "...... ." */ - 0x0B,0x04,0x0C,0xFF,0xFF,0x0C,0x00,0x00, /* 00000A30 "........" */ - 0x00,0x0A,0x21,0x12,0x0B,0x04,0x0C,0xFF, /* 00000A38 "..!....." */ - 0xFF,0x0C,0x00,0x01,0x00,0x0A,0x22,0x12, /* 00000A40 "......"." */ - 0x0C,0x04,0x0C,0xFF,0xFF,0x0C,0x00,0x0A, /* 00000A48 "........" */ - 0x02,0x00,0x0A,0x23,0x12,0x0C,0x04,0x0C, /* 00000A50 "...#...." */ - 0xFF,0xFF,0x0C,0x00,0x0A,0x03,0x00,0x0A, /* 00000A58 "........" */ - 0x24,0x12,0x0B,0x04,0x0C,0xFF,0xFF,0x0D, /* 00000A60 "$......." */ - 0x00,0x00,0x00,0x0A,0x25,0x12,0x0B,0x04, /* 00000A68 "....%..." */ - 0x0C,0xFF,0xFF,0x0D,0x00,0x01,0x00,0x0A, /* 00000A70 "........" */ - 0x26,0x12,0x0C,0x04,0x0C,0xFF,0xFF,0x0D, /* 00000A78 "&......." */ - 0x00,0x0A,0x02,0x00,0x0A,0x27,0x12,0x0C, /* 00000A80 ".....'.." */ - 0x04,0x0C,0xFF,0xFF,0x0D,0x00,0x0A,0x03, /* 00000A88 "........" */ - 0x00,0x0A,0x28,0x12,0x0B,0x04,0x0C,0xFF, /* 00000A90 "..(....." */ - 0xFF,0x0E,0x00,0x00,0x00,0x0A,0x29,0x12, /* 00000A98 "......)." */ - 0x0B,0x04,0x0C,0xFF,0xFF,0x0E,0x00,0x01, /* 00000AA0 "........" */ - 0x00,0x0A,0x2A,0x12,0x0C,0x04,0x0C,0xFF, /* 00000AA8 "..*....." */ - 0xFF,0x0E,0x00,0x0A,0x02,0x00,0x0A,0x2B, /* 00000AB0 ".......+" */ - 0x12,0x0C,0x04,0x0C,0xFF,0xFF,0x0E,0x00, /* 00000AB8 "........" */ - 0x0A,0x03,0x00,0x0A,0x2C,0x12,0x0B,0x04, /* 00000AC0 "....,..." */ - 0x0C,0xFF,0xFF,0x0F,0x00,0x00,0x00,0x0A, /* 00000AC8 "........" */ - 0x2D,0x12,0x0B,0x04,0x0C,0xFF,0xFF,0x0F, /* 00000AD0 "-......." */ - 0x00,0x01,0x00,0x0A,0x2E,0x12,0x0C,0x04, /* 00000AD8 "........" */ - 0x0C,0xFF,0xFF,0x0F,0x00,0x0A,0x02,0x00, /* 00000AE0 "........" */ - 0x0A,0x2F,0x12,0x0C,0x04,0x0C,0xFF,0xFF, /* 00000AE8 "./......" */ - 0x0F,0x00,0x0A,0x03,0x00,0x0A,0x10,0x5B, /* 00000AF0 ".......[" */ - 0x82,0x46,0x37,0x49,0x53,0x41,0x5F,0x08, /* 00000AF8 ".F7ISA_." */ - 0x5F,0x41,0x44,0x52,0x0C,0x00,0x00,0x01, /* 00000B00 "_ADR...." */ - 0x00,0x5B,0x80,0x50,0x49,0x52,0x51,0x02, /* 00000B08 ".[.PIRQ." */ - 0x0A,0x60,0x0A,0x04,0x10,0x2E,0x5C,0x00, /* 00000B10 ".`....\." */ - 0x5B,0x81,0x29,0x5C,0x2F,0x04,0x5F,0x53, /* 00000B18 "[.)\/._S" */ - 0x42,0x5F,0x50,0x43,0x49,0x30,0x49,0x53, /* 00000B20 "B_PCI0IS" */ - 0x41,0x5F,0x50,0x49,0x52,0x51,0x01,0x50, /* 00000B28 "A_PIRQ.P" */ - 0x49,0x52,0x41,0x08,0x50,0x49,0x52,0x42, /* 00000B30 "IRA.PIRB" */ - 0x08,0x50,0x49,0x52,0x43,0x08,0x50,0x49, /* 00000B38 ".PIRC.PI" */ - 0x52,0x44,0x08,0x5B,0x82,0x46,0x0B,0x53, /* 00000B40 "RD.[.F.S" */ - 0x59,0x53,0x52,0x08,0x5F,0x48,0x49,0x44, /* 00000B48 "YSR._HID" */ - 0x0C,0x41,0xD0,0x0C,0x02,0x08,0x5F,0x55, /* 00000B50 ".A...._U" */ - 0x49,0x44,0x01,0x08,0x43,0x52,0x53,0x5F, /* 00000B58 "ID..CRS_" */ - 0x11,0x4E,0x08,0x0A,0x8A,0x47,0x01,0x10, /* 00000B60 ".N...G.." */ - 0x00,0x10,0x00,0x00,0x10,0x47,0x01,0x22, /* 00000B68 ".....G."" */ - 0x00,0x22,0x00,0x00,0x0C,0x47,0x01,0x30, /* 00000B70 "."...G.0" */ - 0x00,0x30,0x00,0x00,0x10,0x47,0x01,0x44, /* 00000B78 ".0...G.D" */ - 0x00,0x44,0x00,0x00,0x1C,0x47,0x01,0x62, /* 00000B80 ".D...G.b" */ - 0x00,0x62,0x00,0x00,0x02,0x47,0x01,0x65, /* 00000B88 ".b...G.e" */ - 0x00,0x65,0x00,0x00,0x0B,0x47,0x01,0x72, /* 00000B90 ".e...G.r" */ - 0x00,0x72,0x00,0x00,0x0E,0x47,0x01,0x80, /* 00000B98 ".r...G.." */ - 0x00,0x80,0x00,0x00,0x01,0x47,0x01,0x84, /* 00000BA0 ".....G.." */ - 0x00,0x84,0x00,0x00,0x03,0x47,0x01,0x88, /* 00000BA8 ".....G.." */ - 0x00,0x88,0x00,0x00,0x01,0x47,0x01,0x8C, /* 00000BB0 ".....G.." */ - 0x00,0x8C,0x00,0x00,0x03,0x47,0x01,0x90, /* 00000BB8 ".....G.." */ - 0x00,0x90,0x00,0x00,0x10,0x47,0x01,0xA2, /* 00000BC0 ".....G.." */ - 0x00,0xA2,0x00,0x00,0x1C,0x47,0x01,0xE0, /* 00000BC8 ".....G.." */ - 0x00,0xE0,0x00,0x00,0x10,0x47,0x01,0xA0, /* 00000BD0 ".....G.." */ - 0x08,0xA0,0x08,0x00,0x04,0x47,0x01,0xC0, /* 00000BD8 ".....G.." */ - 0x0C,0xC0,0x0C,0x00,0x10,0x47,0x01,0xD0, /* 00000BE0 ".....G.." */ - 0x04,0xD0,0x04,0x00,0x02,0x79,0x00,0x14, /* 00000BE8 ".....y.." */ - 0x0B,0x5F,0x43,0x52,0x53,0x00,0xA4,0x43, /* 00000BF0 "._CRS..C" */ - 0x52,0x53,0x5F,0x5B,0x82,0x2B,0x50,0x49, /* 00000BF8 "RS_[.+PI" */ - 0x43,0x5F,0x08,0x5F,0x48,0x49,0x44,0x0B, /* 00000C00 "C_._HID." */ - 0x41,0xD0,0x08,0x5F,0x43,0x52,0x53,0x11, /* 00000C08 "A.._CRS." */ - 0x18,0x0A,0x15,0x47,0x01,0x20,0x00,0x20, /* 00000C10 "...G. . " */ - 0x00,0x01,0x02,0x47,0x01,0xA0,0x00,0xA0, /* 00000C18 "...G...." */ - 0x00,0x01,0x02,0x22,0x04,0x00,0x79,0x00, /* 00000C20 "..."..y." */ - 0x5B,0x82,0x47,0x05,0x44,0x4D,0x41,0x30, /* 00000C28 "[.G.DMA0" */ - 0x08,0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0, /* 00000C30 "._HID.A." */ - 0x02,0x00,0x08,0x5F,0x43,0x52,0x53,0x11, /* 00000C38 "..._CRS." */ - 0x41,0x04,0x0A,0x3D,0x2A,0x10,0x04,0x47, /* 00000C40 "A..=*..G" */ - 0x01,0x00,0x00,0x00,0x00,0x00,0x10,0x47, /* 00000C48 ".......G" */ - 0x01,0x81,0x00,0x81,0x00,0x00,0x03,0x47, /* 00000C50 ".......G" */ - 0x01,0x87,0x00,0x87,0x00,0x00,0x01,0x47, /* 00000C58 ".......G" */ - 0x01,0x89,0x00,0x89,0x00,0x00,0x03,0x47, /* 00000C60 ".......G" */ - 0x01,0x8F,0x00,0x8F,0x00,0x00,0x01,0x47, /* 00000C68 ".......G" */ - 0x01,0xC0,0x00,0xC0,0x00,0x00,0x20,0x47, /* 00000C70 "...... G" */ - 0x01,0x80,0x04,0x80,0x04,0x00,0x10,0x79, /* 00000C78 ".......y" */ - 0x00,0x5B,0x82,0x25,0x54,0x4D,0x52,0x5F, /* 00000C80 ".[.%TMR_" */ - 0x08,0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0, /* 00000C88 "._HID.A." */ - 0x01,0x00,0x08,0x5F,0x43,0x52,0x53,0x11, /* 00000C90 "..._CRS." */ - 0x10,0x0A,0x0D,0x47,0x01,0x40,0x00,0x40, /* 00000C98 "...G.@.@" */ - 0x00,0x00,0x04,0x22,0x01,0x00,0x79,0x00, /* 00000CA0 "..."..y." */ - 0x5B,0x82,0x25,0x52,0x54,0x43,0x5F,0x08, /* 00000CA8 "[.%RTC_." */ - 0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0,0x0B, /* 00000CB0 "_HID.A.." */ - 0x00,0x08,0x5F,0x43,0x52,0x53,0x11,0x10, /* 00000CB8 ".._CRS.." */ - 0x0A,0x0D,0x47,0x01,0x70,0x00,0x70,0x00, /* 00000CC0 "..G.p.p." */ - 0x00,0x02,0x22,0x00,0x01,0x79,0x00,0x5B, /* 00000CC8 ".."..y.[" */ - 0x82,0x22,0x53,0x50,0x4B,0x52,0x08,0x5F, /* 00000CD0 "."SPKR._" */ - 0x48,0x49,0x44,0x0C,0x41,0xD0,0x08,0x00, /* 00000CD8 "HID.A..." */ - 0x08,0x5F,0x43,0x52,0x53,0x11,0x0D,0x0A, /* 00000CE0 "._CRS..." */ - 0x0A,0x47,0x01,0x61,0x00,0x61,0x00,0x00, /* 00000CE8 ".G.a.a.." */ - 0x01,0x79,0x00,0x5B,0x82,0x31,0x50,0x53, /* 00000CF0 ".y.[.1PS" */ - 0x32,0x4D,0x08,0x5F,0x48,0x49,0x44,0x0C, /* 00000CF8 "2M._HID." */ - 0x41,0xD0,0x0F,0x13,0x08,0x5F,0x43,0x49, /* 00000D00 "A...._CI" */ - 0x44,0x0C,0x41,0xD0,0x0F,0x13,0x14,0x09, /* 00000D08 "D.A....." */ - 0x5F,0x53,0x54,0x41,0x00,0xA4,0x0A,0x0F, /* 00000D10 "_STA...." */ - 0x08,0x5F,0x43,0x52,0x53,0x11,0x08,0x0A, /* 00000D18 "._CRS..." */ - 0x05,0x22,0x00,0x10,0x79,0x00,0x5B,0x82, /* 00000D20 "."..y.[." */ - 0x42,0x04,0x50,0x53,0x32,0x4B,0x08,0x5F, /* 00000D28 "B.PS2K._" */ - 0x48,0x49,0x44,0x0C,0x41,0xD0,0x03,0x03, /* 00000D30 "HID.A..." */ - 0x08,0x5F,0x43,0x49,0x44,0x0C,0x41,0xD0, /* 00000D38 "._CID.A." */ - 0x03,0x0B,0x14,0x09,0x5F,0x53,0x54,0x41, /* 00000D40 "...._STA" */ - 0x00,0xA4,0x0A,0x0F,0x08,0x5F,0x43,0x52, /* 00000D48 "....._CR" */ - 0x53,0x11,0x18,0x0A,0x15,0x47,0x01,0x60, /* 00000D50 "S....G.`" */ - 0x00,0x60,0x00,0x00,0x01,0x47,0x01,0x64, /* 00000D58 ".`...G.d" */ - 0x00,0x64,0x00,0x00,0x01,0x22,0x02,0x00, /* 00000D60 ".d...".." */ - 0x79,0x00,0x5B,0x82,0x3A,0x46,0x44,0x43, /* 00000D68 "y.[.:FDC" */ - 0x30,0x08,0x5F,0x48,0x49,0x44,0x0C,0x41, /* 00000D70 "0._HID.A" */ - 0xD0,0x07,0x00,0x14,0x09,0x5F,0x53,0x54, /* 00000D78 "....._ST" */ - 0x41,0x00,0xA4,0x0A,0x0F,0x08,0x5F,0x43, /* 00000D80 "A....._C" */ - 0x52,0x53,0x11,0x1B,0x0A,0x18,0x47,0x01, /* 00000D88 "RS....G." */ - 0xF0,0x03,0xF0,0x03,0x01,0x06,0x47,0x01, /* 00000D90 "......G." */ - 0xF7,0x03,0xF7,0x03,0x01,0x01,0x22,0x40, /* 00000D98 "......"@" */ - 0x00,0x2A,0x04,0x00,0x79,0x00,0x5B,0x82, /* 00000DA0 ".*..y.[." */ - 0x46,0x04,0x55,0x41,0x52,0x31,0x08,0x5F, /* 00000DA8 "F.UAR1._" */ - 0x48,0x49,0x44,0x0C,0x41,0xD0,0x05,0x01, /* 00000DB0 "HID.A..." */ - 0x08,0x5F,0x55,0x49,0x44,0x01,0x14,0x19, /* 00000DB8 "._UID..." */ - 0x5F,0x53,0x54,0x41,0x00,0xA0,0x0D,0x93, /* 00000DC0 "_STA...." */ - 0x5E,0x5E,0x5E,0x5E,0x55,0x41,0x52,0x31, /* 00000DC8 "^^^^UAR1" */ - 0x00,0xA4,0x00,0xA1,0x04,0xA4,0x0A,0x0F, /* 00000DD0 "........" */ - 0x08,0x5F,0x43,0x52,0x53,0x11,0x10,0x0A, /* 00000DD8 "._CRS..." */ - 0x0D,0x47,0x01,0xF8,0x03,0xF8,0x03,0x08, /* 00000DE0 ".G......" */ - 0x08,0x22,0x10,0x00,0x79,0x00,0x5B,0x82, /* 00000DE8 "."..y.[." */ - 0x47,0x04,0x55,0x41,0x52,0x32,0x08,0x5F, /* 00000DF0 "G.UAR2._" */ - 0x48,0x49,0x44,0x0C,0x41,0xD0,0x05,0x01, /* 00000DF8 "HID.A..." */ - 0x08,0x5F,0x55,0x49,0x44,0x0A,0x02,0x14, /* 00000E00 "._UID..." */ - 0x19,0x5F,0x53,0x54,0x41,0x00,0xA0,0x0D, /* 00000E08 "._STA..." */ - 0x93,0x5E,0x5E,0x5E,0x5E,0x55,0x41,0x52, /* 00000E10 ".^^^^UAR" */ - 0x32,0x00,0xA4,0x00,0xA1,0x04,0xA4,0x0A, /* 00000E18 "2......." */ - 0x0F,0x08,0x5F,0x43,0x52,0x53,0x11,0x10, /* 00000E20 ".._CRS.." */ - 0x0A,0x0D,0x47,0x01,0xF8,0x02,0xF8,0x02, /* 00000E28 "..G....." */ - 0x08,0x08,0x22,0x08,0x00,0x79,0x00,0x5B, /* 00000E30 ".."..y.[" */ - 0x82,0x36,0x4C,0x54,0x50,0x31,0x08,0x5F, /* 00000E38 ".6LTP1._" */ - 0x48,0x49,0x44,0x0C,0x41,0xD0,0x04,0x00, /* 00000E40 "HID.A..." */ - 0x08,0x5F,0x55,0x49,0x44,0x0A,0x02,0x14, /* 00000E48 "._UID..." */ - 0x09,0x5F,0x53,0x54,0x41,0x00,0xA4,0x0A, /* 00000E50 "._STA..." */ - 0x0F,0x08,0x5F,0x43,0x52,0x53,0x11,0x10, /* 00000E58 ".._CRS.." */ - 0x0A,0x0D,0x47,0x01,0x78,0x03,0x78,0x03, /* 00000E60 "..G.x.x." */ - 0x08,0x08,0x22,0x80,0x00,0x79,0x00, + 0x00,0x00,0x00,0x00,0x00,0x0A,0x00,0x00, /* 000000F0 "........" */ + 0x00,0x00,0x00,0x79,0x00,0x5B,0x82,0x4F, /* 000000F8 "...y.[.O" */ + 0xD8,0x50,0x43,0x49,0x30,0x08,0x5F,0x48, /* 00000100 ".PCI0._H" */ + 0x49,0x44,0x0C,0x41,0xD0,0x0A,0x03,0x08, /* 00000108 "ID.A...." */ + 0x5F,0x55,0x49,0x44,0x00,0x08,0x5F,0x41, /* 00000110 "_UID.._A" */ + 0x44,0x52,0x00,0x08,0x5F,0x42,0x42,0x4E, /* 00000118 "DR.._BBN" */ + 0x00,0x14,0x4E,0x0C,0x5F,0x43,0x52,0x53, /* 00000120 "..N._CRS" */ + 0x00,0x08,0x50,0x52,0x54,0x30,0x11,0x42, /* 00000128 "..PRT0.B" */ + 0x07,0x0A,0x6E,0x88,0x0D,0x00,0x02,0x0E, /* 00000130 "..n....." */ + 0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00, /* 00000138 "........" */ + 0x00,0x00,0x01,0x47,0x01,0xF8,0x0C,0xF8, /* 00000140 "...G...." */ + 0x0C,0x01,0x08,0x88,0x0D,0x00,0x01,0x0C, /* 00000148 "........" */ + 0x03,0x00,0x00,0x00,0x00,0xF7,0x0C,0x00, /* 00000150 "........" */ + 0x00,0xF8,0x0C,0x88,0x0D,0x00,0x01,0x0C, /* 00000158 "........" */ + 0x03,0x00,0x00,0x00,0x0D,0xFF,0xFF,0x00, /* 00000160 "........" */ + 0x00,0x00,0xF3,0x87,0x17,0x00,0x00,0x0C, /* 00000168 "........" */ + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x0A, /* 00000170 "........" */ + 0x00,0xFF,0xFF,0x0B,0x00,0x00,0x00,0x00, /* 00000178 "........" */ + 0x00,0x00,0x00,0x02,0x00,0x87,0x17,0x00, /* 00000180 "........" */ + 0x00,0x0C,0x03,0x00,0x00,0x00,0x00,0x00, /* 00000188 "........" */ + 0x00,0x00,0xF0,0xFF,0xFF,0xFF,0xF4,0x00, /* 00000190 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x79, /* 00000198 ".......y" */ + 0x00,0x8A,0x50,0x52,0x54,0x30,0x0A,0x5C, /* 000001A0 "..PRT0.\" */ + 0x4D,0x4D,0x49,0x4E,0x8A,0x50,0x52,0x54, /* 000001A8 "MMIN.PRT" */ + 0x30,0x0A,0x60,0x4D,0x4D,0x41,0x58,0x8A, /* 000001B0 "0.`MMAX." */ + 0x50,0x52,0x54,0x30,0x0A,0x68,0x4D,0x4C, /* 000001B8 "PRT0.hML" */ + 0x45,0x4E,0x70,0x50,0x4D,0x49,0x4E,0x4D, /* 000001C0 "ENpPMINM" */ + 0x4D,0x49,0x4E,0x70,0x50,0x4C,0x45,0x4E, /* 000001C8 "MINpPLEN" */ + 0x4D,0x4C,0x45,0x4E,0x72,0x4D,0x4D,0x49, /* 000001D0 "MLENrMMI" */ + 0x4E,0x4D,0x4C,0x45,0x4E,0x4D,0x4D,0x41, /* 000001D8 "NMLENMMA" */ + 0x58,0x74,0x4D,0x4D,0x41,0x58,0x01,0x4D, /* 000001E0 "XtMMAX.M" */ + 0x4D,0x41,0x58,0xA4,0x50,0x52,0x54,0x30, /* 000001E8 "MAX.PRT0" */ + 0x08,0x42,0x55,0x46,0x41,0x11,0x09,0x0A, /* 000001F0 ".BUFA..." */ + 0x06,0x23,0x20,0x0C,0x18,0x79,0x00,0x08, /* 000001F8 ".# ..y.." */ + 0x42,0x55,0x46,0x42,0x11,0x09,0x0A,0x06, /* 00000200 "BUFB...." */ + 0x23,0x00,0x00,0x18,0x79,0x00,0x8B,0x42, /* 00000208 "#...y..B" */ + 0x55,0x46,0x42,0x01,0x49,0x52,0x51,0x56, /* 00000210 "UFB.IRQV" */ + 0x5B,0x82,0x48,0x08,0x4C,0x4E,0x4B,0x41, /* 00000218 "[.H.LNKA" */ + 0x08,0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0, /* 00000220 "._HID.A." */ + 0x0C,0x0F,0x08,0x5F,0x55,0x49,0x44,0x01, /* 00000228 "..._UID." */ + 0x14,0x1C,0x5F,0x53,0x54,0x41,0x00,0x7B, /* 00000230 ".._STA.{" */ + 0x50,0x49,0x52,0x41,0x0A,0x80,0x60,0xA0, /* 00000238 "PIRA..`." */ + 0x08,0x93,0x60,0x0A,0x80,0xA4,0x0A,0x09, /* 00000240 "..`....." */ + 0xA1,0x04,0xA4,0x0A,0x0B,0x14,0x0B,0x5F, /* 00000248 "......._" */ + 0x50,0x52,0x53,0x00,0xA4,0x42,0x55,0x46, /* 00000250 "PRS..BUF" */ + 0x41,0x14,0x11,0x5F,0x44,0x49,0x53,0x00, /* 00000258 "A.._DIS." */ + 0x7D,0x50,0x49,0x52,0x41,0x0A,0x80,0x50, /* 00000260 "}PIRA..P" */ + 0x49,0x52,0x41,0x14,0x1A,0x5F,0x43,0x52, /* 00000268 "IRA.._CR" */ + 0x53,0x00,0x7B,0x50,0x49,0x52,0x41,0x0A, /* 00000270 "S.{PIRA." */ + 0x0F,0x60,0x79,0x01,0x60,0x49,0x52,0x51, /* 00000278 ".`y.`IRQ" */ + 0x56,0xA4,0x42,0x55,0x46,0x42,0x14,0x1B, /* 00000280 "V.BUFB.." */ + 0x5F,0x53,0x52,0x53,0x01,0x8B,0x68,0x01, /* 00000288 "_SRS..h." */ + 0x49,0x52,0x51,0x31,0x82,0x49,0x52,0x51, /* 00000290 "IRQ1.IRQ" */ + 0x31,0x60,0x76,0x60,0x70,0x60,0x50,0x49, /* 00000298 "1`v`p`PI" */ + 0x52,0x41,0x5B,0x82,0x49,0x08,0x4C,0x4E, /* 000002A0 "RA[.I.LN" */ + 0x4B,0x42,0x08,0x5F,0x48,0x49,0x44,0x0C, /* 000002A8 "KB._HID." */ + 0x41,0xD0,0x0C,0x0F,0x08,0x5F,0x55,0x49, /* 000002B0 "A...._UI" */ + 0x44,0x0A,0x02,0x14,0x1C,0x5F,0x53,0x54, /* 000002B8 "D...._ST" */ + 0x41,0x00,0x7B,0x50,0x49,0x52,0x42,0x0A, /* 000002C0 "A.{PIRB." */ + 0x80,0x60,0xA0,0x08,0x93,0x60,0x0A,0x80, /* 000002C8 ".`...`.." */ + 0xA4,0x0A,0x09,0xA1,0x04,0xA4,0x0A,0x0B, /* 000002D0 "........" */ + 0x14,0x0B,0x5F,0x50,0x52,0x53,0x00,0xA4, /* 000002D8 ".._PRS.." */ + 0x42,0x55,0x46,0x41,0x14,0x11,0x5F,0x44, /* 000002E0 "BUFA.._D" */ + 0x49,0x53,0x00,0x7D,0x50,0x49,0x52,0x42, /* 000002E8 "IS.}PIRB" */ + 0x0A,0x80,0x50,0x49,0x52,0x42,0x14,0x1A, /* 000002F0 "..PIRB.." */ + 0x5F,0x43,0x52,0x53,0x00,0x7B,0x50,0x49, /* 000002F8 "_CRS.{PI" */ + 0x52,0x42,0x0A,0x0F,0x60,0x79,0x01,0x60, /* 00000300 "RB..`y.`" */ + 0x49,0x52,0x51,0x56,0xA4,0x42,0x55,0x46, /* 00000308 "IRQV.BUF" */ + 0x42,0x14,0x1B,0x5F,0x53,0x52,0x53,0x01, /* 00000310 "B.._SRS." */ + 0x8B,0x68,0x01,0x49,0x52,0x51,0x31,0x82, /* 00000318 ".h.IRQ1." */ + 0x49,0x52,0x51,0x31,0x60,0x76,0x60,0x70, /* 00000320 "IRQ1`v`p" */ + 0x60,0x50,0x49,0x52,0x42,0x5B,0x82,0x49, /* 00000328 "`PIRB[.I" */ + 0x08,0x4C,0x4E,0x4B,0x43,0x08,0x5F,0x48, /* 00000330 ".LNKC._H" */ + 0x49,0x44,0x0C,0x41,0xD0,0x0C,0x0F,0x08, /* 00000338 "ID.A...." */ + 0x5F,0x55,0x49,0x44,0x0A,0x03,0x14,0x1C, /* 00000340 "_UID...." */ + 0x5F,0x53,0x54,0x41,0x00,0x7B,0x50,0x49, /* 00000348 "_STA.{PI" */ + 0x52,0x43,0x0A,0x80,0x60,0xA0,0x08,0x93, /* 00000350 "RC..`..." */ + 0x60,0x0A,0x80,0xA4,0x0A,0x09,0xA1,0x04, /* 00000358 "`......." */ + 0xA4,0x0A,0x0B,0x14,0x0B,0x5F,0x50,0x52, /* 00000360 "....._PR" */ + 0x53,0x00,0xA4,0x42,0x55,0x46,0x41,0x14, /* 00000368 "S..BUFA." */ + 0x11,0x5F,0x44,0x49,0x53,0x00,0x7D,0x50, /* 00000370 "._DIS.}P" */ + 0x49,0x52,0x43,0x0A,0x80,0x50,0x49,0x52, /* 00000378 "IRC..PIR" */ + 0x43,0x14,0x1A,0x5F,0x43,0x52,0x53,0x00, /* 00000380 "C.._CRS." */ + 0x7B,0x50,0x49,0x52,0x43,0x0A,0x0F,0x60, /* 00000388 "{PIRC..`" */ + 0x79,0x01,0x60,0x49,0x52,0x51,0x56,0xA4, /* 00000390 "y.`IRQV." */ + 0x42,0x55,0x46,0x42,0x14,0x1B,0x5F,0x53, /* 00000398 "BUFB.._S" */ + 0x52,0x53,0x01,0x8B,0x68,0x01,0x49,0x52, /* 000003A0 "RS..h.IR" */ + 0x51,0x31,0x82,0x49,0x52,0x51,0x31,0x60, /* 000003A8 "Q1.IRQ1`" */ + 0x76,0x60,0x70,0x60,0x50,0x49,0x52,0x43, /* 000003B0 "v`p`PIRC" */ + 0x5B,0x82,0x49,0x08,0x4C,0x4E,0x4B,0x44, /* 000003B8 "[.I.LNKD" */ + 0x08,0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0, /* 000003C0 "._HID.A." */ + 0x0C,0x0F,0x08,0x5F,0x55,0x49,0x44,0x0A, /* 000003C8 "..._UID." */ + 0x04,0x14,0x1C,0x5F,0x53,0x54,0x41,0x00, /* 000003D0 "..._STA." */ + 0x7B,0x50,0x49,0x52,0x44,0x0A,0x80,0x60, /* 000003D8 "{PIRD..`" */ + 0xA0,0x08,0x93,0x60,0x0A,0x80,0xA4,0x0A, /* 000003E0 "...`...." */ + 0x09,0xA1,0x04,0xA4,0x0A,0x0B,0x14,0x0B, /* 000003E8 "........" */ + 0x5F,0x50,0x52,0x53,0x00,0xA4,0x42,0x55, /* 000003F0 "_PRS..BU" */ + 0x46,0x41,0x14,0x11,0x5F,0x44,0x49,0x53, /* 000003F8 "FA.._DIS" */ + 0x00,0x7D,0x50,0x49,0x52,0x44,0x0A,0x80, /* 00000400 ".}PIRD.." */ + 0x50,0x49,0x52,0x44,0x14,0x1A,0x5F,0x43, /* 00000408 "PIRD.._C" */ + 0x52,0x53,0x00,0x7B,0x50,0x49,0x52,0x44, /* 00000410 "RS.{PIRD" */ + 0x0A,0x0F,0x60,0x79,0x01,0x60,0x49,0x52, /* 00000418 "..`y.`IR" */ + 0x51,0x56,0xA4,0x42,0x55,0x46,0x42,0x14, /* 00000420 "QV.BUFB." */ + 0x1B,0x5F,0x53,0x52,0x53,0x01,0x8B,0x68, /* 00000428 "._SRS..h" */ + 0x01,0x49,0x52,0x51,0x31,0x82,0x49,0x52, /* 00000430 ".IRQ1.IR" */ + 0x51,0x31,0x60,0x76,0x60,0x70,0x60,0x50, /* 00000438 "Q1`v`p`P" */ + 0x49,0x52,0x44,0x5B,0x82,0x44,0x05,0x48, /* 00000440 "IRD[.D.H" */ + 0x50,0x45,0x54,0x08,0x5F,0x48,0x49,0x44, /* 00000448 "PET._HID" */ + 0x0C,0x41,0xD0,0x01,0x03,0x08,0x5F,0x55, /* 00000450 ".A...._U" */ + 0x49,0x44,0x00,0x14,0x18,0x5F,0x53,0x54, /* 00000458 "ID..._ST" */ + 0x41,0x00,0xA0,0x0C,0x93,0x5E,0x5E,0x5E, /* 00000460 "A....^^^" */ + 0x48,0x50,0x45,0x54,0x00,0xA4,0x00,0xA1, /* 00000468 "HPET...." */ + 0x04,0xA4,0x0A,0x0F,0x08,0x5F,0x43,0x52, /* 00000470 "....._CR" */ + 0x53,0x11,0x1F,0x0A,0x1C,0x87,0x17,0x00, /* 00000478 "S......." */ + 0x00,0x0D,0x01,0x00,0x00,0x00,0x00,0x00, /* 00000480 "........" */ + 0x00,0xD0,0xFE,0xFF,0x03,0xD0,0xFE,0x00, /* 00000488 "........" */ + 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x79, /* 00000490 ".......y" */ + 0x00,0x14,0x16,0x5F,0x50,0x52,0x54,0x00, /* 00000498 "..._PRT." */ + 0xA0,0x0A,0x50,0x49,0x43,0x44,0xA4,0x50, /* 000004A0 "..PICD.P" */ + 0x52,0x54,0x41,0xA4,0x50,0x52,0x54,0x50, /* 000004A8 "RTA.PRTP" */ + 0x08,0x50,0x52,0x54,0x50,0x12,0x49,0x36, /* 000004B0 ".PRTP.I6" */ + 0x3C,0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x01, /* 000004B8 "<......." */ + 0x00,0x00,0x4C,0x4E,0x4B,0x42,0x00,0x12, /* 000004C0 "..LNKB.." */ + 0x0D,0x04,0x0C,0xFF,0xFF,0x01,0x00,0x01, /* 000004C8 "........" */ + 0x4C,0x4E,0x4B,0x43,0x00,0x12,0x0E,0x04, /* 000004D0 "LNKC...." */ + 0x0C,0xFF,0xFF,0x01,0x00,0x0A,0x02,0x4C, /* 000004D8 ".......L" */ + 0x4E,0x4B,0x44,0x00,0x12,0x0E,0x04,0x0C, /* 000004E0 "NKD....." */ + 0xFF,0xFF,0x01,0x00,0x0A,0x03,0x4C,0x4E, /* 000004E8 "......LN" */ + 0x4B,0x41,0x00,0x12,0x0D,0x04,0x0C,0xFF, /* 000004F0 "KA......" */ + 0xFF,0x02,0x00,0x00,0x4C,0x4E,0x4B,0x43, /* 000004F8 "....LNKC" */ + 0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x02, /* 00000500 "........" */ + 0x00,0x01,0x4C,0x4E,0x4B,0x44,0x00,0x12, /* 00000508 "..LNKD.." */ + 0x0E,0x04,0x0C,0xFF,0xFF,0x02,0x00,0x0A, /* 00000510 "........" */ + 0x02,0x4C,0x4E,0x4B,0x41,0x00,0x12,0x0E, /* 00000518 ".LNKA..." */ + 0x04,0x0C,0xFF,0xFF,0x02,0x00,0x0A,0x03, /* 00000520 "........" */ + 0x4C,0x4E,0x4B,0x42,0x00,0x12,0x0D,0x04, /* 00000528 "LNKB...." */ + 0x0C,0xFF,0xFF,0x03,0x00,0x00,0x4C,0x4E, /* 00000530 "......LN" */ + 0x4B,0x44,0x00,0x12,0x0D,0x04,0x0C,0xFF, /* 00000538 "KD......" */ + 0xFF,0x03,0x00,0x01,0x4C,0x4E,0x4B,0x41, /* 00000540 "....LNKA" */ + 0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x03, /* 00000548 "........" */ + 0x00,0x0A,0x02,0x4C,0x4E,0x4B,0x42,0x00, /* 00000550 "...LNKB." */ + 0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x03,0x00, /* 00000558 "........" */ + 0x0A,0x03,0x4C,0x4E,0x4B,0x43,0x00,0x12, /* 00000560 "..LNKC.." */ + 0x0D,0x04,0x0C,0xFF,0xFF,0x04,0x00,0x00, /* 00000568 "........" */ + 0x4C,0x4E,0x4B,0x41,0x00,0x12,0x0D,0x04, /* 00000570 "LNKA...." */ + 0x0C,0xFF,0xFF,0x04,0x00,0x01,0x4C,0x4E, /* 00000578 "......LN" */ + 0x4B,0x42,0x00,0x12,0x0E,0x04,0x0C,0xFF, /* 00000580 "KB......" */ + 0xFF,0x04,0x00,0x0A,0x02,0x4C,0x4E,0x4B, /* 00000588 ".....LNK" */ + 0x43,0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF, /* 00000590 "C......." */ + 0x04,0x00,0x0A,0x03,0x4C,0x4E,0x4B,0x44, /* 00000598 "....LNKD" */ + 0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x05, /* 000005A0 "........" */ + 0x00,0x00,0x4C,0x4E,0x4B,0x42,0x00,0x12, /* 000005A8 "..LNKB.." */ + 0x0D,0x04,0x0C,0xFF,0xFF,0x05,0x00,0x01, /* 000005B0 "........" */ + 0x4C,0x4E,0x4B,0x43,0x00,0x12,0x0E,0x04, /* 000005B8 "LNKC...." */ + 0x0C,0xFF,0xFF,0x05,0x00,0x0A,0x02,0x4C, /* 000005C0 ".......L" */ + 0x4E,0x4B,0x44,0x00,0x12,0x0E,0x04,0x0C, /* 000005C8 "NKD....." */ + 0xFF,0xFF,0x05,0x00,0x0A,0x03,0x4C,0x4E, /* 000005D0 "......LN" */ + 0x4B,0x41,0x00,0x12,0x0D,0x04,0x0C,0xFF, /* 000005D8 "KA......" */ + 0xFF,0x06,0x00,0x00,0x4C,0x4E,0x4B,0x43, /* 000005E0 "....LNKC" */ + 0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x06, /* 000005E8 "........" */ + 0x00,0x01,0x4C,0x4E,0x4B,0x44,0x00,0x12, /* 000005F0 "..LNKD.." */ + 0x0E,0x04,0x0C,0xFF,0xFF,0x06,0x00,0x0A, /* 000005F8 "........" */ + 0x02,0x4C,0x4E,0x4B,0x41,0x00,0x12,0x0E, /* 00000600 ".LNKA..." */ + 0x04,0x0C,0xFF,0xFF,0x06,0x00,0x0A,0x03, /* 00000608 "........" */ + 0x4C,0x4E,0x4B,0x42,0x00,0x12,0x0D,0x04, /* 00000610 "LNKB...." */ + 0x0C,0xFF,0xFF,0x07,0x00,0x00,0x4C,0x4E, /* 00000618 "......LN" */ + 0x4B,0x44,0x00,0x12,0x0D,0x04,0x0C,0xFF, /* 00000620 "KD......" */ + 0xFF,0x07,0x00,0x01,0x4C,0x4E,0x4B,0x41, /* 00000628 "....LNKA" */ + 0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x07, /* 00000630 "........" */ + 0x00,0x0A,0x02,0x4C,0x4E,0x4B,0x42,0x00, /* 00000638 "...LNKB." */ + 0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x07,0x00, /* 00000640 "........" */ + 0x0A,0x03,0x4C,0x4E,0x4B,0x43,0x00,0x12, /* 00000648 "..LNKC.." */ + 0x0D,0x04,0x0C,0xFF,0xFF,0x08,0x00,0x00, /* 00000650 "........" */ + 0x4C,0x4E,0x4B,0x41,0x00,0x12,0x0D,0x04, /* 00000658 "LNKA...." */ + 0x0C,0xFF,0xFF,0x08,0x00,0x01,0x4C,0x4E, /* 00000660 "......LN" */ + 0x4B,0x42,0x00,0x12,0x0E,0x04,0x0C,0xFF, /* 00000668 "KB......" */ + 0xFF,0x08,0x00,0x0A,0x02,0x4C,0x4E,0x4B, /* 00000670 ".....LNK" */ + 0x43,0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF, /* 00000678 "C......." */ + 0x08,0x00,0x0A,0x03,0x4C,0x4E,0x4B,0x44, /* 00000680 "....LNKD" */ + 0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x09, /* 00000688 "........" */ + 0x00,0x00,0x4C,0x4E,0x4B,0x42,0x00,0x12, /* 00000690 "..LNKB.." */ + 0x0D,0x04,0x0C,0xFF,0xFF,0x09,0x00,0x01, /* 00000698 "........" */ + 0x4C,0x4E,0x4B,0x43,0x00,0x12,0x0E,0x04, /* 000006A0 "LNKC...." */ + 0x0C,0xFF,0xFF,0x09,0x00,0x0A,0x02,0x4C, /* 000006A8 ".......L" */ + 0x4E,0x4B,0x44,0x00,0x12,0x0E,0x04,0x0C, /* 000006B0 "NKD....." */ + 0xFF,0xFF,0x09,0x00,0x0A,0x03,0x4C,0x4E, /* 000006B8 "......LN" */ + 0x4B,0x41,0x00,0x12,0x0D,0x04,0x0C,0xFF, /* 000006C0 "KA......" */ + 0xFF,0x0A,0x00,0x00,0x4C,0x4E,0x4B,0x43, /* 000006C8 "....LNKC" */ + 0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x0A, /* 000006D0 "........" */ + 0x00,0x01,0x4C,0x4E,0x4B,0x44,0x00,0x12, /* 000006D8 "..LNKD.." */ + 0x0E,0x04,0x0C,0xFF,0xFF,0x0A,0x00,0x0A, /* 000006E0 "........" */ + 0x02,0x4C,0x4E,0x4B,0x41,0x00,0x12,0x0E, /* 000006E8 ".LNKA..." */ + 0x04,0x0C,0xFF,0xFF,0x0A,0x00,0x0A,0x03, /* 000006F0 "........" */ + 0x4C,0x4E,0x4B,0x42,0x00,0x12,0x0D,0x04, /* 000006F8 "LNKB...." */ + 0x0C,0xFF,0xFF,0x0B,0x00,0x00,0x4C,0x4E, /* 00000700 "......LN" */ + 0x4B,0x44,0x00,0x12,0x0D,0x04,0x0C,0xFF, /* 00000708 "KD......" */ + 0xFF,0x0B,0x00,0x01,0x4C,0x4E,0x4B,0x41, /* 00000710 "....LNKA" */ + 0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x0B, /* 00000718 "........" */ + 0x00,0x0A,0x02,0x4C,0x4E,0x4B,0x42,0x00, /* 00000720 "...LNKB." */ + 0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x0B,0x00, /* 00000728 "........" */ + 0x0A,0x03,0x4C,0x4E,0x4B,0x43,0x00,0x12, /* 00000730 "..LNKC.." */ + 0x0D,0x04,0x0C,0xFF,0xFF,0x0C,0x00,0x00, /* 00000738 "........" */ + 0x4C,0x4E,0x4B,0x41,0x00,0x12,0x0D,0x04, /* 00000740 "LNKA...." */ + 0x0C,0xFF,0xFF,0x0C,0x00,0x01,0x4C,0x4E, /* 00000748 "......LN" */ + 0x4B,0x42,0x00,0x12,0x0E,0x04,0x0C,0xFF, /* 00000750 "KB......" */ + 0xFF,0x0C,0x00,0x0A,0x02,0x4C,0x4E,0x4B, /* 00000758 ".....LNK" */ + 0x43,0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF, /* 00000760 "C......." */ + 0x0C,0x00,0x0A,0x03,0x4C,0x4E,0x4B,0x44, /* 00000768 "....LNKD" */ + 0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x0D, /* 00000770 "........" */ + 0x00,0x00,0x4C,0x4E,0x4B,0x42,0x00,0x12, /* 00000778 "..LNKB.." */ + 0x0D,0x04,0x0C,0xFF,0xFF,0x0D,0x00,0x01, /* 00000780 "........" */ + 0x4C,0x4E,0x4B,0x43,0x00,0x12,0x0E,0x04, /* 00000788 "LNKC...." */ + 0x0C,0xFF,0xFF,0x0D,0x00,0x0A,0x02,0x4C, /* 00000790 ".......L" */ + 0x4E,0x4B,0x44,0x00,0x12,0x0E,0x04,0x0C, /* 00000798 "NKD....." */ + 0xFF,0xFF,0x0D,0x00,0x0A,0x03,0x4C,0x4E, /* 000007A0 "......LN" */ + 0x4B,0x41,0x00,0x12,0x0D,0x04,0x0C,0xFF, /* 000007A8 "KA......" */ + 0xFF,0x0E,0x00,0x00,0x4C,0x4E,0x4B,0x43, /* 000007B0 "....LNKC" */ + 0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x0E, /* 000007B8 "........" */ + 0x00,0x01,0x4C,0x4E,0x4B,0x44,0x00,0x12, /* 000007C0 "..LNKD.." */ + 0x0E,0x04,0x0C,0xFF,0xFF,0x0E,0x00,0x0A, /* 000007C8 "........" */ + 0x02,0x4C,0x4E,0x4B,0x41,0x00,0x12,0x0E, /* 000007D0 ".LNKA..." */ + 0x04,0x0C,0xFF,0xFF,0x0E,0x00,0x0A,0x03, /* 000007D8 "........" */ + 0x4C,0x4E,0x4B,0x42,0x00,0x12,0x0D,0x04, /* 000007E0 "LNKB...." */ + 0x0C,0xFF,0xFF,0x0F,0x00,0x00,0x4C,0x4E, /* 000007E8 "......LN" */ + 0x4B,0x44,0x00,0x12,0x0D,0x04,0x0C,0xFF, /* 000007F0 "KD......" */ + 0xFF,0x0F,0x00,0x01,0x4C,0x4E,0x4B,0x41, /* 000007F8 "....LNKA" */ + 0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x0F, /* 00000800 "........" */ + 0x00,0x0A,0x02,0x4C,0x4E,0x4B,0x42,0x00, /* 00000808 "...LNKB." */ + 0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x0F,0x00, /* 00000810 "........" */ + 0x0A,0x03,0x4C,0x4E,0x4B,0x43,0x00,0x08, /* 00000818 "..LNKC.." */ + 0x50,0x52,0x54,0x41,0x12,0x41,0x2F,0x3C, /* 00000820 "PRTA.A/<" */ + 0x12,0x0B,0x04,0x0C,0xFF,0xFF,0x01,0x00, /* 00000828 "........" */ + 0x00,0x00,0x0A,0x14,0x12,0x0B,0x04,0x0C, /* 00000830 "........" */ + 0xFF,0xFF,0x01,0x00,0x01,0x00,0x0A,0x15, /* 00000838 "........" */ + 0x12,0x0C,0x04,0x0C,0xFF,0xFF,0x01,0x00, /* 00000840 "........" */ + 0x0A,0x02,0x00,0x0A,0x16,0x12,0x0C,0x04, /* 00000848 "........" */ + 0x0C,0xFF,0xFF,0x01,0x00,0x0A,0x03,0x00, /* 00000850 "........" */ + 0x0A,0x17,0x12,0x0B,0x04,0x0C,0xFF,0xFF, /* 00000858 "........" */ + 0x02,0x00,0x00,0x00,0x0A,0x18,0x12,0x0B, /* 00000860 "........" */ + 0x04,0x0C,0xFF,0xFF,0x02,0x00,0x01,0x00, /* 00000868 "........" */ + 0x0A,0x19,0x12,0x0C,0x04,0x0C,0xFF,0xFF, /* 00000870 "........" */ + 0x02,0x00,0x0A,0x02,0x00,0x0A,0x1A,0x12, /* 00000878 "........" */ + 0x0C,0x04,0x0C,0xFF,0xFF,0x02,0x00,0x0A, /* 00000880 "........" */ + 0x03,0x00,0x0A,0x1B,0x12,0x0B,0x04,0x0C, /* 00000888 "........" */ + 0xFF,0xFF,0x03,0x00,0x00,0x00,0x0A,0x1C, /* 00000890 "........" */ + 0x12,0x0B,0x04,0x0C,0xFF,0xFF,0x03,0x00, /* 00000898 "........" */ + 0x01,0x00,0x0A,0x1D,0x12,0x0C,0x04,0x0C, /* 000008A0 "........" */ + 0xFF,0xFF,0x03,0x00,0x0A,0x02,0x00,0x0A, /* 000008A8 "........" */ + 0x1E,0x12,0x0C,0x04,0x0C,0xFF,0xFF,0x03, /* 000008B0 "........" */ + 0x00,0x0A,0x03,0x00,0x0A,0x1F,0x12,0x0B, /* 000008B8 "........" */ + 0x04,0x0C,0xFF,0xFF,0x04,0x00,0x00,0x00, /* 000008C0 "........" */ + 0x0A,0x20,0x12,0x0B,0x04,0x0C,0xFF,0xFF, /* 000008C8 ". ......" */ + 0x04,0x00,0x01,0x00,0x0A,0x21,0x12,0x0C, /* 000008D0 ".....!.." */ + 0x04,0x0C,0xFF,0xFF,0x04,0x00,0x0A,0x02, /* 000008D8 "........" */ + 0x00,0x0A,0x22,0x12,0x0C,0x04,0x0C,0xFF, /* 000008E0 ".."....." */ + 0xFF,0x04,0x00,0x0A,0x03,0x00,0x0A,0x23, /* 000008E8 ".......#" */ + 0x12,0x0B,0x04,0x0C,0xFF,0xFF,0x05,0x00, /* 000008F0 "........" */ + 0x00,0x00,0x0A,0x24,0x12,0x0B,0x04,0x0C, /* 000008F8 "...$...." */ + 0xFF,0xFF,0x05,0x00,0x01,0x00,0x0A,0x25, /* 00000900 ".......%" */ + 0x12,0x0C,0x04,0x0C,0xFF,0xFF,0x05,0x00, /* 00000908 "........" */ + 0x0A,0x02,0x00,0x0A,0x26,0x12,0x0C,0x04, /* 00000910 "....&..." */ + 0x0C,0xFF,0xFF,0x05,0x00,0x0A,0x03,0x00, /* 00000918 "........" */ + 0x0A,0x27,0x12,0x0B,0x04,0x0C,0xFF,0xFF, /* 00000920 ".'......" */ + 0x06,0x00,0x00,0x00,0x0A,0x28,0x12,0x0B, /* 00000928 ".....(.." */ + 0x04,0x0C,0xFF,0xFF,0x06,0x00,0x01,0x00, /* 00000930 "........" */ + 0x0A,0x29,0x12,0x0C,0x04,0x0C,0xFF,0xFF, /* 00000938 ".)......" */ + 0x06,0x00,0x0A,0x02,0x00,0x0A,0x2A,0x12, /* 00000940 "......*." */ + 0x0C,0x04,0x0C,0xFF,0xFF,0x06,0x00,0x0A, /* 00000948 "........" */ + 0x03,0x00,0x0A,0x2B,0x12,0x0B,0x04,0x0C, /* 00000950 "...+...." */ + 0xFF,0xFF,0x07,0x00,0x00,0x00,0x0A,0x2C, /* 00000958 ".......," */ + 0x12,0x0B,0x04,0x0C,0xFF,0xFF,0x07,0x00, /* 00000960 "........" */ + 0x01,0x00,0x0A,0x2D,0x12,0x0C,0x04,0x0C, /* 00000968 "...-...." */ + 0xFF,0xFF,0x07,0x00,0x0A,0x02,0x00,0x0A, /* 00000970 "........" */ + 0x2E,0x12,0x0C,0x04,0x0C,0xFF,0xFF,0x07, /* 00000978 "........" */ + 0x00,0x0A,0x03,0x00,0x0A,0x2F,0x12,0x0B, /* 00000980 "...../.." */ + 0x04,0x0C,0xFF,0xFF,0x08,0x00,0x00,0x00, /* 00000988 "........" */ + 0x0A,0x11,0x12,0x0B,0x04,0x0C,0xFF,0xFF, /* 00000990 "........" */ + 0x08,0x00,0x01,0x00,0x0A,0x12,0x12,0x0C, /* 00000998 "........" */ + 0x04,0x0C,0xFF,0xFF,0x08,0x00,0x0A,0x02, /* 000009A0 "........" */ + 0x00,0x0A,0x13,0x12,0x0C,0x04,0x0C,0xFF, /* 000009A8 "........" */ + 0xFF,0x08,0x00,0x0A,0x03,0x00,0x0A,0x14, /* 000009B0 "........" */ + 0x12,0x0B,0x04,0x0C,0xFF,0xFF,0x09,0x00, /* 000009B8 "........" */ + 0x00,0x00,0x0A,0x15,0x12,0x0B,0x04,0x0C, /* 000009C0 "........" */ + 0xFF,0xFF,0x09,0x00,0x01,0x00,0x0A,0x16, /* 000009C8 "........" */ + 0x12,0x0C,0x04,0x0C,0xFF,0xFF,0x09,0x00, /* 000009D0 "........" */ + 0x0A,0x02,0x00,0x0A,0x17,0x12,0x0C,0x04, /* 000009D8 "........" */ + 0x0C,0xFF,0xFF,0x09,0x00,0x0A,0x03,0x00, /* 000009E0 "........" */ + 0x0A,0x18,0x12,0x0B,0x04,0x0C,0xFF,0xFF, /* 000009E8 "........" */ + 0x0A,0x00,0x00,0x00,0x0A,0x19,0x12,0x0B, /* 000009F0 "........" */ + 0x04,0x0C,0xFF,0xFF,0x0A,0x00,0x01,0x00, /* 000009F8 "........" */ + 0x0A,0x1A,0x12,0x0C,0x04,0x0C,0xFF,0xFF, /* 00000A00 "........" */ + 0x0A,0x00,0x0A,0x02,0x00,0x0A,0x1B,0x12, /* 00000A08 "........" */ + 0x0C,0x04,0x0C,0xFF,0xFF,0x0A,0x00,0x0A, /* 00000A10 "........" */ + 0x03,0x00,0x0A,0x1C,0x12,0x0B,0x04,0x0C, /* 00000A18 "........" */ + 0xFF,0xFF,0x0B,0x00,0x00,0x00,0x0A,0x1D, /* 00000A20 "........" */ + 0x12,0x0B,0x04,0x0C,0xFF,0xFF,0x0B,0x00, /* 00000A28 "........" */ + 0x01,0x00,0x0A,0x1E,0x12,0x0C,0x04,0x0C, /* 00000A30 "........" */ + 0xFF,0xFF,0x0B,0x00,0x0A,0x02,0x00,0x0A, /* 00000A38 "........" */ + 0x1F,0x12,0x0C,0x04,0x0C,0xFF,0xFF,0x0B, /* 00000A40 "........" */ + 0x00,0x0A,0x03,0x00,0x0A,0x20,0x12,0x0B, /* 00000A48 "..... .." */ + 0x04,0x0C,0xFF,0xFF,0x0C,0x00,0x00,0x00, /* 00000A50 "........" */ + 0x0A,0x21,0x12,0x0B,0x04,0x0C,0xFF,0xFF, /* 00000A58 ".!......" */ + 0x0C,0x00,0x01,0x00,0x0A,0x22,0x12,0x0C, /* 00000A60 ".....".." */ + 0x04,0x0C,0xFF,0xFF,0x0C,0x00,0x0A,0x02, /* 00000A68 "........" */ + 0x00,0x0A,0x23,0x12,0x0C,0x04,0x0C,0xFF, /* 00000A70 "..#....." */ + 0xFF,0x0C,0x00,0x0A,0x03,0x00,0x0A,0x24, /* 00000A78 ".......$" */ + 0x12,0x0B,0x04,0x0C,0xFF,0xFF,0x0D,0x00, /* 00000A80 "........" */ + 0x00,0x00,0x0A,0x25,0x12,0x0B,0x04,0x0C, /* 00000A88 "...%...." */ + 0xFF,0xFF,0x0D,0x00,0x01,0x00,0x0A,0x26, /* 00000A90 ".......&" */ + 0x12,0x0C,0x04,0x0C,0xFF,0xFF,0x0D,0x00, /* 00000A98 "........" */ + 0x0A,0x02,0x00,0x0A,0x27,0x12,0x0C,0x04, /* 00000AA0 "....'..." */ + 0x0C,0xFF,0xFF,0x0D,0x00,0x0A,0x03,0x00, /* 00000AA8 "........" */ + 0x0A,0x28,0x12,0x0B,0x04,0x0C,0xFF,0xFF, /* 00000AB0 ".(......" */ + 0x0E,0x00,0x00,0x00,0x0A,0x29,0x12,0x0B, /* 00000AB8 ".....).." */ + 0x04,0x0C,0xFF,0xFF,0x0E,0x00,0x01,0x00, /* 00000AC0 "........" */ + 0x0A,0x2A,0x12,0x0C,0x04,0x0C,0xFF,0xFF, /* 00000AC8 ".*......" */ + 0x0E,0x00,0x0A,0x02,0x00,0x0A,0x2B,0x12, /* 00000AD0 "......+." */ + 0x0C,0x04,0x0C,0xFF,0xFF,0x0E,0x00,0x0A, /* 00000AD8 "........" */ + 0x03,0x00,0x0A,0x2C,0x12,0x0B,0x04,0x0C, /* 00000AE0 "...,...." */ + 0xFF,0xFF,0x0F,0x00,0x00,0x00,0x0A,0x2D, /* 00000AE8 ".......-" */ + 0x12,0x0B,0x04,0x0C,0xFF,0xFF,0x0F,0x00, /* 00000AF0 "........" */ + 0x01,0x00,0x0A,0x2E,0x12,0x0C,0x04,0x0C, /* 00000AF8 "........" */ + 0xFF,0xFF,0x0F,0x00,0x0A,0x02,0x00,0x0A, /* 00000B00 "........" */ + 0x2F,0x12,0x0C,0x04,0x0C,0xFF,0xFF,0x0F, /* 00000B08 "/......." */ + 0x00,0x0A,0x03,0x00,0x0A,0x10,0x5B,0x82, /* 00000B10 "......[." */ + 0x46,0x37,0x49,0x53,0x41,0x5F,0x08,0x5F, /* 00000B18 "F7ISA_._" */ + 0x41,0x44,0x52,0x0C,0x00,0x00,0x01,0x00, /* 00000B20 "ADR....." */ + 0x5B,0x80,0x50,0x49,0x52,0x51,0x02,0x0A, /* 00000B28 "[.PIRQ.." */ + 0x60,0x0A,0x04,0x10,0x2E,0x5C,0x00,0x5B, /* 00000B30 "`....\.[" */ + 0x81,0x29,0x5C,0x2F,0x04,0x5F,0x53,0x42, /* 00000B38 ".)\/._SB" */ + 0x5F,0x50,0x43,0x49,0x30,0x49,0x53,0x41, /* 00000B40 "_PCI0ISA" */ + 0x5F,0x50,0x49,0x52,0x51,0x01,0x50,0x49, /* 00000B48 "_PIRQ.PI" */ + 0x52,0x41,0x08,0x50,0x49,0x52,0x42,0x08, /* 00000B50 "RA.PIRB." */ + 0x50,0x49,0x52,0x43,0x08,0x50,0x49,0x52, /* 00000B58 "PIRC.PIR" */ + 0x44,0x08,0x5B,0x82,0x46,0x0B,0x53,0x59, /* 00000B60 "D.[.F.SY" */ + 0x53,0x52,0x08,0x5F,0x48,0x49,0x44,0x0C, /* 00000B68 "SR._HID." */ + 0x41,0xD0,0x0C,0x02,0x08,0x5F,0x55,0x49, /* 00000B70 "A...._UI" */ + 0x44,0x01,0x08,0x43,0x52,0x53,0x5F,0x11, /* 00000B78 "D..CRS_." */ + 0x4E,0x08,0x0A,0x8A,0x47,0x01,0x10,0x00, /* 00000B80 "N...G..." */ + 0x10,0x00,0x00,0x10,0x47,0x01,0x22,0x00, /* 00000B88 "....G."." */ + 0x22,0x00,0x00,0x0C,0x47,0x01,0x30,0x00, /* 00000B90 ""...G.0." */ + 0x30,0x00,0x00,0x10,0x47,0x01,0x44,0x00, /* 00000B98 "0...G.D." */ + 0x44,0x00,0x00,0x1C,0x47,0x01,0x62,0x00, /* 00000BA0 "D...G.b." */ + 0x62,0x00,0x00,0x02,0x47,0x01,0x65,0x00, /* 00000BA8 "b...G.e." */ + 0x65,0x00,0x00,0x0B,0x47,0x01,0x72,0x00, /* 00000BB0 "e...G.r." */ + 0x72,0x00,0x00,0x0E,0x47,0x01,0x80,0x00, /* 00000BB8 "r...G..." */ + 0x80,0x00,0x00,0x01,0x47,0x01,0x84,0x00, /* 00000BC0 "....G..." */ + 0x84,0x00,0x00,0x03,0x47,0x01,0x88,0x00, /* 00000BC8 "....G..." */ + 0x88,0x00,0x00,0x01,0x47,0x01,0x8C,0x00, /* 00000BD0 "....G..." */ + 0x8C,0x00,0x00,0x03,0x47,0x01,0x90,0x00, /* 00000BD8 "....G..." */ + 0x90,0x00,0x00,0x10,0x47,0x01,0xA2,0x00, /* 00000BE0 "....G..." */ + 0xA2,0x00,0x00,0x1C,0x47,0x01,0xE0,0x00, /* 00000BE8 "....G..." */ + 0xE0,0x00,0x00,0x10,0x47,0x01,0xA0,0x08, /* 00000BF0 "....G..." */ + 0xA0,0x08,0x00,0x04,0x47,0x01,0xC0,0x0C, /* 00000BF8 "....G..." */ + 0xC0,0x0C,0x00,0x10,0x47,0x01,0xD0,0x04, /* 00000C00 "....G..." */ + 0xD0,0x04,0x00,0x02,0x79,0x00,0x14,0x0B, /* 00000C08 "....y..." */ + 0x5F,0x43,0x52,0x53,0x00,0xA4,0x43,0x52, /* 00000C10 "_CRS..CR" */ + 0x53,0x5F,0x5B,0x82,0x2B,0x50,0x49,0x43, /* 00000C18 "S_[.+PIC" */ + 0x5F,0x08,0x5F,0x48,0x49,0x44,0x0B,0x41, /* 00000C20 "_._HID.A" */ + 0xD0,0x08,0x5F,0x43,0x52,0x53,0x11,0x18, /* 00000C28 ".._CRS.." */ + 0x0A,0x15,0x47,0x01,0x20,0x00,0x20,0x00, /* 00000C30 "..G. . ." */ + 0x01,0x02,0x47,0x01,0xA0,0x00,0xA0,0x00, /* 00000C38 "..G....." */ + 0x01,0x02,0x22,0x04,0x00,0x79,0x00,0x5B, /* 00000C40 ".."..y.[" */ + 0x82,0x47,0x05,0x44,0x4D,0x41,0x30,0x08, /* 00000C48 ".G.DMA0." */ + 0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0,0x02, /* 00000C50 "_HID.A.." */ + 0x00,0x08,0x5F,0x43,0x52,0x53,0x11,0x41, /* 00000C58 ".._CRS.A" */ + 0x04,0x0A,0x3D,0x2A,0x10,0x04,0x47,0x01, /* 00000C60 "..=*..G." */ + 0x00,0x00,0x00,0x00,0x00,0x10,0x47,0x01, /* 00000C68 "......G." */ + 0x81,0x00,0x81,0x00,0x00,0x03,0x47,0x01, /* 00000C70 "......G." */ + 0x87,0x00,0x87,0x00,0x00,0x01,0x47,0x01, /* 00000C78 "......G." */ + 0x89,0x00,0x89,0x00,0x00,0x03,0x47,0x01, /* 00000C80 "......G." */ + 0x8F,0x00,0x8F,0x00,0x00,0x01,0x47,0x01, /* 00000C88 "......G." */ + 0xC0,0x00,0xC0,0x00,0x00,0x20,0x47,0x01, /* 00000C90 "..... G." */ + 0x80,0x04,0x80,0x04,0x00,0x10,0x79,0x00, /* 00000C98 "......y." */ + 0x5B,0x82,0x25,0x54,0x4D,0x52,0x5F,0x08, /* 00000CA0 "[.%TMR_." */ + 0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0,0x01, /* 00000CA8 "_HID.A.." */ + 0x00,0x08,0x5F,0x43,0x52,0x53,0x11,0x10, /* 00000CB0 ".._CRS.." */ + 0x0A,0x0D,0x47,0x01,0x40,0x00,0x40,0x00, /* 00000CB8 "..G.@.@." */ + 0x00,0x04,0x22,0x01,0x00,0x79,0x00,0x5B, /* 00000CC0 ".."..y.[" */ + 0x82,0x25,0x52,0x54,0x43,0x5F,0x08,0x5F, /* 00000CC8 ".%RTC_._" */ + 0x48,0x49,0x44,0x0C,0x41,0xD0,0x0B,0x00, /* 00000CD0 "HID.A..." */ + 0x08,0x5F,0x43,0x52,0x53,0x11,0x10,0x0A, /* 00000CD8 "._CRS..." */ + 0x0D,0x47,0x01,0x70,0x00,0x70,0x00,0x00, /* 00000CE0 ".G.p.p.." */ + 0x02,0x22,0x00,0x01,0x79,0x00,0x5B,0x82, /* 00000CE8 "."..y.[." */ + 0x22,0x53,0x50,0x4B,0x52,0x08,0x5F,0x48, /* 00000CF0 ""SPKR._H" */ + 0x49,0x44,0x0C,0x41,0xD0,0x08,0x00,0x08, /* 00000CF8 "ID.A...." */ + 0x5F,0x43,0x52,0x53,0x11,0x0D,0x0A,0x0A, /* 00000D00 "_CRS...." */ + 0x47,0x01,0x61,0x00,0x61,0x00,0x00,0x01, /* 00000D08 "G.a.a..." */ + 0x79,0x00,0x5B,0x82,0x31,0x50,0x53,0x32, /* 00000D10 "y.[.1PS2" */ + 0x4D,0x08,0x5F,0x48,0x49,0x44,0x0C,0x41, /* 00000D18 "M._HID.A" */ + 0xD0,0x0F,0x13,0x08,0x5F,0x43,0x49,0x44, /* 00000D20 "...._CID" */ + 0x0C,0x41,0xD0,0x0F,0x13,0x14,0x09,0x5F, /* 00000D28 ".A....._" */ + 0x53,0x54,0x41,0x00,0xA4,0x0A,0x0F,0x08, /* 00000D30 "STA....." */ + 0x5F,0x43,0x52,0x53,0x11,0x08,0x0A,0x05, /* 00000D38 "_CRS...." */ + 0x22,0x00,0x10,0x79,0x00,0x5B,0x82,0x42, /* 00000D40 ""..y.[.B" */ + 0x04,0x50,0x53,0x32,0x4B,0x08,0x5F,0x48, /* 00000D48 ".PS2K._H" */ + 0x49,0x44,0x0C,0x41,0xD0,0x03,0x03,0x08, /* 00000D50 "ID.A...." */ + 0x5F,0x43,0x49,0x44,0x0C,0x41,0xD0,0x03, /* 00000D58 "_CID.A.." */ + 0x0B,0x14,0x09,0x5F,0x53,0x54,0x41,0x00, /* 00000D60 "..._STA." */ + 0xA4,0x0A,0x0F,0x08,0x5F,0x43,0x52,0x53, /* 00000D68 "...._CRS" */ + 0x11,0x18,0x0A,0x15,0x47,0x01,0x60,0x00, /* 00000D70 "....G.`." */ + 0x60,0x00,0x00,0x01,0x47,0x01,0x64,0x00, /* 00000D78 "`...G.d." */ + 0x64,0x00,0x00,0x01,0x22,0x02,0x00,0x79, /* 00000D80 "d..."..y" */ + 0x00,0x5B,0x82,0x3A,0x46,0x44,0x43,0x30, /* 00000D88 ".[.:FDC0" */ + 0x08,0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0, /* 00000D90 "._HID.A." */ + 0x07,0x00,0x14,0x09,0x5F,0x53,0x54,0x41, /* 00000D98 "...._STA" */ + 0x00,0xA4,0x0A,0x0F,0x08,0x5F,0x43,0x52, /* 00000DA0 "....._CR" */ + 0x53,0x11,0x1B,0x0A,0x18,0x47,0x01,0xF0, /* 00000DA8 "S....G.." */ + 0x03,0xF0,0x03,0x01,0x06,0x47,0x01,0xF7, /* 00000DB0 ".....G.." */ + 0x03,0xF7,0x03,0x01,0x01,0x22,0x40,0x00, /* 00000DB8 "....."@." */ + 0x2A,0x04,0x00,0x79,0x00,0x5B,0x82,0x46, /* 00000DC0 "*..y.[.F" */ + 0x04,0x55,0x41,0x52,0x31,0x08,0x5F,0x48, /* 00000DC8 ".UAR1._H" */ + 0x49,0x44,0x0C,0x41,0xD0,0x05,0x01,0x08, /* 00000DD0 "ID.A...." */ + 0x5F,0x55,0x49,0x44,0x01,0x14,0x19,0x5F, /* 00000DD8 "_UID..._" */ + 0x53,0x54,0x41,0x00,0xA0,0x0D,0x93,0x5E, /* 00000DE0 "STA....^" */ + 0x5E,0x5E,0x5E,0x55,0x41,0x52,0x31,0x00, /* 00000DE8 "^^^UAR1." */ + 0xA4,0x00,0xA1,0x04,0xA4,0x0A,0x0F,0x08, /* 00000DF0 "........" */ + 0x5F,0x43,0x52,0x53,0x11,0x10,0x0A,0x0D, /* 00000DF8 "_CRS...." */ + 0x47,0x01,0xF8,0x03,0xF8,0x03,0x08,0x08, /* 00000E00 "G......." */ + 0x22,0x10,0x00,0x79,0x00,0x5B,0x82,0x47, /* 00000E08 ""..y.[.G" */ + 0x04,0x55,0x41,0x52,0x32,0x08,0x5F,0x48, /* 00000E10 ".UAR2._H" */ + 0x49,0x44,0x0C,0x41,0xD0,0x05,0x01,0x08, /* 00000E18 "ID.A...." */ + 0x5F,0x55,0x49,0x44,0x0A,0x02,0x14,0x19, /* 00000E20 "_UID...." */ + 0x5F,0x53,0x54,0x41,0x00,0xA0,0x0D,0x93, /* 00000E28 "_STA...." */ + 0x5E,0x5E,0x5E,0x5E,0x55,0x41,0x52,0x32, /* 00000E30 "^^^^UAR2" */ + 0x00,0xA4,0x00,0xA1,0x04,0xA4,0x0A,0x0F, /* 00000E38 "........" */ + 0x08,0x5F,0x43,0x52,0x53,0x11,0x10,0x0A, /* 00000E40 "._CRS..." */ + 0x0D,0x47,0x01,0xF8,0x02,0xF8,0x02,0x08, /* 00000E48 ".G......" */ + 0x08,0x22,0x08,0x00,0x79,0x00,0x5B,0x82, /* 00000E50 "."..y.[." */ + 0x36,0x4C,0x54,0x50,0x31,0x08,0x5F,0x48, /* 00000E58 "6LTP1._H" */ + 0x49,0x44,0x0C,0x41,0xD0,0x04,0x00,0x08, /* 00000E60 "ID.A...." */ + 0x5F,0x55,0x49,0x44,0x0A,0x02,0x14,0x09, /* 00000E68 "_UID...." */ + 0x5F,0x53,0x54,0x41,0x00,0xA4,0x0A,0x0F, /* 00000E70 "_STA...." */ + 0x08,0x5F,0x43,0x52,0x53,0x11,0x10,0x0A, /* 00000E78 "._CRS..." */ + 0x0D,0x47,0x01,0x78,0x03,0x78,0x03,0x08, /* 00000E80 ".G.x.x.." */ + 0x08,0x22,0x80,0x00,0x79,0x00, }; int DsdtLen=sizeof(AmlCode); diff --git a/tools/fs-back/fs-backend.c b/tools/fs-back/fs-backend.c index 634d5fa31e..fd5ba2b46b 100644 --- a/tools/fs-back/fs-backend.c +++ b/tools/fs-back/fs-backend.c @@ -140,8 +140,8 @@ void* handle_mount(void *data) handle_aio_events(mount); moretodo: rp = mount->ring.sring->req_prod; - rmb(); /* Ensure we see queued requests up to 'rp'. */ - + xen_rmb(); /* Ensure we see queued requests up to 'rp'. */ + while ((cons = mount->ring.req_cons) != rp) { int i; diff --git a/tools/ioemu/Makefile.target b/tools/ioemu/Makefile.target index ebd691b5f0..965d726adf 100644 --- a/tools/ioemu/Makefile.target +++ b/tools/ioemu/Makefile.target @@ -15,7 +15,7 @@ TARGET_BASE_ARCH:=sparc endif TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)$(TARGET_SUB) VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio -CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) +CPPFLAGS+=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) CPPFLAGS+= -I$(XEN_ROOT)/tools/libxc CPPFLAGS+= -I$(XEN_ROOT)/tools/xenstore CPPFLAGS+= -I$(XEN_ROOT)/tools/include @@ -66,7 +66,11 @@ else QEMU_SYSTEM=qemu-fast endif +ifdef CONFIG_STUBDOM +QEMU_SYSTEM=qemu.a +else QEMU_SYSTEM=qemu-dm +endif ifdef CONFIG_USER_ONLY PROGS=$(QEMU_USER) @@ -345,14 +349,25 @@ VL_OBJS=vl.o osdep.o readline.o monitor.o pci.o console.o isa_mmio.o VL_OBJS+=cutils.o VL_OBJS+=block.o block-raw.o VL_OBJS+=block-cow.o block-qcow.o aes.o block-vmdk.o block-cloop.o block-dmg.o block-bochs.o block-vpc.o block-vvfat.o block-qcow2.o +ifdef CONFIG_STUBDOM +VL_OBJS+=block-vbd.o +endif ifdef CONFIG_WIN32 VL_OBJS+=tap-win32.o endif -ifeq (,$(wildcard /usr/include/pci)) +ifdef CONFIG_STUBDOM +CONFIG_PASSTHROUGH=1 +else + ifeq (,$(wildcard /usr/include/pci)) $(warning *** pciutils-devl package not found - missing /usr/include/pci) $(warning *** PCI passthrough capability has been disabled) -else + else +CONFIG_PASSTHROUGH=1 + endif +endif + +ifdef CONFIG_PASSTHROUGH LIBS+=-lpci VL_OBJS+= pass-through.o CFLAGS += -DCONFIG_PASSTHROUGH @@ -404,13 +419,13 @@ VL_OBJS+= ne2000.o rtl8139.o pcnet.o e100.o ifeq ($(TARGET_BASE_ARCH), i386) # Hardware support -VL_OBJS+= ide.o pckbd.o ps2.o vga.o $(SOUND_HW) dma.o $(AUDIODRV) extboot.o +VL_OBJS+= ide.o pckbd.o ps2.o vga.o dma.o extboot.o ifeq ($(ARCH),ia64) VL_OBJS+= fdc.o mc146818rtc.o serial.o pc.o else VL_OBJS+= fdc.o serial.o pc.o endif -VL_OBJS+= cirrus_vga.o mixeng.o parallel.o acpi.o +VL_OBJS+= cirrus_vga.o parallel.o acpi.o VL_OBJS+= usb-uhci.o smbus_eeprom.o VL_OBJS+= piix4acpi.o VL_OBJS+= xenstore.o @@ -419,22 +434,32 @@ VL_OBJS+= xen_machine_fv.o VL_OBJS+= xen_machine_pv.o VL_OBJS+= xenfb.o VL_OBJS+= xen_console.o +ifndef CONFIG_STUBDOM VL_OBJS+= tpm_tis.o +VL_OBJS+= $(SOUND_HW) $(AUDIODRV) mixeng.o +CPPFLAGS += -DHAS_TPM CPPFLAGS += -DHAS_AUDIO endif +endif ifeq ($(TARGET_BASE_ARCH), ppc) -VL_OBJS+= ppc.o ide.o pckbd.o ps2.o vga.o $(SOUND_HW) dma.o $(AUDIODRV) +VL_OBJS+= ppc.o ide.o pckbd.o ps2.o vga.o dma.o VL_OBJS+= mc146818rtc.o serial.o i8259.o i8254.o fdc.o m48t59.o VL_OBJS+= ppc_prep.o ppc_chrp.o cuda.o adb.o openpic.o heathrow_pic.o mixeng.o VL_OBJS+= grackle_pci.o prep_pci.o unin_pci.o +ifndef CONFIG_STUBDOM +VL_OBJS+= $(SOUND_HW) $(AUDIODRV) CPPFLAGS += -DHAS_AUDIO endif +endif ifeq ($(TARGET_ARCH), mips) VL_OBJS+= mips_r4k.o mips_malta.o mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o VL_OBJS+= ide.o gt64xxx.o pckbd.o ps2.o fdc.o mc146818rtc.o usb-uhci.o acpi.o -VL_OBJS+= piix_pci.o parallel.o mixeng.o cirrus_vga.o $(SOUND_HW) $(AUDIODRV) +VL_OBJS+= piix_pci.o parallel.o mixeng.o cirrus_vga.o +ifndef CONFIG_STUBDOM +VL_OBJS+= $(SOUND_HW) $(AUDIODRV) DEFINES += -DHAS_AUDIO endif +endif ifeq ($(TARGET_BASE_ARCH), sparc) ifeq ($(TARGET_ARCH), sparc64) VL_OBJS+= sun4u.o ide.o pckbd.o ps2.o vga.o apb_pci.o @@ -512,7 +537,11 @@ SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole endif $(QEMU_SYSTEM): $(VL_OBJS) libqemu.a +ifdef CONFIG_STUBDOM + $(AR) rcs $@ $(VL_OBJS) +else $(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(VL_LIBS) +endif cocoa.o: cocoa.m $(CC) $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $< diff --git a/tools/ioemu/aes.c b/tools/ioemu/aes.c index cd4484ff9b..e75b168a80 100644 --- a/tools/ioemu/aes.c +++ b/tools/ioemu/aes.c @@ -33,9 +33,11 @@ #define NDEBUG #include <assert.h> +#ifndef CONFIG_STUBDOM typedef uint32_t u32; typedef uint16_t u16; typedef uint8_t u8; +#endif #define MAXKC (256/32) #define MAXKB (256/8) diff --git a/tools/ioemu/block-raw.c b/tools/ioemu/block-raw.c index 68e8a370ca..182d2ec55e 100644 --- a/tools/ioemu/block-raw.c +++ b/tools/ioemu/block-raw.c @@ -25,7 +25,9 @@ #include "block_int.h" #include <assert.h> #ifndef _WIN32 +#ifndef NO_AIO #include <aio.h> +#endif #ifndef QEMU_TOOL #include "exec-all.h" @@ -167,10 +169,16 @@ static int raw_pread(BlockDriverState *bs, int64_t offset, } s->lseek_err_cnt=0; - ret = read(s->fd, buf, count); - if (ret == count) - goto label__raw_read__success; + uint64_t done; + for (done = 0; done < count; done += ret) { + ret = read(s->fd, buf + done, count - done); + if (ret == -1) + goto label__raw_read__error; + } + ret = count; + goto label__raw_read__success; +label__raw_read__error: DEBUG_BLOCK_PRINT("raw_read(%d:%s, %" PRId64 ", %p, %d) [%" PRId64 "] read failed %d : %d = %s\n", s->fd, bs->filename, @@ -232,9 +240,16 @@ static int raw_pwrite(BlockDriverState *bs, int64_t offset, } s->lseek_err_cnt = 0; - ret = write(s->fd, buf, count); - if (ret == count) - goto label__raw_write__success; + uint64_t done; + for (done = 0; done < count; done += ret) { + ret = write(s->fd, buf + done, count - done); + if (ret == -1) + goto label__raw_write__error; + } + ret = count; + goto label__raw_write__success; + +label__raw_write__error: DEBUG_BLOCK_PRINT("raw_write(%d:%s, %" PRId64 ", %p, %d) [%" PRId64 "] write failed %d : %d = %s\n", s->fd, @@ -255,6 +270,7 @@ label__raw_write__success: /***********************************************************/ /* Unix AIO using POSIX AIO */ +#ifndef NO_AIO typedef struct RawAIOCB { BlockDriverAIOCB common; struct aiocb aiocb; @@ -480,6 +496,7 @@ static void raw_aio_cancel(BlockDriverAIOCB *blockacb) pacb = &acb->next; } } +#endif static void raw_close(BlockDriverState *bs) { @@ -600,10 +617,12 @@ BlockDriver bdrv_raw = { raw_create, raw_flush, +#ifndef NO_AIO .bdrv_aio_read = raw_aio_read, .bdrv_aio_write = raw_aio_write, .bdrv_aio_cancel = raw_aio_cancel, .aiocb_size = sizeof(RawAIOCB), +#endif .protocol_name = "file", .bdrv_pread = raw_pread, .bdrv_pwrite = raw_pwrite, @@ -936,10 +955,12 @@ BlockDriver bdrv_host_device = { NULL, raw_flush, +#ifndef NO_AIO .bdrv_aio_read = raw_aio_read, .bdrv_aio_write = raw_aio_write, .bdrv_aio_cancel = raw_aio_cancel, .aiocb_size = sizeof(RawAIOCB), +#endif .bdrv_pread = raw_pread, .bdrv_pwrite = raw_pwrite, .bdrv_getlength = raw_getlength, diff --git a/tools/ioemu/block-vbd.c b/tools/ioemu/block-vbd.c new file mode 100644 index 0000000000..937bb5e62d --- /dev/null +++ b/tools/ioemu/block-vbd.c @@ -0,0 +1,345 @@ +/* + * Block driver for Mini-os PV devices + * Based on block-raw.c + * + * Copyright (c) 2006 Fabrice Bellard, 2007 Samuel Thibault + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +#include "vl.h" +#include "block_int.h" +#include <assert.h> +#include <xenbus.h> +#include <blkfront.h> +#include <malloc.h> + +#define SECTOR_SIZE 512 + +#ifndef QEMU_TOOL +#include "exec-all.h" +#endif + +#define DEBUG_BLOCK +#ifdef DEBUG_BLOCK +#define DEBUG_BLOCK_PRINT( formatCstr, args... ) fprintf( logfile, formatCstr, ##args ); fflush( logfile ) +#else +#define DEBUG_BLOCK_PRINT( formatCstr, args... ) +#endif + +#define FTYPE_FILE 0 +#define FTYPE_CD 1 +#define FTYPE_FD 2 + +typedef struct BDRVVbdState { + struct blkfront_dev *dev; + int fd; + int type; + int mode; + uint64_t sectors; + unsigned sector_size; + QEMU_LIST_ENTRY(BDRVVbdState) list; +} BDRVVbdState; + +QEMU_LIST_HEAD(, BDRVVbdState) vbds; + +static int vbd_probe(const uint8_t *buf, int buf_size, const char *filename) +{ + char *value; + if (xenbus_read(XBT_NIL, filename, &value)) + return 0; + free(value); + return 100; +} + +static void vbd_io_completed(void *opaque) +{ + BDRVVbdState *s = opaque; + blkfront_aio_poll(s->dev); +} + +static int vbd_open(BlockDriverState *bs, const char *filename, int flags) +{ + BDRVVbdState *s = bs->opaque; + + //handy to test posix access + //return -EIO; + + s->dev = init_blkfront((char *) filename, &s->sectors, &s->sector_size, &s->mode); + + if (!s->dev) + return -EIO; + + if (SECTOR_SIZE % s->sector_size) { + printf("sector size is %d, we only support sector sizes that divide %d\n", s->sector_size, SECTOR_SIZE); + return -EIO; + } + + s->fd = blkfront_open(s->dev); + qemu_set_fd_handler(s->fd, vbd_io_completed, NULL, s); + + QEMU_LIST_INSERT_HEAD(&vbds, s, list); + + return 0; +} + +typedef struct VbdAIOCB { + BlockDriverAIOCB common; + struct blkfront_aiocb aiocb; +} VbdAIOCB; + +void qemu_aio_init(void) +{ +} + +void qemu_aio_poll(void) +{ +} + +/* Wait for all IO requests to complete. */ +void qemu_aio_flush(void) +{ + BDRVVbdState *s; + for (s = vbds.lh_first; s; s = s->list.le_next) + blkfront_sync(s->dev); +} + +void qemu_aio_wait_start(void) +{ +} + +void qemu_aio_wait(void) +{ + int some = 0; + DEFINE_WAIT(w); + while (1) { + BDRVVbdState *s; + add_waiter(w, blkfront_queue); + for (s = vbds.lh_first; s; s = s->list.le_next) + if (blkfront_aio_poll(s->dev)) + some = 1; + if (some) + break; + schedule(); + } + remove_waiter(w); +} + +void qemu_aio_wait_end(void) +{ +} + +static void vbd_aio_callback(struct blkfront_aiocb *aiocbp, int ret) { + VbdAIOCB *acb = aiocbp->data; + + acb->common.cb(acb->common.opaque, ret); + qemu_aio_release(acb); +} + +static VbdAIOCB *vbd_aio_setup(BlockDriverState *bs, + int64_t sector_num, uint8_t *buf, int nb_sectors, + BlockDriverCompletionFunc *cb, void *opaque) +{ + BDRVVbdState *s = bs->opaque; + VbdAIOCB *acb; + + acb = qemu_aio_get(bs, cb, opaque); + if (!acb) + return NULL; + acb->aiocb.aio_dev = s->dev; + acb->aiocb.aio_buf = buf; + acb->aiocb.aio_nbytes = nb_sectors * SECTOR_SIZE; + acb->aiocb.aio_offset = sector_num * SECTOR_SIZE; + acb->aiocb.aio_cb = vbd_aio_callback; + acb->aiocb.data = acb; + + return acb; +} + +static BlockDriverAIOCB *vbd_aio_read(BlockDriverState *bs, + int64_t sector_num, uint8_t *buf, int nb_sectors, + BlockDriverCompletionFunc *cb, void *opaque) +{ + VbdAIOCB *acb; + + acb = vbd_aio_setup(bs, sector_num, buf, nb_sectors, cb, opaque); + if (!acb) + return NULL; + blkfront_aio(&acb->aiocb, 0); + return &acb->common; +} + +static BlockDriverAIOCB *vbd_aio_write(BlockDriverState *bs, + int64_t sector_num, const uint8_t *buf, int nb_sectors, + BlockDriverCompletionFunc *cb, void *opaque) +{ + VbdAIOCB *acb; + + acb = vbd_aio_setup(bs, sector_num, (uint8_t*) buf, nb_sectors, cb, opaque); + if (!acb) + return NULL; + blkfront_aio(&acb->aiocb, 1); + return &acb->common; +} + +static void vbd_cb(void *data, int ret) { + int *result = data; + result[0] = 1; + result[1] = ret; +} + +static int vbd_aligned_io(BlockDriverState *bs, + int64_t sector_num, uint8_t *buf, int nb_sectors, int write) +{ + VbdAIOCB *acb; + int result[2]; + result[0] = 0; + qemu_aio_wait_start(); + acb = vbd_aio_setup(bs, sector_num, (uint8_t*) buf, nb_sectors, vbd_cb, &result); + blkfront_aio(&acb->aiocb, write); + while (!result[0]) + qemu_aio_wait(); + qemu_aio_wait_end(); + return result[1]; +} + +static int vbd_read(BlockDriverState *bs, + int64_t sector_num, uint8_t *buf, int nb_sectors) +{ + uint8_t *iobuf; + int ret; + /* page alignment would be a bit better, but that's still fine compared to + * copying */ + if (!((uintptr_t)buf & (SECTOR_SIZE-1))) + return vbd_aligned_io(bs, sector_num, buf, nb_sectors, 0); + iobuf = qemu_memalign(PAGE_SIZE, nb_sectors * SECTOR_SIZE); + ret = vbd_aligned_io(bs, sector_num, iobuf, nb_sectors, 0); + memcpy(buf, iobuf, nb_sectors * SECTOR_SIZE); + free(iobuf); + if (ret < 0) + return ret; + else if (ret != nb_sectors * SECTOR_SIZE) + return -EINVAL; + else + return 0; +} + +static int vbd_write(BlockDriverState *bs, + int64_t sector_num, const uint8_t *buf, int nb_sectors) +{ + uint8_t *iobuf; + int ret; + if (!((uintptr_t)buf & (SECTOR_SIZE-1))) + return vbd_aligned_io(bs, sector_num, (uint8_t*) buf, nb_sectors, 1); + iobuf = qemu_memalign(PAGE_SIZE, nb_sectors * SECTOR_SIZE); + memcpy(iobuf, buf, nb_sectors * SECTOR_SIZE); + ret = vbd_aligned_io(bs, sector_num, iobuf, nb_sectors, 1); + free(iobuf); + if (ret < 0) + return ret; + else if (ret != nb_sectors * SECTOR_SIZE) + return -EINVAL; + else + return 0; +} + +static void vbd_aio_cancel(BlockDriverAIOCB *blockacb) +{ + /* TODO */ + //VbdAIOCB *acb = (VbdAIOCB *)blockacb; + + // Try to cancel. If can't, wait for it, drop the callback and call qemu_aio_release(acb) +} + +static void vbd_close(BlockDriverState *bs) +{ + BDRVVbdState *s = bs->opaque; + bs->total_sectors = 0; + if (s->fd >= 0) { + close(s->fd); + s->fd = -1; + } + QEMU_LIST_REMOVE(s, list); +} + +static int64_t vbd_getlength(BlockDriverState *bs) +{ + BDRVVbdState *s = bs->opaque; + return s->sectors * s->sector_size; +} + +static void vbd_flush(BlockDriverState *bs) +{ + BDRVVbdState *s = bs->opaque; + blkfront_sync(s->dev); +} + +/***********************************************/ +/* host device */ + +static int vbd_is_inserted(BlockDriverState *bs) +{ + /* TODO: monitor the backend */ + return 1; +} + +/* currently only used by fdc.c, but a CD version would be good too */ +static int vbd_media_changed(BlockDriverState *bs) +{ + /* TODO: monitor the backend */ + return -ENOTSUP; +} + +static int vbd_eject(BlockDriverState *bs, int eject_flag) +{ + /* TODO: Xen support needed */ + return -ENOTSUP; +} + +static int vbd_set_locked(BlockDriverState *bs, int locked) +{ + /* TODO: Xen support needed */ + return -ENOTSUP; +} + +BlockDriver bdrv_vbd = { + "vbd", + sizeof(BDRVVbdState), + vbd_probe, + vbd_open, + NULL, + NULL, + vbd_close, + NULL, + vbd_flush, + + .bdrv_aio_read = vbd_aio_read, + .bdrv_aio_write = vbd_aio_write, + .bdrv_aio_cancel = vbd_aio_cancel, + .aiocb_size = sizeof(VbdAIOCB), + .bdrv_read = vbd_read, + .bdrv_write = vbd_write, + .bdrv_getlength = vbd_getlength, + + /* removable device support */ + .bdrv_is_inserted = vbd_is_inserted, + .bdrv_media_changed = vbd_media_changed, + .bdrv_eject = vbd_eject, + .bdrv_set_locked = vbd_set_locked, +}; + diff --git a/tools/ioemu/block.c b/tools/ioemu/block.c index cf84e8ffbb..a43f3fe27b 100644 --- a/tools/ioemu/block.c +++ b/tools/ioemu/block.c @@ -1235,6 +1235,9 @@ void bdrv_init(void) { bdrv_register(&bdrv_raw); bdrv_register(&bdrv_host_device); +#ifdef CONFIG_STUBDOM + bdrv_register(&bdrv_vbd); +#endif #ifndef _WIN32 bdrv_register(&bdrv_cow); #endif diff --git a/tools/ioemu/configure b/tools/ioemu/configure index ef0bac1f8e..3e3b427b87 100755 --- a/tools/ioemu/configure +++ b/tools/ioemu/configure @@ -74,6 +74,7 @@ softmmu="yes" linux_user="no" darwin_user="no" build_docs="no" +stubdom="no" uname_release="" # OS specific @@ -231,6 +232,8 @@ for opt do ;; --enable-uname-release=*) uname_release="$optarg" ;; + --enable-stubdom) stubdom="yes" + ;; esac done @@ -416,7 +419,11 @@ if test -z "$target_list" ; then target_list="i386-darwin-user ppc-darwin-user $target_list" fi # the i386-dm target - target_list="i386-dm" + if test "$stubdom" = "yes"; then + target_list="i386-dm-stubdom" + else + target_list="i386-dm" + fi else target_list=`echo "$target_list" | sed -e 's/,/ /g'` fi @@ -575,6 +582,11 @@ bindir="$prefix/$libdir/xen/bin" configdir="/etc/xen" fi +if test "$stubdom" = "yes"; then + oss="no" + sdl="no" +fi + echo "Install prefix $prefix" echo "BIOS directory $datadir" echo "binary directory $bindir" @@ -943,6 +955,14 @@ if expr $target : '.*-dm' > /dev/null ; then echo "#define CONFIG_DM 1" >> $config_h fi +if test "$stubdom" = "yes" ; then + echo "CONFIG_STUBDOM=yes" >> $config_mak + echo "#define CONFIG_STUBDOM 1" >> $config_h + echo "#define NO_UNIX_SOCKETS 1" >> $config_h + echo "#define NO_DAEMONIZE 1" >> $config_h + echo "#define NO_AIO 1" >> $config_h +fi + if test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" -o "$target_cpu" = "sparc" -o "$target_cpu" = "sparc64" -o "$target_cpu" = "m68k"; then echo "CONFIG_SOFTFLOAT=yes" >> $config_mak echo "#define CONFIG_SOFTFLOAT 1" >> $config_h diff --git a/tools/ioemu/console.c b/tools/ioemu/console.c index 634e3d85d0..dc904f6574 100644 --- a/tools/ioemu/console.c +++ b/tools/ioemu/console.c @@ -169,16 +169,12 @@ static unsigned int vga_get_color(DisplayState *ds, unsigned int rgba) unsigned int r, g, b, color; switch(ds->depth) { -#if 0 case 8: r = (rgba >> 16) & 0xff; g = (rgba >> 8) & 0xff; b = (rgba) & 0xff; - color = (rgb_to_index[r] * 6 * 6) + - (rgb_to_index[g] * 6) + - (rgb_to_index[b]); + color = ((r >> 5) << 5 | (g >> 5) << 2 | (b >> 6)); break; -#endif case 15: r = (rgba >> 16) & 0xff; g = (rgba >> 8) & 0xff; diff --git a/tools/ioemu/cpu-all.h b/tools/ioemu/cpu-all.h index 2f125b785d..9cc854ed7c 100644 --- a/tools/ioemu/cpu-all.h +++ b/tools/ioemu/cpu-all.h @@ -116,6 +116,7 @@ static inline void tswap64s(uint64_t *s) #define bswaptls(s) bswap64s(s) #endif +#ifdef CONFIG_SOFTFLOAT /* NOTE: arm FPA is horrible as double 32 bit words are stored in big endian ! */ typedef union { @@ -134,6 +135,7 @@ typedef union { #endif uint64_t ll; } CPU_DoubleU; +#endif /* CPU memory access without any memory or io remapping */ @@ -267,6 +269,7 @@ static inline void stq_le_p(void *ptr, uint64_t v) stl_le_p(p + 4, v >> 32); } +#ifdef CONFIG_SOFTFLOAT /* float access */ static inline float32 ldfl_le_p(void *ptr) @@ -304,6 +307,7 @@ static inline void stfq_le_p(void *ptr, float64 v) stl_le_p(ptr, u.l.lower); stl_le_p(ptr + 4, u.l.upper); } +#endif #else @@ -342,6 +346,7 @@ static inline void stq_le_p(void *ptr, uint64_t v) *(uint64_t *)ptr = v; } +#ifdef CONFIG_SOFTFLOAT /* float access */ static inline float32 ldfl_le_p(void *ptr) @@ -364,6 +369,7 @@ static inline void stfq_le_p(void *ptr, float64 v) *(float64 *)ptr = v; } #endif +#endif #if !defined(WORDS_BIGENDIAN) || defined(WORDS_ALIGNED) @@ -456,6 +462,7 @@ static inline void stq_be_p(void *ptr, uint64_t v) stl_be_p(ptr + 4, v); } +#ifdef CONFIG_SOFTFLOAT /* float access */ static inline float32 ldfl_be_p(void *ptr) @@ -493,6 +500,7 @@ static inline void stfq_be_p(void *ptr, float64 v) stl_be_p(ptr, u.l.upper); stl_be_p(ptr + 4, u.l.lower); } +#endif #else @@ -531,6 +539,7 @@ static inline void stq_be_p(void *ptr, uint64_t v) *(uint64_t *)ptr = v; } +#ifdef CONFIG_SOFTFLOAT /* float access */ static inline float32 ldfl_be_p(void *ptr) @@ -552,6 +561,7 @@ static inline void stfq_be_p(void *ptr, float64 v) { *(float64 *)ptr = v; } +#endif #endif diff --git a/tools/ioemu/exec-all.h b/tools/ioemu/exec-all.h index f6804b1a0a..28c120d4ca 100644 --- a/tools/ioemu/exec-all.h +++ b/tools/ioemu/exec-all.h @@ -481,6 +481,9 @@ static inline int testandset (int *p) } #endif +#ifdef CONFIG_STUBDOM +#include <spinlock.h> +#else typedef int spinlock_t; #define SPIN_LOCK_UNLOCKED 0 @@ -514,6 +517,7 @@ static inline int spin_trylock(spinlock_t *lock) return 1; } #endif +#endif extern spinlock_t tb_lock; diff --git a/tools/ioemu/hw/fdc.c b/tools/ioemu/hw/fdc.c index dc2ea6ebff..5989afd7d0 100644 --- a/tools/ioemu/hw/fdc.c +++ b/tools/ioemu/hw/fdc.c @@ -378,7 +378,7 @@ struct fdctrl_t { uint8_t cur_drv; uint8_t bootsel; /* Command FIFO */ - uint8_t fifo[FD_SECTOR_LEN]; + uint8_t *fifo; uint32_t data_pos; uint32_t data_len; uint8_t data_state; @@ -497,6 +497,11 @@ fdctrl_t *fdctrl_init (int irq_lvl, int dma_chann, int mem_mapped, fdctrl = qemu_mallocz(sizeof(fdctrl_t)); if (!fdctrl) return NULL; + fdctrl->fifo = qemu_memalign(512, FD_SECTOR_LEN); + if (fdctrl->fifo == NULL) { + qemu_free(fdctrl); + return NULL; + } fdctrl->result_timer = qemu_new_timer(vm_clock, fdctrl_result_timer, fdctrl); diff --git a/tools/ioemu/hw/ide.c b/tools/ioemu/hw/ide.c index 0e65141ec6..9dd9653aa9 100644 --- a/tools/ioemu/hw/ide.c +++ b/tools/ioemu/hw/ide.c @@ -22,6 +22,7 @@ * THE SOFTWARE. */ #include "vl.h" +#include <malloc.h> /* debug IDE devices */ //#define DEBUG_IDE @@ -347,7 +348,7 @@ typedef struct IDEState { EndTransferFunc *end_transfer_func; uint8_t *data_ptr; uint8_t *data_end; - uint8_t io_buffer[MAX_MULT_SECTORS*512 + 4]; + uint8_t *io_buffer; QEMUTimer *sector_write_timer; /* only used for win2k instal hack */ uint32_t irq_count; /* counts IRQs when using win2k install hack */ } IDEState; @@ -2305,6 +2306,7 @@ static void ide_init2(IDEState *ide_state, for(i = 0; i < 2; i++) { s = ide_state + i; + s->io_buffer = qemu_memalign(getpagesize(), MAX_MULT_SECTORS*512 + 4); if (i == 0) s->bs = hd0; else diff --git a/tools/ioemu/hw/pc.c b/tools/ioemu/hw/pc.c index 5d982016a6..c6ebc6780d 100644 --- a/tools/ioemu/hw/pc.c +++ b/tools/ioemu/hw/pc.c @@ -361,6 +361,7 @@ void bochs_bios_init(void) register_ioport_write(0x503, 1, 1, bochs_bios_write, NULL); } +#if defined(__i386__) || defined(__x86_64__) /* Generate an initial boot sector which sets state and jump to a specified vector */ static void generate_bootsect(uint32_t gpr[8], uint16_t segs[6], uint16_t ip) @@ -718,6 +719,14 @@ static void load_linux(const char *kernel_filename, generate_bootsect(gpr, seg, 0); } +#else /* __ia64__ */ +static void load_linux(const char *kernel_filename, + const char *initrd_filename, + const char *kernel_cmdline) +{ + /* Direct Linux boot is unsupported. */ +} +#endif static void main_cpu_reset(void *opaque) { @@ -1013,8 +1022,10 @@ static void pc_init1(uint64_t ram_size, int vga_ram_size, char *boot_device, } } +#ifdef HAS_TPM if (has_tpm_device()) tpm_tis_init(&pic_set_irq_new, isa_pic, 11); +#endif kbd_init(); DMA_init(0); diff --git a/tools/ioemu/hw/scsi-disk.c b/tools/ioemu/hw/scsi-disk.c index c6280fd559..acbe75fc98 100644 --- a/tools/ioemu/hw/scsi-disk.c +++ b/tools/ioemu/hw/scsi-disk.c @@ -26,13 +26,18 @@ do { printf("scsi-disk: " fmt , ##args); } while (0) do { fprintf(stderr, "scsi-disk: " fmt , ##args); } while (0) #include "vl.h" +#include <malloc.h> #define SENSE_NO_SENSE 0 #define SENSE_NOT_READY 2 #define SENSE_HARDWARE_ERROR 4 #define SENSE_ILLEGAL_REQUEST 5 +#ifdef CONFIG_STUBDOM +#define SCSI_DMA_BUF_SIZE 32768 +#else #define SCSI_DMA_BUF_SIZE 65536 +#endif typedef struct SCSIRequest { SCSIDevice *dev; @@ -44,7 +49,7 @@ typedef struct SCSIRequest { int sector_count; /* The amounnt of data in the buffer. */ int buf_len; - uint8_t dma_buf[SCSI_DMA_BUF_SIZE]; + uint8_t *dma_buf; BlockDriverAIOCB *aiocb; struct SCSIRequest *next; } SCSIRequest; @@ -76,6 +81,7 @@ static SCSIRequest *scsi_new_request(SCSIDevice *s, uint32_t tag) free_requests = r->next; } else { r = qemu_malloc(sizeof(SCSIRequest)); + r->dma_buf = qemu_memalign(getpagesize(), SCSI_DMA_BUF_SIZE); } r->dev = s; r->tag = tag; diff --git a/tools/ioemu/hw/usb-hid.c b/tools/ioemu/hw/usb-hid.c index e947977313..78b48b8dbb 100644 --- a/tools/ioemu/hw/usb-hid.c +++ b/tools/ioemu/hw/usb-hid.c @@ -224,15 +224,37 @@ static const uint8_t qemu_tablet_hid_report_descriptor[] = { 0xC0, /* End Collection */ }; +static int currentbutton = 0; +typedef struct _mouseclick { + int button_state; + struct _mouseclick *next; +} mouseclick; +static mouseclick mousequeue[20]; +static mouseclick *head = mousequeue; +static mouseclick *tail = mousequeue; + static void usb_mouse_event(void *opaque, int dx1, int dy1, int dz1, int buttons_state) { USBMouseState *s = opaque; + if (s->status_changed == 1){ + //A mouse event is lost + if (buttons_state != currentbutton && tail->next != head) { + //A left click event is lost: let's add it to the queue + //counter++; + tail->button_state = buttons_state; + tail = tail->next; + } + } + else { + s->buttons_state = buttons_state; + } + s->dx += dx1; s->dy += dy1; s->dz += dz1; - s->buttons_state = buttons_state; + currentbutton = buttons_state; s->status_changed = 1; } @@ -240,11 +262,24 @@ static void usb_tablet_event(void *opaque, int x, int y, int dz, int buttons_state) { USBMouseState *s = opaque; + + if (s->status_changed == 1){ + //A mouse event is lost + if (buttons_state != currentbutton && tail->next != head) { + //A left click event is lost: let's add it to the queue + //counter++; + tail->button_state = buttons_state; + tail = tail->next; + } + } + else { + s->buttons_state = buttons_state; + } s->x = x; s->y = y; s->dz += dz; - s->buttons_state = buttons_state; + currentbutton = buttons_state; s->status_changed = 1; } @@ -493,10 +528,17 @@ static int usb_mouse_handle_data(USBDevice *dev, USBPacket *p) else if (s->kind == USB_TABLET) ret = usb_tablet_poll(s, p->data, p->len); - if (!s->status_changed) + if (!s->status_changed) { ret = USB_RET_NAK; - else - s->status_changed = 0; + } else { + if (head != tail) { + s->buttons_state = head->button_state; + head = head->next; + } + else { + s->status_changed = 0; + } + } } else { goto fail; @@ -567,6 +609,14 @@ int usb_mouse_load(QEMUFile *f, void *opaque, int version_id) USBDevice *usb_tablet_init(void) { USBMouseState *s; + int i; + + for (i = 0; i < 19; i++) { + mousequeue[i].button_state = 0; + mousequeue[i].next = &(mousequeue[i + 1]); + } + mousequeue[i].button_state = 0; + mousequeue[i].next = mousequeue; s = qemu_mallocz(sizeof(USBMouseState)); if (!s) @@ -591,6 +641,14 @@ USBDevice *usb_tablet_init(void) USBDevice *usb_mouse_init(void) { USBMouseState *s; + int i; + + for (i = 0; i < 19; i++) { + mousequeue[i].button_state = 0; + mousequeue[i].next = &(mousequeue[i + 1]); + } + mousequeue[i].button_state = 0; + mousequeue[i].next = mousequeue; s = qemu_mallocz(sizeof(USBMouseState)); if (!s) diff --git a/tools/ioemu/hw/vga.c b/tools/ioemu/hw/vga.c index 17538bbddc..4e2f9525a7 100644 --- a/tools/ioemu/hw/vga.c +++ b/tools/ioemu/hw/vga.c @@ -1071,7 +1071,7 @@ static const uint8_t cursor_glyph[32 * 4] = { */ static void vga_draw_text(VGAState *s, int full_update) { - int cx, cy, cheight, cw, ch, cattr, height, width, ch_attr; + int cx, cy, cheight, cw, ch, cattr, height, width, ch_attr, depth; int cx_min, cx_max, linesize, x_incr; uint32_t offset, fgcol, bgcol, v, cursor_offset; uint8_t *d1, *d, *src, *s1, *dest, *cursor_ptr; @@ -1134,6 +1134,11 @@ static void vga_draw_text(VGAState *s, int full_update) return; } + depth = s->get_bpp(s); + if (depth == 24) + depth = 32; + if (s->ds->dpy_colourdepth != NULL && s->ds->depth != depth) + s->ds->dpy_colourdepth(s->ds, depth); if (width != s->last_width || height != s->last_height || cw != s->last_cw || cheight != s->last_ch) { s->last_scr_width = width * cw; @@ -1477,7 +1482,7 @@ void check_sse2(void) */ static void vga_draw_graphic(VGAState *s, int full_update) { - int y1, y, update, linesize, y_start, double_scan, mask; + int y1, y, update, linesize, y_start, double_scan, mask, depth; int width, height, shift_control, line_offset, bwidth; ram_addr_t page0, page1; int disp_width, multi_scan, multi_run; @@ -1551,6 +1556,11 @@ static void vga_draw_graphic(VGAState *s, int full_update) } vga_draw_line = vga_draw_line_table[v * NB_DEPTHS + get_depth_index(s->ds)]; + depth = s->get_bpp(s); + if (depth == 24) + depth = 32; + if (s->ds->dpy_colourdepth != NULL && s->ds->depth != depth) + s->ds->dpy_colourdepth(s->ds, depth); if (disp_width != s->last_width || height != s->last_height) { dpy_resize(s->ds, disp_width, height); diff --git a/tools/ioemu/hw/xen_console.c b/tools/ioemu/hw/xen_console.c index 76aca8f3ee..44f8bcca48 100644 --- a/tools/ioemu/hw/xen_console.c +++ b/tools/ioemu/hw/xen_console.c @@ -75,7 +75,7 @@ static void buffer_append(struct domain *dom) cons = intf->out_cons; prod = intf->out_prod; - mb(); + xen_mb(); size = prod - cons; if ((size == 0) || (size > sizeof(intf->out))) @@ -94,7 +94,7 @@ static void buffer_append(struct domain *dom) buffer->data[buffer->size++] = intf->out[ MASK_XENCONS_IDX(cons++, intf->out)]; - mb(); + xen_mb(); intf->out_cons = cons; xc_evtchn_notify(dom->xce_handle, dom->local_port); @@ -289,7 +289,7 @@ static int ring_free_bytes(struct domain *dom) cons = intf->in_cons; prod = intf->in_prod; - mb(); + xen_mb(); space = prod - cons; if (space > sizeof(intf->in)) @@ -322,7 +322,7 @@ static void xencons_receive(void *opaque, const uint8_t *buf, int len) intf->in[MASK_XENCONS_IDX(prod++, intf->in)] = buf[i]; } - wmb(); + xen_wmb(); intf->in_prod = prod; xc_evtchn_notify(dom->xce_handle, dom->local_port); } diff --git a/tools/ioemu/hw/xen_machine_fv.c b/tools/ioemu/hw/xen_machine_fv.c index 22ba1dbc3f..272f67946f 100644 --- a/tools/ioemu/hw/xen_machine_fv.c +++ b/tools/ioemu/hw/xen_machine_fv.c @@ -24,6 +24,9 @@ */ #include "vl.h" +#ifdef CONFIG_STUBDOM +#include <xenbus.h> +#endif #include <xen/hvm/params.h> #include <sys/mman.h> diff --git a/tools/ioemu/hw/xenfb.c b/tools/ioemu/hw/xenfb.c index f0d7f7936e..5418986178 100644 --- a/tools/ioemu/hw/xenfb.c +++ b/tools/ioemu/hw/xenfb.c @@ -485,7 +485,7 @@ static void xenfb_on_fb_event(struct xenfb *xenfb) prod = page->out_prod; if (prod == page->out_cons) return; - rmb(); /* ensure we see ring contents up to prod */ + xen_rmb(); /* ensure we see ring contents up to prod */ for (cons = page->out_cons; cons != prod; cons++) { union xenfb_out_event *event = &XENFB_OUT_RING_REF(page, cons); int x, y, w, h; @@ -512,7 +512,7 @@ static void xenfb_on_fb_event(struct xenfb *xenfb) break; } } - mb(); /* ensure we're done with ring contents */ + xen_mb(); /* ensure we're done with ring contents */ page->out_cons = cons; xc_evtchn_notify(xenfb->evt_xch, xenfb->fb.port); } @@ -571,9 +571,9 @@ static int xenfb_kbd_event(struct xenfb *xenfb, return -1; } - mb(); /* ensure ring space available */ + xen_mb(); /* ensure ring space available */ XENKBD_IN_RING_REF(page, prod) = *event; - wmb(); /* ensure ring contents visible */ + xen_wmb(); /* ensure ring contents visible */ page->in_prod = prod + 1; return xc_evtchn_notify(xenfb->evt_xch, xenfb->kbd.port); } diff --git a/tools/ioemu/osdep.c b/tools/ioemu/osdep.c index d1eff8deb5..5ec16b47da 100644 --- a/tools/ioemu/osdep.c +++ b/tools/ioemu/osdep.c @@ -61,6 +61,10 @@ void *qemu_malloc(size_t size) } #if defined(_WIN32) +void *qemu_memalign(size_t alignment, size_t size) +{ + return VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_READWRITE); +} void *qemu_vmalloc(size_t size) { @@ -172,6 +176,22 @@ void kqemu_vfree(void *ptr) #endif +void *qemu_memalign(size_t alignment, size_t size) +{ +#if defined(_POSIX_C_SOURCE) + int ret; + void *ptr; + ret = posix_memalign(&ptr, alignment, size); + if (ret != 0) + return NULL; + return ptr; +#elif defined(_BSD) + return valloc(size); +#else + return memalign(alignment, size); +#endif +} + /* alloc shared memory pages */ void *qemu_vmalloc(size_t size) { diff --git a/tools/ioemu/osdep.h b/tools/ioemu/osdep.h index bd6ffc1713..6df1d87d12 100644 --- a/tools/ioemu/osdep.h +++ b/tools/ioemu/osdep.h @@ -14,6 +14,7 @@ void *qemu_mallocz(size_t size); void qemu_free(void *ptr); char *qemu_strdup(const char *str); +void *qemu_memalign(size_t alignment, size_t size); void *qemu_vmalloc(size_t size); void qemu_vfree(void *ptr); diff --git a/tools/ioemu/sdl.c b/tools/ioemu/sdl.c index 4d6d73a6a1..4d09469858 100644 --- a/tools/ioemu/sdl.c +++ b/tools/ioemu/sdl.c @@ -259,11 +259,9 @@ static void sdl_grab_end(void) sdl_update_caption(); } -static void sdl_send_mouse_event(int dz) +static void sdl_send_mouse_event(int dx, int dy, int dz, int state) { - int dx, dy, state, buttons; - state = SDL_GetRelativeMouseState(&dx, &dy); - buttons = 0; + int buttons = 0; if (state & SDL_BUTTON(SDL_BUTTON_LEFT)) buttons |= MOUSE_EVENT_LBUTTON; if (state & SDL_BUTTON(SDL_BUTTON_RIGHT)) @@ -425,11 +423,19 @@ static void sdl_refresh(DisplayState *ds) case SDL_MOUSEMOTION: if (gui_grab || kbd_mouse_is_absolute() || absolute_enabled) { - sdl_send_mouse_event(0); + int dx, dy, state; + state = SDL_GetRelativeMouseState(&dx, &dy); + sdl_send_mouse_event(dx, dy, 0, state); } break; - case SDL_MOUSEBUTTONDOWN: case SDL_MOUSEBUTTONUP: + if (gui_grab || kbd_mouse_is_absolute()) { + int dx, dy, state; + state = SDL_GetRelativeMouseState(&dx, &dy); + sdl_send_mouse_event(dx, dy, 0, state); + } + break; + case SDL_MOUSEBUTTONDOWN: { SDL_MouseButtonEvent *bev = &ev->button; if (!gui_grab && !kbd_mouse_is_absolute()) { @@ -439,16 +445,19 @@ static void sdl_refresh(DisplayState *ds) sdl_grab_start(); } } else { - int dz; + int dx, dy, dz, state; dz = 0; + state = SDL_GetRelativeMouseState(&dx, &dy); #ifdef SDL_BUTTON_WHEELUP - if (bev->button == SDL_BUTTON_WHEELUP && ev->type == SDL_MOUSEBUTTONDOWN) { + if (bev->button == SDL_BUTTON_WHEELUP) { dz = -1; - } else if (bev->button == SDL_BUTTON_WHEELDOWN && ev->type == SDL_MOUSEBUTTONDOWN) { + } else if (bev->button == SDL_BUTTON_WHEELDOWN) { dz = 1; + } else { + state = bev->button | state; } #endif - sdl_send_mouse_event(dz); + sdl_send_mouse_event(dx, dy, dz, state); } } break; @@ -499,6 +508,7 @@ void sdl_display_init(DisplayState *ds, int full_screen) ds->dpy_update = sdl_update; ds->dpy_resize = sdl_resize; ds->dpy_refresh = sdl_refresh; + ds->dpy_colourdepth = NULL; sdl_resize(ds, 640, 400); sdl_update_caption(); diff --git a/tools/ioemu/target-i386-dm/cpu.h b/tools/ioemu/target-i386-dm/cpu.h index 017b8c021b..6071a8529e 100644 --- a/tools/ioemu/target-i386-dm/cpu.h +++ b/tools/ioemu/target-i386-dm/cpu.h @@ -37,17 +37,21 @@ #include "cpu-defs.h" +#ifdef CONFIG_SOFTFLOAT #include "softfloat.h" +#endif #if defined(__i386__) && !defined(CONFIG_SOFTMMU) #define USE_CODE_COPY #endif +#ifdef CONFIG_SOFTFLOAT #ifdef USE_X86LDOUBLE typedef floatx80 CPU86_LDouble; #else typedef float64 CPU86_LDouble; #endif +#endif /* Empty for now */ typedef struct CPUX86State { diff --git a/tools/ioemu/target-i386-dm/helper2.c b/tools/ioemu/target-i386-dm/helper2.c index d45ac7a999..4896b11ab8 100644 --- a/tools/ioemu/target-i386-dm/helper2.c +++ b/tools/ioemu/target-i386-dm/helper2.c @@ -218,7 +218,7 @@ static ioreq_t *__cpu_get_ioreq(int vcpu) return NULL; } - rmb(); /* see IOREQ_READY /then/ read contents of ioreq */ + xen_rmb(); /* see IOREQ_READY /then/ read contents of ioreq */ req->state = STATE_IOREQ_INPROCESS; return req; @@ -568,7 +568,7 @@ void __handle_buffered_iopage(CPUState *env) __handle_ioreq(env, &req); - mb(); + xen_mb(); buffered_io_page->read_pointer += qw ? 2 : 1; } } @@ -603,7 +603,7 @@ void cpu_handle_ioreq(void *opaque) return; } - wmb(); /* Update ioreq contents /then/ update state. */ + xen_wmb(); /* Update ioreq contents /then/ update state. */ /* * We do this before we send the response so that the tools diff --git a/tools/ioemu/vl.c b/tools/ioemu/vl.c index fc81fd16e1..703f1bfd6d 100644 --- a/tools/ioemu/vl.c +++ b/tools/ioemu/vl.c @@ -36,22 +36,29 @@ #include <sys/times.h> #include <sys/wait.h> #include <termios.h> +#ifndef CONFIG_STUBDOM #include <sys/poll.h> +#endif #include <sys/mman.h> #include <sys/ioctl.h> #include <sys/resource.h> #include <sys/socket.h> #include <netinet/in.h> +#ifndef CONFIG_STUBDOM #include <net/if.h> +#endif #if defined(__NetBSD__) #include <net/if_tap.h> #endif #if defined(__linux__) || defined(__Linux__) #include <linux/if_tun.h> #endif +#ifndef CONFIG_STUBDOM #include <arpa/inet.h> #include <dirent.h> +#endif #include <netdb.h> +#ifndef CONFIG_STUBDOM #ifdef _BSD #include <sys/stat.h> #ifndef _BSD @@ -70,6 +77,7 @@ #include <stropts.h> #endif #endif +#endif #if defined(CONFIG_SLIRP) #include "libslirp.h" @@ -80,6 +88,7 @@ #include <windows.h> #define getopt_long_only getopt_long #define memalign(align, size) malloc(size) +#define NO_DAEMONIZE 1 #endif #include "qemu_socket.h" @@ -131,10 +140,9 @@ #define MAX_IOPORTS 65536 const char *bios_dir = CONFIG_QEMU_SHAREDIR; -char phys_ram_file[1024]; -void *ioport_opaque[MAX_IOPORTS]; -IOPortReadFunc *ioport_read_table[3][MAX_IOPORTS]; -IOPortWriteFunc *ioport_write_table[3][MAX_IOPORTS]; +void **ioport_opaque; +IOPortReadFunc *(*ioport_read_table)[MAX_IOPORTS]; +IOPortWriteFunc *(*ioport_write_table)[MAX_IOPORTS]; /* Note: bs_table[MAX_DISKS] is a dummy block driver if none available to store the VM snapshots */ BlockDriverState *bs_table[MAX_DISKS + MAX_SCSI_DISKS + 1], *fd_table[MAX_FD]; @@ -186,7 +194,9 @@ const char *vnc_display; int acpi_enabled = 0; int fd_bootchk = 1; int no_reboot = 0; +#ifndef NO_DAEMONIZE int daemonize = 0; +#endif const char *option_rom[MAX_OPTION_ROMS]; int nb_option_roms; int semihosting_enabled = 0; @@ -224,17 +234,29 @@ void default_ioport_writeb(void *opaque, uint32_t address, uint32_t data) uint32_t default_ioport_readw(void *opaque, uint32_t address) { uint32_t data; - data = ioport_read_table[0][address](ioport_opaque[address], address); + IOPortReadFunc *func = ioport_read_table[0][address]; + if (!func) + func = default_ioport_readb; + data = func(ioport_opaque[address], address); address = (address + 1) & (MAX_IOPORTS - 1); - data |= ioport_read_table[0][address](ioport_opaque[address], address) << 8; + func = ioport_read_table[0][address]; + if (!func) + func = default_ioport_readb; + data |= func(ioport_opaque[address], address) << 8; return data; } void default_ioport_writew(void *opaque, uint32_t address, uint32_t data) { - ioport_write_table[0][address](ioport_opaque[address], address, data & 0xff); + IOPortWriteFunc *func = ioport_write_table[0][address]; + if (!func) + func = default_ioport_writeb; + func(ioport_opaque[address], address, data & 0xff); address = (address + 1) & (MAX_IOPORTS - 1); - ioport_write_table[0][address](ioport_opaque[address], address, (data >> 8) & 0xff); + func = ioport_write_table[0][address]; + if (!func) + func = default_ioport_writeb; + func(ioport_opaque[address], address, (data >> 8) & 0xff); } uint32_t default_ioport_readl(void *opaque, uint32_t address) @@ -254,16 +276,9 @@ void default_ioport_writel(void *opaque, uint32_t address, uint32_t data) void init_ioports(void) { - int i; - - for(i = 0; i < MAX_IOPORTS; i++) { - ioport_read_table[0][i] = default_ioport_readb; - ioport_write_table[0][i] = default_ioport_writeb; - ioport_read_table[1][i] = default_ioport_readw; - ioport_write_table[1][i] = default_ioport_writew; - ioport_read_table[2][i] = default_ioport_readl; - ioport_write_table[2][i] = default_ioport_writel; - } + ioport_opaque = malloc(MAX_IOPORTS * sizeof(*ioport_opaque)); + ioport_read_table = malloc(3 * MAX_IOPORTS * sizeof(**ioport_read_table)); + ioport_write_table = malloc(3 * MAX_IOPORTS * sizeof(**ioport_write_table)); } /* size is the word size in byte */ @@ -335,11 +350,14 @@ void isa_unassign_ioport(int start, int length) void cpu_outb(CPUState *env, int addr, int val) { + IOPortWriteFunc *func = ioport_write_table[0][addr]; + if (!func) + func = default_ioport_writeb; #ifdef DEBUG_IOPORT if (loglevel & CPU_LOG_IOPORT) fprintf(logfile, "outb: %04x %02x\n", addr, val); #endif - ioport_write_table[0][addr](ioport_opaque[addr], addr, val); + func(ioport_opaque[addr], addr, val); #ifdef USE_KQEMU if (env) env->last_io_time = cpu_get_time_fast(); @@ -348,11 +366,14 @@ void cpu_outb(CPUState *env, int addr, int val) void cpu_outw(CPUState *env, int addr, int val) { + IOPortWriteFunc *func = ioport_write_table[1][addr]; + if (!func) + func = default_ioport_writew; #ifdef DEBUG_IOPORT if (loglevel & CPU_LOG_IOPORT) fprintf(logfile, "outw: %04x %04x\n", addr, val); #endif - ioport_write_table[1][addr](ioport_opaque[addr], addr, val); + func(ioport_opaque[addr], addr, val); #ifdef USE_KQEMU if (env) env->last_io_time = cpu_get_time_fast(); @@ -361,11 +382,14 @@ void cpu_outw(CPUState *env, int addr, int val) void cpu_outl(CPUState *env, int addr, int val) { + IOPortWriteFunc *func = ioport_write_table[2][addr]; + if (!func) + func = default_ioport_writel; #ifdef DEBUG_IOPORT if (loglevel & CPU_LOG_IOPORT) fprintf(logfile, "outl: %04x %08x\n", addr, val); #endif - ioport_write_table[2][addr](ioport_opaque[addr], addr, val); + func(ioport_opaque[addr], addr, val); #ifdef USE_KQEMU if (env) env->last_io_time = cpu_get_time_fast(); @@ -375,7 +399,10 @@ void cpu_outl(CPUState *env, int addr, int val) int cpu_inb(CPUState *env, int addr) { int val; - val = ioport_read_table[0][addr](ioport_opaque[addr], addr); + IOPortReadFunc *func = ioport_read_table[0][addr]; + if (!func) + func = default_ioport_readb; + val = func(ioport_opaque[addr], addr); #ifdef DEBUG_IOPORT if (loglevel & CPU_LOG_IOPORT) fprintf(logfile, "inb : %04x %02x\n", addr, val); @@ -390,7 +417,10 @@ int cpu_inb(CPUState *env, int addr) int cpu_inw(CPUState *env, int addr) { int val; - val = ioport_read_table[1][addr](ioport_opaque[addr], addr); + IOPortReadFunc *func = ioport_read_table[1][addr]; + if (!func) + func = default_ioport_readw; + val = func(ioport_opaque[addr], addr); #ifdef DEBUG_IOPORT if (loglevel & CPU_LOG_IOPORT) fprintf(logfile, "inw : %04x %04x\n", addr, val); @@ -405,7 +435,10 @@ int cpu_inw(CPUState *env, int addr) int cpu_inl(CPUState *env, int addr) { int val; - val = ioport_read_table[2][addr](ioport_opaque[addr], addr); + IOPortReadFunc *func = ioport_read_table[2][addr]; + if (!func) + func = default_ioport_readl; + val = func(ioport_opaque[addr], addr); #ifdef DEBUG_IOPORT if (loglevel & CPU_LOG_IOPORT) fprintf(logfile, "inl : %04x %08x\n", addr, val); @@ -773,9 +806,6 @@ static QEMUTimer *active_timers[2]; static MMRESULT timerID; static HANDLE host_alarm = NULL; static unsigned int period = 1; -#else -/* frequency of the times() clock tick */ -static int timer_freq; #endif QEMUClock *qemu_new_clock(int type) @@ -1113,9 +1143,6 @@ static void init_timer_alarm(void) struct itimerval itv; #endif - /* get times() syscall frequency */ - timer_freq = sysconf(_SC_CLK_TCK); - #ifndef CONFIG_DM /* timer signal */ sigfillset(&act.sa_mask); @@ -1473,6 +1500,7 @@ static CharDriverState *qemu_chr_open_file_out(const char *file_out) return qemu_chr_open_fd(-1, fd_out); } +#ifndef CONFIG_STUBDOM static CharDriverState *qemu_chr_open_pipe(const char *filename) { int fd_in, fd_out; @@ -1718,6 +1746,7 @@ static CharDriverState *qemu_chr_open_stdio(void) } return chr; } +#endif /* * Create a store entry for a device (e.g., monitor, serial/parallel lines). @@ -1727,6 +1756,9 @@ static CharDriverState *qemu_chr_open_stdio(void) static int store_dev_info(char *devName, int domid, CharDriverState *cState, char *storeString) { +#ifdef CONFIG_STUBDOM + return 0; +#else int xc_handle; struct xs_handle *xs; char *path; @@ -1802,8 +1834,10 @@ static int store_dev_info(char *devName, int domid, close(xc_handle); return 0; +#endif } +#ifndef CONFIG_STUBDOM #ifdef __sun__ /* Once Solaris has openpty(), this is going to be removed. */ int openpty(int *amaster, int *aslave, char *name, @@ -2462,6 +2496,7 @@ static CharDriverState *qemu_chr_open_win_file_out(const char *file_out) return qemu_chr_open_win_file(fd_out); } #endif +#endif /***********************************************************/ /* UDP Net console */ @@ -2532,7 +2567,7 @@ static void udp_chr_update_read_handler(CharDriverState *chr) } int parse_host_port(struct sockaddr_in *saddr, const char *str); -#ifndef _WIN32 +#ifndef NO_UNIX_SOCKETS static int parse_unix_path(struct sockaddr_un *uaddr, const char *str); #endif int parse_host_src_port(struct sockaddr_in *haddr, @@ -2740,7 +2775,7 @@ static void tcp_chr_accept(void *opaque) CharDriverState *chr = opaque; TCPCharDriver *s = chr->opaque; struct sockaddr_in saddr; -#ifndef _WIN32 +#ifndef NO_UNIX_SOCKETS struct sockaddr_un uaddr; #endif struct sockaddr *addr; @@ -2748,7 +2783,7 @@ static void tcp_chr_accept(void *opaque) int fd; for(;;) { -#ifndef _WIN32 +#ifndef NO_UNIX_SOCKETS if (s->is_unix) { len = sizeof(uaddr); addr = (struct sockaddr *)&uaddr; @@ -2797,13 +2832,13 @@ static CharDriverState *qemu_chr_open_tcp(const char *host_str, int do_nodelay = 0; const char *ptr; struct sockaddr_in saddr; -#ifndef _WIN32 +#ifndef NO_UNIX_SOCKETS struct sockaddr_un uaddr; #endif struct sockaddr *addr; socklen_t addrlen; -#ifndef _WIN32 +#ifndef NO_UNIX_SOCKETS if (is_unix) { addr = (struct sockaddr *)&uaddr; addrlen = sizeof(uaddr); @@ -2842,7 +2877,7 @@ static CharDriverState *qemu_chr_open_tcp(const char *host_str, if (!s) goto fail; -#ifndef _WIN32 +#ifndef NO_UNIX_SOCKETS if (is_unix) fd = socket(PF_UNIX, SOCK_STREAM, 0); else @@ -2867,7 +2902,7 @@ static CharDriverState *qemu_chr_open_tcp(const char *host_str, if (is_listen) { /* allow fast reuse */ -#ifndef _WIN32 +#ifndef NO_UNIX_SOCKETS if (is_unix) { char path[109]; strncpy(path, uaddr.sun_path, 108); @@ -2954,12 +2989,14 @@ CharDriverState *qemu_chr_open(const char *filename) return qemu_chr_open_tcp(p, 0, 1); } else if (strstart(filename, "file:", &p)) { return qemu_chr_open_file_out(p); +#ifndef CONFIG_STUBDOM } else if (strstart(filename, "pipe:", &p)) { return qemu_chr_open_pipe(p); } else if (!strcmp(filename, "pty")) { return qemu_chr_open_pty(); } else if (!strcmp(filename, "stdio")) { return qemu_chr_open_stdio(); +#endif } else #endif #if defined(__linux__) @@ -3449,7 +3486,16 @@ static TAPState *net_tap_fd_init(VLANState *vlan, int fd) return s; } -#ifdef _BSD +#ifdef CONFIG_STUBDOM +#include <netfront.h> +static int tap_open(char *ifname, int ifname_size) +{ + char nodename[64]; + static int num = 1; // 0 is for our own TCP/IP networking + snprintf(nodename, sizeof(nodename), "device/vif/%d", num++); + return netfront_tap_open(nodename); +} +#elif defined(_BSD) static int tap_open(char *ifname, int ifname_size) { int fd; @@ -3537,6 +3583,7 @@ static int net_tap_init(VLANState *vlan, const char *ifname1, if (fd < 0) return -1; +#ifndef CONFIG_STUBDOM if (!setup_script || !strcmp(setup_script, "no")) setup_script = ""; if (setup_script[0] != '\0') { @@ -3569,6 +3616,7 @@ static int net_tap_init(VLANState *vlan, const char *ifname1, } } } +#endif s = net_tap_fd_init(vlan, fd); if (!s) return -1; @@ -4397,6 +4445,7 @@ void dumb_display_init(DisplayState *ds) ds->depth = 0; ds->dpy_update = dumb_update; ds->dpy_resize = dumb_resize; + ds->dpy_colourdepth = NULL; ds->dpy_refresh = dumb_refresh; } @@ -6510,7 +6559,7 @@ void help(void) "-vnc display start a VNC server on display\n" "-vncviewer start a vncviewer process for this domain\n" "-vncunused bind the VNC server to an unused port\n" -#ifndef _WIN32 +#ifndef NO_DAEMONIZE "-daemonize daemonize QEMU after initializing\n" #endif "-option-rom rom load a file, rom, into the option ROM space\n" @@ -6600,7 +6649,9 @@ enum { QEMU_OPTION_vnc, QEMU_OPTION_no_acpi, QEMU_OPTION_no_reboot, +#ifndef NO_DAEMONIZE QEMU_OPTION_daemonize, +#endif QEMU_OPTION_option_rom, QEMU_OPTION_semihosting , @@ -6698,7 +6749,9 @@ const QEMUOption qemu_options[] = { { "cirrusvga", 0, QEMU_OPTION_cirrusvga }, { "no-acpi", 0, QEMU_OPTION_no_acpi }, { "no-reboot", 0, QEMU_OPTION_no_reboot }, +#ifndef NO_DAEMONIZE { "daemonize", 0, QEMU_OPTION_daemonize }, +#endif { "option-rom", HAS_ARG, QEMU_OPTION_option_rom }, #if defined(TARGET_ARM) { "semihosting", 0, QEMU_OPTION_semihosting }, @@ -7009,12 +7062,14 @@ int main(int argc, char **argv) char usb_devices[MAX_USB_CMDLINE][128]; int usb_devices_index; int fds[2]; +#ifndef CONFIG_STUBDOM struct rlimit rl; +#endif sigset_t set; char qemu_dm_logfilename[128]; const char *direct_pci = NULL; -#ifndef __sun__ +#if !defined(__sun__) && !defined(CONFIG_STUBDOM) /* Maximise rlimits. Needed where default constraints are tight (*BSD). */ if (getrlimit(RLIMIT_STACK, &rl) != 0) { perror("getrlimit(RLIMIT_STACK)"); @@ -7040,6 +7095,7 @@ int main(int argc, char **argv) perror("setrlimit(RLIMIT_MEMLOCK)"); #endif +#ifndef CONFIG_STUBDOM /* Ensure that SIGUSR2 is blocked by default when a new thread is created, then only the threads that use the signal unblock it -- this fixes a race condition in Qcow support where the AIO signal is misdelivered. */ @@ -7082,6 +7138,7 @@ int main(int argc, char **argv) } } #endif +#endif register_machines(); machine = first_machine; @@ -7496,9 +7553,11 @@ int main(int argc, char **argv) case QEMU_OPTION_no_reboot: no_reboot = 1; break; +#ifndef NO_DAEMONIZE case QEMU_OPTION_daemonize: daemonize = 1; break; +#endif case QEMU_OPTION_option_rom: if (nb_option_roms >= MAX_OPTION_ROMS) { fprintf(stderr, "Too many option ROMs\n"); @@ -7542,7 +7601,7 @@ int main(int argc, char **argv) sprintf(qemu_dm_logfilename, "/var/log/xen/qemu-dm-%d.log", domid); cpu_set_log_filename(qemu_dm_logfilename); -#ifndef _WIN32 +#ifndef NO_DAEMONIZE if (daemonize && !nographic && vnc_display == NULL && vncunused == 0) { fprintf(stderr, "Can only daemonize if using -nographic or -vnc\n"); daemonize = 0; @@ -7593,7 +7652,15 @@ int main(int argc, char **argv) #ifdef CONFIG_DM bdrv_init(); xc_handle = xc_interface_open(); +#ifdef CONFIG_STUBDOM + char *domid_s, *msg; + if ((msg = xenbus_read(XBT_NIL, "domid", &domid_s))) + fprintf(stderr,"Can not read our own domid\n", msg); + else + xenstore_parse_domain_config(atoi(domid_s)); +#else /* CONFIG_STUBDOM */ xenstore_parse_domain_config(domid); +#endif /* CONFIG_STUBDOM */ #endif /* CONFIG_DM */ #ifdef USE_KQEMU @@ -7760,8 +7827,10 @@ int main(int argc, char **argv) vnc_display_password(ds, password); if ((vnc_display_port = vnc_display_open(ds, vnc_display, vncunused)) < 0) exit (0); +#ifndef CONFIG_STUBDOM if (vncviewer) vnc_start_viewer(vnc_display_port); +#endif xenstore_write_vncport(vnc_display_port); } else { #if defined(CONFIG_SDL) @@ -7863,6 +7932,7 @@ int main(int argc, char **argv) } } +#ifndef NO_DAEMONIZE if (daemonize) { uint8_t status = 0; ssize_t len; @@ -7886,12 +7956,17 @@ int main(int argc, char **argv) close(fd); } +#endif - /* Unblock SIGTERM, which may have been blocked by the caller */ +#ifndef CONFIG_STUBDOM + /* Unblock SIGTERM and SIGHUP, which may have been blocked by the caller */ + signal(SIGHUP, SIG_DFL); sigemptyset(&set); sigaddset(&set, SIGTERM); + sigaddset(&set, SIGHUP); if (sigprocmask(SIG_UNBLOCK, &set, NULL) == -1) - fprintf(stderr, "Failed to unblock SIGTERM\n"); + fprintf(stderr, "Failed to unblock SIGTERM and SIGHUP\n"); +#endif main_loop(); quit_timers(); diff --git a/tools/ioemu/vl.h b/tools/ioemu/vl.h index 9d78cd25d9..00f5c16333 100644 --- a/tools/ioemu/vl.h +++ b/tools/ioemu/vl.h @@ -574,6 +574,9 @@ typedef struct BlockDriver BlockDriver; extern BlockDriver bdrv_raw; extern BlockDriver bdrv_host_device; +#ifdef CONFIG_STUBDOM +extern BlockDriver bdrv_vbd; +#endif extern BlockDriver bdrv_cow; extern BlockDriver bdrv_qcow; extern BlockDriver bdrv_vmdk; @@ -912,8 +915,11 @@ struct DisplayState { int height; void *opaque; + int switchbpp; + void (*dpy_update)(struct DisplayState *s, int x, int y, int w, int h); void (*dpy_resize)(struct DisplayState *s, int w, int h); + void (*dpy_colourdepth)(struct DisplayState *s, int depth); void (*dpy_refresh)(struct DisplayState *s); void (*dpy_copy)(struct DisplayState *s, int src_x, int src_y, int dst_x, int dst_y, int w, int h); }; diff --git a/tools/ioemu/vnc.c b/tools/ioemu/vnc.c index 0dd78dd4b4..7f87f8ed18 100644 --- a/tools/ioemu/vnc.c +++ b/tools/ioemu/vnc.c @@ -30,6 +30,9 @@ #include "vl.h" #include "qemu_socket.h" #include <assert.h> +#ifdef CONFIG_STUBDOM +#include <netfront.h> +#endif /* The refresh interval starts at BASE. If we scan the buffer and find no change, we increase by INC, up to MAX. If the mouse moves @@ -85,8 +88,8 @@ typedef void VncWritePixels(VncState *vs, void *data, int size); typedef void VncSendHextileTile(VncState *vs, int x, int y, int w, int h, - uint32_t *last_bg, - uint32_t *last_fg, + void *last_bg, + void *last_fg, int *has_bg, int *has_fg); #if 0 @@ -154,6 +157,7 @@ struct VncState int has_resize; int has_hextile; int has_pointer_type_change; + int has_WMVi; int absolute; int last_x; int last_y; @@ -187,9 +191,9 @@ struct VncState VncWritePixels *write_pixels; VncSendHextileTile *send_hextile_tile; int pix_bpp, pix_big_endian; - int red_shift, red_max, red_shift1; - int green_shift, green_max, green_shift1; - int blue_shift, blue_max, blue_shift1; + int red_shift, red_max, red_shift1, red_max1; + int green_shift, green_max, green_shift1, green_max1; + int blue_shift, blue_max, blue_shift1, blue_max1; VncReadEvent *read_handler; size_t read_handler_expect; @@ -379,54 +383,67 @@ static void vnc_write_pixels_copy(VncState *vs, void *pixels, int size) /* slowest but generic code. */ static void vnc_convert_pixel(VncState *vs, uint8_t *buf, uint32_t v) { - unsigned int r, g, b; + uint8_t r, g, b; - r = (v >> vs->red_shift1) & vs->red_max; - g = (v >> vs->green_shift1) & vs->green_max; - b = (v >> vs->blue_shift1) & vs->blue_max; - v = (r << vs->red_shift) | - (g << vs->green_shift) | - (b << vs->blue_shift); + r = ((v >> vs->red_shift1) & vs->red_max1) * (vs->red_max + 1) / (vs->red_max1 + 1); + g = ((v >> vs->green_shift1) & vs->green_max1) * (vs->green_max + 1) / (vs->green_max1 + 1); + b = ((v >> vs->blue_shift1) & vs->blue_max1) * (vs->blue_max + 1) / (vs->blue_max1 + 1); switch(vs->pix_bpp) { case 1: - buf[0] = v; + buf[0] = (r << vs->red_shift) | (g << vs->green_shift) | (b << vs->blue_shift); break; case 2: + { + uint16_t *p = (uint16_t *) buf; + *p = (r << vs->red_shift) | (g << vs->green_shift) | (b << vs->blue_shift); if (vs->pix_big_endian) { - buf[0] = v >> 8; - buf[1] = v; - } else { - buf[1] = v >> 8; - buf[0] = v; + *p = htons(*p); } + } break; default: case 4: + { + uint32_t *p = (uint32_t *) buf; + *p = (r << vs->red_shift) | (g << vs->green_shift) | (b << vs->blue_shift); if (vs->pix_big_endian) { - buf[0] = v >> 24; - buf[1] = v >> 16; - buf[2] = v >> 8; - buf[3] = v; - } else { - buf[3] = v >> 24; - buf[2] = v >> 16; - buf[1] = v >> 8; - buf[0] = v; + *p = htonl(*p); } break; } + } } static void vnc_write_pixels_generic(VncState *vs, void *pixels1, int size) { - uint32_t *pixels = pixels1; uint8_t buf[4]; - int n, i; - n = size >> 2; - for(i = 0; i < n; i++) { - vnc_convert_pixel(vs, buf, pixels[i]); - vnc_write(vs, buf, vs->pix_bpp); + if (vs->depth == 4) { + uint32_t *pixels = pixels1; + int n, i; + n = size >> 2; + for(i = 0; i < n; i++) { + vnc_convert_pixel(vs, buf, pixels[i]); + vnc_write(vs, buf, vs->pix_bpp); + } + } else if (vs->depth == 2) { + uint16_t *pixels = pixels1; + int n, i; + n = size >> 1; + for(i = 0; i < n; i++) { + vnc_convert_pixel(vs, buf, pixels[i]); + vnc_write(vs, buf, vs->pix_bpp); + } + } else if (vs->depth == 1) { + uint8_t *pixels = pixels1; + int n, i; + n = size; + for(i = 0; i < n; i++) { + vnc_convert_pixel(vs, buf, pixels[i]); + vnc_write(vs, buf, vs->pix_bpp); + } + } else { + fprintf(stderr, "vnc_write_pixels_generic: VncState color depth not supported\n"); } } @@ -463,6 +480,18 @@ static void hextile_enc_cord(uint8_t *ptr, int x, int y, int w, int h) #undef BPP #define GENERIC +#define BPP 8 +#include "vnchextile.h" +#undef BPP +#undef GENERIC + +#define GENERIC +#define BPP 16 +#include "vnchextile.h" +#undef BPP +#undef GENERIC + +#define GENERIC #define BPP 32 #include "vnchextile.h" #undef BPP @@ -472,18 +501,22 @@ static void send_framebuffer_update_hextile(VncState *vs, int x, int y, int w, i { int i, j; int has_fg, has_bg; - uint32_t last_fg32, last_bg32; + void *last_fg, *last_bg; vnc_framebuffer_update(vs, x, y, w, h, 5); + last_fg = (void *) malloc(vs->depth); + last_bg = (void *) malloc(vs->depth); has_fg = has_bg = 0; for (j = y; j < (y + h); j += 16) { for (i = x; i < (x + w); i += 16) { vs->send_hextile_tile(vs, i, j, MIN(16, x + w - i), MIN(16, y + h - j), - &last_bg32, &last_fg32, &has_bg, &has_fg); + last_bg, last_fg, &has_bg, &has_fg); } } + free(last_fg); + free(last_bg); } static void send_framebuffer_update(VncState *vs, int x, int y, int w, int h) @@ -1278,6 +1311,7 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings) vs->has_hextile = 0; vs->has_resize = 0; vs->has_pointer_type_change = 0; + vs->has_WMVi = 0; vs->absolute = -1; vs->ds->dpy_copy = NULL; @@ -1298,6 +1332,8 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings) case -257: vs->has_pointer_type_change = 1; break; + case 0x574D5669: + vs->has_WMVi = 1; default: break; } @@ -1306,17 +1342,6 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings) check_pointer_type_change(vs, kbd_mouse_is_absolute()); } -static int compute_nbits(unsigned int val) -{ - int n; - n = 0; - while (val != 0) { - n++; - val >>= 1; - } - return n; -} - static void set_pixel_format(VncState *vs, int bits_per_pixel, int depth, int big_endian_flag, int true_color_flag, @@ -1335,23 +1360,24 @@ static void set_pixel_format(VncState *vs, vnc_client_error(vs); return; } - if (bits_per_pixel == 32 && + if (bits_per_pixel == 32 && + bits_per_pixel == vs->depth * 8 && host_big_endian_flag == big_endian_flag && red_max == 0xff && green_max == 0xff && blue_max == 0xff && red_shift == 16 && green_shift == 8 && blue_shift == 0) { - vs->depth = 4; vs->write_pixels = vnc_write_pixels_copy; vs->send_hextile_tile = send_hextile_tile_32; } else - if (bits_per_pixel == 16 && + if (bits_per_pixel == 16 && + bits_per_pixel == vs->depth * 8 && host_big_endian_flag == big_endian_flag && red_max == 31 && green_max == 63 && blue_max == 31 && red_shift == 11 && green_shift == 5 && blue_shift == 0) { - vs->depth = 2; vs->write_pixels = vnc_write_pixels_copy; vs->send_hextile_tile = send_hextile_tile_16; } else if (bits_per_pixel == 8 && + bits_per_pixel == vs->depth * 8 && red_max == 7 && green_max == 7 && blue_max == 3 && red_shift == 5 && green_shift == 2 && blue_shift == 0) { vs->depth = 1; @@ -1364,28 +1390,170 @@ static void set_pixel_format(VncState *vs, bits_per_pixel != 16 && bits_per_pixel != 32) goto fail; - vs->depth = 4; - vs->red_shift = red_shift; - vs->red_max = red_max; - vs->red_shift1 = 24 - compute_nbits(red_max); - vs->green_shift = green_shift; - vs->green_max = green_max; - vs->green_shift1 = 16 - compute_nbits(green_max); - vs->blue_shift = blue_shift; - vs->blue_max = blue_max; - vs->blue_shift1 = 8 - compute_nbits(blue_max); - vs->pix_bpp = bits_per_pixel / 8; + if (vs->depth == 4) { + vs->send_hextile_tile = send_hextile_tile_generic_32; + } else if (vs->depth == 2) { + vs->send_hextile_tile = send_hextile_tile_generic_16; + } else { + vs->send_hextile_tile = send_hextile_tile_generic_8; + } + vs->pix_big_endian = big_endian_flag; vs->write_pixels = vnc_write_pixels_generic; - vs->send_hextile_tile = send_hextile_tile_generic; } - - vnc_dpy_resize(vs->ds, vs->ds->width, vs->ds->height); + + vs->red_shift = red_shift; + vs->red_max = red_max; + vs->green_shift = green_shift; + vs->green_max = green_max; + vs->blue_shift = blue_shift; + vs->blue_max = blue_max; + vs->pix_bpp = bits_per_pixel / 8; vga_hw_invalidate(); vga_hw_update(); } +static void pixel_format_message (VncState *vs) { + char pad[3] = { 0, 0, 0 }; + + vnc_write_u8(vs, vs->depth * 8); /* bits-per-pixel */ + if (vs->depth == 4) vnc_write_u8(vs, 24); /* depth */ + else vnc_write_u8(vs, vs->depth * 8); /* depth */ + +#ifdef WORDS_BIGENDIAN + vnc_write_u8(vs, 1); /* big-endian-flag */ +#else + vnc_write_u8(vs, 0); /* big-endian-flag */ +#endif + vnc_write_u8(vs, 1); /* true-color-flag */ + if (vs->depth == 4) { + vnc_write_u16(vs, 0xFF); /* red-max */ + vnc_write_u16(vs, 0xFF); /* green-max */ + vnc_write_u16(vs, 0xFF); /* blue-max */ + vnc_write_u8(vs, 16); /* red-shift */ + vnc_write_u8(vs, 8); /* green-shift */ + vnc_write_u8(vs, 0); /* blue-shift */ + vs->send_hextile_tile = send_hextile_tile_32; + } else if (vs->depth == 2) { + vnc_write_u16(vs, 31); /* red-max */ + vnc_write_u16(vs, 63); /* green-max */ + vnc_write_u16(vs, 31); /* blue-max */ + vnc_write_u8(vs, 11); /* red-shift */ + vnc_write_u8(vs, 5); /* green-shift */ + vnc_write_u8(vs, 0); /* blue-shift */ + vs->send_hextile_tile = send_hextile_tile_16; + } else if (vs->depth == 1) { + /* XXX: change QEMU pixel 8 bit pixel format to match the VNC one ? */ + vnc_write_u16(vs, 7); /* red-max */ + vnc_write_u16(vs, 7); /* green-max */ + vnc_write_u16(vs, 3); /* blue-max */ + vnc_write_u8(vs, 5); /* red-shift */ + vnc_write_u8(vs, 2); /* green-shift */ + vnc_write_u8(vs, 0); /* blue-shift */ + vs->send_hextile_tile = send_hextile_tile_8; + } + vs->red_max = vs->red_max1; + vs->green_max = vs->green_max1; + vs->blue_max = vs->blue_max1; + vs->red_shift = vs->red_shift1; + vs->green_shift = vs->green_shift1; + vs->blue_shift = vs->blue_shift1; + vs->pix_bpp = vs->depth * 8; + vs->write_pixels = vnc_write_pixels_copy; + + vnc_write(vs, pad, 3); /* padding */ +} + +static void vnc_dpy_colourdepth(DisplayState *ds, int depth) +{ + int host_big_endian_flag; + struct VncState *vs; + + if (!depth) return; + +#ifdef WORDS_BIGENDIAN + host_big_endian_flag = 1; +#else + host_big_endian_flag = 0; +#endif + vs = ds->opaque; + + switch (depth) { + case 8: + vs->depth = depth / 8; + vs->red_max1 = 7; + vs->green_max1 = 7; + vs->blue_max1 = 3; + vs->red_shift1 = 5; + vs->green_shift1 = 2; + vs->blue_shift1 = 0; + break; + case 16: + vs->depth = depth / 8; + vs->red_max1 = 31; + vs->green_max1 = 63; + vs->blue_max1 = 31; + vs->red_shift1 = 11; + vs->green_shift1 = 5; + vs->blue_shift1 = 0; + break; + case 32: + vs->depth = 4; + vs->red_max1 = 255; + vs->green_max1 = 255; + vs->blue_max1 = 255; + vs->red_shift1 = 16; + vs->green_shift1 = 8; + vs->blue_shift1 = 0; + break; + default: + return; + } + if (ds->switchbpp) { + vnc_client_error(vs); + } else if (vs->csock != -1 && vs->has_WMVi) { + /* Sending a WMVi message to notify the client*/ + vnc_write_u8(vs, 0); /* msg id */ + vnc_write_u8(vs, 0); + vnc_write_u16(vs, 1); /* number of rects */ + vnc_framebuffer_update(vs, 0, 0, ds->width, ds->height, 0x574D5669); + pixel_format_message(vs); + vnc_flush(vs); + } else { + if (vs->pix_bpp == 4 && vs->depth == 4 && + host_big_endian_flag == vs->pix_big_endian && + vs->red_max == 0xff && vs->green_max == 0xff && vs->blue_max == 0xff && + vs->red_shift == 16 && vs->green_shift == 8 && vs->blue_shift == 0) { + vs->write_pixels = vnc_write_pixels_copy; + vs->send_hextile_tile = send_hextile_tile_32; + } else if (vs->pix_bpp == 2 && vs->depth == 2 && + host_big_endian_flag == vs->pix_big_endian && + vs->red_max == 31 && vs->green_max == 63 && vs->blue_max == 31 && + vs->red_shift == 11 && vs->green_shift == 5 && vs->blue_shift == 0) { + vs->write_pixels = vnc_write_pixels_copy; + vs->send_hextile_tile = send_hextile_tile_16; + } else if (vs->pix_bpp == 1 && vs->depth == 1 && + host_big_endian_flag == vs->pix_big_endian && + vs->red_max == 7 && vs->green_max == 7 && vs->blue_max == 3 && + vs->red_shift == 5 && vs->green_shift == 2 && vs->blue_shift == 0) { + vs->write_pixels = vnc_write_pixels_copy; + vs->send_hextile_tile = send_hextile_tile_8; + } else { + if (vs->depth == 4) { + vs->send_hextile_tile = send_hextile_tile_generic_32; + } else if (vs->depth == 2) { + vs->send_hextile_tile = send_hextile_tile_generic_16; + } else { + vs->send_hextile_tile = send_hextile_tile_generic_8; + } + vs->write_pixels = vnc_write_pixels_generic; + } + } + + vnc_dpy_resize(ds, ds->width, ds->height); +} + static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len) { int i; @@ -1473,7 +1641,6 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len) static int protocol_client_init(VncState *vs, uint8_t *data, size_t len) { size_t l; - char pad[3] = { 0, 0, 0 }; vga_hw_update(); @@ -1482,43 +1649,7 @@ static int protocol_client_init(VncState *vs, uint8_t *data, size_t len) vnc_write_u16(vs, vs->ds->width); vnc_write_u16(vs, vs->ds->height); - vnc_write_u8(vs, vs->depth * 8); /* bits-per-pixel */ - vnc_write_u8(vs, vs->depth * 8); /* depth */ -#ifdef WORDS_BIGENDIAN - vnc_write_u8(vs, 1); /* big-endian-flag */ -#else - vnc_write_u8(vs, 0); /* big-endian-flag */ -#endif - vnc_write_u8(vs, 1); /* true-color-flag */ - if (vs->depth == 4) { - vnc_write_u16(vs, 0xFF); /* red-max */ - vnc_write_u16(vs, 0xFF); /* green-max */ - vnc_write_u16(vs, 0xFF); /* blue-max */ - vnc_write_u8(vs, 16); /* red-shift */ - vnc_write_u8(vs, 8); /* green-shift */ - vnc_write_u8(vs, 0); /* blue-shift */ - vs->send_hextile_tile = send_hextile_tile_32; - } else if (vs->depth == 2) { - vnc_write_u16(vs, 31); /* red-max */ - vnc_write_u16(vs, 63); /* green-max */ - vnc_write_u16(vs, 31); /* blue-max */ - vnc_write_u8(vs, 11); /* red-shift */ - vnc_write_u8(vs, 5); /* green-shift */ - vnc_write_u8(vs, 0); /* blue-shift */ - vs->send_hextile_tile = send_hextile_tile_16; - } else if (vs->depth == 1) { - /* XXX: change QEMU pixel 8 bit pixel format to match the VNC one ? */ - vnc_write_u16(vs, 7); /* red-max */ - vnc_write_u16(vs, 7); /* green-max */ - vnc_write_u16(vs, 3); /* blue-max */ - vnc_write_u8(vs, 5); /* red-shift */ - vnc_write_u8(vs, 2); /* green-shift */ - vnc_write_u8(vs, 0); /* blue-shift */ - vs->send_hextile_tile = send_hextile_tile_8; - } - vs->write_pixels = vnc_write_pixels_copy; - - vnc_write(vs, pad, 3); /* padding */ + pixel_format_message(vs); l = strlen(domain_name); vnc_write_u32(vs, l); @@ -2160,7 +2291,6 @@ void vnc_display_init(DisplayState *ds) vs->lsock = -1; vs->csock = -1; - vs->depth = 4; vs->last_x = -1; vs->last_y = -1; @@ -2177,9 +2307,12 @@ void vnc_display_init(DisplayState *ds) vs->ds->data = NULL; vs->ds->dpy_update = vnc_dpy_update; vs->ds->dpy_resize = vnc_dpy_resize; + vs->ds->dpy_colourdepth = vnc_dpy_colourdepth; vs->ds->dpy_refresh = vnc_dpy_refresh; - vnc_dpy_resize(vs->ds, 640, 400); + vs->ds->width = 640; + vs->ds->height = 400; + vnc_dpy_colourdepth(vs->ds, 32); } #if CONFIG_VNC_TLS @@ -2297,10 +2430,12 @@ int vnc_display_open(DisplayState *ds, const char *display, int find_unused) { struct sockaddr *addr; struct sockaddr_in iaddr; -#ifndef _WIN32 +#ifndef NO_UNIX_SOCKETS struct sockaddr_un uaddr; #endif +#ifndef CONFIG_STUBDOM int reuse_addr, ret; +#endif socklen_t addrlen; const char *p; VncState *vs = ds ? (VncState *)ds->opaque : vnc_state; @@ -2325,6 +2460,8 @@ int vnc_display_open(DisplayState *ds, const char *display, int find_unused) options++; if (strncmp(options, "password", 8) == 0) { password = 1; /* Require password auth */ + } else if (strncmp(options, "switchbpp", 9) == 0) { + ds->switchbpp = 1; #if CONFIG_VNC_TLS } else if (strncmp(options, "tls", 3) == 0) { tls = 1; /* Require TLS */ @@ -2432,6 +2569,15 @@ int vnc_display_open(DisplayState *ds, const char *display, int find_unused) return -1; } +#ifdef CONFIG_STUBDOM + { + struct ip_addr ipaddr = { iaddr.sin_addr.s_addr }; + struct ip_addr netmask = { 0 }; + struct ip_addr gw = { 0 }; + networking_set_addr(&ipaddr, &netmask, &gw); + } +#endif + iaddr.sin_port = htons(ntohs(iaddr.sin_port) + 5900); vs->lsock = socket(PF_INET, SOCK_STREAM, 0); @@ -2442,6 +2588,7 @@ int vnc_display_open(DisplayState *ds, const char *display, int find_unused) return -1; } +#ifndef CONFIG_STUBDOM reuse_addr = 1; ret = setsockopt(vs->lsock, SOL_SOCKET, SO_REUSEADDR, (const char *)&reuse_addr, sizeof(reuse_addr)); @@ -2453,6 +2600,7 @@ int vnc_display_open(DisplayState *ds, const char *display, int find_unused) vs->display = NULL; return -1; } +#endif } while (bind(vs->lsock, addr, addrlen) == -1) { @@ -2483,6 +2631,7 @@ int vnc_display_open(DisplayState *ds, const char *display, int find_unused) return ntohs(iaddr.sin_port); } +#ifndef CONFIG_STUBDOM int vnc_start_viewer(int port) { int pid, i, open_max; @@ -2510,4 +2659,5 @@ int vnc_start_viewer(int port) return pid; } } +#endif diff --git a/tools/ioemu/vnchextile.h b/tools/ioemu/vnchextile.h index 3d894cd574..29b74840f5 100644 --- a/tools/ioemu/vnchextile.h +++ b/tools/ioemu/vnchextile.h @@ -2,29 +2,29 @@ #define CONCAT(a, b) CONCAT_I(a, b) #define pixel_t CONCAT(uint, CONCAT(BPP, _t)) #ifdef GENERIC -#define NAME generic +#define NAME CONCAT(generic_, BPP) #else #define NAME BPP #endif static void CONCAT(send_hextile_tile_, NAME)(VncState *vs, int x, int y, int w, int h, - uint32_t *last_bg32, - uint32_t *last_fg32, + void *last_bg_, + void *last_fg_, int *has_bg, int *has_fg) { uint8_t *row = (vs->ds->data + y * vs->ds->linesize + x * vs->depth); pixel_t *irow = (pixel_t *)row; int j, i; - pixel_t *last_bg = (pixel_t *)last_bg32; - pixel_t *last_fg = (pixel_t *)last_fg32; + pixel_t *last_bg = (pixel_t *)last_bg_; + pixel_t *last_fg = (pixel_t *)last_fg_; pixel_t bg = 0; pixel_t fg = 0; int n_colors = 0; int bg_count = 0; int fg_count = 0; int flags = 0; - uint8_t data[(sizeof(pixel_t) + 2) * 16 * 16]; + uint8_t data[(vs->pix_bpp + 2) * 16 * 16]; int n_data = 0; int n_subtiles = 0; diff --git a/tools/ioemu/xenstore.c b/tools/ioemu/xenstore.c index 9d33237cb3..8cad6bda2d 100644 --- a/tools/ioemu/xenstore.c +++ b/tools/ioemu/xenstore.c @@ -11,8 +11,10 @@ #include "vl.h" #include "block_int.h" #include <unistd.h> +#ifndef CONFIG_STUBDOM #include <sys/ipc.h> #include <sys/shm.h> +#endif #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -219,10 +221,18 @@ void xenstore_parse_domain_config(int domid) } /* open device now if media present */ +#ifdef CONFIG_STUBDOM + if (pasprintf(&buf, "%s/device/vbd/%s", path, e[i]) == -1) + continue; + if (bdrv_open2(bs, buf, 0 /* snapshot */, &bdrv_vbd) == 0) { + pstrcpy(bs->filename, sizeof(bs->filename), params); + continue; + } +#endif + if (params[0]) { if (bdrv_open(bs, params, 0 /* snapshot */) < 0) - fprintf(stderr, "qemu: could not open hard disk image '%s'\n", - params); + fprintf(stderr, "qemu: could not open vbd '%s' or hard disk image '%s'\n", buf, params); } } @@ -265,6 +275,10 @@ extern int vga_ram_size, bios_size; void xenstore_process_logdirty_event(void) { +#ifdef CONFIG_STUBDOM + /* XXX we just can't use shm. */ + return; +#else char *act; static char *active_path = NULL; static char *next_active_path = NULL; @@ -367,6 +381,7 @@ void xenstore_process_logdirty_event(void) /* Ack that we've switched */ xs_write(xsh, XBT_NULL, active_path, act, len); free(act); +#endif } diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile index ffc5662052..b73bbfe55b 100644 --- a/tools/libxc/Makefile +++ b/tools/libxc/Makefile @@ -5,10 +5,12 @@ MAJOR = 3.2 MINOR = 0 CTRL_SRCS-y := +ifneq ($(stubdom),y) CTRL_SRCS-y += xc_core.c CTRL_SRCS-$(CONFIG_X86) += xc_core_x86.c CTRL_SRCS-$(CONFIG_IA64) += xc_core_ia64.c CTRL_SRCS-$(CONFIG_POWERPC) += xc_core_powerpc.c +endif CTRL_SRCS-y += xc_domain.c CTRL_SRCS-y += xc_evtchn.c CTRL_SRCS-y += xc_misc.c @@ -19,21 +21,27 @@ CTRL_SRCS-y += xc_private.c CTRL_SRCS-y += xc_sedf.c CTRL_SRCS-y += xc_csched.c CTRL_SRCS-y += xc_tbuf.c +ifneq ($(stubdom),y) CTRL_SRCS-y += xc_resume.c +endif CTRL_SRCS-$(CONFIG_X86) += xc_pagetab.c CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c CTRL_SRCS-$(CONFIG_SunOS) += xc_solaris.c CTRL_SRCS-$(CONFIG_X86_Linux) += xc_ptrace.c xc_ptrace_core.c CTRL_SRCS-$(CONFIG_NetBSD) += xc_netbsd.c +CTRL_SRCS-$(CONFIG_MiniOS) += xc_minios.c GUEST_SRCS-y := GUEST_SRCS-y += xg_private.c +ifneq ($(stubdom),y) GUEST_SRCS-$(CONFIG_MIGRATE) += xc_domain_restore.c xc_domain_save.c GUEST_SRCS-$(CONFIG_HVM) += xc_hvm_build.c +endif VPATH = ../../xen/common/libelf CFLAGS += -I../../xen/common/libelf +ifneq ($(stubdom),y) GUEST_SRCS-y += libelf-tools.c libelf-loader.c GUEST_SRCS-y += libelf-dominfo.c libelf-relocate.c @@ -46,6 +54,7 @@ GUEST_SRCS-y += xc_dom_compat_linux.c GUEST_SRCS-$(CONFIG_X86) += xc_dom_x86.c GUEST_SRCS-$(CONFIG_IA64) += xc_dom_ia64.c GUEST_SRCS-$(CONFIG_POWERPC) += xc_dom_powerpc.c +endif -include $(XEN_TARGET_ARCH)/Makefile @@ -71,10 +80,14 @@ GUEST_LIB_OBJS := $(patsubst %.c,%.o,$(GUEST_SRCS-y)) GUEST_PIC_OBJS := $(patsubst %.c,%.opic,$(GUEST_SRCS-y)) LIB := libxenctrl.a +ifneq ($(stubdom),y) LIB += libxenctrl.so libxenctrl.so.$(MAJOR) libxenctrl.so.$(MAJOR).$(MINOR) +endif LIB += libxenguest.a +ifneq ($(stubdom),y) LIB += libxenguest.so libxenguest.so.$(MAJOR) libxenguest.so.$(MAJOR).$(MINOR) +endif .PHONY: all all: build @@ -133,7 +146,7 @@ libxenctrl.so.$(MAJOR): libxenctrl.so.$(MAJOR).$(MINOR) ln -sf $< $@ libxenctrl.so.$(MAJOR).$(MINOR): $(CTRL_PIC_OBJS) - $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ -lpthread + $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ $(PTHREAD_LIBS) # libxenguest @@ -146,7 +159,7 @@ libxenguest.so.$(MAJOR): libxenguest.so.$(MAJOR).$(MINOR) ln -sf $< $@ libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so - $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl -lpthread + $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl $(PTHREAD_LIBS) -include $(DEPS) diff --git a/tools/libxc/ia64/Makefile b/tools/libxc/ia64/Makefile index 8a23024b24..4fd4fbbe86 100644 --- a/tools/libxc/ia64/Makefile +++ b/tools/libxc/ia64/Makefile @@ -1,3 +1,4 @@ +ifneq ($(stubdom),y) CTRL_SRCS-y += ia64/xc_ia64_stubs.c GUEST_SRCS-y += ia64/xc_ia64_hvm_build.c @@ -8,6 +9,7 @@ GUEST_SRCS-y += ia64/xc_dom_ia64_util.c GUEST_SRCS-y += ia64/dom_fw_acpi.c DOMFW_SRCS_BASE := dom_fw_common.c dom_fw_domu.c dom_fw_asm.S +endif DOMFW_SRCS := $(addprefix ia64/, $(DOMFW_SRCS_BASE)) $(DOMFW_SRCS): ln -sf ../$(XEN_ROOT)/xen/arch/ia64/xen/$(@F) $@ diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c index f75955c577..0f28ed5ca5 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -350,21 +350,6 @@ int xc_shadow_control(int xc_handle, return (rc == 0) ? domctl.u.shadow_op.pages : rc; } -int xc_domain_setcpuweight(int xc_handle, - uint32_t domid, - float weight) -{ - int sched_id; - int ret; - - /* Figure out which scheduler is currently used: */ - if ( (ret = xc_sched_id(xc_handle, &sched_id)) != 0 ) - return ret; - - /* No-op. */ - return 0; -} - int xc_domain_setmaxmem(int xc_handle, uint32_t domid, unsigned int max_memkb) diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c index ec7e8fc9a2..52fc1155d2 100644 --- a/tools/libxc/xc_domain_restore.c +++ b/tools/libxc/xc_domain_restore.c @@ -251,7 +251,7 @@ static xen_pfn_t *load_p2m_frame_list( /* Now that we know the guest's word-size, can safely allocate * the p2m frame list */ - if ( (p2m_frame_list = malloc(P2M_FL_SIZE)) == NULL ) + if ( (p2m_frame_list = malloc(P2M_TOOLS_FL_SIZE)) == NULL ) { ERROR("Couldn't allocate p2m_frame_list array"); return NULL; @@ -1040,7 +1040,7 @@ int xc_domain_restore(int xc_handle, int io_fd, uint32_t dom, SET_FIELD(&ctxt, gdt_frames[j], p2m[pfn]); } /* Uncanonicalise the page table base pointer. */ - pfn = xen_cr3_to_pfn(GET_FIELD(&ctxt, ctrlreg[3])); + pfn = UNFOLD_CR3(GET_FIELD(&ctxt, ctrlreg[3])); if ( pfn >= p2m_size ) { @@ -1057,12 +1057,12 @@ int xc_domain_restore(int xc_handle, int io_fd, uint32_t dom, (unsigned long)pt_levels<<XEN_DOMCTL_PFINFO_LTAB_SHIFT); goto out; } - SET_FIELD(&ctxt, ctrlreg[3], xen_pfn_to_cr3(p2m[pfn])); + SET_FIELD(&ctxt, ctrlreg[3], FOLD_CR3(p2m[pfn])); /* Guest pagetable (x86/64) stored in otherwise-unused CR1. */ if ( (pt_levels == 4) && (ctxt.x64.ctrlreg[1] & 1) ) { - pfn = xen_cr3_to_pfn(ctxt.x64.ctrlreg[1] & ~1); + pfn = UNFOLD_CR3(ctxt.x64.ctrlreg[1] & ~1); if ( pfn >= p2m_size ) { ERROR("User PT base is bad: pfn=%lu p2m_size=%lu", @@ -1077,7 +1077,7 @@ int xc_domain_restore(int xc_handle, int io_fd, uint32_t dom, (unsigned long)pt_levels<<XEN_DOMCTL_PFINFO_LTAB_SHIFT); goto out; } - ctxt.x64.ctrlreg[1] = xen_pfn_to_cr3(p2m[pfn]); + ctxt.x64.ctrlreg[1] = FOLD_CR3(p2m[pfn]); } domctl.cmd = XEN_DOMCTL_setvcpucontext; domctl.domain = (domid_t)dom; @@ -1158,7 +1158,7 @@ int xc_domain_restore(int xc_handle, int io_fd, uint32_t dom, if ( guest_width > sizeof (xen_pfn_t) ) for ( i = p2m_size - 1; i >= 0; i-- ) ((uint64_t *)p2m)[i] = p2m[i]; - else if ( guest_width > sizeof (xen_pfn_t) ) + else if ( guest_width < sizeof (xen_pfn_t) ) for ( i = 0; i < p2m_size; i++ ) ((uint32_t *)p2m)[i] = p2m[i]; diff --git a/tools/libxc/xc_domain_save.c b/tools/libxc/xc_domain_save.c index d37ea9cd51..3bd2db08b6 100644 --- a/tools/libxc/xc_domain_save.c +++ b/tools/libxc/xc_domain_save.c @@ -61,10 +61,11 @@ unsigned int guest_width; #define mfn_to_pfn(_mfn) (live_m2p[(_mfn)]) -#define pfn_to_mfn(_pfn) \ - ((xen_pfn_t) ((guest_width==8) \ - ? (((uint64_t *)live_p2m)[(_pfn)]) \ - : (((uint32_t *)live_p2m)[(_pfn)]))) +#define pfn_to_mfn(_pfn) \ + ((xen_pfn_t) ((guest_width==8) \ + ? (((uint64_t *)live_p2m)[(_pfn)]) \ + : ((((uint32_t *)live_p2m)[(_pfn)]) == 0xffffffffU \ + ? (-1UL) : (((uint32_t *)live_p2m)[(_pfn)])))) /* * Returns TRUE if the given machine frame number has a unique mapping @@ -496,10 +497,9 @@ static int canonicalize_pagetable(unsigned long type, unsigned long pfn, xen_start = L3_PAGETABLE_ENTRIES_PAE; /* - ** in PAE only the L2 mapping the top 1GB contains Xen mappings. - ** We can spot this by looking for the guest linear mapping which - ** Xen always ensures is present in that L2. Guests must ensure - ** that this check will fail for other L2s. + ** In PAE only the L2 mapping the top 1GB contains Xen mappings. + ** We can spot this by looking for the guest's mappingof the m2p. + ** Guests must ensure that this check will fail for other L2s. */ if ( (pt_levels == 3) && (type == XEN_DOMCTL_PFINFO_L2TAB) ) { @@ -555,7 +555,13 @@ static int canonicalize_pagetable(unsigned long type, unsigned long pfn, /* This will happen if the type info is stale which is quite feasible under live migration */ pfn = 0; /* zap it - we'll retransmit this page later */ - race = 1; /* inform the caller of race; fatal if !live */ + /* XXX: We can't spot Xen mappings in compat-mode L2es + * from 64-bit tools, but the only thing in them is the + * compat m2p, so we quietly zap them. This doesn't + * count as a race, so don't report it. */ + if ( !(type == XEN_DOMCTL_PFINFO_L2TAB + && sizeof (unsigned long) > guest_width) ) + race = 1; /* inform the caller; fatal if !live */ } else pfn = mfn_to_pfn(mfn); @@ -690,7 +696,7 @@ static xen_pfn_t *map_and_save_p2m_table(int xc_handle, else p2m_frame_list_list[i] = 0; else if ( guest_width < sizeof(unsigned long) ) - for ( i = PAGE_SIZE/sizeof(unsigned long) - 1; i >= 0; i++ ) + for ( i = PAGE_SIZE/sizeof(unsigned long) - 1; i >= 0; i-- ) p2m_frame_list_list[i] = ((uint32_t *)p2m_frame_list_list)[i]; live_p2m_frame_list = @@ -704,19 +710,20 @@ static xen_pfn_t *map_and_save_p2m_table(int xc_handle, } /* Get a local copy of the live_P2M_frame_list */ - if ( !(p2m_frame_list = malloc(P2M_FL_SIZE)) ) + if ( !(p2m_frame_list = malloc(P2M_TOOLS_FL_SIZE)) ) { ERROR("Couldn't allocate p2m_frame_list array"); goto out; } - memcpy(p2m_frame_list, live_p2m_frame_list, P2M_FL_SIZE); + memset(p2m_frame_list, 0, P2M_TOOLS_FL_SIZE); + memcpy(p2m_frame_list, live_p2m_frame_list, P2M_GUEST_FL_SIZE); /* Canonicalize guest's unsigned long vs ours */ if ( guest_width > sizeof(unsigned long) ) for ( i = 0; i < P2M_FL_ENTRIES; i++ ) p2m_frame_list[i] = ((uint64_t *)p2m_frame_list)[i]; else if ( guest_width < sizeof(unsigned long) ) - for ( i = P2M_FL_ENTRIES - 1; i >= 0; i++ ) + for ( i = P2M_FL_ENTRIES - 1; i >= 0; i-- ) p2m_frame_list[i] = ((uint32_t *)p2m_frame_list)[i]; @@ -1559,31 +1566,26 @@ int xc_domain_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters, } /* Canonicalise the page table base pointer. */ - if ( !MFN_IS_IN_PSEUDOPHYS_MAP(xen_cr3_to_pfn( - GET_FIELD(&ctxt, ctrlreg[3]))) ) + if ( !MFN_IS_IN_PSEUDOPHYS_MAP(UNFOLD_CR3( + GET_FIELD(&ctxt, ctrlreg[3]))) ) { ERROR("PT base is not in range of pseudophys map"); goto out; } SET_FIELD(&ctxt, ctrlreg[3], - xen_pfn_to_cr3( - mfn_to_pfn( - xen_cr3_to_pfn( - GET_FIELD(&ctxt, ctrlreg[3]))))); + FOLD_CR3(mfn_to_pfn(UNFOLD_CR3(GET_FIELD(&ctxt, ctrlreg[3]))))); /* Guest pagetable (x86/64) stored in otherwise-unused CR1. */ if ( (pt_levels == 4) && ctxt.x64.ctrlreg[1] ) { - if ( !MFN_IS_IN_PSEUDOPHYS_MAP( - xen_cr3_to_pfn(ctxt.x64.ctrlreg[1])) ) + if ( !MFN_IS_IN_PSEUDOPHYS_MAP(UNFOLD_CR3(ctxt.x64.ctrlreg[1])) ) { ERROR("PT base is not in range of pseudophys map"); goto out; } /* Least-significant bit means 'valid PFN'. */ ctxt.x64.ctrlreg[1] = 1 | - xen_pfn_to_cr3( - mfn_to_pfn(xen_cr3_to_pfn(ctxt.x64.ctrlreg[1]))); + FOLD_CR3(mfn_to_pfn(UNFOLD_CR3(ctxt.x64.ctrlreg[1]))); } if ( write_exact(io_fd, &ctxt, ((guest_width==8) diff --git a/tools/libxc/xc_minios.c b/tools/libxc/xc_minios.c new file mode 100644 index 0000000000..53f7a148da --- /dev/null +++ b/tools/libxc/xc_minios.c @@ -0,0 +1,313 @@ +/****************************************************************************** + * + * Copyright 2007-2008 Samuel Thibault <samuel.thibault@eu.citrix.com>. + * All rights reserved. + * Use is subject to license terms. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, version 2 of the + * License. + */ + +#undef NDEBUG +#include <types.h> +#include <os.h> +#include <mm.h> +#include <lib.h> +#include <events.h> +#include <wait.h> +#include <sys/mman.h> +#include <errno.h> + +#include <xen/memory.h> +#include <xen/sys/evtchn.h> +#include <unistd.h> +#include <fcntl.h> +#include <stdio.h> +#include <assert.h> +#include <stdint.h> +#include <inttypes.h> + +#include "xc_private.h" + +extern struct wait_queue_head event_queue; + +int xc_interface_open(void) +{ + return 0; +} + +int xc_interface_close(int xc_handle) +{ + return 0; +} + +void *xc_map_foreign_batch(int xc_handle, uint32_t dom, int prot, + xen_pfn_t *arr, int num) +{ + unsigned long pt_prot = 0; +#ifdef __ia64__ + /* TODO */ +#else + if (prot & PROT_READ) + pt_prot = L1_PROT_RO; + if (prot & PROT_WRITE) + pt_prot = L1_PROT; +#endif + return map_frames_ex(arr, num, 1, 0, 1, dom, 1, pt_prot); +} + +void *xc_map_foreign_range(int xc_handle, uint32_t dom, + int size, int prot, + unsigned long mfn) +{ + unsigned long pt_prot = 0; + printf("xc_map_foreign_range(%lx, %d)\n", mfn, size); +#ifdef __ia64__ + /* TODO */ +#else + if (prot & PROT_READ) + pt_prot = L1_PROT_RO; + if (prot & PROT_WRITE) + pt_prot = L1_PROT; +#endif + assert(!(size % getpagesize())); + return map_frames_ex(&mfn, size / getpagesize(), 0, 1, 1, dom, 0, pt_prot); +} + +int xc_map_foreign_ranges(int xc_handle, uint32_t dom, + privcmd_mmap_entry_t *entries, int nr) +{ + printf("xc_map_foreign_ranges, TODO\n"); + do_exit(); +} + +int do_xen_hypercall(int xc_handle, privcmd_hypercall_t *hypercall) +{ + multicall_entry_t call; + int i, ret; + + call.op = hypercall->op; + for (i = 0; i < sizeof(hypercall->arg) / sizeof(*hypercall->arg); i++) + call.args[i] = hypercall->arg[i]; + + ret = HYPERVISOR_multicall(&call, 1); + + if (ret < 0) { + errno = -ret; + return -1; + } + if (call.result < 0) { + errno = -call.result; + return -1; + } + return call.result; +} + +int xc_find_device_number(const char *name) +{ + printf("xc_find_device_number(%s)\n", name); + do_exit(); +} + +int xc_evtchn_open(void) +{ + int fd = alloc_fd(FTYPE_EVTCHN), i; + for (i = 0; i < MAX_EVTCHN_PORTS; i++) { + files[fd].evtchn.ports[i].port = -1; + files[fd].evtchn.ports[i].bound = 0; + } + printf("evtchn_open() -> %d\n", fd); + return fd; +} + +int xc_evtchn_close(int xce_handle) +{ + int i; + for (i = 0; i < MAX_EVTCHN_PORTS; i++) + if (files[xce_handle].evtchn.ports[i].bound) + unbind_evtchn(files[xce_handle].evtchn.ports[i].port); + files[xce_handle].type = FTYPE_NONE; + return 0; +} + +int xc_evtchn_fd(int xce_handle) +{ + return xce_handle; +} + +int xc_evtchn_notify(int xce_handle, evtchn_port_t port) +{ + int ret; + + ret = notify_remote_via_evtchn(port); + + if (ret < 0) { + errno = -ret; + ret = -1; + } + return ret; +} + +/* XXX Note: This is not threadsafe */ +static int port_alloc(int xce_handle) { + int i; + for (i= 0; i < MAX_EVTCHN_PORTS; i++) + if (files[xce_handle].evtchn.ports[i].port == -1) + break; + if (i == MAX_EVTCHN_PORTS) { + printf("Too many ports in xc handle\n"); + errno = EMFILE; + return -1; + } + files[xce_handle].evtchn.ports[i].pending = 0; + return i; +} + +static void poke_port(int xce_handle, evtchn_port_t port) +{ + shared_info_t *s = HYPERVISOR_shared_info; + printk("poking port %d\n", port); + synch_set_bit(port, &s->evtchn_pending[0]); + xc_evtchn_unmask(xce_handle, port); +} + +static void evtchn_handler(evtchn_port_t port, struct pt_regs *regs, void *data) +{ + int xce_handle = (intptr_t) data; + int i; + assert(files[xce_handle].type == FTYPE_EVTCHN); + mask_evtchn(port); + for (i= 0; i < MAX_EVTCHN_PORTS; i++) + if (files[xce_handle].evtchn.ports[i].port == port) + break; + if (i == MAX_EVTCHN_PORTS) { + printk("Unknown port for handle %d\n", xce_handle); + return; + } + files[xce_handle].evtchn.ports[i].pending++; + files[xce_handle].read = 1; + wake_up(&event_queue); +} + +evtchn_port_or_error_t xc_evtchn_bind_unbound_port(int xce_handle, int domid) +{ + int ret, i; + evtchn_port_t port; + + assert(get_current() == main_thread); + i = port_alloc(xce_handle); + if (i == -1) + return -1; + + printf("xc_evtchn_bind_unbound_port(%d)", domid); + ret = evtchn_alloc_unbound(domid, evtchn_handler, (void*)(intptr_t)xce_handle, &port); + printf(" = %d\n", ret); + + if (ret < 0) { + errno = -ret; + return -1; + } + files[xce_handle].evtchn.ports[i].bound = 1; + files[xce_handle].evtchn.ports[i].port = port; + return port; +} + +evtchn_port_or_error_t xc_evtchn_bind_interdomain(int xce_handle, int domid, + evtchn_port_t remote_port) +{ + evtchn_port_t local_port; + int ret, i; + + assert(get_current() == main_thread); + i = port_alloc(xce_handle); + if (i == -1) + return -1; + + printf("xc_evtchn_bind_interdomain(%d, %"PRId32")", domid, remote_port); + ret = evtchn_bind_interdomain(domid, remote_port, evtchn_handler, (void*)(intptr_t)xce_handle, &local_port); + printf(" = %d\n", ret); + + if (ret < 0) { + errno = -ret; + return -1; + } + files[xce_handle].evtchn.ports[i].bound = 1; + files[xce_handle].evtchn.ports[i].port = local_port; +/* Poke port on start: HVM won't send an event for the very first request since + * we were not ready yet */ + poke_port(xce_handle, local_port); + return local_port; +} + +int xc_evtchn_unbind(int xce_handle, evtchn_port_t port) +{ + int i; + for (i = 0; i < MAX_EVTCHN_PORTS; i++) + if (files[xce_handle].evtchn.ports[i].port == port) { + files[xce_handle].evtchn.ports[i].port = -1; + break; + } + if (i == MAX_EVTCHN_PORTS) + printf("Warning: couldn't find port %"PRId32" for xc handle %x\n", port, xce_handle); + files[xce_handle].evtchn.ports[i].bound = 0; + unbind_evtchn(port); + return 0; +} + +evtchn_port_or_error_t xc_evtchn_bind_virq(int xce_handle, unsigned int virq) +{ + evtchn_port_t port; + int i; + + assert(get_current() == main_thread); + i = port_alloc(xce_handle); + if (i == -1) + return -1; + + printf("xc_evtchn_bind_virq(%d)", virq); + port = bind_virq(virq, evtchn_handler, (void*)(intptr_t)xce_handle); + + if (port < 0) { + errno = -port; + return -1; + } + files[xce_handle].evtchn.ports[i].bound = 1; + files[xce_handle].evtchn.ports[i].port = port; + return port; +} + +evtchn_port_or_error_t xc_evtchn_pending(int xce_handle) +{ + int i; + unsigned long flags; + local_irq_save(flags); + for (i = 0; i < MAX_EVTCHN_PORTS; i++) { + evtchn_port_t port = files[xce_handle].evtchn.ports[i].port; + if (port != -1 && files[xce_handle].evtchn.ports[i].pending) { + files[xce_handle].evtchn.ports[i].pending--; + local_irq_restore(flags); + return port; + } + } + files[xce_handle].read = 0; + local_irq_restore(flags); + return -1; +} + +int xc_evtchn_unmask(int xce_handle, evtchn_port_t port) +{ + unmask_evtchn(port); + return 0; +} + +/* + * Local variables: + * mode: C + * c-set-style: "BSD" + * c-basic-offset: 4 + * tab-width: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h index f6778dd946..afc80a36df 100644 --- a/tools/libxc/xenctrl.h +++ b/tools/libxc/xenctrl.h @@ -43,22 +43,21 @@ */ #if defined(__i386__) -#define mb() __asm__ __volatile__ ( "lock; addl $0,0(%%esp)" : : : "memory" ) -#define rmb() __asm__ __volatile__ ( "lock; addl $0,0(%%esp)" : : : "memory" ) -#define wmb() __asm__ __volatile__ ( "" : : : "memory") +#define xen_mb() asm volatile ( "lock; addl $0,0(%%esp)" : : : "memory" ) +#define xen_rmb() asm volatile ( "lock; addl $0,0(%%esp)" : : : "memory" ) +#define xen_wmb() asm volatile ( "" : : : "memory") #elif defined(__x86_64__) -#define mb() __asm__ __volatile__ ( "mfence" : : : "memory") -#define rmb() __asm__ __volatile__ ( "lfence" : : : "memory") -#define wmb() __asm__ __volatile__ ( "" : : : "memory") +#define xen_mb() asm volatile ( "mfence" : : : "memory") +#define xen_rmb() asm volatile ( "lfence" : : : "memory") +#define xen_wmb() asm volatile ( "" : : : "memory") #elif defined(__ia64__) -#define mb() __asm__ __volatile__ ("mf" ::: "memory") -#define rmb() __asm__ __volatile__ ("mf" ::: "memory") -#define wmb() __asm__ __volatile__ ("mf" ::: "memory") +#define xen_mb() asm volatile ("mf" ::: "memory") +#define xen_rmb() asm volatile ("mf" ::: "memory") +#define xen_wmb() asm volatile ("mf" ::: "memory") #elif defined(__powerpc__) -/* XXX loosen these up later */ -#define mb() __asm__ __volatile__ ("sync" : : : "memory") -#define rmb() __asm__ __volatile__ ("sync" : : : "memory") /* lwsync? */ -#define wmb() __asm__ __volatile__ ("sync" : : : "memory") /* eieio? */ +#define xen_mb() asm volatile ("sync" : : : "memory") +#define xen_rmb() asm volatile ("sync" : : : "memory") /* lwsync? */ +#define xen_wmb() asm volatile ("sync" : : : "memory") /* eieio? */ #else #error "Define barriers" #endif @@ -380,9 +379,6 @@ int xc_vcpu_getinfo(int xc_handle, uint32_t vcpu, xc_vcpuinfo_t *info); -int xc_domain_setcpuweight(int xc_handle, - uint32_t domid, - float weight); long long xc_domain_get_cpu_usage(int xc_handle, domid_t domid, int vcpu); diff --git a/tools/libxc/xg_private.h b/tools/libxc/xg_private.h index 679c31896c..2ed3f55849 100644 --- a/tools/libxc/xg_private.h +++ b/tools/libxc/xg_private.h @@ -155,7 +155,9 @@ typedef l4_pgentry_64_t l4_pgentry_t; #define P2M_FL_ENTRIES (((p2m_size)+FPP-1)/FPP) /* Size in bytes of the pfn_to_mfn_frame_list */ -#define P2M_FL_SIZE ((P2M_FL_ENTRIES)*(guest_width)) +#define P2M_GUEST_FL_SIZE ((P2M_FL_ENTRIES) * (guest_width)) +#define P2M_TOOLS_FL_SIZE ((P2M_FL_ENTRIES) * \ + MAX((sizeof (xen_pfn_t)), guest_width)) /* Masks for PTE<->PFN conversions */ #define MADDR_BITS_X86 ((guest_width == 8) ? 52 : 44) diff --git a/tools/libxc/xg_save_restore.h b/tools/libxc/xg_save_restore.h index b0379a4550..2da1e2090d 100644 --- a/tools/libxc/xg_save_restore.h +++ b/tools/libxc/xg_save_restore.h @@ -68,6 +68,13 @@ static inline int get_platform_info(int xc_handle, uint32_t dom, *guest_width = domctl.u.address_size.size / 8; + /* 64-bit tools will see the 64-bit hvirt_start, but 32-bit guests + * will be using the compat one. */ + if ( *guest_width < sizeof (unsigned long) ) + /* XXX need to fix up a way of extracting this value from Xen if + * XXX it becomes variable for domU */ + *hvirt_start = 0xf5800000; + if (strstr(xen_caps, "xen-3.0-x86_64")) /* Depends on whether it's a compat 32-on-64 guest */ *pt_levels = ( (*guest_width == 8) ? 4 : 3 ); @@ -136,6 +143,16 @@ typedef union (_p)->x32._f = (_v); \ } while (0) +#define UNFOLD_CR3(_c) \ + ((uint64_t)((guest_width == 8) \ + ? ((_c) >> 12) \ + : (((uint32_t)(_c) >> 12) | ((uint32_t)(_c) << 20)))) + +#define FOLD_CR3(_c) \ + ((uint64_t)((guest_width == 8) \ + ? ((uint64_t)(_c)) << 12 \ + : (((uint32_t)(_c) << 12) | ((uint32_t)(_c) >> 20)))) + #define MEMCPY_FIELD(_d, _s, _f) do { \ if (guest_width == 8) \ memcpy(&(_d)->x64._f, &(_s)->x64._f,sizeof((_d)->x64._f)); \ diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index 425ed7b0fe..305138bd70 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -237,26 +237,6 @@ static PyObject *pyxc_vcpu_setaffinity(XcObject *self, return zero; } -static PyObject *pyxc_domain_setcpuweight(XcObject *self, - PyObject *args, - PyObject *kwds) -{ - uint32_t dom; - float cpuweight = 1; - - static char *kwd_list[] = { "domid", "cpuweight", NULL }; - - if ( !PyArg_ParseTupleAndKeywords(args, kwds, "i|f", kwd_list, - &dom, &cpuweight) ) - return NULL; - - if ( xc_domain_setcpuweight(self->xc_handle, dom, cpuweight) != 0 ) - return pyxc_error_to_exception(); - - Py_INCREF(zero); - return zero; -} - static PyObject *pyxc_domain_sethandle(XcObject *self, PyObject *args) { int i; @@ -1325,14 +1305,6 @@ static PyMethodDef pyxc_methods[] = { " cpumap [list, []]: list of usable CPUs.\n\n" "Returns: [int] 0 on success; -1 on error.\n" }, - { "domain_setcpuweight", - (PyCFunction)pyxc_domain_setcpuweight, - METH_VARARGS | METH_KEYWORDS, "\n" - "Set cpuweight scheduler parameter for domain.\n" - " dom [int]: Identifier of domain to be changed.\n" - " cpuweight [float, 1]: VCPU being pinned.\n" - "Returns: [int] 0 on success; -1 on error.\n" }, - { "domain_sethandle", (PyCFunction)pyxc_domain_sethandle, METH_VARARGS, "\n" diff --git a/tools/python/xen/xend/XendConfig.py b/tools/python/xen/xend/XendConfig.py index 1eb7ee78ca..fafe3e8534 100644 --- a/tools/python/xen/xend/XendConfig.py +++ b/tools/python/xen/xend/XendConfig.py @@ -127,7 +127,7 @@ LEGACY_CFG_TO_XENAPI_CFG = reverse_dict(XENAPI_CFG_TO_LEGACY_CFG) XENAPI_PLATFORM_CFG = [ 'acpi', 'apic', 'boot', 'device_model', 'loader', 'display', 'fda', 'fdb', 'keymap', 'isa', 'localtime', 'monitor', 'nographic', 'pae', 'rtc_timeoffset', 'serial', 'sdl', - 'soundhw','stdvga', 'usb', 'usbdevice', 'vnc', + 'soundhw','stdvga', 'usb', 'usbdevice', 'hpet', 'vnc', 'vncconsole', 'vncdisplay', 'vnclisten', 'timer_mode', 'vncpasswd', 'vncunused', 'xauthority', 'pci', 'vhpt', 'guest_os_type', 'hap'] @@ -406,15 +406,13 @@ class XendConfig(dict): if self.is_hvm(): if 'loader' not in self['platform']: - log.debug("No loader present") - # Old configs may have hvmloder set as PV_kernel param, - # so lets migrate them.... - if self['PV_kernel'] == "/usr/lib/xen/boot/hvmloader": + # Old configs may have hvmloader set as PV_kernel param + if self.has_key('PV_kernel') and re.search('hvmloader', self['PV_kernel']): self['platform']['loader'] = self['PV_kernel'] - log.debug("Loader copied from kernel %s" % str(self['platform']['loader'])) + self['PV_kernel'] = '' else: self['platform']['loader'] = "/usr/lib/xen/boot/hvmloader" - log.debug("Loader %s" % str(self['platform']['loader'])) + log.debug("Loader is %s" % str(self['platform']['loader'])) # Compatibility hack, can go away soon. if 'soundhw' not in self['platform'] and \ diff --git a/tools/python/xen/xend/XendConstants.py b/tools/python/xen/xend/XendConstants.py index a99dbdc92f..bca3ee7dd1 100644 --- a/tools/python/xen/xend/XendConstants.py +++ b/tools/python/xen/xend/XendConstants.py @@ -47,6 +47,7 @@ HVM_PARAM_NVRAM_FD = 7 HVM_PARAM_VHPT_SIZE = 8 HVM_PARAM_BUFPIOREQ_PFN = 9 HVM_PARAM_TIMER_MODE = 10 +HVM_PARAM_HPET_ENABLED = 11 restart_modes = [ "restart", diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 1e9c1b11f5..c1cb6aa998 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -707,9 +707,6 @@ class XendDomainInfo: log.debug("Setting memory maximum of domain %s (%s) to %d MiB.", self.info['name_label'], str(self.domid), limit) - if limit <= 0: - raise XendError('Invalid memory size') - MiB = 1024 * 1024 self._safe_set_memory('memory_static_max', limit * MiB) @@ -1692,6 +1689,12 @@ class XendDomainInfo: xc.hvm_set_param(self.domid, HVM_PARAM_TIMER_MODE, long(timer_mode)) + # Optionally enable virtual HPET + hpet = self.info["platform"].get("hpet") + if hvm and hpet is not None: + xc.hvm_set_param(self.domid, HVM_PARAM_HPET_ENABLED, + long(hpet)) + # Set maximum number of vcpus in domain xc.domain_max_vcpus(self.domid, int(self.info['VCPUs_max'])) @@ -1750,9 +1753,6 @@ class XendDomainInfo: self.image = image.create(self, self.info) - xc.domain_setcpuweight(self.domid, \ - self.info['vcpus_params']['weight']) - # repin domain vcpus if a restricted cpus list is provided # this is done prior to memory allocation to aide in memory # distribution for NUMA systems. diff --git a/tools/python/xen/xend/XendPBD.py b/tools/python/xen/xend/XendPBD.py index 10d8c32b81..2187cd7850 100644 --- a/tools/python/xen/xend/XendPBD.py +++ b/tools/python/xen/xend/XendPBD.py @@ -20,6 +20,7 @@ import uuid from XendLogging import log from xen.xend.XendBase import XendBase from xen.xend import XendAPIStore +from xen.xend import uuid as genuuid class XendPBD(XendBase): """Physical block devices.""" @@ -39,8 +40,7 @@ class XendPBD(XendBase): return XendBase.getAttrRW() + attrRW def getAttrInst(self): - return ['uuid', - 'host', + return ['host', 'SR', 'device_config'] @@ -61,31 +61,31 @@ class XendPBD(XendBase): getFuncs = classmethod(getFuncs) def recreate(uuid, record): - pbd = XendPBD(uuid, record) + pbd = XendPBD(record, uuid) return uuid def create(cls, record): uuid = genuuid.createString() - pbd = XendPBD(uuid, record) - return uuid + pbd = XendPBD(record, uuid) + return uuid create = classmethod(create) - def __init__(self, uuid, record): + def __init__(self, record, uuid): XendBase.__init__(self, uuid, record) - this.currently_attached = True + self.currently_attached = True def get_host(self): - return this.host + return self.host def get_SR(self): - return this.SR + return self.SR def get_device_config(self): - return this.device_config + return self.device_config def get_currently_attached(self): - return this.currently_attached + return self.currently_attached def destroy(self): pass diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index 02ea81c748..069cde7dbe 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -91,12 +91,12 @@ class ImageHandler: ("image/cmdline", self.cmdline), ("image/ramdisk", self.ramdisk)) - self.dmargs = self.parseDeviceModelArgs(vmConfig) self.device_model = vmConfig['platform'].get('device_model') self.display = vmConfig['platform'].get('display') self.xauthority = vmConfig['platform'].get('xauthority') self.vncconsole = vmConfig['platform'].get('vncconsole') + self.dmargs = self.parseDeviceModelArgs(vmConfig) self.pid = None @@ -204,8 +204,14 @@ class ImageHandler: for dev_uuid in vmConfig['console_refs']: dev_type, dev_info = vmConfig['devices'][dev_uuid] if dev_type == 'vfb': - vnc_config = dev_info.get('other_config', {}) - has_vnc = True + vfb_type = dev_info.get('type', {}) + if vfb_type == 'sdl': + self.display = dev_info.get('display', {}) + self.xauthority = dev_info.get('xauthority', {}) + has_sdl = True + else: + vnc_config = dev_info.get('other_config', {}) + has_vnc = True break keymap = vmConfig['platform'].get("keymap") @@ -329,16 +335,27 @@ class ImageHandler: return if self.pid: try: - os.kill(self.pid, signal.SIGKILL) + os.kill(self.pid, signal.SIGHUP) except OSError, exn: log.exception(exn) try: - os.waitpid(self.pid, 0) + # Try to reap the child every 100ms for 10s. Then SIGKILL it. + for i in xrange(100): + (p, rv) = os.waitpid(self.pid, os.WNOHANG) + if p == self.pid: + break + time.sleep(0.1) + else: + log.warning("DeviceModel %d took more than 10s " + "to terminate: sending SIGKILL" % self.pid) + os.kill(self.pid, signal.SIGKILL) + os.waitpid(self.pid, 0) except OSError, exn: # This is expected if Xend has been restarted within the # life of this domain. In this case, we can kill the process, # but we can't wait for it because it's not our child. - pass + # We just make really sure it's going away (SIGKILL) first. + os.kill(self.pid, signal.SIGKILL) self.pid = None state = xstransact.Remove("/local/domain/0/device-model/%i" % self.vm.getDomid()) @@ -449,7 +466,7 @@ class HVMImageHandler(ImageHandler): ret = ImageHandler.parseDeviceModelArgs(self, vmConfig) ret = ret + ['-vcpus', str(self.vm.getVCpuCount())] - if self.kernel and self.kernel != "/usr/lib/xen/boot/hvmloader": + if self.kernel: log.debug("kernel = %s", self.kernel) ret = ret + ['-kernel', self.kernel] if self.ramdisk: diff --git a/tools/python/xen/xm/create.py b/tools/python/xen/xm/create.py index 1c508becd3..7a3d764c6b 100644 --- a/tools/python/xen/xm/create.py +++ b/tools/python/xen/xm/create.py @@ -198,6 +198,10 @@ gopts.var('pae', val='PAE', fn=set_int, default=1, use="Disable or enable PAE of HVM domain.") +gopts.var('hpet', val='HPET', + fn=set_int, default=0, + use="Enable virtual high-precision event timer.") + gopts.var('timer_mode', val='TIMER_MODE', fn=set_int, default=0, use="""Timer mode (0=delay virtual time when ticks are missed; @@ -740,7 +744,7 @@ def configure_hvm(config_image, vals): 'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'soundhw', 'vnc', 'vncdisplay', 'vncunused', 'vncconsole', 'vnclisten', 'sdl', 'display', 'xauthority', 'rtc_timeoffset', 'monitor', - 'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci', + 'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci', 'hpet', 'guest_os_type', 'hap'] for a in args: diff --git a/tools/python/xen/xm/xenapi_create.py b/tools/python/xen/xm/xenapi_create.py index 04abcc4e4e..9c16376955 100644 --- a/tools/python/xen/xm/xenapi_create.py +++ b/tools/python/xen/xm/xenapi_create.py @@ -818,7 +818,8 @@ class sxp2xml: def extract_platform(self, image, document): - platform_keys = ['acpi', 'apic', 'pae', 'vhpt', 'timer_mode', 'hap'] + platform_keys = ['acpi', 'apic', 'pae', 'vhpt', 'timer_mode', + 'hap', 'hpet'] def extract_platform_key(key): platform = document.createElement("platform") diff --git a/tools/xenmon/xenbaked.c b/tools/xenmon/xenbaked.c index 728f14b753..32ca9f36c3 100644 --- a/tools/xenmon/xenbaked.c +++ b/tools/xenmon/xenbaked.c @@ -511,10 +511,10 @@ int monitor_tbufs(void) { while ( meta[i]->cons != meta[i]->prod ) { - rmb(); /* read prod, then read item. */ + xen_rmb(); /* read prod, then read item. */ rec_size = process_record( i, (struct t_rec *)(data[i] + meta[i]->cons % data_size)); - mb(); /* read item, then update cons. */ + xen_mb(); /* read item, then update cons. */ meta[i]->cons += rec_size; } } diff --git a/tools/xenstore/xenstored_domain.c b/tools/xenstore/xenstored_domain.c index 2cc9881eb4..d1d59f9f6f 100644 --- a/tools/xenstore/xenstored_domain.c +++ b/tools/xenstore/xenstored_domain.c @@ -112,7 +112,7 @@ static int writechn(struct connection *conn, /* Must read indexes once, and before anything else, and verified. */ cons = intf->rsp_cons; prod = intf->rsp_prod; - mb(); + xen_mb(); if (!check_indexes(cons, prod)) { errno = EIO; @@ -124,7 +124,7 @@ static int writechn(struct connection *conn, len = avail; memcpy(dest, data, len); - mb(); + xen_mb(); intf->rsp_prod += len; xc_evtchn_notify(xce_handle, conn->domain->port); @@ -142,7 +142,7 @@ static int readchn(struct connection *conn, void *data, unsigned int len) /* Must read indexes once, and before anything else, and verified. */ cons = intf->req_cons; prod = intf->req_prod; - mb(); + xen_mb(); if (!check_indexes(cons, prod)) { errno = EIO; @@ -154,7 +154,7 @@ static int readchn(struct connection *conn, void *data, unsigned int len) len = avail; memcpy(data, src, len); - mb(); + xen_mb(); intf->req_cons += len; xc_evtchn_notify(xce_handle, conn->domain->port); diff --git a/tools/xentrace/xentrace.c b/tools/xentrace/xentrace.c index 26415bdb7d..7f394d2af0 100644 --- a/tools/xentrace/xentrace.c +++ b/tools/xentrace/xentrace.c @@ -23,6 +23,7 @@ #include <string.h> #include <getopt.h> #include <assert.h> +#include <sys/poll.h> #include <xen/xen.h> #include <xen/trace.h> @@ -40,9 +41,6 @@ do { \ /***** Compile time configuration of defaults ********************************/ -/* when we've got more records than this waiting, we log it to the output */ -#define NEW_DATA_THRESH 1 - /* sleep for this long (milliseconds) between checking the trace buffers */ #define POLL_SLEEP_MILLIS 100 @@ -51,8 +49,7 @@ do { \ typedef struct settings_st { char *outfile; - struct timespec poll_sleep; - unsigned long new_data_thresh; + unsigned long poll_sleep; /* milliseconds to sleep between polls */ uint32_t evt_mask; uint32_t cpu_mask; unsigned long tbuf_size; @@ -63,26 +60,16 @@ settings_t opts; int interrupted = 0; /* gets set if we get a SIGHUP */ +static int xc_handle = -1; +static int event_fd = -1; +static int virq_port = -1; + void close_handler(int signal) { interrupted = 1; } /** - * millis_to_timespec - convert a time in milliseconds to a struct timespec - * @millis: time interval in milliseconds - */ -struct timespec millis_to_timespec(unsigned long millis) -{ - struct timespec spec; - - spec.tv_sec = millis / 1000; - spec.tv_nsec = (millis % 1000) * 1000; - - return spec; -} - -/** * write_buffer - write a section of the trace buffer * @cpu - source buffer CPU ID * @start @@ -143,14 +130,8 @@ void write_buffer(unsigned int cpu, unsigned char *start, int size, static void get_tbufs(unsigned long *mfn, unsigned long *size) { - int xc_handle = xc_interface_open(); int ret; - if ( xc_handle < 0 ) - { - exit(EXIT_FAILURE); - } - if(!opts.tbuf_size) opts.tbuf_size = DEFAULT_TBUF_SIZE; @@ -161,8 +142,6 @@ static void get_tbufs(unsigned long *mfn, unsigned long *size) perror("Couldn't enable trace buffers"); exit(1); } - - xc_interface_close(xc_handle); } /** @@ -176,22 +155,12 @@ static void get_tbufs(unsigned long *mfn, unsigned long *size) struct t_buf *map_tbufs(unsigned long tbufs_mfn, unsigned int num, unsigned long size) { - int xc_handle; struct t_buf *tbufs_mapped; - xc_handle = xc_interface_open(); - - if ( xc_handle < 0 ) - { - exit(EXIT_FAILURE); - } - tbufs_mapped = xc_map_foreign_range(xc_handle, DOMID_XEN, size * num, PROT_READ | PROT_WRITE, tbufs_mfn); - xc_interface_close(xc_handle); - if ( tbufs_mapped == 0 ) { PERROR("Failed to mmap trace buffers"); @@ -210,7 +179,6 @@ struct t_buf *map_tbufs(unsigned long tbufs_mfn, unsigned int num, void set_mask(uint32_t mask, int type) { int ret = 0; - int xc_handle = xc_interface_open(); /* for accessing control interface */ if (type == 1) { ret = xc_tbuf_set_cpu_mask(xc_handle, mask); @@ -220,8 +188,6 @@ void set_mask(uint32_t mask, int type) fprintf(stderr, "change evtmask to 0x%x\n", mask); } - xc_interface_close(xc_handle); - if ( ret != 0 ) { PERROR("Failure to get trace buffer pointer from Xen and set the new mask"); @@ -295,7 +261,6 @@ unsigned char **init_rec_ptrs(struct t_buf **meta, unsigned int num) unsigned int get_num_cpus(void) { xc_physinfo_t physinfo = { 0 }; - int xc_handle = xc_interface_open(); int ret; ret = xc_physinfo(xc_handle, &physinfo); @@ -306,11 +271,70 @@ unsigned int get_num_cpus(void) exit(EXIT_FAILURE); } - xc_interface_close(xc_handle); - return physinfo.nr_cpus; } +/** + * event_init - setup to receive the VIRQ_TBUF event + */ +void event_init(void) +{ + int rc; + + rc = xc_evtchn_open(); + if (rc < 0) { + perror(xc_get_last_error()->message); + exit(EXIT_FAILURE); + } + event_fd = rc; + + rc = xc_evtchn_bind_virq(event_fd, VIRQ_TBUF); + if (rc == -1) { + PERROR("failed to bind to VIRQ port"); + exit(EXIT_FAILURE); + } + virq_port = rc; +} + +/** + * wait_for_event_or_timeout - sleep for the specified number of milliseconds, + * or until an VIRQ_TBUF event occurs + */ +void wait_for_event_or_timeout(unsigned long milliseconds) +{ + int rc; + struct pollfd fd = { .fd = event_fd, + .events = POLLIN | POLLERR }; + int port; + + rc = poll(&fd, 1, milliseconds); + if (rc == -1) { + if (errno == EINTR) + return; + PERROR("poll exitted with an error"); + exit(EXIT_FAILURE); + } + + if (rc == 1) { + port = xc_evtchn_pending(event_fd); + if (port == -1) { + PERROR("failed to read port from evtchn"); + exit(EXIT_FAILURE); + } + if (port != virq_port) { + fprintf(stderr, + "unexpected port returned from evtchn (got %d vs expected %d)\n", + port, virq_port); + exit(EXIT_FAILURE); + } + rc = xc_evtchn_unmask(event_fd, port); + if (rc == -1) { + PERROR("failed to write port to evtchn"); + exit(EXIT_FAILURE); + } + } +} + /** * monitor_tbufs - monitor the contents of tbufs and output to a file @@ -330,6 +354,9 @@ int monitor_tbufs(int outfd) unsigned long data_size; + /* prepare to listen for VIRQ_TBUF */ + event_init(); + /* get number of logical CPUs (and therefore number of trace buffers) */ num = get_num_cpus(); @@ -357,14 +384,23 @@ int monitor_tbufs(int outfd) /* Read window information only once. */ cons = meta[i]->cons; prod = meta[i]->prod; - rmb(); /* read prod, then read item. */ - + xen_rmb(); /* read prod, then read item. */ + if ( cons == prod ) continue; - assert(prod > cons); + assert(cons < 2*data_size); + assert(prod < 2*data_size); + + // NB: if (prod<cons), then (prod-cons)%data_size will not yield + // the correct answer because data_size is not a power of 2. + if ( prod < cons ) + window_size = (prod + 2*data_size) - cons; + else + window_size = prod - cons; + assert(window_size > 0); + assert(window_size <= data_size); - window_size = prod - cons; start_offset = cons % data_size; end_offset = prod % data_size; @@ -392,11 +428,11 @@ int monitor_tbufs(int outfd) outfd); } - mb(); /* read buffer, then update cons. */ + xen_mb(); /* read buffer, then update cons. */ meta[i]->cons = prod; } - nanosleep(&opts.poll_sleep, NULL); + wait_for_event_or_timeout(opts.poll_sleep); } /* cleanup */ @@ -416,7 +452,7 @@ int monitor_tbufs(int outfd) #define xstr(x) str(x) #define str(x) #x -const char *program_version = "xentrace v1.1"; +const char *program_version = "xentrace v1.2"; const char *program_bug_address = "<mark.a.williamson@intel.com>"; void usage(void) @@ -435,9 +471,6 @@ void usage(void) " N.B. that the trace buffer cannot be resized.\n" \ " if it has already been set this boot cycle,\n" \ " this argument will be ignored.\n" \ -" -t, --log-thresh=l Set number, l, of new records required to\n" \ -" trigger a write to output (default " \ - xstr(NEW_DATA_THRESH) ").\n" \ " -?, --help Show this message\n" \ " -V, --version Print program version\n" \ "\n" \ @@ -516,12 +549,8 @@ void parse_args(int argc, char **argv) { switch ( option ) { - case 't': /* set new records threshold for logging */ - opts.new_data_thresh = argtol(optarg, 0); - break; - case 's': /* set sleep time (given in milliseconds) */ - opts.poll_sleep = millis_to_timespec(argtol(optarg, 0)); + opts.poll_sleep = argtol(optarg, 0); break; case 'c': /* set new cpu mask for filtering*/ @@ -565,13 +594,19 @@ int main(int argc, char **argv) struct sigaction act; opts.outfile = 0; - opts.poll_sleep = millis_to_timespec(POLL_SLEEP_MILLIS); - opts.new_data_thresh = NEW_DATA_THRESH; + opts.poll_sleep = POLL_SLEEP_MILLIS; opts.evt_mask = 0; opts.cpu_mask = 0; parse_args(argc, argv); - + + xc_handle = xc_interface_open(); + if ( xc_handle < 0 ) + { + perror(xc_get_last_error()->message); + exit(EXIT_FAILURE); + } + if ( opts.evt_mask != 0 ) set_mask(opts.evt_mask, 0); |