#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "cpu.h"
#include "device.h"
#include "diskimage.h"
#include "emul.h"
#include "machine.h"
#include "memory.h"
#include "misc.h"
#include "settings.h"
#include "symbol.h"
Go to the source code of this file.
Functions | |
struct machine * | machine_new (char *name, struct emul *emul, int id) |
void | machine_destroy (struct machine *machine) |
int | machine_name_to_type (char *stype, char *ssubtype, int *type, int *subtype, int *arch) |
void | machine_add_breakpoint_string (struct machine *machine, char *str) |
void | machine_add_tickfunction (struct machine *machine, void(*func)(struct cpu *, void *), void *extra, int tickshift) |
void | machine_statistics_init (struct machine *machine, char *fname) |
void | machine_dumpinfo (struct machine *m) |
void | machine_setup (struct machine *machine) |
void | machine_memsize_fix (struct machine *m) |
void | machine_default_cputype (struct machine *m) |
int | machine_run (struct machine *machine) |
struct machine_entry * | machine_entry_new (const char *name, int arch, int oldstyle_type) |
void | machine_entry_add_alias (struct machine_entry *me, const char *name) |
void | machine_entry_add_subtype (struct machine_entry *me, const char *name, int oldstyle_subtype,...) |
void | machine_entry_register (struct machine_entry *me, int arch) |
void | machine_list_available_types_and_cpus (void) |
void | machine_init (void) |
Variables | |
struct machine_entry * | first_machine_entry = NULL |
void machine_add_breakpoint_string | ( | struct machine * | machine, |
char * | str | ||
) |
Definition at line 252 of file machine.cc.
References breakpoints::addr, machine::breakpoints, CHECK_ALLOCATION, breakpoints::n, optarg, and breakpoints::string.
void machine_add_tickfunction | ( | struct machine * | machine, |
void(*)(struct cpu *, void *) | func, | ||
void * | extra, | ||
int | tickshift | ||
) |
Definition at line 280 of file machine.cc.
References CHECK_ALLOCATION, tick_functions::extra, tick_functions::f, fatal(), tick_functions::n_entries, N_SAFE_DYNTRANS_LIMIT_SHIFT, machine::tick_functions, tick_functions::ticks_reset_value, and tick_functions::ticks_till_next.
Referenced by dev_asc_init(), dev_bt459_init(), dev_crime_init(), dev_dc7085_init(), dev_gt_init(), dev_le_init(), dev_pckbc_init(), dev_px_init(), dev_scc_init(), dev_sgi_gbe_init(), dev_sgi_ip22_init(), dev_sii_init(), dev_ssc_init(), dev_vr41xx_init(), and DEVINIT().
void machine_default_cputype | ( | struct machine * | m | ) |
Definition at line 572 of file machine.cc.
References machine::cpu_name, fatal(), first_machine_entry, machine::machine_subtype, machine::machine_type, machine_entry::machine_type, machine_entry::next, and machine_entry::set_default_cpu.
Referenced by emul_machine_setup().
void machine_destroy | ( | struct machine * | machine | ) |
Definition at line 124 of file machine.cc.
References cpu_destroy(), machine::cpus, machine::ncpus, machine::path, machine::settings, settings_destroy(), and settings_remove_all().
Referenced by emul_destroy().
void machine_dumpinfo | ( | struct machine * | m | ) |
Definition at line 392 of file machine.cc.
References machine::bootstrap_cpu, cpu_dumpinfo(), machine::cpus, debug, diskimage_dump_info(), x11_md::display_names, machine::force_netboot, x11_md::in_use, machine::memory_offset_in_mb, x11_md::n_display_names, machine::ncpus, machine::nr_of_nics, machine::physical_ram_in_mb, machine::prom_emulation, machine::random_mem_contents, x11_md::scaledown, x11_md::scaleup, machine::serial_nr, machine::slow_serial_interrupts_hack_for_linux, and machine::x11_md.
Referenced by emul_dumpinfo().
void machine_entry_add_alias | ( | struct machine_entry * | me, |
const char * | name | ||
) |
Definition at line 697 of file machine.cc.
References machine_entry::aliases, CHECK_ALLOCATION, machine_entry::n_aliases, and machine_entry::name.
Referenced by MACHINE_REGISTER().
void machine_entry_add_subtype | ( | struct machine_entry * | me, |
const char * | name, | ||
int | oldstyle_subtype, | ||
... | |||
) |
Definition at line 717 of file machine.cc.
References machine_entry_subtype::aliases, CHECK_ALLOCATION, machine_entry_subtype::machine_subtype, machine_entry_subtype::n_aliases, machine_entry::n_subtypes, machine_entry_subtype::name, and machine_entry::subtype.
Referenced by MACHINE_REGISTER().
struct machine_entry* machine_entry_new | ( | const char * | name, |
int | arch, | ||
int | oldstyle_type | ||
) |
Definition at line 672 of file machine.cc.
References machine_entry::aliases, machine_entry::arch, CHECK_ALLOCATION, machine_entry::machine_type, machine_entry::n_aliases, machine_entry::n_subtypes, machine_entry::name, and machine_entry::setup.
void machine_entry_register | ( | struct machine_entry * | me, |
int | arch | ||
) |
Definition at line 766 of file machine.cc.
References machine_entry::arch, cpu_family_ptr_by_number(), first_machine_entry, machine_entry::name, and machine_entry::next.
void machine_init | ( | void | ) |
Definition at line 865 of file machine.cc.
References automachine_init(), fatal(), and first_machine_entry.
Referenced by main().
void machine_list_available_types_and_cpus | ( | void | ) |
Definition at line 802 of file machine.cc.
References machine_entry_subtype::aliases, machine_entry::aliases, machine_entry::arch, cpu_family_ptr_by_number(), cpu_list_available_types(), debug, DEBUG_INDENTATION, debug_indentation(), fatal(), first_machine_entry, machine_entry_subtype::n_aliases, machine_entry::n_aliases, machine_entry::n_subtypes, cpu_family::name, machine_entry_subtype::name, machine_entry::name, machine_entry::next, and machine_entry::subtype.
void machine_memsize_fix | ( | struct machine * | m | ) |
Definition at line 527 of file machine.cc.
References DEFAULT_RAM_IN_MB, fatal(), first_machine_entry, MACHINE_SGI, machine::machine_subtype, machine::machine_type, machine_entry::machine_type, machine::memory_offset_in_mb, machine_entry::next, machine::physical_ram_in_mb, and machine_entry::set_default_ram.
Referenced by emul_machine_setup().
int machine_name_to_type | ( | char * | stype, |
char * | ssubtype, | ||
int * | type, | ||
int * | subtype, | ||
int * | arch | ||
) |
Definition at line 156 of file machine.cc.
References machine_entry_subtype::aliases, machine_entry::aliases, machine_entry::arch, fatal(), first_machine_entry, MACHINE_NONE, machine_entry_subtype::machine_subtype, machine_entry::machine_type, machine_entry_subtype::n_aliases, machine_entry::n_aliases, machine_entry::n_subtypes, machine_entry::next, and machine_entry::subtype.
Definition at line 58 of file machine.cc.
References machine::allow_instruction_combinations, machine::arch_pagesize, machine::boot_kernel_filename, machine::boot_string_argument, machine::byte_order_override, CHECK_ALLOCATION, machine::emul, statistics::enabled, MACHINE_NONE, machine::machine_subtype, machine::machine_type, machine::n_gfx_cards, machine::name, NO_BYTE_ORDER_OVERRIDE, machine::path, machine::prom_emulation, x11_md::scaledown, x11_md::scaleup, machine::serial_nr, machine::settings, settings_add(), SETTINGS_FORMAT_DECIMAL, SETTINGS_FORMAT_STRING, SETTINGS_FORMAT_YESNO, settings_new(), SETTINGS_TYPE_INT, SETTINGS_TYPE_STRING, machine::statistics, machine::symbol_context, symbol_init(), and machine::x11_md.
Referenced by emul_add_machine().
int machine_run | ( | struct machine * | machine | ) |
Definition at line 617 of file machine.cc.
References machine::cpus, tick_functions::extra, tick_functions::f, tick_functions::n_entries, machine::ncpus, cpu::run_instr, cpu::running, machine::tick_functions, and tick_functions::ticks_till_next.
void machine_setup | ( | struct machine * | machine | ) |
Definition at line 449 of file machine.cc.
References machine::boot_string_argument, machine::bootarg, machine::bootdev_id, machine::bootdev_type, machine::bootstr, machine::bootstrap_cpu, machine::cpus, debug, diskimage_bootdev(), machine::emulated_hz, fatal(), first_machine_entry, MACHINE_ARC, MACHINE_CATS, machine::machine_name, MACHINE_PMAX, machine::machine_type, machine_entry::machine_type, cpu::mem, machine_entry::next, machine_entry::setup, and strlen().
Referenced by emul_machine_setup().
void machine_statistics_init | ( | struct machine * | machine, |
char * | fname | ||
) |
Definition at line 323 of file machine.cc.
References machine::allow_instruction_combinations, CHECK_ALLOCATION, statistics::enabled, statistics::fields, statistics::file, statistics::filename, machine::statistics, and strlen().
struct machine_entry* first_machine_entry = NULL |
Definition at line 50 of file machine.cc.
Referenced by machine_default_cputype(), machine_entry_register(), machine_init(), machine_list_available_types_and_cpus(), machine_memsize_fix(), machine_name_to_type(), and machine_setup().