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

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

revision 31 by dpavlin, Mon Oct 8 16:20:40 2007 UTC revision 32 by dpavlin, Mon Oct 8 16:20:58 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: machine_test.c,v 1.18 2006/07/25 19:35:28 debug Exp $   *  $Id: machine_test.c,v 1.22 2006/10/25 09:24:06 debug Exp $
29   *   *
30   *  Various "test" machines (bare machines with just a CPU, or a bare machine   *  Various "test" machines (bare machines with just a CPU, or a bare machine
31   *  plus some experimental devices).   *  plus some experimental devices).
# Line 46  Line 46 
46  #include "testmachine/dev_ether.h"  #include "testmachine/dev_ether.h"
47  #include "testmachine/dev_fb.h"  #include "testmachine/dev_fb.h"
48  #include "testmachine/dev_mp.h"  #include "testmachine/dev_mp.h"
49    #include "testmachine/dev_rtc.h"
50    
51    
52  static void default_test(struct machine *machine, struct cpu *cpu)  static void default_test(struct machine *machine, struct cpu *cpu)
# Line 71  static void default_test(struct machine Line 72  static void default_test(struct machine
72          snprintf(tmpstr, sizeof(tmpstr), "ether addr=0x%"PRIx64" irq=0",          snprintf(tmpstr, sizeof(tmpstr), "ether addr=0x%"PRIx64" irq=0",
73              (uint64_t) DEV_ETHER_ADDRESS);              (uint64_t) DEV_ETHER_ADDRESS);
74          device_add(machine, tmpstr);          device_add(machine, tmpstr);
75    
76            snprintf(tmpstr, sizeof(tmpstr), "rtc addr=0x%"PRIx64" irq=0",
77                (uint64_t) DEV_RTC_ADDRESS);
78            device_add(machine, tmpstr);
79  }  }
80    
81    
# Line 181  MACHINE_REGISTER(testarm) Line 186  MACHINE_REGISTER(testarm)
186    
187    
188    
189    MACHINE_SETUP(bareavr32)
190    {
191            machine->machine_name = "Generic \"bare\" AVR32 machine";
192            machine->stable = 1;
193    }
194    
195    
196    MACHINE_SETUP(testavr32)
197    {
198            machine->machine_name = "AVR32 test machine";
199            machine->stable = 1;
200    
201            /*  TODO: interrupts  */
202    
203            default_test(machine, cpu);
204    }
205    
206    
207    MACHINE_DEFAULT_CPU(bareavr32)
208    {
209            machine->cpu_name = strdup("AVR32A");
210    }
211    
212    
213    MACHINE_DEFAULT_CPU(testavr32)
214    {
215            machine->cpu_name = strdup("AVR32A");
216    }
217    
218    
219    MACHINE_REGISTER(bareavr32)
220    {
221            MR_DEFAULT(bareavr32, "Generic \"bare\" AVR32 machine",
222                ARCH_AVR32, MACHINE_BAREAVR32);
223    
224            machine_entry_add_alias(me, "bareavr32");
225    }
226    
227    
228    MACHINE_REGISTER(testavr32)
229    {
230            MR_DEFAULT(testavr32, "Test-machine for AVR32",
231                ARCH_AVR32, MACHINE_TESTAVR32);
232    
233            machine_entry_add_alias(me, "testavr32");
234    }
235    
236    
237  MACHINE_SETUP(barehppa)  MACHINE_SETUP(barehppa)
238  {  {
239          machine->machine_name = "Generic \"bare\" HPPA machine";          machine->machine_name = "Generic \"bare\" HPPA machine";
# Line 391  MACHINE_SETUP(testmips) Line 444  MACHINE_SETUP(testmips)
444           *      7       CPU counter           *      7       CPU counter
445           *      6       SMP IPIs           *      6       SMP IPIs
446           *      5       not used yet           *      5       not used yet
447           *      4       not used yet           *      4       rtc
448           *      3       ethernet             *      3       ethernet  
449           *      2       serial console           *      2       serial console
450           */           */
# Line 421  MACHINE_SETUP(testmips) Line 474  MACHINE_SETUP(testmips)
474          snprintf(tmpstr, sizeof(tmpstr), "ether addr=0x%"PRIx64" irq=3",          snprintf(tmpstr, sizeof(tmpstr), "ether addr=0x%"PRIx64" irq=3",
475              (uint64_t) DEV_ETHER_ADDRESS);              (uint64_t) DEV_ETHER_ADDRESS);
476          device_add(machine, tmpstr);          device_add(machine, tmpstr);
477    
478            snprintf(tmpstr, sizeof(tmpstr), "rtc addr=0x%"PRIx64" irq=4",
479                (uint64_t) DEV_RTC_ADDRESS);
480            device_add(machine, tmpstr);
481  }  }
482    
483    
# Line 521  MACHINE_SETUP(testsh) Line 578  MACHINE_SETUP(testsh)
578    
579  MACHINE_DEFAULT_CPU(baresh)  MACHINE_DEFAULT_CPU(baresh)
580  {  {
581          machine->cpu_name = strdup("SH5");          machine->cpu_name = strdup("SH7750");
582  }  }
583    
584    
585  MACHINE_DEFAULT_CPU(testsh)  MACHINE_DEFAULT_CPU(testsh)
586  {  {
587          machine->cpu_name = strdup("SH5");          machine->cpu_name = strdup("SH7750");
588  }  }
589    
590    

Legend:
Removed from v.31  
changed lines
  Added in v.32

  ViewVC Help
Powered by ViewVC 1.1.26