1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20#ifndef QEMU_ALPHA_CPU_QOM_H
21#define QEMU_ALPHA_CPU_QOM_H
22
23#include "qom/cpu.h"
24#include "cpu.h"
25
26#define TYPE_ALPHA_CPU "alpha-cpu"
27
28#define ALPHA_CPU_CLASS(klass) \
29 OBJECT_CLASS_CHECK(AlphaCPUClass, (klass), TYPE_ALPHA_CPU)
30#define ALPHA_CPU(obj) \
31 OBJECT_CHECK(AlphaCPU, (obj), TYPE_ALPHA_CPU)
32#define ALPHA_CPU_GET_CLASS(obj) \
33 OBJECT_GET_CLASS(AlphaCPUClass, (obj), TYPE_ALPHA_CPU)
34
35
36
37
38
39
40
41
42typedef struct AlphaCPUClass {
43
44 CPUClass parent_class;
45
46
47 DeviceRealize parent_realize;
48 void (*parent_reset)(CPUState *cpu);
49} AlphaCPUClass;
50
51
52
53
54
55
56
57typedef struct AlphaCPU {
58
59 CPUState parent_obj;
60
61
62 CPUAlphaState env;
63
64
65 QEMUTimer *alarm_timer;
66} AlphaCPU;
67
68static inline AlphaCPU *alpha_env_get_cpu(CPUAlphaState *env)
69{
70 return container_of(env, AlphaCPU, env);
71}
72
73#define ENV_GET_CPU(e) CPU(alpha_env_get_cpu(e))
74
75#define ENV_OFFSET offsetof(AlphaCPU, env)
76
77#ifndef CONFIG_USER_ONLY
78extern const struct VMStateDescription vmstate_alpha_cpu;
79#endif
80
81void alpha_cpu_do_interrupt(CPUState *cpu);
82bool alpha_cpu_exec_interrupt(CPUState *cpu, int int_req);
83void alpha_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf,
84 int flags);
85hwaddr alpha_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
86int alpha_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg);
87int alpha_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
88void alpha_cpu_do_unaligned_access(CPUState *cpu, vaddr addr,
89 int is_write, int is_user, uintptr_t retaddr);
90
91#endif
92