1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
/*
* op_helper.c: IA64 emulation cpu micro-operations helpers for qemu.
*
* Copyright (c) 2007 Intel Corporation
* Zhang Xiantao <xiantao.zhang@intel.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place - Suite 330, Boston, MA 02111-1307 USA.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "cpu.h"
#include "exec-all.h"
extern int kvm_allowed;
CPUState *cpu_ia64_init(char *cpu_model){
CPUState *env;
env = qemu_mallocz(sizeof(CPUState));
if (!env)
return NULL;
cpu_exec_init(env);
cpu_reset(env);
#ifdef USE_KVM
{
if (kvm_allowed) {
kvm_qemu_init_env(env);
env->ready_for_interrupt_injection = 1;
}
}
#endif
return env;
}
void cpu_reset(CPUIA64State *env)
{
}
static inline void set_feature(CPUIA64State *env, int feature)
{
}
void cpu_ia64_set_model(CPUIA64State *env, uint32_t id)
{
}
void cpu_ia64_close(CPUIA64State *env)
{
free(env);
}
extern int semihosting_enabled;
void switch_mode(CPUState *env, int mode)
{
}
/* Handle a CPU exception. */
void do_interrupt(CPUIA64State *env)
{
#ifdef USE_KVM
if (kvm_allowed) {
printf("%s: unexpect\n", __FUNCTION__);
exit(-1);
}
#endif
}
int cpu_ia64_handle_mmu_fault (CPUState *env, target_ulong address,
int access_type, int is_user, int is_softmmu)
{
return 1;
}
target_ulong cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
{
return -1;
}
void cpu_dump_state(CPUState *env, FILE *f,
int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
int flags)
{
return;
}
void tlb_fill (target_ulong addr, int is_write, int is_user, void *retaddr)
{
return ;
}
|