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

« back to all changes in this revision

Viewing changes to hw/misc/arm_l2x0.c

  • 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:
23
23
/* L2C-310 r3p2 */
24
24
#define CACHE_ID 0x410000c8
25
25
 
26
 
typedef struct l2x0_state {
27
 
    SysBusDevice busdev;
 
26
#define TYPE_ARM_L2X0 "l2x0"
 
27
#define ARM_L2X0(obj) OBJECT_CHECK(L2x0State, (obj), TYPE_ARM_L2X0)
 
28
 
 
29
typedef struct L2x0State {
 
30
    SysBusDevice parent_obj;
 
31
 
28
32
    MemoryRegion iomem;
29
33
    uint32_t cache_type;
30
34
    uint32_t ctrl;
33
37
    uint32_t tag_ctrl;
34
38
    uint32_t filter_start;
35
39
    uint32_t filter_end;
36
 
} l2x0_state;
 
40
} L2x0State;
37
41
 
38
42
static const VMStateDescription vmstate_l2x0 = {
39
43
    .name = "l2x0",
40
44
    .version_id = 1,
41
45
    .minimum_version_id = 1,
42
46
    .fields = (VMStateField[]) {
43
 
        VMSTATE_UINT32(ctrl, l2x0_state),
44
 
        VMSTATE_UINT32(aux_ctrl, l2x0_state),
45
 
        VMSTATE_UINT32(data_ctrl, l2x0_state),
46
 
        VMSTATE_UINT32(tag_ctrl, l2x0_state),
47
 
        VMSTATE_UINT32(filter_start, l2x0_state),
48
 
        VMSTATE_UINT32(filter_end, l2x0_state),
 
47
        VMSTATE_UINT32(ctrl, L2x0State),
 
48
        VMSTATE_UINT32(aux_ctrl, L2x0State),
 
49
        VMSTATE_UINT32(data_ctrl, L2x0State),
 
50
        VMSTATE_UINT32(tag_ctrl, L2x0State),
 
51
        VMSTATE_UINT32(filter_start, L2x0State),
 
52
        VMSTATE_UINT32(filter_end, L2x0State),
49
53
        VMSTATE_END_OF_LIST()
50
54
    }
51
55
};
55
59
                               unsigned size)
56
60
{
57
61
    uint32_t cache_data;
58
 
    l2x0_state *s = (l2x0_state *)opaque;
 
62
    L2x0State *s = (L2x0State *)opaque;
59
63
    offset &= 0xfff;
60
64
    if (offset >= 0x730 && offset < 0x800) {
61
65
        return 0; /* cache ops complete */
97
101
static void l2x0_priv_write(void *opaque, hwaddr offset,
98
102
                            uint64_t value, unsigned size)
99
103
{
100
 
    l2x0_state *s = (l2x0_state *)opaque;
 
104
    L2x0State *s = (L2x0State *)opaque;
101
105
    offset &= 0xfff;
102
106
    if (offset >= 0x730 && offset < 0x800) {
103
107
        /* ignore */
137
141
 
138
142
static void l2x0_priv_reset(DeviceState *dev)
139
143
{
140
 
    l2x0_state *s = DO_UPCAST(l2x0_state, busdev.qdev, dev);
 
144
    L2x0State *s = ARM_L2X0(dev);
141
145
 
142
146
    s->ctrl = 0;
143
147
    s->aux_ctrl = 0x02020000;
155
159
 
156
160
static int l2x0_priv_init(SysBusDevice *dev)
157
161
{
158
 
    l2x0_state *s = FROM_SYSBUS(l2x0_state, dev);
 
162
    L2x0State *s = ARM_L2X0(dev);
159
163
 
160
 
    memory_region_init_io(&s->iomem, &l2x0_mem_ops, s, "l2x0_cc", 0x1000);
 
164
    memory_region_init_io(&s->iomem, OBJECT(dev), &l2x0_mem_ops, s,
 
165
                          "l2x0_cc", 0x1000);
161
166
    sysbus_init_mmio(dev, &s->iomem);
162
167
    return 0;
163
168
}
164
169
 
165
170
static Property l2x0_properties[] = {
166
 
    DEFINE_PROP_UINT32("cache-type", l2x0_state, cache_type, 0x1c100100),
 
171
    DEFINE_PROP_UINT32("cache-type", L2x0State, cache_type, 0x1c100100),
167
172
    DEFINE_PROP_END_OF_LIST(),
168
173
};
169
174
 
180
185
}
181
186
 
182
187
static const TypeInfo l2x0_info = {
183
 
    .name = "l2x0",
 
188
    .name = TYPE_ARM_L2X0,
184
189
    .parent = TYPE_SYS_BUS_DEVICE,
185
 
    .instance_size = sizeof(l2x0_state),
 
190
    .instance_size = sizeof(L2x0State),
186
191
    .class_init = l2x0_class_init,
187
192
};
188
193