~ubuntu-branches/ubuntu/vivid/qemu-linaro/vivid

« back to all changes in this revision

Viewing changes to target-arm/cpu-qom.h

  • Committer: Ricardo Salveti de Araujo
  • Date: 2012-09-20 18:39:31 UTC
  • mfrom: (12922.1.2 qemu-linaro)
  • Revision ID: ricardo.salveti@linaro.org-20120920183931-sp3cg6kpdl8dmwo9
* New upstream release.
  - support emulated systems with more than 2G of memory. (LP: #1030588)
* Drop powerpc-missing-include.patch - merged upstream.
* Update debian/control:
  - drop perl build dependency.
  - add libfdt-dev build dependency.
* Update debian/qemu-keymaps.install file.
* Update debian/rules:
  - update QEMU_CPU for ARM architecture: armv4l -> armv7l.
  - update conf_audio_drv: default to PulseAudio since PA is the default on
    Ubuntu.
  - enable KVM on ARM architecture.
  - enable flat device tree support (--enable-fdt). (LP: #1030594)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * QEMU ARM CPU
 
3
 *
 
4
 * Copyright (c) 2012 SUSE LINUX Products GmbH
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or
 
7
 * modify it under the terms of the GNU General Public License
 
8
 * as published by the Free Software Foundation; either version 2
 
9
 * of the License, or (at your option) any later version.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program; if not, see
 
18
 * <http://www.gnu.org/licenses/gpl-2.0.html>
 
19
 */
 
20
#ifndef QEMU_ARM_CPU_QOM_H
 
21
#define QEMU_ARM_CPU_QOM_H
 
22
 
 
23
#include "qemu/cpu.h"
 
24
 
 
25
#define TYPE_ARM_CPU "arm-cpu"
 
26
 
 
27
#define ARM_CPU_CLASS(klass) \
 
28
    OBJECT_CLASS_CHECK(ARMCPUClass, (klass), TYPE_ARM_CPU)
 
29
#define ARM_CPU(obj) \
 
30
    OBJECT_CHECK(ARMCPU, (obj), TYPE_ARM_CPU)
 
31
#define ARM_CPU_GET_CLASS(obj) \
 
32
    OBJECT_GET_CLASS(ARMCPUClass, (obj), TYPE_ARM_CPU)
 
33
 
 
34
/**
 
35
 * ARMCPUClass:
 
36
 * @parent_reset: The parent class' reset handler.
 
37
 *
 
38
 * An ARM CPU model.
 
39
 */
 
40
typedef struct ARMCPUClass {
 
41
    /*< private >*/
 
42
    CPUClass parent_class;
 
43
    /*< public >*/
 
44
 
 
45
    void (*parent_reset)(CPUState *cpu);
 
46
} ARMCPUClass;
 
47
 
 
48
/**
 
49
 * ARMCPU:
 
50
 * @env: #CPUARMState
 
51
 *
 
52
 * An ARM CPU core.
 
53
 */
 
54
typedef struct ARMCPU {
 
55
    /*< private >*/
 
56
    CPUState parent_obj;
 
57
    /*< public >*/
 
58
 
 
59
    CPUARMState env;
 
60
 
 
61
    /* Coprocessor information */
 
62
    GHashTable *cp_regs;
 
63
 
 
64
    /* The instance init functions for implementation-specific subclasses
 
65
     * set these fields to specify the implementation-dependent values of
 
66
     * various constant registers and reset values of non-constant
 
67
     * registers.
 
68
     * Some of these might become QOM properties eventually.
 
69
     * Field names match the official register names as defined in the
 
70
     * ARMv7AR ARM Architecture Reference Manual. A reset_ prefix
 
71
     * is used for reset values of non-constant registers; no reset_
 
72
     * prefix means a constant register.
 
73
     */
 
74
    uint32_t midr;
 
75
    uint32_t reset_fpsid;
 
76
    uint32_t mvfr0;
 
77
    uint32_t mvfr1;
 
78
    uint32_t ctr;
 
79
    uint32_t reset_sctlr;
 
80
    uint32_t id_pfr0;
 
81
    uint32_t id_pfr1;
 
82
    uint32_t id_dfr0;
 
83
    uint32_t id_afr0;
 
84
    uint32_t id_mmfr0;
 
85
    uint32_t id_mmfr1;
 
86
    uint32_t id_mmfr2;
 
87
    uint32_t id_mmfr3;
 
88
    uint32_t id_isar0;
 
89
    uint32_t id_isar1;
 
90
    uint32_t id_isar2;
 
91
    uint32_t id_isar3;
 
92
    uint32_t id_isar4;
 
93
    uint32_t id_isar5;
 
94
    uint32_t clidr;
 
95
    /* The elements of this array are the CCSIDR values for each cache,
 
96
     * in the order L1DCache, L1ICache, L2DCache, L2ICache, etc.
 
97
     */
 
98
    uint32_t ccsidr[16];
 
99
    uint32_t reset_cbar;
 
100
    uint32_t reset_auxcr;
 
101
} ARMCPU;
 
102
 
 
103
static inline ARMCPU *arm_env_get_cpu(CPUARMState *env)
 
104
{
 
105
    return ARM_CPU(container_of(env, ARMCPU, env));
 
106
}
 
107
 
 
108
#define ENV_GET_CPU(e) CPU(arm_env_get_cpu(e))
 
109
 
 
110
void arm_cpu_realize(ARMCPU *cpu);
 
111
void register_cp_regs_for_features(ARMCPU *cpu);
 
112
 
 
113
#endif