Revision 9596ebb7 vl.c
b/vl.c | ||
---|---|---|
242 | 242 |
target_phys_addr_t isa_mem_base = 0; |
243 | 243 |
PicState2 *isa_pic; |
244 | 244 |
|
245 |
uint32_t default_ioport_readb(void *opaque, uint32_t address) |
|
245 |
static uint32_t default_ioport_readb(void *opaque, uint32_t address)
|
|
246 | 246 |
{ |
247 | 247 |
#ifdef DEBUG_UNUSED_IOPORT |
248 | 248 |
fprintf(stderr, "unused inb: port=0x%04x\n", address); |
... | ... | |
250 | 250 |
return 0xff; |
251 | 251 |
} |
252 | 252 |
|
253 |
void default_ioport_writeb(void *opaque, uint32_t address, uint32_t data) |
|
253 |
static void default_ioport_writeb(void *opaque, uint32_t address, uint32_t data)
|
|
254 | 254 |
{ |
255 | 255 |
#ifdef DEBUG_UNUSED_IOPORT |
256 | 256 |
fprintf(stderr, "unused outb: port=0x%04x data=0x%02x\n", address, data); |
... | ... | |
258 | 258 |
} |
259 | 259 |
|
260 | 260 |
/* default is to make two byte accesses */ |
261 |
uint32_t default_ioport_readw(void *opaque, uint32_t address) |
|
261 |
static uint32_t default_ioport_readw(void *opaque, uint32_t address)
|
|
262 | 262 |
{ |
263 | 263 |
uint32_t data; |
264 | 264 |
data = ioport_read_table[0][address](ioport_opaque[address], address); |
... | ... | |
267 | 267 |
return data; |
268 | 268 |
} |
269 | 269 |
|
270 |
void default_ioport_writew(void *opaque, uint32_t address, uint32_t data) |
|
270 |
static void default_ioport_writew(void *opaque, uint32_t address, uint32_t data)
|
|
271 | 271 |
{ |
272 | 272 |
ioport_write_table[0][address](ioport_opaque[address], address, data & 0xff); |
273 | 273 |
address = (address + 1) & (MAX_IOPORTS - 1); |
274 | 274 |
ioport_write_table[0][address](ioport_opaque[address], address, (data >> 8) & 0xff); |
275 | 275 |
} |
276 | 276 |
|
277 |
uint32_t default_ioport_readl(void *opaque, uint32_t address) |
|
277 |
static uint32_t default_ioport_readl(void *opaque, uint32_t address)
|
|
278 | 278 |
{ |
279 | 279 |
#ifdef DEBUG_UNUSED_IOPORT |
280 | 280 |
fprintf(stderr, "unused inl: port=0x%04x\n", address); |
... | ... | |
282 | 282 |
return 0xffffffff; |
283 | 283 |
} |
284 | 284 |
|
285 |
void default_ioport_writel(void *opaque, uint32_t address, uint32_t data) |
|
285 |
static void default_ioport_writel(void *opaque, uint32_t address, uint32_t data)
|
|
286 | 286 |
{ |
287 | 287 |
#ifdef DEBUG_UNUSED_IOPORT |
288 | 288 |
fprintf(stderr, "unused outl: port=0x%04x data=0x%02x\n", address, data); |
289 | 289 |
#endif |
290 | 290 |
} |
291 | 291 |
|
292 |
void init_ioports(void) |
|
292 |
static void init_ioports(void)
|
|
293 | 293 |
{ |
294 | 294 |
int i; |
295 | 295 |
|
... | ... | |
961 | 961 |
|
962 | 962 |
static QEMUTimer *active_timers[2]; |
963 | 963 |
|
964 |
QEMUClock *qemu_new_clock(int type) |
|
964 |
static QEMUClock *qemu_new_clock(int type)
|
|
965 | 965 |
{ |
966 | 966 |
QEMUClock *clock; |
967 | 967 |
clock = qemu_mallocz(sizeof(QEMUClock)); |
... | ... | |
1539 | 1539 |
alarm_timer = t; |
1540 | 1540 |
} |
1541 | 1541 |
|
1542 |
void quit_timers(void) |
|
1542 |
static void quit_timers(void)
|
|
1543 | 1543 |
{ |
1544 | 1544 |
alarm_timer->stop(alarm_timer); |
1545 | 1545 |
alarm_timer = NULL; |
... | ... | |
1832 | 1832 |
d->mux_cnt++; |
1833 | 1833 |
} |
1834 | 1834 |
|
1835 |
CharDriverState *qemu_chr_open_mux(CharDriverState *drv) |
|
1835 |
static CharDriverState *qemu_chr_open_mux(CharDriverState *drv)
|
|
1836 | 1836 |
{ |
1837 | 1837 |
CharDriverState *chr; |
1838 | 1838 |
MuxDriver *d; |
... | ... | |
3385 | 3385 |
/***********************************************************/ |
3386 | 3386 |
/* network device redirectors */ |
3387 | 3387 |
|
3388 |
void hex_dump(FILE *f, const uint8_t *buf, int size) |
|
3388 |
static void hex_dump(FILE *f, const uint8_t *buf, int size)
|
|
3389 | 3389 |
{ |
3390 | 3390 |
int len, i, j, c; |
3391 | 3391 |
|
... | ... | |
3733 | 3733 |
} |
3734 | 3734 |
|
3735 | 3735 |
/* automatic user mode samba server configuration */ |
3736 |
void net_slirp_smb(const char *exported_dir) |
|
3736 |
static void net_slirp_smb(const char *exported_dir)
|
|
3737 | 3737 |
{ |
3738 | 3738 |
char smb_conf[1024]; |
3739 | 3739 |
char smb_cmdline[1024]; |
... | ... | |
5127 | 5127 |
return NULL; |
5128 | 5128 |
} |
5129 | 5129 |
|
5130 |
QEMUFile *qemu_fopen_bdrv(BlockDriverState *bs, int64_t offset, int is_writable) |
|
5130 |
static QEMUFile *qemu_fopen_bdrv(BlockDriverState *bs, int64_t offset, int is_writable)
|
|
5131 | 5131 |
{ |
5132 | 5132 |
QEMUFile *f; |
5133 | 5133 |
|
... | ... | |
5361 | 5361 |
#define QEMU_VM_FILE_MAGIC 0x5145564d |
5362 | 5362 |
#define QEMU_VM_FILE_VERSION 0x00000002 |
5363 | 5363 |
|
5364 |
int qemu_savevm_state(QEMUFile *f) |
|
5364 |
static int qemu_savevm_state(QEMUFile *f)
|
|
5365 | 5365 |
{ |
5366 | 5366 |
SaveStateEntry *se; |
5367 | 5367 |
int len, ret; |
... | ... | |
5384 | 5384 |
/* record size: filled later */ |
5385 | 5385 |
len_pos = qemu_ftell(f); |
5386 | 5386 |
qemu_put_be32(f, 0); |
5387 |
|
|
5388 | 5387 |
se->save_state(f, se->opaque); |
5389 | 5388 |
|
5390 | 5389 |
/* fill record size */ |
... | ... | |
5415 | 5414 |
return NULL; |
5416 | 5415 |
} |
5417 | 5416 |
|
5418 |
int qemu_loadvm_state(QEMUFile *f) |
|
5417 |
static int qemu_loadvm_state(QEMUFile *f)
|
|
5419 | 5418 |
{ |
5420 | 5419 |
SaveStateEntry *se; |
5421 | 5420 |
int len, ret, instance_id, record_len, version_id; |
... | ... | |
6655 | 6654 |
return 0; |
6656 | 6655 |
} |
6657 | 6656 |
|
6658 |
QEMUMachine *find_machine(const char *name) |
|
6657 |
static QEMUMachine *find_machine(const char *name)
|
|
6659 | 6658 |
{ |
6660 | 6659 |
QEMUMachine *m; |
6661 | 6660 |
|
... | ... | |
6669 | 6668 |
/***********************************************************/ |
6670 | 6669 |
/* main execution loop */ |
6671 | 6670 |
|
6672 |
void gui_update(void *opaque) |
|
6671 |
static void gui_update(void *opaque)
|
|
6673 | 6672 |
{ |
6674 | 6673 |
DisplayState *ds = opaque; |
6675 | 6674 |
ds->dpy_refresh(ds); |
... | ... | |
6953 | 6952 |
|
6954 | 6953 |
static CPUState *cur_cpu; |
6955 | 6954 |
|
6956 |
int main_loop(void) |
|
6955 |
static int main_loop(void)
|
|
6957 | 6956 |
{ |
6958 | 6957 |
int ret, timeout; |
6959 | 6958 |
#ifdef CONFIG_PROFILER |
... | ... | |
7414 | 7413 |
} |
7415 | 7414 |
|
7416 | 7415 |
/* XXX: currently we cannot use simultaneously different CPUs */ |
7417 |
void register_machines(void) |
|
7416 |
static void register_machines(void)
|
|
7418 | 7417 |
{ |
7419 | 7418 |
#if defined(TARGET_I386) |
7420 | 7419 |
qemu_register_machine(&pc_machine); |
Also available in: Unified diff