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

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

revision 22 by dpavlin, Mon Oct 8 16:19:37 2007 UTC revision 42 by dpavlin, Mon Oct 8 16:22:32 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_algor.c,v 1.5 2006/02/18 17:55:25 debug Exp $   *  $Id: machine_algor.c,v 1.20 2007/06/15 18:08:10 debug Exp $
29     *
30     *  COMMENT: Algorithmic P4032 and P5064 evaluation boards
31   */   */
32    
33  #include <stdio.h>  #include <stdio.h>
# Line 38  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    
46    
47  MACHINE_SETUP(algor)  MACHINE_SETUP(algor)
48  {  {
49            struct pci_data *pci_bus;
50            char tmpstr[300];
51    
52            machine->emulated_hz = 166560000;
53    
54          switch (machine->machine_subtype) {          switch (machine->machine_subtype) {
55          case MACHINE_ALGOR_P4032:          case MACHINE_ALGOR_P4032:
56                  machine->machine_name = "Algor P4032";                  machine->machine_name = "Algor P4032";
# Line 56  MACHINE_SETUP(algor) Line 62  MACHINE_SETUP(algor)
62                  exit(1);                  exit(1);
63          }          }
64    
65          machine->md_int.v3_data = dev_v3_init(machine, machine->memory);          /*
66          machine->md_interrupt = isa8_interrupt;           *  Algor CPU interrupts:
67          machine->isa_pic_data.native_irq = 6;           *
68          /*  Hm. ISA interrupts at 6, but "local" at 2!  */           *  7 = CPU count/compare
69             *  4 = Local
70             *  3 = PCI
71             *  2 = ISA
72             */
73    
74            pci_bus = device_add(machine, "v3");
75    
76          device_add(machine, "algor addr=0x1ff00000");          device_add(machine, "algor addr=0x1ff00000");
77    
78          bus_isa_init(machine, BUS_ISA_FDC, 0x1d000000, 0x10000000, 8, 24);          snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].v3",
79                machine->path, machine->bootstrap_cpu);
80            bus_isa_init(machine, tmpstr, BUS_ISA_EXTERNAL_PIC | BUS_ISA_FDC,
81                0x1d000000, 0x10000000);
82    
83          bus_pci_add(machine, machine->md_int.v3_data->pci_data,          /*  bus_pci_add(machine, pci_bus, machine->memory, 0, 0, 0,
84              machine->memory, 0, 0, 0, "dec21143");              "dec21143");  */
85    
86          if (!machine->prom_emulation)          if (!machine->prom_emulation)
87                  return;                  return;
# Line 87  MACHINE_SETUP(algor) Line 102  MACHINE_SETUP(algor)
102          store_string(cpu, (int32_t)0x9fc01040, machine->bootstr);          store_string(cpu, (int32_t)0x9fc01040, machine->bootstr);
103          store_string(cpu, (int32_t)0x9fc01200, machine->bootarg);          store_string(cpu, (int32_t)0x9fc01200, machine->bootarg);
104    
105          /*  a2 = (yamon_env_var *)envp  */          /*  a2 = pointer to environment strings  */
106          cpu->cd.mips.gpr[MIPS_GPR_A2] = (int32_t)0x9fc01800;          cpu->cd.mips.gpr[MIPS_GPR_A2] = (int32_t)0x9fc01800;
107          {          {
108                  char tmps[50];                  char tmps[50];
# Line 112  MACHINE_DEFAULT_CPU(algor) Line 127  MACHINE_DEFAULT_CPU(algor)
127    
128  MACHINE_REGISTER(algor)  MACHINE_REGISTER(algor)
129  {  {
130          MR_DEFAULT(algor, "Algor evaluation board", ARCH_MIPS, MACHINE_ALGOR,          MR_DEFAULT(algor, "Algor evaluation board", ARCH_MIPS, MACHINE_ALGOR);
131              1, 2);  
132          me->aliases[0] = "algor";          machine_entry_add_alias(me, "algor");
133          me->subtype[0] = machine_entry_subtype_new("P4032",  
134              MACHINE_ALGOR_P4032, 1);          machine_entry_add_subtype(me, "P4032", MACHINE_ALGOR_P4032,
135          me->subtype[0]->aliases[0] = "p4032";              "p4032", NULL);
136          me->subtype[1] = machine_entry_subtype_new("P5064",  
137              MACHINE_ALGOR_P5064, 1);          machine_entry_add_subtype(me, "P5064", MACHINE_ALGOR_P5064,
138          me->subtype[1]->aliases[0] = "p5064";              "p5064", NULL);
         machine_entry_add(me, ARCH_MIPS);  
139  }  }
140    

Legend:
Removed from v.22  
changed lines
  Added in v.42

  ViewVC Help
Powered by ViewVC 1.1.26