aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-06-25 16:20:35 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-06-25 16:20:35 +0000
commit1df912cf9e3dc0c3352fca1200c4bdc3477bf9f4 (patch)
tree81e26928c90a7cdd002d881f89b1204050ee3ced
parent435183235567e0d942829bcf0507cbd34fdcf8a7 (diff)
downloadqemu-1df912cf9e3dc0c3352fca1200c4bdc3477bf9f4.zip
qemu-1df912cf9e3dc0c3352fca1200c4bdc3477bf9f4.tar.gz
qemu-1df912cf9e3dc0c3352fca1200c4bdc3477bf9f4.tar.bz2
VL license of the day is MIT/BSD
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@281 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--vl.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/vl.c b/vl.c
index b97f74f..fe05254 100644
--- a/vl.c
+++ b/vl.c
@@ -1,13 +1,29 @@
/*
- * QEMU based User Mode Linux
+ * QEMU PC System Emulator
*
- * This file is part of proprietary software - it is published here
- * only for demonstration and information purposes.
+ * Copyright (c) 2003 Fabrice Bellard
*
- * Copyright (c) 2003 Fabrice Bellard
+ * 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 <stdlib.h>
#include <stdio.h>
+#include <stdarg.h>
#include <string.h>
#include <getopt.h>
#include <inttypes.h>
@@ -163,6 +179,7 @@ typedef uint32_t (IOPortReadFunc)(CPUX86State *env, uint32_t address);
char phys_ram_file[1024];
CPUX86State *global_env;
+CPUX86State *cpu_single_env;
FILE *logfile = NULL;
int loglevel;
IOPortReadFunc *ioport_readb_table[MAX_IOPORTS];
@@ -1658,7 +1675,7 @@ static int timer_irq_pending;
static void host_alarm_handler(int host_signum, siginfo_t *info,
void *puc)
{
- /* just exit from the cpu to have a change to handle timers */
+ /* just exit from the cpu to have a chance to handle timers */
cpu_x86_interrupt(global_env);
timer_irq_pending = 1;
}
@@ -1811,6 +1828,7 @@ int main(int argc, char **argv)
/* init CPU state */
env = cpu_init();
global_env = env;
+ cpu_single_env = env;
/* setup basic memory access */
env->cr[0] = 0x00000033;
@@ -1893,7 +1911,7 @@ int main(int argc, char **argv)
}
}
- /* just for testing */
+ /* timer IRQ */
if (timer_irq_pending) {
pic_set_irq(0, 1);
pic_set_irq(0, 0);