diff options
author | David 'Digit' Turner <digit@android.com> | 2011-05-11 16:01:57 +0200 |
---|---|---|
committer | David 'Digit' Turner <digit@android.com> | 2011-06-01 17:08:19 +0200 |
commit | ae3098a3bce898cf958a6c3334f3d62282b12d2a (patch) | |
tree | c723c520b533214a9113c0a2a2543c59ba57ae0b /vl.c | |
parent | 23ca2ae2bf303236eb6b1e0beb126ec05c6c23bf (diff) | |
download | external_qemu-ae3098a3bce898cf958a6c3334f3d62282b12d2a.zip external_qemu-ae3098a3bce898cf958a6c3334f3d62282b12d2a.tar.gz external_qemu-ae3098a3bce898cf958a6c3334f3d62282b12d2a.tar.bz2 |
vl-android.c: move arch-specific functions to arch_init.c
Change-Id: I4908006f3492aab199466c501dedff2bd835d647
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 186 |
1 files changed, 3 insertions, 183 deletions
@@ -34,7 +34,6 @@ #ifndef _WIN32 #include <libgen.h> -#include <pwd.h> #include <sys/times.h> #include <sys/wait.h> #include <termios.h> @@ -112,6 +111,9 @@ #define memalign(align, size) malloc(size) #endif +#include "cpus.h" +#include "arch_init.h" + #ifdef CONFIG_SDL #ifdef __APPLE__ #include <SDL.h> @@ -136,7 +138,6 @@ int qemu_main(int argc, char **argv, char **envp); #include "hw/usb.h" #include "hw/pcmcia.h" #include "hw/pc.h" -#include "hw/audiodev.h" #include "hw/isa.h" #include "hw/baum.h" #include "hw/bt.h" @@ -207,15 +208,6 @@ int std_vga_enabled = 0; int vmsvga_enabled = 0; int xenfb_enabled = 0; QEMUClock *rtc_clock; -#ifdef TARGET_SPARC -int graphic_width = 1024; -int graphic_height = 768; -int graphic_depth = 8; -#else -int graphic_width = 800; -int graphic_height = 600; -int graphic_depth = 15; -#endif static int full_screen = 0; #ifdef CONFIG_SDL static int no_frame = 0; @@ -1808,11 +1800,6 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id) return 0; } -void qemu_service_io(void) -{ - qemu_notify_event(); -} - /***********************************************************/ /* machine registration */ @@ -2218,147 +2205,6 @@ static const QEMUOption qemu_options[] = { { NULL, 0, 0 }, }; -#ifdef HAS_AUDIO -struct soundhw soundhw[] = { -#ifdef HAS_AUDIO_CHOICE -#if defined(TARGET_I386) || defined(TARGET_MIPS) - { - "pcspk", - "PC speaker", - 0, - 1, - { .init_isa = pcspk_audio_init } - }, -#endif - -#ifdef CONFIG_SB16 - { - "sb16", - "Creative Sound Blaster 16", - 0, - 1, - { .init_isa = SB16_init } - }, -#endif - -#ifdef CONFIG_CS4231A - { - "cs4231a", - "CS4231A", - 0, - 1, - { .init_isa = cs4231a_init } - }, -#endif - -#ifdef CONFIG_ADLIB - { - "adlib", -#ifdef HAS_YMF262 - "Yamaha YMF262 (OPL3)", -#else - "Yamaha YM3812 (OPL2)", -#endif - 0, - 1, - { .init_isa = Adlib_init } - }, -#endif - -#ifdef CONFIG_GUS - { - "gus", - "Gravis Ultrasound GF1", - 0, - 1, - { .init_isa = GUS_init } - }, -#endif - -#ifdef CONFIG_AC97 - { - "ac97", - "Intel 82801AA AC97 Audio", - 0, - 0, - { .init_pci = ac97_init } - }, -#endif - -#ifdef CONFIG_ES1370 - { - "es1370", - "ENSONIQ AudioPCI ES1370", - 0, - 0, - { .init_pci = es1370_init } - }, -#endif - -#endif /* HAS_AUDIO_CHOICE */ - - { NULL, NULL, 0, 0, { NULL } } -}; - -static void select_soundhw (const char *optarg) -{ - struct soundhw *c; - - if (*optarg == '?') { - show_valid_cards: - - printf ("Valid sound card names (comma separated):\n"); - for (c = soundhw; c->name; ++c) { - printf ("%-11s %s\n", c->name, c->descr); - } - printf ("\n-soundhw all will enable all of the above\n"); - exit (*optarg != '?'); - } - else { - size_t l; - const char *p; - char *e; - int bad_card = 0; - - if (!strcmp (optarg, "all")) { - for (c = soundhw; c->name; ++c) { - c->enabled = 1; - } - return; - } - - p = optarg; - while (*p) { - e = strchr (p, ','); - l = !e ? strlen (p) : (size_t) (e - p); - - for (c = soundhw; c->name; ++c) { - if (!strncmp (c->name, p, l)) { - c->enabled = 1; - break; - } - } - - if (!c->name) { - if (l > 80) { - fprintf (stderr, - "Unknown sound card name (too big to show)\n"); - } - else { - fprintf (stderr, "Unknown sound card name `%.*s'\n", - (int) l, p); - } - bad_card = 1; - } - p += l + (e != NULL); - } - - if (bad_card) - goto show_valid_cards; - } -} -#endif - static void select_vgahw (const char *p) { const char *opts; @@ -2395,27 +2241,6 @@ static void select_vgahw (const char *p) } } -int qemu_uuid_parse(const char *str, uint8_t *uuid) -{ - int ret; - - if(strlen(str) != 36) - return -1; - - ret = sscanf(str, UUID_FMT, &uuid[0], &uuid[1], &uuid[2], &uuid[3], - &uuid[4], &uuid[5], &uuid[6], &uuid[7], &uuid[8], &uuid[9], - &uuid[10], &uuid[11], &uuid[12], &uuid[13], &uuid[14], &uuid[15]); - - if(ret != 16) - return -1; - -#ifdef TARGET_I386 - smbios_add_field(1, offsetof(struct smbios_type_1, uuid), 16, uuid); -#endif - - return 0; -} - #define MAX_NET_CLIENTS 32 #ifdef _WIN32 @@ -3151,11 +2976,6 @@ int main(int argc, char **argv, char **envp) exit(1); } break; -#ifndef _WIN32 - 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"); |