summaryrefslogtreecommitdiff
path: root/emulators/qemu-devel/files
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/qemu-devel/files')
-rw-r--r--emulators/qemu-devel/files/patch-90_security40
-rw-r--r--emulators/qemu-devel/files/patch-bsdusb.patch6
-rw-r--r--emulators/qemu-devel/files/patch-bt12
-rw-r--r--emulators/qemu-devel/files/patch-vl.c43
-rw-r--r--emulators/qemu-devel/files/patch-vl.c-ppbus11
5 files changed, 40 insertions, 72 deletions
diff --git a/emulators/qemu-devel/files/patch-90_security b/emulators/qemu-devel/files/patch-90_security
index 6bf6a711dcdd..b075556cb2f2 100644
--- a/emulators/qemu-devel/files/patch-90_security
+++ b/emulators/qemu-devel/files/patch-90_security
@@ -185,32 +185,6 @@ Index: qemu-0.8.2/hw/fdc.c
}
}
retval = fdctrl->fifo[pos];
-Index: qemu-0.8.2/hw/ne2000.c
-===================================================================
---- qemu-0.8.2.orig/hw/ne2000.c 2007-04-20 06:05:59.000000000 +0300
-+++ qemu-0.8.2/hw/ne2000.c 2007-04-20 06:05:59.000000000 +0300
-@@ -230,7 +230,7 @@ static void ne2000_receive(void *opaque,
- {
- NE2000State *s = opaque;
- uint8_t *p;
-- int total_len, next, avail, len, index, mcast_idx;
-+ unsigned int total_len, next, avail, len, index, mcast_idx;
- uint8_t buf1[60];
- static const uint8_t broadcast_macaddr[6] =
- { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
-@@ -299,7 +299,11 @@ static void ne2000_receive(void *opaque,
-
- /* write packet data */
- while (size > 0) {
-- avail = s->stop - index;
-+ /* taviso: this can wrap, so check its okay. */
-+ if (index <= s->stop)
-+ avail = s->stop - index;
-+ else
-+ avail = 0;
- len = size;
- if (len > avail)
- len = avail;
Index: qemu-0.8.2/hw/pc.c
===================================================================
--- qemu-0.8.2.orig/hw/pc.c 2007-04-20 06:05:58.000000000 +0300
@@ -272,20 +246,6 @@ Index: qemu-0.8.2/target-i386/translate.c
===================================================================
--- qemu-0.8.2.orig/target-i386/translate.c 2006-07-22 20:23:34.000000000 +0300
+++ qemu-0.8.2/target-i386/translate.c 2007-04-20 06:05:59.000000000 +0300
-@@ -5244,7 +5244,12 @@ static target_ulong disas_insn(DisasCont
- if (CODE64(s))
- goto illegal_op;
- val = ldub_code(s->pc++);
-- gen_op_aam(val);
-+ /* taviso: operand can be zero */
-+ if (val) {
-+ gen_op_aam(val);
-+ } else {
-+ gen_exception(s, EXCP00_DIVZ, s->pc - s->cs_base);
-+ }
- s->cc_op = CC_OP_LOGICB;
- break;
- case 0xd5: /* aad */
@@ -5292,6 +5297,7 @@ static target_ulong disas_insn(DisasCont
gen_jmp_im(pc_start - s->cs_base);
gen_op_into(s->pc - pc_start);
diff --git a/emulators/qemu-devel/files/patch-bsdusb.patch b/emulators/qemu-devel/files/patch-bsdusb.patch
index ce1686004eaa..b7cabe25d428 100644
--- a/emulators/qemu-devel/files/patch-bsdusb.patch
+++ b/emulators/qemu-devel/files/patch-bsdusb.patch
@@ -36,15 +36,15 @@ Index: qemu/configure
for target in $target_list; do
target_dir="$target"
Index: qemu/Makefile.target
-@@ -329,7 +329,7 @@
+@@ -408,7 +408,7 @@
VL_OBJS+= scsi-disk.o cdrom.o lsi53c895a.o
# USB layer
-VL_OBJS+= usb.o usb-hub.o usb-linux.o usb-hid.o usb-ohci.o usb-msd.o
+VL_OBJS+= usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-ohci.o usb-msd.o
+ VL_OBJS+= usb-wacom.o
- # PCI network cards
- VL_OBJS+= ne2000.o rtl8139.o pcnet.o
+ # EEPROM emulation
Index: qemu/usb-stub.c
@@ -0,0 +1,11 @@
+#include "vl.h"
diff --git a/emulators/qemu-devel/files/patch-bt b/emulators/qemu-devel/files/patch-bt
index 62e8924722b3..2a51b7d00a8f 100644
--- a/emulators/qemu-devel/files/patch-bt
+++ b/emulators/qemu-devel/files/patch-bt
@@ -1,14 +1,14 @@
Index: qemu/vl.c
-@@ -43,6 +43,9 @@
- #ifndef __APPLE__
- #include <libutil.h>
+@@ -76,6 +76,9 @@
+ #endif
+ #endif
#endif
+#ifdef __FreeBSD__
+#include <sys/module.h>
+#endif
- #else
- #include <linux/if.h>
- #include <linux/if_tun.h>
+
+ #if defined(CONFIG_SLIRP)
+ #include "libslirp.h"
@@ -1059,6 +1062,34 @@
#endif /* CONFIG_SLIRP */
diff --git a/emulators/qemu-devel/files/patch-vl.c b/emulators/qemu-devel/files/patch-vl.c
index 44c3c64cb468..3d23a23d855e 100644
--- a/emulators/qemu-devel/files/patch-vl.c
+++ b/emulators/qemu-devel/files/patch-vl.c
@@ -1,21 +1,4 @@
Index: qemu/vl.c
-@@ -1510,7 +1510,7 @@
- return chr;
- }
-
--#if defined(__linux__)
-+#if defined(__linux__) || defined(__FreeBSD__)
- static CharDriverState *qemu_chr_open_pty(void)
- {
- struct termios tty;
-@@ -1904,6 +1907,7 @@
- return chr;
- }
-
-+#if defined(__linux__)
- typedef struct {
- int fd;
- int mode;
@@ -1727,6 +1728,7 @@
chr->chr_ioctl = pp_ioctl;
return chr;
@@ -24,3 +7,29 @@ Index: qemu/vl.c
#else
CharDriverState *qemu_chr_open_pty(void)
+@@ -1771,14 +1771,14 @@
+ return chr;
+ }
+
+-#if defined(__linux__) || defined(__sun__)
++#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__)
+ static CharDriverState *qemu_chr_open_pty(void)
+ {
+ struct termios tty;
+ char slave_name[1024];
+ int master_fd, slave_fd;
+
+-#if defined(__linux__)
++#if defined(__linux__) || defined(__FreeBSD__)
+ /* Not satisfying */
+ if (openpty(&master_fd, &slave_fd, slave_name, NULL, NULL) < 0) {
+ return NULL;
+@@ -3036,7 +3036,7 @@
+ return qemu_chr_open_pp(filename);
+ } else
+ #endif
+-#if defined(__linux__) || defined(__sun__)
++#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__)
+ if (strstart(filename, "/dev/", NULL)) {
+ return qemu_chr_open_tty(filename);
+ } else
diff --git a/emulators/qemu-devel/files/patch-vl.c-ppbus b/emulators/qemu-devel/files/patch-vl.c-ppbus
index d0b46abcbcb4..11ce2a60382c 100644
--- a/emulators/qemu-devel/files/patch-vl.c-ppbus
+++ b/emulators/qemu-devel/files/patch-vl.c-ppbus
@@ -1,20 +1,19 @@
---- vl.c.orig Mon Aug 21 23:06:11 2006
-+++ vl.c Mon Aug 21 23:04:49 2006
-@@ -48,6 +48,8 @@
+Index: qemu/vl.c
+@@ -78,6 +78,8 @@
#endif
#ifdef __FreeBSD__
#include <sys/module.h>
+#include <dev/ppbus/ppi.h>
+#include <dev/ppbus/ppbconf.h>
#endif
- #else
- #ifndef __sun__
+
+ #if defined(CONFIG_SLIRP)
@@ -1728,7 +1730,64 @@
chr->chr_ioctl = pp_ioctl;
return chr;
}
-#endif /* defined(__linux__) */
-+#elif defined(__FreeBSD__)
++#if defined(__FreeBSD__)
+static int pp_ioctl(CharDriverState *chr, int cmd, void *arg)
+{
+ int fd = (int)chr->opaque;