/[gxemul]/trunk/src/machine.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/machine.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 15 by dpavlin, Mon Oct 8 16:18:51 2007 UTC revision 16 by dpavlin, Mon Oct 8 16:19:01 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: machine.c,v 1.565 2005/10/07 22:10:50 debug Exp $   *  $Id: machine.c,v 1.569 2005/10/11 03:31:27 debug Exp $
29   *   *
30   *  Emulation of specific machines.   *  Emulation of specific machines.
31   *   *
# Line 1569  void machine_setup(struct machine *machi Line 1569  void machine_setup(struct machine *machi
1569                  case MACHINE_ARC:                  case MACHINE_ARC:
1570                          machine->boot_string_argument = "-aN";                          machine->boot_string_argument = "-aN";
1571                          break;                          break;
1572                    case MACHINE_CATS:
1573                            machine->boot_string_argument = "-A";
1574                            break;
1575                  case MACHINE_DEC:                  case MACHINE_DEC:
1576                          machine->boot_string_argument = "-a";                          machine->boot_string_argument = "-a";
1577                          break;                          break;
# Line 4575  Not yet. Line 4578  Not yet.
4578          case MACHINE_CATS:          case MACHINE_CATS:
4579                  machine->machine_name = "CATS evaluation board";                  machine->machine_name = "CATS evaluation board";
4580    
4581                    if (machine->emulated_hz == 0)
4582                            machine->emulated_hz = 50000000;
4583    
4584                  if (machine->physical_ram_in_mb > 256)                  if (machine->physical_ram_in_mb > 256)
4585                          fprintf(stderr, "WARNING! Real CATS machines cannot"                          fprintf(stderr, "WARNING! Real CATS machines cannot"
4586                              " have more than 256 MB RAM. Continuing anyway.\n");                              " have more than 256 MB RAM. Continuing anyway.\n");
# Line 4586  Not yet. Line 4592  Not yet.
4592                  /*  NetBSD and OpenBSD clean their caches here:  */                  /*  NetBSD and OpenBSD clean their caches here:  */
4593                  dev_ram_init(mem, 0x50000000, 0x4000, DEV_RAM_RAM, 0);                  dev_ram_init(mem, 0x50000000, 0x4000, DEV_RAM_RAM, 0);
4594    
4595                    /*  Interrupt ack space?  */
4596                    dev_ram_init(mem, 0x80000000, 0x1000, DEV_RAM_RAM, 0);
4597    
4598                  snprintf(tmpstr, sizeof(tmpstr), "8259 irq=64 addr=0x7c000020");                  snprintf(tmpstr, sizeof(tmpstr), "8259 irq=64 addr=0x7c000020");
4599                  machine->isa_pic_data.pic1 = device_add(machine, tmpstr);                  machine->isa_pic_data.pic1 = device_add(machine, tmpstr);
4600                  snprintf(tmpstr, sizeof(tmpstr), "8259 irq=64 addr=0x7c0000a0");                  snprintf(tmpstr, sizeof(tmpstr), "8259 irq=64 addr=0x7c0000a0");
# Line 4605  Not yet. Line 4614  Not yet.
4614                  device_add(machine, "ns16550 irq=36 addr=0x7c0003f8 name2=com0 in_use=0");                  device_add(machine, "ns16550 irq=36 addr=0x7c0003f8 name2=com0 in_use=0");
4615                  device_add(machine, "ns16550 irq=35 addr=0x7c0002f8 name2=com1 in_use=0");                  device_add(machine, "ns16550 irq=35 addr=0x7c0002f8 name2=com1 in_use=0");
4616    
4617                    device_add(machine, "lpt irq=39 addr=0x7c000378 name2=lpt in_use=0");
4618    
4619                  if (machine->prom_emulation) {                  if (machine->prom_emulation) {
4620                          struct ebsaboot ebsaboot;                          struct ebsaboot ebsaboot;
4621                            char bs[300];
4622                            int boot_id = bootdev_id >= 0? bootdev_id : 0;
4623    
4624                          cpu->cd.arm.r[0] = /* machine->physical_ram_in_mb */                          cpu->cd.arm.r[0] = /* machine->physical_ram_in_mb */
4625                              7 * 1048576 - 0x1000;                              7 * 1048576 - 0x1000;
# Line 4639  Not yet. Line 4652  Not yet.
4652    
4653                          store_buf(cpu, cpu->cd.arm.r[0],                          store_buf(cpu, cpu->cd.arm.r[0],
4654                              (char *)&ebsaboot, sizeof(struct ebsaboot));                              (char *)&ebsaboot, sizeof(struct ebsaboot));
4655                          store_string(cpu, cpu->cd.arm.r[0] +  
4656                              sizeof(struct ebsaboot),                          snprintf(bs, sizeof(bs), "(hd%i)%s%s%s",
4657                                boot_id, machine->boot_kernel_filename,
4658                                (machine->boot_string_argument[0])? " " : "",
4659                              machine->boot_string_argument);                              machine->boot_string_argument);
4660    
4661                            store_string(cpu, cpu->cd.arm.r[0] +
4662                                sizeof(struct ebsaboot), bs);
4663    
4664                          arm_setup_initial_translation_table(cpu,                          arm_setup_initial_translation_table(cpu,
4665                              7 * 1048576 - 32768);                              7 * 1048576 - 32768);
4666                  }                  }

Legend:
Removed from v.15  
changed lines
  Added in v.16

  ViewVC Help
Powered by ViewVC 1.1.26