/[gxemul]/trunk/src/machines/machine_prep.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/machines/machine_prep.c

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

revision 24 by dpavlin, Mon Oct 8 16:19:56 2007 UTC revision 34 by dpavlin, Mon Oct 8 16:21:17 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   *  Copyright (C) 2005-2006  Anders Gavare.  All rights reserved.   *  Copyright (C) 2005-2007  Anders Gavare.  All rights reserved.
3   *   *
4   *  Redistribution and use in source and binary forms, with or without   *  Redistribution and use in source and binary forms, with or without
5   *  modification, are permitted provided that the following conditions are met:   *  modification, are permitted provided that the following conditions are met:
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: machine_prep.c,v 1.6 2006/06/24 06:53:04 debug Exp $   *  $Id: machine_prep.c,v 1.17 2007/01/21 21:02:57 debug Exp $
29   *   *
30   *  Machines conforming to the PowerPC Reference Platform specs.   *  Machines conforming to the PowerPC Reference Platform specs.
31   */   */
# Line 40  Line 40 
40  #include "device.h"  #include "device.h"
41  #include "devices.h"  #include "devices.h"
42  #include "machine.h"  #include "machine.h"
 #include "machine_interrupts.h"  
43  #include "memory.h"  #include "memory.h"
44  #include "misc.h"  #include "misc.h"
45    
# Line 48  Line 47 
47    
48  MACHINE_SETUP(prep)  MACHINE_SETUP(prep)
49  {  {
50            char tmpstr[300];
51    
52          struct pci_data *pci_data;          struct pci_data *pci_data;
53          char *model_name = "";          char *model_name = "";
54    
# Line 62  MACHINE_SETUP(prep) Line 63  MACHINE_SETUP(prep)
63                  if (machine->emulated_hz == 0)                  if (machine->emulated_hz == 0)
64                          machine->emulated_hz = 20000000;                          machine->emulated_hz = 20000000;
65    
66                  machine->md_int.prep_data = device_add(machine, "prep");                  snprintf(tmpstr, sizeof(tmpstr), "prep irq=%s.cpu[%i]",
67                  machine->isa_pic_data.native_irq = 1;   /*  Semi-bogus  */                      machine->path, machine->bootstrap_cpu);
68                  machine->md_interrupt = isa32_interrupt;                  device_add(machine, tmpstr);
69    
70                  pci_data = dev_eagle_init(machine, machine->memory,                  snprintf(tmpstr, sizeof(tmpstr), "eagle irq=%s.cpu[%i]",
71                      32 /*  isa irq base */, 0 /*  pci irq: TODO */);                      machine->path, machine->bootstrap_cpu);
72                    pci_data = device_add(machine, tmpstr);
                 bus_isa_init(machine, BUS_ISA_IDE0 | BUS_ISA_IDE1,  
                     0x80000000, 0xc0000000, 32, 48);  
73    
74                  bus_pci_add(machine, pci_data, machine->memory,                  bus_pci_add(machine, pci_data, machine->memory,
75                      0, 13, 0, "dec21143");                      0, 13, 0, "dec21143");
# Line 87  MACHINE_SETUP(prep) Line 86  MACHINE_SETUP(prep)
86                  /*  TODO: _EXACT_ model name for mvme2400?  */                  /*  TODO: _EXACT_ model name for mvme2400?  */
87                  model_name = "MOT MVME2400";                  model_name = "MOT MVME2400";
88    
89                  machine->md_int.prep_data = device_add(machine, "prep");                  snprintf(tmpstr, sizeof(tmpstr), "prep irq=%s.cpu[%i]",
90                  machine->isa_pic_data.native_irq = 1;   /*  Semi-bogus  */                      machine->path, machine->bootstrap_cpu);
91                  machine->md_interrupt = isa32_interrupt;                  device_add(machine, tmpstr);
92    
93                  pci_data = dev_eagle_init(machine, machine->memory,                  snprintf(tmpstr, sizeof(tmpstr), "eagle irq=%s.cpu[%i]",
94                      32 /*  isa irq base */, 0 /*  pci irq: TODO */);                      machine->path, machine->bootstrap_cpu);
95                    pci_data = device_add(machine, tmpstr);
                 bus_isa_init(machine, BUS_ISA_IDE0 | BUS_ISA_IDE1,  
                     0x80000000, 0xc0000000, 32, 48);  
96    
97                  break;                  break;
98    
# Line 181  MACHINE_DEFAULT_RAM(prep) Line 178  MACHINE_DEFAULT_RAM(prep)
178    
179  MACHINE_REGISTER(prep)  MACHINE_REGISTER(prep)
180  {  {
181          MR_DEFAULT(prep, "PowerPC Reference Platform", ARCH_PPC,          MR_DEFAULT(prep, "PowerPC Reference Platform", ARCH_PPC, MACHINE_PREP);
             MACHINE_PREP, 1, 2);  
   
         me->aliases[0] = "prep";  
   
         me->subtype[0] = machine_entry_subtype_new(  
             "IBM 6050/6070", MACHINE_PREP_IBM6050, 2);  
         me->subtype[0]->aliases[0] = "ibm6050";  
         me->subtype[0]->aliases[1] = "ibm6070";  
   
         me->subtype[1] = machine_entry_subtype_new(  
             "MVME2400", MACHINE_PREP_MVME2400, 1);  
         me->subtype[1]->aliases[0] = "mvme2400";  
182    
183            machine_entry_add_alias(me, "prep");
184          me->set_default_ram = machine_default_ram_prep;          me->set_default_ram = machine_default_ram_prep;
185    
186          machine_entry_add(me, ARCH_PPC);          machine_entry_add_subtype(me, "IBM 6050/6070", MACHINE_PREP_IBM6050,
187                "ibm6050", "ibm6070", NULL);
188    
189            machine_entry_add_subtype(me, "MVME2400", MACHINE_PREP_MVME2400,
190                "mvme2400", NULL);
191  }  }
192    

Legend:
Removed from v.24  
changed lines
  Added in v.34

  ViewVC Help
Powered by ViewVC 1.1.26