aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-01 14:16:52 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-01 14:16:52 +0000
commit66508601adbc5faac5f25d944f073921e82d79d4 (patch)
treed7b36c8e05e38e0be8df60e34cec69bd51055217 /vl.c
parent9467cd4602adfdacb457478d6aa074ea02652645 (diff)
Set OpenBIOS variables in NVRAM
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2764 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index bf8df5dc9b..f4be194680 100644
--- a/vl.c
+++ b/vl.c
@@ -197,6 +197,10 @@ int nb_option_roms;
int semihosting_enabled = 0;
int autostart = 1;
const char *qemu_name;
+#ifdef TARGET_SPARC
+unsigned int nb_prom_envs = 0;
+const char *prom_envs[MAX_PROM_ENVS];
+#endif
/***********************************************************/
/* x86 ISA bus support */
@@ -6530,6 +6534,9 @@ void help(void)
"-daemonize daemonize QEMU after initializing\n"
#endif
"-option-rom rom load a file, rom, into the option ROM space\n"
+#ifdef TARGET_SPARC
+ "-prom-env variable=value set OpenBIOS nvram variables\n"
+#endif
"\n"
"During emulation, the following keys are useful:\n"
"ctrl-alt-f toggle full screen\n"
@@ -6624,6 +6631,7 @@ enum {
QEMU_OPTION_option_rom,
QEMU_OPTION_semihosting,
QEMU_OPTION_name,
+ QEMU_OPTION_prom_env,
};
typedef struct QEMUOption {
@@ -6721,6 +6729,9 @@ const QEMUOption qemu_options[] = {
{ "semihosting", 0, QEMU_OPTION_semihosting },
#endif
{ "name", HAS_ARG, QEMU_OPTION_name },
+#if defined(TARGET_SPARC)
+ { "prom-env", HAS_ARG, QEMU_OPTION_prom_env },
+#endif
{ NULL },
};
@@ -7478,6 +7489,16 @@ int main(int argc, char **argv)
case QEMU_OPTION_name:
qemu_name = optarg;
break;
+#ifdef TARGET_SPARC
+ case QEMU_OPTION_prom_env:
+ if (nb_prom_envs >= MAX_PROM_ENVS) {
+ fprintf(stderr, "Too many prom variables\n");
+ exit(1);
+ }
+ prom_envs[nb_prom_envs] = optarg;
+ nb_prom_envs++;
+ break;
+#endif
}
}
}