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

« back to all changes in this revision

Viewing changes to debian/patches/linaro-patches/0016-hw-omap_tap.c-Return-correct-ID-register-values-for-.patch

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2013-10-22 22:47:07 UTC
  • mfrom: (1.8.3) (10.1.42 sid)
  • Revision ID: package-import@ubuntu.com-20131022224707-1lya34fw3k3f24tv
Tags: 1.6.0+dfsg-2ubuntu1
* Merge 1.6.0~rc0+dfsg-2exp from debian experimental.  Remaining changes:
  - debian/control
    * update maintainer
    * remove libiscsi, usb-redir, vde, vnc-jpeg, and libssh2-1-dev
      from build-deps
    * enable rbd
    * add qemu-system and qemu-common B/R to qemu-keymaps
    * add D:udev, R:qemu, R:qemu-common and B:qemu-common to
      qemu-system-common
    * qemu-system-arm, qemu-system-ppc, qemu-system-sparc:
      - add qemu-kvm to Provides
      - add qemu-common, qemu-kvm, kvm to B/R
      - remove openbios-sparc from qemu-system-sparc D
      - drop openbios-ppc and openhackware Depends to Suggests (for now)
    * qemu-system-x86:
      - add qemu-common to Breaks/Replaces.
      - add cpu-checker to Recommends.
    * qemu-user: add B/R:qemu-kvm
    * qemu-kvm:
      - add armhf armel powerpc sparc to Architecture
      - C/R/P: qemu-kvm-spice
    * add qemu-common package
    * drop qemu-slof which is not packaged in ubuntu
  - add qemu-system-common.links for tap ifup/down scripts and OVMF link.
  - qemu-system-x86.links:
    * remove pxe rom links which are in kvm-ipxe
    * add symlink for kvm.1 manpage
  - debian/rules
    * add kvm-spice symlink to qemu-kvm
    * call dh_installmodules for qemu-system-x86
    * update dh_installinit to install upstart script
    * run dh_installman (Closes: #709241) (cherrypicked from 1.5.0+dfsg-2)
  - Add qemu-utils.links for kvm-* symlinks.
  - Add qemu-system-x86.qemu-kvm.upstart and .default
  - Add qemu-system-x86.modprobe to set nesting=1
  - Add qemu-system-common.preinst to add kvm group
  - qemu-system-common.postinst: remove bad group acl if there, then have
    udev relabel /dev/kvm.
  - New linaro patches from qemu-linaro rebasing branch
  - Dropped patches:
    * xen-simplify-xen_enabled.patch
    * sparc-linux-user-fix-missing-symbols-in-.rel-.rela.plt-sections.patch
    * main_loop-do-not-set-nonblocking-if-xen_enabled.patch
    * xen_machine_pv-do-not-create-a-dummy-CPU-in-machine-.patch
    * virtio-rng-fix-crash
  - Kept patches:
    * expose_vms_qemu64cpu.patch - updated
    * linaro arm patches from qemu-linaro rebasing branch
  - New patches:
    * fix-pci-add: change CONFIG variable in ifdef to make sure that
      pci_add is defined.
* Add linaro patches
* Add experimental mach-virt patches for arm virtualization.
* qemu-system-common.install: add debian/tmp/usr/lib to install the
  qemu-bridge-helper

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 0dca4d5cacbb16b18bcf62be6b5b0173710383bc Mon Sep 17 00:00:00 2001
 
2
From: Peter Maydell <peter.maydell@linaro.org>
 
3
Date: Mon, 18 Feb 2013 16:58:25 +0000
 
4
Subject: [PATCH 16/71] hw/omap_tap.c: Return correct ID register values for
 
5
 OMAP3
 
6
 
 
7
Add/correct the ID register values returned for OMAP3.
 
8
In particular, the OMAP3 PRODUCTION_ID register was not
 
9
modelled correctly: it is a 128 bit register spanning
 
10
four words 0x208..0x214. (There appears to be a typo in
 
11
the OMAP35xx TRM about this; however the OMAP36xx TRM
 
12
is clearer and experimentation shows that the 35xx behaves the
 
13
same way.)
 
14
 
 
15
Signed-off-by:  Peter Maydell <peter.maydell@linaro.org>
 
16
---
 
17
 hw/misc/omap_tap.c | 61 +++++++++++++++++++++++++++++++++++++++++++++---------
 
18
 1 file changed, 51 insertions(+), 10 deletions(-)
 
19
 
 
20
diff --git a/hw/misc/omap_tap.c b/hw/misc/omap_tap.c
 
21
index 9d2b710..6c012a7 100644
 
22
--- a/hw/misc/omap_tap.c
 
23
+++ b/hw/misc/omap_tap.c
 
24
@@ -41,13 +41,20 @@ static uint64_t omap_tap_read(void *opaque, hwaddr addr,
 
25
         case omap2430:
 
26
             return 0x5b68a02f; /* ES 2.2 */
 
27
         case omap3430:
 
28
-            return 0x1b7ae02f; /* ES 2 */
 
29
+            return 0x4b7ae02f;  /* ES 3.1 */
 
30
+        case omap3630:
 
31
+            return 0x1b89102f;  /* ES 1.1 */
 
32
         default:
 
33
-            hw_error("%s: Bad mpu model\n", __FUNCTION__);
 
34
+            hw_error("%s: Bad mpu model\n", __func__);
 
35
         }
 
36
 
 
37
-    case 0x208:        /* PRODUCTION_ID_reg for OMAP2 */
 
38
-    case 0x210:        /* PRODUCTION_ID_reg for OMAP3 */
 
39
+        /* For OMAP2 there is a two word PRODUCTION_ID register at
 
40
+         * 0x208..0x210.
 
41
+         * For OMAP3 there is a four word PRODUCTION_ID register at
 
42
+         * 0x208..0x214.
 
43
+         */
 
44
+
 
45
+    case 0x208: /* PRODUCTION_ID_reg bits 0-31 */
 
46
         switch (s->mpu_model) {
 
47
         case omap2420:
 
48
             return 0x000254f0; /* POP ESHS2.1.1 in N91/93/95, ES2 in N800 */
 
49
@@ -58,12 +65,13 @@ static uint64_t omap_tap_read(void *opaque, hwaddr addr,
 
50
         case omap2430:
 
51
             return 0x000000f0;
 
52
         case omap3430:
 
53
-            return 0x000000f0;
 
54
+        case omap3630:
 
55
+            return 0x0;
 
56
         default:
 
57
-            hw_error("%s: Bad mpu model\n", __FUNCTION__);
 
58
+            hw_error("%s: Bad mpu model\n", __func__);
 
59
         }
 
60
-
 
61
-    case 0x20c:
 
62
+        break;
 
63
+    case 0x20c: /* PRODUCTION_ID bits 32-63 */
 
64
         switch (s->mpu_model) {
 
65
         case omap2420:
 
66
         case omap2422:
 
67
@@ -72,10 +80,43 @@ static uint64_t omap_tap_read(void *opaque, hwaddr addr,
 
68
         case omap2430:
 
69
             return 0xcafeb68a; /* ES 2.2 */
 
70
         case omap3430:
 
71
-            return 0xcafeb7ae; /* ES 2 */
 
72
+        case omap3630:
 
73
+            return 0x0;
 
74
+        default:
 
75
+            hw_error("%s: Bad mpu model\n", __func__);
 
76
+        }
 
77
+        break;
 
78
+    case 0x210: /* PRODUCTION_ID reg bits 64-95 (OMAP3 only) */
 
79
+        switch (s->mpu_model) {
 
80
+        case omap2420:
 
81
+        case omap2422:
 
82
+        case omap2423:
 
83
+        case omap2430:
 
84
+            /* OMAP3 only, break out to bad-register path */
 
85
+            break;
 
86
+        case omap3430:
 
87
+        case omap3630:
 
88
+            return 0x000f00f0;
 
89
+        default:
 
90
+            hw_error("%s: Bad mpu model\n", __func__);
 
91
+        }
 
92
+        break;
 
93
+    case 0x214: /* PRODUCTION_ID bits 96-127 (OMAP3 only) */
 
94
+        switch (s->mpu_model) {
 
95
+        case omap2420:
 
96
+        case omap2422:
 
97
+        case omap2423:
 
98
+        case omap2430:
 
99
+            /* OMAP3 only, break out to bad-register path */
 
100
+            break;
 
101
+        case omap3430:
 
102
+            return 0xcafeb7ae;  /* ES 2.x/3.0 */
 
103
+        case omap3630:
 
104
+            return 0xcafeb891;  /* ES 1.0/1.1 */
 
105
         default:
 
106
-            hw_error("%s: Bad mpu model\n", __FUNCTION__);
 
107
+            hw_error("%s: Bad mpu model\n", __func__);
 
108
         }
 
109
+        break;
 
110
 
 
111
     case 0x218:        /* DIE_ID_reg */
 
112
         return ('Q' << 24) | ('E' << 16) | ('M' << 8) | ('U' << 0);
 
113
-- 
 
114
1.8.3.2
 
115