machine.cc Source File
Back to the index.
Go to the documentation of this file.
63 memset(m, 0,
sizeof(
struct machine));
73 snprintf(m->
path, 20,
"machine[%i]",
id);
157 int *type,
int *subtype,
int *
arch)
160 int i, j, k, nmatches = 0;
169 if (strcasecmp(me->
aliases[i], stype) == 0) {
181 if (strcasecmp(ssubtype,
189 fatal(
"Unknown subtype '%s' for emulation"
190 " '%s'\n", ssubtype, stype);
192 fatal(
"(Maybe you forgot the -e"
193 " command line option?)\n");
211 if (strcasecmp(ssubtype, me->
subtype[j]->
224 case 0:
fatal(
"\nSorry, emulation \"%s\"", stype);
225 if (ssubtype != NULL && ssubtype[0] !=
'\0')
226 fatal(
" (subtype \"%s\")", ssubtype);
227 fatal(
" is unknown.\n");
230 default:
fatal(
"\nSorry, multiple matches for \"%s\"", stype);
231 if (ssubtype != NULL && ssubtype[0] !=
'\0')
232 fatal(
" (subtype \"%s\")", ssubtype);
239 fatal(
"Use the -H command line option to get a list of "
240 "available types and subtypes.\n\n");
281 (
struct cpu *,
void *),
void *extra,
int tickshift)
300 fatal(
"ERROR! tickshift = %i, less than "
301 "N_SAFE_DYNTRANS_LIMIT_SHIFT (%i)\n",
326 char *pcolon = fname;
327 const char *mode =
"a";
332 fprintf(stderr,
"Only one -s option is allowed.\n");
340 while (*pcolon && *pcolon !=
':')
343 if (*pcolon !=
':') {
344 fprintf(stderr,
"The syntax for the -s option is: "
345 "-s flags:filename\nYou omitted the flags. Run g"
346 "xemul -h for a list of available flags.\n");
350 while (*fname !=
':') {
372 default:fprintf(stderr,
"Unknown flag '%c' used with the"
373 " -s option. Aborting.\n", *fname);
405 debug(
", randomized contents");
409 debug(
"PROM emulation disabled\n");
411 for (i=0; i<m->
ncpus; i++)
418 debug(
"Using slow_serial_interrupts_hack_for_linux\n");
428 debug(i?
", " :
" (");
439 debug(
"Forced netboot\n");
530 fatal(
"machine_defaultmemsize(): m == NULL?\n");
577 fatal(
"machine_default_cputype(): m == NULL?\n");
596 fprintf(stderr,
"machine_default_cputype(): no default"
597 " cpu for machine type %i subtype %i\n",
622 for (i=0; i<ncpus; i++) {
624 int instrs_run = cpus[i]->
run_instr(cpus[i]);
626 cpu0instrs += instrs_run;
644 ticks_reset_value[te];
653 for (i=0; i<ncpus; i++)
718 int oldstyle_subtype, ...)
743 va_start(argp, oldstyle_subtype);
746 char *s = va_arg(argp,
char *);
807 debug(
"Available CPU types:\n\n");
813 debug(
"\nMost of the CPU types are bogus, and not really implemented."
814 " The main effect of\nselecting a specific CPU type is to choose "
815 "what kind of 'id' it will have.\n\nAvailable machine types (with "
816 "aliases) and their subtypes:\n\n");
822 fatal(
"No machines defined!\n");
840 debug(
"%s\"%s\"", j?
", " :
"",
850 debug(
"\nMost of the machine types are bogus too. Please read the "
851 "GXemul documentation\nfor information about which machine types "
852 "that actually work. Use the alias\nwhen selecting a machine type "
853 "or subtype, not the real name.\n");
868 fatal(
"machine_init(): already called?\n");
int machine_name_to_type(char *stype, char *ssubtype, int *type, int *subtype, int *arch)
struct cpu_family * cpu_family_ptr_by_number(int arch)
void machine_default_cputype(struct machine *m)
int diskimage_bootdev(struct machine *machine, int *typep)
struct statistics statistics
void(* setup)(struct machine *, struct cpu *)
struct machine * machine_new(char *name, struct emul *emul, int id)
struct symbol_context symbol_context
struct breakpoints breakpoints
#define N_SAFE_DYNTRANS_LIMIT_SHIFT
void machine_setup(struct machine *machine)
#define SETTINGS_FORMAT_STRING
void automachine_init(void)
#define SETTINGS_FORMAT_DECIMAL
void settings_add(struct settings *settings, const char *name, int writable, int type, int format, void *ptr)
#define SETTINGS_TYPE_STRING
void machine_destroy(struct machine *machine)
int allow_instruction_combinations
struct tick_functions tick_functions
void machine_entry_add_subtype(struct machine_entry *me, const char *name, int oldstyle_subtype,...)
char * boot_string_argument
void symbol_init(struct symbol_context *)
struct machine_entry * first_machine_entry
void machine_add_tickfunction(struct machine *machine, void(*func)(struct cpu *, void *), void *extra, int tickshift)
int slow_serial_interrupts_hack_for_linux
#define NO_BYTE_ORDER_OVERRIDE
void COMBINE() strlen(struct cpu *cpu, struct arm_instr_call *ic, int low_addr)
void fatal(const char *fmt,...)
void machine_list_available_types_and_cpus(void)
int machine_run(struct machine *machine)
void settings_remove_all(struct settings *settings)
struct settings * settings
struct machine_entry * machine_entry_new(const char *name, int arch, int oldstyle_type)
struct machine_entry * next
void(* set_default_cpu)(struct machine *)
void machine_memsize_fix(struct machine *m)
char * boot_kernel_filename
void settings_destroy(struct settings *settings)
void machine_entry_add_alias(struct machine_entry *me, const char *name)
void(* set_default_ram)(struct machine *)
void machine_add_breakpoint_string(struct machine *machine, char *str)
int(* run_instr)(struct cpu *cpu)
#define DEBUG_INDENTATION
void machine_statistics_init(struct machine *machine, char *fname)
void machine_entry_register(struct machine_entry *me, int arch)
#define DEFAULT_RAM_IN_MB
void machine_dumpinfo(struct machine *m)
struct settings * settings_new(void)
const char * machine_name
void(** f)(struct cpu *, void *)
void cpu_destroy(struct cpu *cpu)
void cpu_dumpinfo(struct machine *m, struct cpu *cpu)
void diskimage_dump_info(struct machine *machine)
void debug_indentation(int diff)
#define SETTINGS_FORMAT_YESNO
#define SETTINGS_TYPE_INT
void cpu_list_available_types(void)
struct machine_entry_subtype ** subtype
#define CHECK_ALLOCATION(ptr)
Generated on Tue Mar 24 2020 14:04:48 for GXemul by
1.8.17