diff options
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 58 |
1 files changed, 11 insertions, 47 deletions
@@ -182,7 +182,6 @@ const char *bios_name = NULL; struct drivelist drives = QTAILQ_HEAD_INITIALIZER(drives); struct driveoptlist driveopts = QTAILQ_HEAD_INITIALIZER(driveopts); enum vga_retrace_method vga_retrace_method = VGA_RETRACE_DUMB; -static DisplayState *display_state; DisplayType display_type = DT_DEFAULT; const char* keyboard_layout = NULL; ram_addr_t ram_size; @@ -2583,46 +2582,6 @@ void pcmcia_info(Monitor *mon) } /***********************************************************/ -/* register display */ - -struct DisplayAllocator default_allocator = { - defaultallocator_create_displaysurface, - defaultallocator_resize_displaysurface, - defaultallocator_free_displaysurface -}; - -void register_displaystate(DisplayState *ds) -{ - DisplayState **s; - s = &display_state; - while (*s != NULL) - s = &(*s)->next; - ds->next = NULL; - *s = ds; -} - -DisplayState *get_displaystate(void) -{ - return display_state; -} - -DisplayAllocator *register_displayallocator(DisplayState *ds, DisplayAllocator *da) -{ - if(ds->allocator == &default_allocator) ds->allocator = da; - return ds->allocator; -} - -/* dumb display */ - -static void dumb_display_init(void) -{ - DisplayState *ds = qemu_mallocz(sizeof(DisplayState)); - ds->allocator = &default_allocator; - ds->surface = qemu_create_displaysurface(ds, 640, 480); - register_displaystate(ds); -} - -/***********************************************************/ /* I/O handling */ typedef struct IOHandlerRecord { @@ -4958,6 +4917,9 @@ int main(int argc, char **argv, char **envp) fclose(fp); } } +#if defined(cpudef_setup) + cpudef_setup(); /* parse cpu definitions in target config file */ +#endif /* second pass of option parsing */ optind = 1; @@ -4991,8 +4953,10 @@ int main(int argc, char **argv, char **envp) /* hw initialization will check this */ if (*optarg == '?') { /* XXX: implement xxx_cpu_list for targets that still miss it */ -#if defined(cpu_list) - cpu_list(stdout, &fprintf); +#if defined(cpu_list_id) + cpu_list_id(stdout, &fprintf, optarg); +#elif defined(cpu_list) + cpu_list(stdout, &fprintf); /* deprecated */ #endif exit(0); } else { @@ -5978,10 +5942,10 @@ int main(int argc, char **argv, char **envp) if (qemu_opts_foreach(&qemu_device_opts, device_init_func, NULL, 1) != 0) exit(1); - if (!display_state) - dumb_display_init(); + net_check_clients(); + /* just use the first displaystate for the moment */ - ds = display_state; + ds = get_displaystate(); if (display_type == DT_DEFAULT) { #if defined(CONFIG_SDL) || defined(CONFIG_COCOA) @@ -6039,7 +6003,7 @@ int main(int argc, char **argv, char **envp) qemu_mod_timer(nographic_timer, qemu_get_clock(rt_clock)); } - text_consoles_set_display(display_state); + text_consoles_set_display(ds); if (qemu_opts_foreach(&qemu_mon_opts, mon_init_func, NULL, 1) != 0) exit(1); |