/[gxemul]/trunk/src/machines/machine_arc.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_arc.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 24 by dpavlin, Mon Oct 8 16:19:56 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: machine_arc.c,v 1.2 2006/02/03 17:25:14 debug Exp $   *  $Id: machine_arc.c,v 1.3 2006/03/24 05:53:17 debug Exp $
29   */   */
30    
31  #include <stdio.h>  #include <stdio.h>
# Line 83  MACHINE_SETUP(arc) Line 83  MACHINE_SETUP(arc)
83                              MACHINE_NAME_MAXBUF);                              MACHINE_NAME_MAXBUF);
84                          break;                          break;
85                  case MACHINE_ARC_NEC_R94:                  case MACHINE_ARC_NEC_R94:
86                          strlcat(machine->machine_name, " (NEC-R94; NEC RISCstation 2200)",                          strlcat(machine->machine_name,
87                                " (NEC-R94; NEC RISCstation 2200)",
88                              MACHINE_NAME_MAXBUF);                              MACHINE_NAME_MAXBUF);
89                          break;                          break;
90                  case MACHINE_ARC_NEC_R96:                  case MACHINE_ARC_NEC_R96:
91                          strlcat(machine->machine_name, " (NEC-R96; NEC Express RISCserver)",                          strlcat(machine->machine_name,
92                                " (NEC-R96; NEC Express RISCserver)",
93                              MACHINE_NAME_MAXBUF);                              MACHINE_NAME_MAXBUF);
94                          break;                          break;
95                  }                  }
# Line 143  MACHINE_SETUP(arc) Line 145  MACHINE_SETUP(arc)
145                   *  According to http://mail-index.netbsd.org/port-arc/                   *  According to http://mail-index.netbsd.org/port-arc/
146                   *      2004/02/01/0001.html:                   *      2004/02/01/0001.html:
147                   *                   *
148                   *  Network adapter at "start: 0x 0 18600000, length: 0x1000, level: 4, vector: 9"                   *  Network adapter at "start: 0x 0 18600000, length:
149                   *  Disk at "start: 0x 0 18c103f0, length: 0x1000, level: 5, vector: 6"                   *      0x1000, level: 4, vector: 9"
150                   *  Keyboard at "start: 0x 0 18c20060, length: 0x1000, level: 5, vector: 3"                   *  Disk at "start: 0x 0 18c103f0, length: 0x1000, level:
151                   *  Serial at "start: 0x 0 18c103f8, length: 0x1000, level: 5, vector: 4"                   *      5, vector: 6"
152                   *  Serial at "start: 0x 0 18c102f8, length: 0x1000, level: 5, vector: 4"                   *  Keyboard at "start: 0x 0 18c20060, length: 0x1000,
153                   *  Parallel at "start: 0x 0 18c10278, length: 0x1000, level: 5, vector: 5"                   *      level: 5, vector: 3"
154                     *  Serial at "start: 0x 0 18c103f8, length: 0x1000,
155                     *      level: 5, vector: 4"
156                     *  Serial at "start: 0x 0 18c102f8, length: 0x1000,
157                     *      level: 5, vector: 4"
158                     *  Parallel at "start: 0x 0 18c10278, length: 0x1000,
159                     *      level: 5, vector: 5"
160                   */                   */
161    
162                  strlcat(machine->machine_name,                  strlcat(machine->machine_name,
# Line 181  MACHINE_SETUP(arc) Line 189  MACHINE_SETUP(arc)
189                   *  asc0 at jazzio0 addr 0xe0002000 intr 5: NCR53C94, target 0                   *  asc0 at jazzio0 addr 0xe0002000 intr 5: NCR53C94, target 0
190                   *  pckbd at jazzio0 addr 0xe0005000 intr 6 not configured                   *  pckbd at jazzio0 addr 0xe0005000 intr 6 not configured
191                   *  pms at jazzio0 addr 0xe0005000 intr 7 not configured                   *  pms at jazzio0 addr 0xe0005000 intr 7 not configured
192                   *  com0 at jazzio0 addr 0xe0006000 intr 8: ns16550a, working fifo                   *  com0 at jazzio0 addr 0xe0006000 intr 8: ns16550a,
193                     *      working fifo
194                   *  com at jazzio0 addr 0xe0007000 intr 9 not configured                   *  com at jazzio0 addr 0xe0007000 intr 9 not configured
195                   *  jazzisabr0 at mainbus0                   *  jazzisabr0 at mainbus0
196                   *  isa0 at jazzisabr0 isa_io_base 0xe2000000 isa_mem_base 0xe3000000                   *  isa0 at jazzisabr0 isa_io_base 0xe2000000 isa_mem_base
197                     *      0xe3000000
198                   *                   *
199                   *  "Microsoft-Jazz", "MIPS Magnum"                   *  "Microsoft-Jazz", "MIPS Magnum"
200                   *                   *
# Line 200  MACHINE_SETUP(arc) Line 210  MACHINE_SETUP(arc)
210                   *  scsibus0 at asc0: 8 targets, 8 luns per target                   *  scsibus0 at asc0: 8 targets, 8 luns per target
211                   *  pckbd at jazzio0 addr 0xe0005000 intr 6 not configured                   *  pckbd at jazzio0 addr 0xe0005000 intr 6 not configured
212                   *  pms at jazzio0 addr 0xe0005000 intr 7 not configured                   *  pms at jazzio0 addr 0xe0005000 intr 7 not configured
213                   *  com0 at jazzio0 addr 0xe0006000 intr 8: ns16550a, working fifo                   *  com0 at jazzio0 addr 0xe0006000 intr 8: ns16550a,
214                     *      working fifo
215                   *  com at jazzio0 addr 0xe0007000 intr 9 not configured                   *  com at jazzio0 addr 0xe0007000 intr 9 not configured
216                   *  jazzisabr0 at mainbus0                   *  jazzisabr0 at mainbus0
217                   *  isa0 at jazzisabr0 isa_io_base 0xe2000000 isa_mem_base 0xe3000000                   *  isa0 at jazzisabr0 isa_io_base 0xe2000000 isa_mem_base
218                     *      0xe3000000
219                   */                   */
220    
221                  switch (machine->machine_subtype) {                  switch (machine->machine_subtype) {
222                  case MACHINE_ARC_JAZZ_PICA:                  case MACHINE_ARC_JAZZ_PICA:
223                          strlcat(machine->machine_name, " (Microsoft Jazz, Acer PICA-61)",                          strlcat(machine->machine_name,
224                                " (Microsoft Jazz, Acer PICA-61)",
225                              MACHINE_NAME_MAXBUF);                              MACHINE_NAME_MAXBUF);
226                          machine->stable = 1;                          machine->stable = 1;
227                          break;                          break;
228                  case MACHINE_ARC_JAZZ_MAGNUM:                  case MACHINE_ARC_JAZZ_MAGNUM:
229                          strlcat(machine->machine_name, " (Microsoft Jazz, MIPS Magnum)",                          strlcat(machine->machine_name,
230                                " (Microsoft Jazz, MIPS Magnum)",
231                              MACHINE_NAME_MAXBUF);                              MACHINE_NAME_MAXBUF);
232                          break;                          break;
233                  default:                  default:
# Line 221  MACHINE_SETUP(arc) Line 235  MACHINE_SETUP(arc)
235                          exit(1);                          exit(1);
236                  }                  }
237    
238                                  machine->md_int.jazz_data = device_add(machine,                  machine->md_int.jazz_data = device_add(machine,
239                                      "jazz addr=0x80000000");                      "jazz addr=0x80000000");
240                                  machine->md_interrupt = jazz_interrupt;                  machine->md_interrupt = jazz_interrupt;
241    
242                                  i = dev_pckbc_init(machine, mem, 0x80005000ULL,                  i = dev_pckbc_init(machine, mem, 0x80005000ULL,
243                                      PCKBC_JAZZ, 8 + 6, 8 + 7, machine->use_x11, 0);                      PCKBC_JAZZ, 8 + 6, 8 + 7,
244                        machine->use_x11, 0);
245                                  snprintf(tmpstr, sizeof(tmpstr), "ns16550 irq=16 addr=0x80006000 in_use=%i name2=tty0", machine->use_x11? 0 : 1);  
246                                  j = (size_t)device_add(machine, tmpstr);                  snprintf(tmpstr, sizeof(tmpstr),
247                                  snprintf(tmpstr, sizeof(tmpstr), "ns16550 irq=17 addr=0x80007000 in_use=%i name2=tty1", 0);                      "ns16550 irq=16 addr=0x80006000 in_use=%i"
248                                  device_add(machine, tmpstr);                      " name2=tty0", machine->use_x11? 0 : 1);
249                    j = (size_t)device_add(machine, tmpstr);
250                                  if (machine->use_x11)                  snprintf(tmpstr, sizeof(tmpstr),
251                                          machine->main_console_handle = i;                      "ns16550 irq=17 addr=0x80007000 in_use=%i"
252                                  else                      " name2=tty1", 0);
253                                          machine->main_console_handle = j;                  device_add(machine, tmpstr);
254    
255                                  switch (machine->machine_subtype) {                  if (machine->use_x11)
256                                  case MACHINE_ARC_JAZZ_PICA:                          machine->main_console_handle = i;
257                                          if (machine->use_x11) {                  else
258                                                  dev_vga_init(machine, mem,                          machine->main_console_handle = j;
259                                                      0x400a0000ULL, 0x600003c0ULL,  
260                                                      machine->machine_name);                  switch (machine->machine_subtype) {
261                                                  arcbios_console_init(machine,                  case MACHINE_ARC_JAZZ_PICA:
262                                                      0x400b8000ULL, 0x600003c0ULL);                          if (machine->use_x11) {
263                                          }                                  dev_vga_init(machine, mem, 0x400a0000ULL,
264                                          break;                                      0x600003c0ULL, machine->machine_name);
265                                  case MACHINE_ARC_JAZZ_MAGNUM:                                  arcbios_console_init(machine,
266                                          /*  PROM mirror?  */                                      0x400b8000ULL, 0x600003c0ULL);
267                                          dev_ram_init(machine, 0xfff00000, 0x100000,                          }
268                                              DEV_RAM_MIRROR | DEV_RAM_MIGHT_POINT_TO_DEVICES, 0x1fc00000);                          break;
269                    case MACHINE_ARC_JAZZ_MAGNUM:
270                                          /*  VXL. TODO  */                          /*  PROM mirror?  */
271                                          /*  control at 0x60100000?  */                          dev_ram_init(machine, 0xfff00000, 0x100000,
272                                          dev_fb_init(machine, mem, 0x60200000ULL,                              DEV_RAM_MIRROR | DEV_RAM_MIGHT_POINT_TO_DEVICES,
273                                              VFB_GENERIC, 1024,768, 1024,768,                              0x1fc00000);
274                                              8, "VXL");  
275                                          break;                          /*  VXL. TODO  */
276                                  }                          /*  control at 0x60100000?  */
277                            dev_fb_init(machine, mem, 0x60200000ULL,
278                                  /*  irq 8 + 4  */                              VFB_GENERIC, 1024,768, 1024,768, 8, "VXL");
279                                  device_add(machine, "sn addr=0x80001000 irq=12");                          break;
280                    }
281                                  dev_asc_init(machine, mem,  
282                                      0x80002000ULL, 8 + 5, NULL, DEV_ASC_PICA,                  /*  irq 8 + 4  */
283                                      dev_jazz_dma_controller,                  device_add(machine, "sn addr=0x80001000 irq=12");
284                                      machine->md_int.jazz_data);  
285                    dev_asc_init(machine, mem, 0x80002000ULL, 8 + 5, NULL,
286                        DEV_ASC_PICA, dev_jazz_dma_controller,
287                        machine->md_int.jazz_data);
288    
289                                  device_add(machine, "fdc addr=0x80003000, irq=0");                  device_add(machine, "fdc addr=0x80003000, irq=0");
290    
291                                  dev_mc146818_init(machine, mem,                  dev_mc146818_init(machine, mem,
292                                      0x80004000ULL, 2, MC146818_ARC_JAZZ, 1);                      0x80004000ULL, 2, MC146818_ARC_JAZZ, 1);
293    
294  #if 0  #if 0
295  Not yet.  Not yet.
296                                  /*  irq = 8+16 + 14  */                  /*  irq = 8+16 + 14  */
297                                  device_add(machine, "wdc addr=0x900001f0, irq=38");                  device_add(machine, "wdc addr=0x900001f0, irq=38");
298  #endif  #endif
299    
300                                  break;                  break;
301    
302            case MACHINE_ARC_JAZZ_M700:
303                    /*
304                     *  "Microsoft-Jazz", "Olivetti M700"
305                     *
306                     *  Different enough from Pica and Magnum to be
307                     *  separate here.
308                     *
309                     *  http://mail-index.netbsd.org/port-arc/2000/10/18/0001.html
310                     */
311    
312                    strlcat(machine->machine_name, " (Microsoft Jazz, "
313                        "Olivetti M700)", MACHINE_NAME_MAXBUF);
314    
315                          case MACHINE_ARC_JAZZ_M700:                  machine->md_int.jazz_data = device_add(machine,
316                                  /*                      "jazz addr=0x80000000");
317                                   *  "Microsoft-Jazz", "Olivetti M700"                  machine->md_interrupt = jazz_interrupt;
                                  *  
                                  *  Different enough from Pica and Magnum to be  
                                  *  separate here.  
                                  *  
                                  *  See http://mail-index.netbsd.org/port-arc/2000/10/18/0001.html.  
                                  */  
   
                                 strlcat(machine->machine_name, " (Microsoft Jazz, Olivetti M700)",  
                                     MACHINE_NAME_MAXBUF);  
   
                                 machine->md_int.jazz_data = device_add(machine,  
                                     "jazz addr=0x80000000");  
                                 machine->md_interrupt = jazz_interrupt;  
318    
319                                  dev_mc146818_init(machine, mem,                  dev_mc146818_init(machine, mem,
320                                      0x80004000ULL, 2, MC146818_ARC_JAZZ, 1);                      0x80004000ULL, 2, MC146818_ARC_JAZZ, 1);
321    
322                                  i = 0;          /*  TODO: Yuck!  */                  i = 0;          /*  TODO: Yuck!  */
323  #if 0  #if 0
324                                  i = dev_pckbc_init(machine, mem, 0x80005000ULL,                  i = dev_pckbc_init(machine, mem, 0x80005000ULL,
325                                      PCKBC_JAZZ, 8 + 6, 8 + 7, machine->use_x11, 0);                      PCKBC_JAZZ, 8 + 6, 8 + 7, machine->use_x11, 0);
326  #endif  #endif
327    
328                                  snprintf(tmpstr, sizeof(tmpstr), "ns16550 irq=16 addr=0x80006000 in_use=%i name2=tty0", machine->use_x11? 0 : 1);                  snprintf(tmpstr, sizeof(tmpstr), "ns16550 irq=16 addr="
329                                  j = (size_t)device_add(machine, tmpstr);                      "0x80006000 in_use=%i name2=tty0", machine->use_x11? 0 : 1);
330                                  snprintf(tmpstr, sizeof(tmpstr), "ns16550 irq=17 addr=0x80007000 in_use=%i name2=tty1", 0);                  j = (size_t)device_add(machine, tmpstr);
331                                  device_add(machine, tmpstr);                  snprintf(tmpstr, sizeof(tmpstr), "ns16550 irq=17 addr="
332                        "0x80007000 in_use=%i name2=tty1", 0);
333                                  if (machine->use_x11)                  device_add(machine, tmpstr);
334                                          machine->main_console_handle = i;  
335                                  else                  if (machine->use_x11)
336                                          machine->main_console_handle = j;                          machine->main_console_handle = i;
337                    else
338                                  dev_m700_fb_init(machine, mem,                          machine->main_console_handle = j;
339                                      0x180080000ULL, 0x100000000ULL);  
340                    dev_m700_fb_init(machine, mem, 0x180080000ULL, 0x100000000ULL);
341                                  break;  
342                    break;
343                          case MACHINE_ARC_DESKTECH_TYNE:  
344                                  /*          case MACHINE_ARC_DESKTECH_TYNE:
345                                   *  "Deskstation Tyne" (?)                  /*
346                                   *                   *  "Deskstation Tyne" (?)
347                                   *  TODO                   *
348                                   *  http://mail-index.netbsd.org/port-arc/2000/10/14/0000.html                   *  TODO
349                                   */                   *  http://mail-index.netbsd.org/port-arc/2000/10/14/0000.html
350                     */
351    
352                  strlcat(machine->machine_name, " (Deskstation Tyne)",                  strlcat(machine->machine_name, " (Deskstation Tyne)",
353                      MACHINE_NAME_MAXBUF);                      MACHINE_NAME_MAXBUF);
# Line 338  Not yet. Line 356  Not yet.
356                  bus_isa_init(machine, 0, 0x900000000ULL,                  bus_isa_init(machine, 0, 0x900000000ULL,
357                      0x100000000ULL, 8, 24);                      0x100000000ULL, 8, 24);
358  #if 0  #if 0
359                  snprintf(tmpstr, sizeof(tmpstr), "ns16550 irq=0 addr=0x9000003f8 in_use=%i name2=tty0", machine->use_x11? 0 : 1);                  snprintf(tmpstr, sizeof(tmpstr), "ns16550 irq=0 addr="
360                        "0x9000003f8 in_use=%i name2=tty0", machine->use_x11? 0:1);
361                  i = (size_t)device_add(machine, tmpstr);                  i = (size_t)device_add(machine, tmpstr);
362                  device_add(machine, "ns16550 irq=0 addr=0x9000002f8 in_use=0 name2=tty1");                  device_add(machine, "ns16550 irq=0 addr=0x9000002f8 in_use=0"
363                        " name2=tty1");
364  #endif  #endif
365                  device_add(machine, "ns16550 irq=0 addr=0x9000003e8 in_use=0 name2=tty2");                  device_add(machine, "ns16550 irq=0 addr=0x9000003e8 "
366                  device_add(machine, "ns16550 irq=0 addr=0x9000002e8 in_use=0 name2=tty3");                      "in_use=0 name2=tty2");
367                    device_add(machine, "ns16550 irq=0 addr=0x9000002e8 "
368                        "in_use=0 name2=tty3");
369  #if 0  #if 0
370                  dev_mc146818_init(machine, mem,                  dev_mc146818_init(machine, mem,
371                      0x900000070ULL, 2, MC146818_PC_CMOS, 1);                      0x900000070ULL, 2, MC146818_PC_CMOS, 1);

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

  ViewVC Help
Powered by ViewVC 1.1.26