updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / qemu-sweb / qemu-debug-info-0xe9.patch
blob3bd0c47a24a3ab42baa0ffb27dcf128253e2c9cb
1 *** qemu-0.12.5/vl.c 2010-07-22 14:39:04.000000000 +0200
2 --- qemu-0.12.5-patched/vl.c 2010-11-12 13:14:42.000000000 +0100
3 ***************
4 *** 228,233 ****
5 --- 228,234 ----
6 unsigned int nb_prom_envs = 0;
7 const char *prom_envs[MAX_PROM_ENVS];
8 int boot_menu;
9 + static void e9write(void *opaque, uint32_t address, uint32_t value);
11 typedef struct FWBootEntry FWBootEntry;
13 ***************
14 *** 1453,1458 ****
15 --- 1454,1460 ----
17 bdrv_close_all();
18 pause_all_vcpus();
19 + e9write(0, 0, '\n');
22 static void version(void)
23 *************** static int virtcon_parse(const char *dev
24 *** 4848,4853 ****
25 --- 4848,4891 ----
26 return 0;
29 + static void e9write(void *opaque, uint32_t address, uint32_t value)
30 + {
31 + static uint32_t last = -1;
32 + static size_t pos = 0;
33 + static char buffer[256];
34 + if (last == -1)
35 + buffer[0] = 0;
36 + if (value == '\r')
37 + {
38 + printf("%s\n", buffer);
39 + fflush(stdout);
40 + pos = 0;
41 + buffer[0] = 0;
42 + }
43 + else if (value == '\n')
44 + {
45 + if (last != '\r')
46 + {
47 + printf("%s\n", buffer);
48 + fflush(stdout);
49 + pos = 0;
50 + buffer[0] = 0;
51 + }
52 + }
53 + else
54 + {
55 + buffer[pos++] = (char) value;
56 + buffer[pos] = 0;
57 + if (pos+2 >= sizeof(buffer))
58 + {
59 + printf("%s", buffer);
60 + pos = 0;
61 + buffer[0] = 0;
62 + }
63 + }
64 + last = value;
65 + }
67 int main(int argc, char **argv, char **envp)
69 const char *gdbstub_dev = NULL;
70 *************** int main(int argc, char **argv, char **e
71 *** 6136,6141 ****
72 --- 6174,6182 ----
74 #endif
76 + /* register the 0xe9 port to the e9write function */
77 + register_ioport_write(0xe9, 1, 1, e9write, NULL);
79 main_loop();
80 quit_timers();
81 net_cleanup();