30 |
enum { |
enum { |
31 |
VM_TYPE_C7200 = 0, |
VM_TYPE_C7200 = 0, |
32 |
VM_TYPE_C3600, |
VM_TYPE_C3600, |
33 |
|
VM_TYPE_C2691, |
34 |
|
VM_TYPE_C3725, |
35 |
|
VM_TYPE_C3745, |
36 |
|
}; |
37 |
|
|
38 |
|
/* Ghost RAM status */ |
39 |
|
enum { |
40 |
|
VM_GHOST_RAM_NONE = 0, |
41 |
|
VM_GHOST_RAM_GENERATE, |
42 |
|
VM_GHOST_RAM_USE, |
43 |
}; |
}; |
44 |
|
|
45 |
/* Timer IRQ check interval */ |
/* Timer IRQ check interval */ |
97 |
struct vdevice *dev_list; |
struct vdevice *dev_list; |
98 |
struct vdevice *dev_array[MIPS64_DEVICE_MAX]; |
struct vdevice *dev_array[MIPS64_DEVICE_MAX]; |
99 |
|
|
100 |
|
/* Filename for ghosted RAM */ |
101 |
|
char *ghost_ram_filename; |
102 |
|
|
103 |
|
/* Ghost RAM image handling */ |
104 |
|
int ghost_status; |
105 |
|
|
106 |
/* "idling" pointer counter */ |
/* "idling" pointer counter */ |
107 |
m_uint64_t idle_pc; |
m_uint64_t idle_pc; |
108 |
|
|
133 |
|
|
134 |
#define VM_C7200(vm) ((c7200_t *)vm->hw_data) |
#define VM_C7200(vm) ((c7200_t *)vm->hw_data) |
135 |
#define VM_C3600(vm) ((c3600_t *)vm->hw_data) |
#define VM_C3600(vm) ((c3600_t *)vm->hw_data) |
136 |
|
#define VM_C2691(vm) ((c2691_t *)vm->hw_data) |
137 |
|
#define VM_C3725(vm) ((c3725_t *)vm->hw_data) |
138 |
|
#define VM_C3745(vm) ((c3745_t *)vm->hw_data) |
139 |
|
|
140 |
extern int vm_file_naming_type; |
extern int vm_file_naming_type; |
141 |
|
|
160 |
/* Get VM type */ |
/* Get VM type */ |
161 |
char *vm_get_type(vm_instance_t *vm); |
char *vm_get_type(vm_instance_t *vm); |
162 |
|
|
163 |
|
/* Get MAC address MSB */ |
164 |
|
u_int vm_get_mac_addr_msb(vm_instance_t *vm); |
165 |
|
|
166 |
/* Generate a filename for use by the instance */ |
/* Generate a filename for use by the instance */ |
167 |
char *vm_build_filename(vm_instance_t *vm,char *name); |
char *vm_build_filename(vm_instance_t *vm,char *name); |
168 |
|
|
202 |
/* Release a VM (decrement reference count) */ |
/* Release a VM (decrement reference count) */ |
203 |
int vm_release(vm_instance_t *vm); |
int vm_release(vm_instance_t *vm); |
204 |
|
|
205 |
|
/* Initialize RAM */ |
206 |
|
int vm_ram_init(vm_instance_t *vm,m_uint64_t paddr); |
207 |
|
|
208 |
/* Initialize VTTY */ |
/* Initialize VTTY */ |
209 |
int vm_init_vtty(vm_instance_t *vm); |
int vm_init_vtty(vm_instance_t *vm); |
210 |
|
|
238 |
/* Monitor an instance periodically */ |
/* Monitor an instance periodically */ |
239 |
void vm_monitor(vm_instance_t *vm); |
void vm_monitor(vm_instance_t *vm); |
240 |
|
|
241 |
|
/* Open a VM file and map it in memory */ |
242 |
|
int vm_mmap_open_file(vm_instance_t *vm,char *name, |
243 |
|
u_char **ptr,off_t *fsize); |
244 |
|
|
245 |
|
/* Open/Create a VM file and map it in memory */ |
246 |
|
int vm_mmap_create_file(vm_instance_t *vm,char *name,size_t len,u_char **ptr); |
247 |
|
|
248 |
|
/* Close a memory mapped file */ |
249 |
|
int vm_mmap_close_file(int fd,u_char *ptr,size_t len); |
250 |
|
|
251 |
/* Save the Cisco IOS configuration from NVRAM */ |
/* Save the Cisco IOS configuration from NVRAM */ |
252 |
int vm_ios_save_config(vm_instance_t *vm); |
int vm_ios_save_config(vm_instance_t *vm); |
253 |
|
|