~ubuntu-branches/ubuntu/trusty/qemu/trusty

« back to all changes in this revision

Viewing changes to debian/patches/ubuntu/linaro/0037-hw-omap_uart.c-Forbid-extended-MCR-bit-writes-unless.patch

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2014-02-04 12:13:08 UTC
  • mfrom: (10.1.45 sid)
  • Revision ID: package-import@ubuntu.com-20140204121308-1xq92lrfs75agw2g
Tags: 1.7.0+dfsg-3ubuntu1~ppa1
* Merge 1.7.0+dfsg-3 from debian.  Remaining changes:
  - debian/patches/ubuntu:
    * expose-vmx_qemu64cpu.patch
    * linaro (omap3) and arm64 patches
    * ubuntu/target-ppc-add-stubs-for-kvm-breakpoints: fix FTBFS
      on ppc
    * ubuntu/CVE-2013-4377.patch: fix denial of service via virtio
  - debian/qemu-system-x86.modprobe: set kvm_intel nested=1 options
  - debian/control:
    * add arm64 to Architectures
    * add qemu-common and qemu-system-aarch64 packages
  - debian/qemu-system-common.install: add debian/tmp/usr/lib
  - debian/qemu-system-common.preinst: add kvm group
  - debian/qemu-system-common.postinst: remove acl placed by udev,
    and add udevadm trigger.
  - qemu-system-x86.links: add eepro100.rom, remove pxe-virtio,
    pxe-e1000 and pxe-rtl8139.
  - add qemu-system-x86.qemu-kvm.upstart and .default
  - qemu-user-static.postinst-in: remove arm64 binfmt
  - debian/rules:
    * allow parallel build
    * add aarch64 to system_targets and sys_systems
    * add qemu-kvm-spice links
    * install qemu-system-x86.modprobe
  - add debian/qemu-system-common.links for OVMF.fd link
* Remove kvm-img, kvm-nbd, kvm-ifup and kvm-ifdown symlinks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 1078f8f7da486c83b13a96a978402040c0ad54fa Mon Sep 17 00:00:00 2001
 
2
From: Peter Maydell <peter.maydell@linaro.org>
 
3
Date: Mon, 18 Feb 2013 16:58:29 +0000
 
4
Subject: [PATCH 37/70] hw/omap_uart.c: Forbid extended MCR bit writes unless
 
5
 in enhanced mode
 
6
 
 
7
The OMAP UART defines new functions for MCR bits 5 and 6;
 
8
these can only be written if the appropriate bit is set in the
 
9
EFR register.
 
10
 
 
11
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
 
12
---
 
13
 hw/char/omap_uart.c | 13 ++++++++++---
 
14
 1 file changed, 10 insertions(+), 3 deletions(-)
 
15
 
 
16
diff --git a/hw/char/omap_uart.c b/hw/char/omap_uart.c
 
17
index 5ee352c..55982fa 100644
 
18
--- a/hw/char/omap_uart.c
 
19
+++ b/hw/char/omap_uart.c
 
20
@@ -124,8 +124,10 @@ static uint64_t omap_uart_read(void *opaque, hwaddr addr,
 
21
         if (s->access_mode == regs_config_b) {
 
22
             return s->xon[(addr & 7) >> 2];
 
23
         } else if (addr == 0x10) {
 
24
-            return s->serial_ops->read(s->serial, addr, size)
 
25
-                   | (s->mcr_cache & 0xe0);
 
26
+            /* MCR. Bits 5 and 6 are handled by us, the rest by
 
27
+             * the underlying serial implementation.
 
28
+             */
 
29
+            return s->serial_ops->read(s->serial, addr, size) | s->mcr_cache;
 
30
         }
 
31
         return s->serial_ops->read(s->serial, addr, size);
 
32
     case 0x18:
 
33
@@ -213,7 +215,12 @@ static void omap_uart_write(void *opaque, hwaddr addr,
 
34
             s->xon[(addr & 7) >> 2] = value;
 
35
         } else {
 
36
             if (addr == 0x10) {
 
37
-                s->mcr_cache = value & 0x7f;
 
38
+                /* Bits 5 and 6 are handled at this level; they can
 
39
+                 * only be written if EFR_REG:ENHANCED_EN is set.
 
40
+                 */
 
41
+                if (s->efr & 0x10) {
 
42
+                    s->mcr_cache = value & 0x60;
 
43
+                }
 
44
             }
 
45
             s->serial_ops->write(s->serial, addr, value, size);
 
46
         }
 
47
-- 
 
48
1.8.5.2
 
49