machine_pmax.cc Source File

Back to the index.

machine_pmax.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2003-2019 Anders Gavare. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are met:
6  *
7  * 1. Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * 3. The name of the author may not be used to endorse or promote products
13  * derived from this software without specific prior written permission.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25  * SUCH DAMAGE.
26  *
27  *
28  * COMMENT: Digital DECstation ("PMAX") machines
29  */
30 
31 #include <stdio.h>
32 #include <stdlib.h>
33 #include <string.h>
34 
35 #include "cpu.h"
36 #include "device.h"
37 #include "devices.h"
38 #include "diskimage.h"
39 #include "machine.h"
40 #include "machine_pmax.h"
41 #include "memory.h"
42 #include "misc.h"
43 
44 #include "thirdparty/dec_prom.h"
46 #include "thirdparty/dec_5100.h"
47 #include "thirdparty/dec_kn01.h"
48 #include "thirdparty/dec_kn02.h"
49 #include "thirdparty/dec_kn03.h"
50 #include "thirdparty/dec_kmin.h"
51 #include "thirdparty/dec_maxine.h"
52 
53 #define BOOTARG_BUFLEN 2000
54 
55 
57 {
58  const char *framebuffer_console_name, *serial_console_name;
59  char bootpath[200];
60  char *init_bootpath;
61  int color_fb_flag, i;
62  int boot_scsi_boardnumber = 3, boot_net_boardnumber = 3;
63  const char *turbochannel_default_gfx_card = "PMAG-BA";
64  /* PMAG-AA, -BA, -CA/DA/EA/FA, -JA, -RO, PMAGB-BA */
65  struct xx {
66  struct btinfo_magic a;
67  struct btinfo_bootpath b;
68  struct btinfo_symtab c;
69  } xx;
70  char tmpstr[1000];
71  struct vfb_data *fb;
72  struct memory *mem = machine->memory;
73  uint64_t addr;
74 
76 
77  /*
78  * Add an R2020 or R3220 writeback memory thing:
79  */
80  cpu->cd.mips.coproc[3] = mips_coproc_new(cpu, 3);
81 
82  /* There aren't really any good standard values... */
83  framebuffer_console_name = "osconsole=0,3";
84  serial_console_name = "osconsole=1";
85 
86  switch (machine->machine_subtype) {
87 
88  case MACHINE_DEC_PMAX_3100: /* type 1, KN01 */
89  /* Supposed to have 12MHz or 16.67MHz R2000 CPU, R2010 FPC,
90  R2020 Memory coprocessor */
91  machine->machine_name = strdup("DEC PMAX 3100 (KN01)");
92 
93  /* 12 MHz for 2100, 16.67 MHz for 3100 */
94  if (machine->emulated_hz == 0)
95  machine->emulated_hz = 16670000;
96 
97  if (machine->physical_ram_in_mb > 24)
98  fprintf(stderr, "WARNING! Real DECstation 3100 machines"
99  " cannot have more than 24MB RAM.\n");
100 
101  if ((machine->physical_ram_in_mb % 4) != 0)
102  fprintf(stderr, "WARNING! Real DECstation 3100 machines"
103  " have an integer multiple of 4 MBs of RAM.\n");
104 
105  /* 1 for color, 0 for mono. TODO: command line option? */
106  color_fb_flag = 1;
107 
108  /*
109  * According to NetBSD/pmax:
110  *
111  * pm0 at ibus0 addr 0xfc00000: 1024x864x1 (or x8 for color)
112  * dc0 at ibus0 addr 0x1c000000
113  * le0 at ibus0 addr 0x18000000: address 00:00:00:00:00:00
114  * sii0 at ibus0 addr 0x1a000000
115  * mcclock0 at ibus0 addr 0x1d000000: mc146818 or compatible
116  * 0x1e000000 = system status and control register
117  */
119  color_fb_flag? VFB_DEC_VFB02 : VFB_DEC_VFB01,
120  0,0,0,0,0, color_fb_flag? "VFB02":"VFB01");
122  &fb->color_plane_mask);
124  color_fb_flag);
125 
126  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].%i",
130  tmpstr, 4*1048576);
131 
132  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].%i",
135  KN01_SYS_SII_B_END, tmpstr);
136 
137  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].%i",
139  dev_dc7085_init(machine, mem, KN01_SYS_DZ, tmpstr,
141 
142  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].%i",
145  MC146818_DEC, 1);
146 
147  dev_kn01_init(mem, KN01_SYS_CSR, color_fb_flag);
148 
149  framebuffer_console_name = "osconsole=0,3"; /* fb,keyb */
150  serial_console_name = "osconsole=3"; /* 3 */
151  break;
152 
153  case MACHINE_DEC_3MAX_5000: /* type 2, KN02 */
154  /* Supposed to have 25MHz R3000 CPU, R3010 FPC, */
155  /* and a R3220 Memory coprocessor */
156  machine->machine_name = strdup("DECstation 5000/200 (3MAX, KN02)");
157 
158  if (machine->emulated_hz == 0)
159  machine->emulated_hz = 25000000;
160 
161  if (machine->physical_ram_in_mb < 8)
162  fprintf(stderr, "WARNING! Real KN02 machines do not "
163  "have less than 8MB RAM. Continuing anyway.\n");
164  if (machine->physical_ram_in_mb > 480)
165  fprintf(stderr, "WARNING! Real KN02 machines cannot "
166  "have more than 480MB RAM. Continuing anyway.\n");
167 
168  /* An R3220 memory thingy: */
169  cpu->cd.mips.coproc[3] = mips_coproc_new(cpu, 3);
170 
171  /*
172  * According to NetBSD/pmax:
173  * asc0 at tc0 slot 5 offset 0x0
174  * le0 at tc0 slot 6 offset 0x0
175  * ibus0 at tc0 slot 7 offset 0x0
176  * dc0 at ibus0 addr 0x1fe00000
177  * mcclock0 at ibus0 addr 0x1fe80000: mc146818
178  */
179 
180  /* KN02 mainbus (TurboChannel interrupt controller): */
181  snprintf(tmpstr, sizeof(tmpstr), "kn02 addr=0x%x "
182  "irq=%s.cpu[%i].2", (int) KN02_SYS_CSR,
184  device_add(machine, tmpstr);
185 
186  /*
187  * TURBOchannel slots 0, 1, and 2 are free for option cards.
188  * Let's put in zero or more graphics boards:
189  *
190  * TODO: It's also possible to have larger graphics cards that
191  * occupy several slots. How should this be solved nicely?
192  */
193 
194  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].2.kn02.%i",
198  machine->n_gfx_cards >= 1?
199  turbochannel_default_gfx_card : "",
200  tmpstr);
201 
202  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].2.kn02.%i",
206  machine->n_gfx_cards >= 2?
207  turbochannel_default_gfx_card : "",
208  tmpstr);
209 
210  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].2.kn02.%i",
214  machine->n_gfx_cards >= 3?
215  turbochannel_default_gfx_card : "",
216  tmpstr);
217 
218  /* TURBOchannel slots 3 and 4 are reserved. */
219 
220  /* TURBOchannel slot 5 is PMAZ-AA ("asc" SCSI). */
221  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].2.kn02.%i",
225  "PMAZ-AA", tmpstr);
226 
227  /* TURBOchannel slot 6 is PMAD-AA ("le" ethernet). */
228  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].2.kn02.%i",
232  "PMAD-AA", tmpstr);
233 
234  /* TURBOchannel slot 7 is system stuff. */
235  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].2.kn02.%i",
239  KN02_SYS_DZ, tmpstr, machine->x11_md.in_use);
240 
241  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].%i",
244  KN02_SYS_CLOCK, tmpstr, MC146818_DEC, 1);
245 
246  framebuffer_console_name = "osconsole=0,7";
247  /* fb,keyb */
248  serial_console_name = "osconsole=2";
249  boot_scsi_boardnumber = 5;
250  boot_net_boardnumber = 6; /* TODO: 3? */
251  break;
252 
253  case MACHINE_DEC_3MIN_5000: /* type 3, KN02BA */
254  machine->machine_name = strdup("DECstation 5000/112, 125, or 145 (3MIN,"
255  " KN02BA)");
256  if (machine->emulated_hz == 0)
257  machine->emulated_hz = 33000000;
258  if (machine->physical_ram_in_mb > 128)
259  fprintf(stderr, "WARNING! Real 3MIN machines cannot "
260  "have more than 128MB RAM. Continuing anyway.\n");
261 
262  /* KN02BA "3min" TurboChannel interrupt controller: */
263  snprintf(tmpstr, sizeof(tmpstr), "kn02ba irq=%s.cpu[%i].%i",
265  device_add(machine, tmpstr);
266 
267  /*
268  * tc0 at mainbus0: 12.5 MHz clock (0x10000000,slotsize=64MB)
269  * tc slot 1: 0x14000000
270  * tc slot 2: 0x18000000
271  * ioasic0 at tc0 slot 3 offset 0x0 (0x1c000000) slot 0
272  * asic regs (0x1c040000) slot 1
273  * station's ether address (0x1c080000) slot 2
274  * le0 at ioasic0 offset 0xc0000: address 00:00:00:00:00:00
275  * (0x1c0c0000) slot 3
276  * scc0 at ioasic0 offset 0x100000 (0x1c100000) slot 4
277  * scc1 at ioasic0 offset 0x180000: console(0x1c180000) slot 6
278  * mcclock0 at ioasic0 offset 0x200000: mc146818 or
279  * compatible (0x1c200000) slot 8
280  * asc0 at ioasic0 offset 0x300000: NCR53C94, 25MHz,
281  * SCSI ID 7 (0x1c300000) slot 12
282  * dma for asc0 (0x1c380000) slot 14
283  */
284 
285 ////fatal("TODO: kmin dev_le_init.\n");
286 ////abort();
287 // dev_le_init(machine, mem, 0x1c0c0000, 0, 0,
288 // KMIN_INTR_LANCE + 8, 4 * 65536);
289 
290  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].%i.kn02ba.0x%x",
292  dev_scc_init(machine, mem, 0x1c100000, tmpstr,
293  machine->x11_md.in_use, 0, 1);
294 
295  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].%i.kn02ba.0x%x",
297  dev_scc_init(machine, mem, 0x1c180000, tmpstr,
298  machine->x11_md.in_use, 1, 1);
299 
300 
301  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].%i.kn02ba.0x%x",
304  KMIN_SYS_CLOCK, tmpstr, MC146818_DEC, 1);
305 
306  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].%i.kn02ba.0x%x",
308  dev_asc_init(machine, mem, 0x1c300000, tmpstr,
309  NULL, DEV_ASC_DEC, NULL, NULL);
310 
311  /*
312  * TURBOchannel slots 0, 1, and 2 are free for
313  * option cards. These are by default filled with
314  * zero or more graphics boards.
315  *
316  * TODO: irqs
317  */
318 
319  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].%i",
323  machine->n_gfx_cards >= 1?
324  turbochannel_default_gfx_card : "",
325  tmpstr);
326 
327  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].%i",
331  machine->n_gfx_cards >= 2?
332  turbochannel_default_gfx_card : "",
333  tmpstr);
334 
335  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].%i",
339  machine->n_gfx_cards >= 3?
340  turbochannel_default_gfx_card : "",
341  tmpstr);
342 
343  /* (kmin shared irq numbers (IP) are offset by +8 in the
344  emulator) */
345  /* kmin_csr = dev_kmin_init(cpu, mem, KMIN_REG_INTR); */
346 
347  framebuffer_console_name = "osconsole=0,3"; /* fb,keyb(?) */
348  serial_console_name = "osconsole=3"; /* ? */
349  break;
350 
351  case MACHINE_DEC_3MAXPLUS_5000: /* type 4, KN03 */
352  machine->machine_name = strdup("DECsystem 5900 or 5000 (3MAX+) (KN03)");
353 
354  /* 5000/240 (KN03-GA, R3000): 40 MHz */
355  /* 5000/260 (KN05-NB, R4000): 60 MHz */
356  /* TODO: are both these type 4? */
357  if (machine->emulated_hz == 0)
358  machine->emulated_hz = 40000000;
359  if (machine->physical_ram_in_mb > 480)
360  fprintf(stderr, "WARNING! Real KN03 machines cannot "
361  "have more than 480MB RAM. Continuing anyway.\n");
362 
363  /* KN03 interrupts: */
364 fatal("TODO: Legacy rewrite\n");
365 abort();
366 // machine->md_interrupt = kn03_interrupt;
367 
368  /*
369  * tc0 at mainbus0: 25 MHz clock (slot 0) (0x1e000000)
370  * tc0 slot 1 (0x1e800000)
371  * tc0 slot 2 (0x1f000000)
372  * ioasic0 at tc0 slot 3 offset 0x0 (0x1f800000)
373  * something that has to do with interrupts? (?)(0x1f840000?)
374  * le0 at ioasic0 offset 0xc0000 (0x1f8c0000)
375  * scc0 at ioasic0 offset 0x100000 (0x1f900000)
376  * scc1 at ioasic0 offset 0x180000: console (0x1f980000)
377  * mcclock0 at ioasic0 offset 0x200000: mc146818 or
378  * compatible (0x1fa00000)
379  * asc0 at ioasic0 offset 0x300000: NCR53C94, 25MHz,
380  * SCSI ID 7 (0x1fb00000)
381  */
382 fatal("TODO: dec_ioasic legacy rewrite\n");
383 abort();
384 // machine->md_int.dec_ioasic_data = dev_dec_ioasic_init(cpu,
385 // mem, 0x1f800000, 0);
386 
387 fatal("TODO: kn03 dev_le_init rewrite\n");
388 abort();
389 // dev_le_init(machine, mem, KN03_SYS_LANCE, 0, 0,
390 // KN03_INTR_LANCE +8, 4 * 65536);
391 
392 fatal("TODO: dec_ioasic legacy rewrite\n");
393 abort();
394 // machine->md_int.dec_ioasic_data->dma_func[3] =
395 // dev_scc_dma_func;
396 // machine->md_int.dec_ioasic_data->dma_func_extra[2] =
397 // dev_scc_init(machine, mem, KN03_SYS_SCC_0,
398 // KN03_INTR_SCC_0 +8, machine->x11_md.in_use, 0, 1);
399 // machine->md_int.dec_ioasic_data->dma_func[2] =
400 // dev_scc_dma_func;
401 // machine->md_int.dec_ioasic_data->dma_func_extra[3] =
402 // dev_scc_init(machine, mem, KN03_SYS_SCC_1,
403 // KN03_INTR_SCC_1 +8, machine->x11_md.in_use, 1, 1);
404 
405 fatal("TODO: mc146818 irq\n");
406 abort();
407 // dev_mc146818_init(machine, mem, KN03_SYS_CLOCK, KN03_INT_RTC,
408 // MC146818_DEC, 1);
409 fatal("TODO: asc init rewrite\n");
410 abort();
411 // dev_asc_init(machine, mem, KN03_SYS_SCSI,
412 // KN03_INTR_SCSI +8, NULL, DEV_ASC_DEC, NULL, NULL);
413 
414  /*
415  * TURBOchannel slots 0, 1, and 2 are free for
416  * option cards. These are by default filled with
417  * zero or more graphics boards.
418  *
419  * TODO: irqs
420  */
421 fatal("TODO: turbochannel rewrite init\n");
422 abort();
423 #if 0
426  machine->n_gfx_cards >= 1?
427  turbochannel_default_gfx_card : "",
428  KN03_INTR_TC_0 +8);
429 
432  machine->n_gfx_cards >= 2?
433  turbochannel_default_gfx_card : "",
434  KN03_INTR_TC_1 +8);
435 
438  machine->n_gfx_cards >= 3?
439  turbochannel_default_gfx_card : "",
440  KN03_INTR_TC_2 +8);
441 #endif
442 
443  /* TODO: interrupts */
444  /* shared (turbochannel) interrupts are +8 */
445 
446  framebuffer_console_name = "osconsole=0,3"; /* fb,keyb(?) */
447  serial_console_name = "osconsole=3"; /* ? */
448  break;
449 
450  case MACHINE_DEC_5800: /* type 5, KN5800 */
451  machine->machine_name = strdup("DECsystem 5800");
452 
453  /* TODO: this is incorrect, banks multiply by 8 etc */
454  if (machine->physical_ram_in_mb < 48)
455  fprintf(stderr, "WARNING! 5800 will probably not run "
456  "with less than 48MB RAM. Continuing anyway.\n");
457 
458  /*
459  * According to
460  * http://www2.no.netbsd.org/ports/pmax/models.html,
461  * the 5800-series is based on VAX 6000/300.
462  */
463 
464  /*
465  * Ultrix might support SMP on this machine type.
466  *
467  * Something at 0x10000000.
468  * ssc serial console at 0x10140000, interrupt 2 (shared
469  * with XMI?).
470  * xmi 0 at address 0x11800000 (node x at offset x*0x80000)
471  * Clock uses interrupt 3 (shared with XMI?).
472  */
473 
474  device_add(machine, "dec5800 addr=0x10000000");
475  device_add(machine, "decbi addr=0x10000000");
476 
477  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].dec5800.28",
479  dev_ssc_init(machine, mem, 0x10140000,
480  tmpstr, machine->x11_md.in_use);
481 
482  dev_decxmi_init(mem, 0x11800000);
484 
485  break;
486 
487  case MACHINE_DEC_5400: /* type 6, KN210 */
488  machine->machine_name = strdup("DECsystem 5400 (KN210)");
489  /*
490  * Misc. info from the KN210 manual:
491  *
492  * Interrupt lines:
493  * irq5 fpu
494  * irq4 halt
495  * irq3 pwrfl -> mer1 -> mer0 -> wear
496  * irq2 100 Hz -> birq7
497  * irq1 dssi -> ni -> birq6
498  * irq0 birq5 -> console -> timers -> birq4
499  *
500  * Interrupt status register at 0x10048000.
501  * Main memory error status register at 0x1008140.
502  * Interval Timer Register (ITR) at 0x10084010.
503  * Q22 stuff at 0x10088000 - 0x1008ffff.
504  * TODR at 0x1014006c.
505  * TCR0 (timer control register 0) 0x10140100.
506  * TIR0 (timer interval register 0) 0x10140104.
507  * TCR1 (timer control register 1) 0x10140110.
508  * TIR1 (timer interval register 1) 0x10140114.
509  * VRR0 (Vector Read Register 0) at 0x16000050.
510  * VRR1 (Vector Read Register 1) at 0x16000054.
511  * VRR2 (Vector Read Register 2) at 0x16000058.
512  * VRR3 (Vector Read Register 3) at 0x1600005c.
513  */
514  /* ln (ethernet) at 0x10084x00 ? and 0x10120000 ? */
515  /* error registers (?) at 0x17000000 and 0x10080000 */
516  /* device_add(machine, "kn210 addr=0x10080000"); */
517  dev_ssc_init(machine, mem, 0x10140000, "irq? TODO",
519  break;
520 
521  case MACHINE_DEC_MAXINE_5000: /* type 7, KN02CA */
522  machine->machine_name = strdup("Personal DECstation 5000/xxx "
523  "(MAXINE) (KN02CA)");
524  if (machine->emulated_hz == 0)
525  machine->emulated_hz = 33000000;
526 
527  if (machine->physical_ram_in_mb < 8)
528  fprintf(stderr, "WARNING! Real KN02CA machines do not "
529  "have less than 8MB RAM. Continuing anyway.\n");
530  if (machine->physical_ram_in_mb > 40)
531  fprintf(stderr, "WARNING! Real KN02CA machines cannot "
532  "have more than 40MB RAM. Continuing anyway.\n");
533 
534  /* Maxine interrupts: */
535 fatal("TODO: Legacy rewrite\n");
536 abort();
537 
538 // machine->md_interrupt = maxine_interrupt;
539 
540  /*
541  * Something at address 0xca00000. (?)
542  * Something at address 0xe000000. (?)
543  * tc0 slot 0 (0x10000000)
544  * tc0 slot 1 (0x14000000)
545  * (tc0 slot 2 used by the framebuffer)
546  * ioasic0 at tc0 slot 3 offset 0x0 (0x1c000000)
547  * le0 at ioasic0 offset 0xc0000: address 00:00:00:00:00:00
548  * (0x1c0c0000)
549  * scc0 at ioasic0 offset 0x100000: console <-- serial
550  * (0x1c100000)
551  * mcclock0 at ioasic0 offset 0x200000: mc146818 (0x1c200000)
552  * isdn at ioasic0 offset 0x240000 not configured (0x1c240000)
553  * bba0 at ioasic0 offset 0x240000 (audio0 at bba0)
554  * ^--- which one of isdn and bba0?
555  * dtop0 at ioasic0 offset 0x280000 (0x1c280000)
556  * fdc at ioasic0 offset 0x2c0000 not configured
557  * ^-- floppy (0x1c2c0000)
558  * asc0 at ioasic0 offset 0x300000: NCR53C94, 25MHz, SCSI
559  * ID 7 (0x1c300000)
560  * xcfb0 at tc0 slot 2 offset 0x0: 1024x768x8
561  * built-in framebuffer (0xa000000)
562  */
563 fatal("TODO: dec_ioasic legacy rewrite\n");
564 abort();
565 // machine->md_int.dec_ioasic_data =
566 // dev_dec_ioasic_init(cpu, mem, 0x1c000000, 0);
567 
568 fatal("TODO: turbochannel rewrite!\n");
569 abort();
570 #if 0
571  /* TURBOchannel slots (0 and 1): */
573  0x10000000, 0x103fffff,
574  machine->n_gfx_cards >= 2?
575  turbochannel_default_gfx_card : "",
576  XINE_INTR_TC_0 +8);
578  0x14000000, 0x143fffff,
579  machine->n_gfx_cards >= 3?
580  turbochannel_default_gfx_card : "",
581  XINE_INTR_TC_1 +8);
582 
583  /*
584  * TURBOchannel slot 2 is hardwired to be used by
585  * the framebuffer: (NOTE: 0x8000000, not 0x18000000)
586  */
588  0x8000000, 0xbffffff, "PMAG-DV", 0);
589 #endif
590  /*
591  * TURBOchannel slot 3: fixed, ioasic
592  * (the system stuff), 0x1c000000
593  */
594 fatal("TODO: xine dev_le_init rewrite\n");
595 abort();
596 // dev_le_init(machine, mem, 0x1c0c0000, 0, 0,
597 // XINE_INTR_LANCE +8, 4*65536);
598 // dev_scc_init(machine, mem, 0x1c100000,
599 // XINE_INTR_SCC_0 +8, machine->x11_md.in_use, 0, 1);
600 fatal("TODO: mc146818 irq\n");
601 abort();
602 // dev_mc146818_init(machine, mem, 0x1c200000,
603 // XINE_INT_TOY, MC146818_DEC, 1);
604 fatal("TODO: xine asc init rewrite\n");
605 abort();
606 // dev_asc_init(machine, mem, 0x1c300000,
607 // XINE_INTR_SCSI +8, NULL, DEV_ASC_DEC, NULL, NULL);
608 
609  framebuffer_console_name = "osconsole=3,2"; /* keyb,fb? */
610  serial_console_name = "osconsole=3";
611  break;
612 
613  case MACHINE_DEC_5500: /* type 11, KN220 */
614  machine->machine_name = strdup("DECsystem 5500 (KN220)");
615 
616  /*
617  * According to NetBSD's pmax ports page:
618  * KN220-AA is a "30 MHz R3000 CPU with R3010 FPU"
619  * with "512 kBytes of Prestoserve battery backed RAM."
620  */
621  if (machine->emulated_hz == 0)
622  machine->emulated_hz = 30000000;
623 
624  /*
625  * See KN220 docs for more info.
626  *
627  * something at 0x10000000
628  * something at 0x10001000
629  * something at 0x10040000
630  * scc at 0x10140000
631  * qbus at (or around) 0x10080000
632  * dssi (disk controller) buffers at 0x10100000,
633  * registers at 0x10160000.
634  * sgec (ethernet) registers at 0x10008000, station
635  * addresss at 0x10120000.
636  * asc (scsi) at 0x17100000.
637  */
638 
639  dev_ssc_init(machine, mem, 0x10140000, "TODO: irq",
641 
642  /* something at 0x17000000, ultrix says "cpu 0 panic: "
643  "DS5500 I/O Board is missing" if this is not here */
644  dev_dec5500_ioboard_init(cpu, mem, 0x17000000);
645 
646  dev_sgec_init(mem, 0x10008000, 0); /* irq? */
647 
648  /* The asc controller might be TURBOchannel-ish? */
649 #if 0
650  dev_turbochannel_init(machine, mem, 0, 0x17100000,
651  0x171fffff, "PMAZ-AA", 0); /* irq? */
652 #else
653  dev_asc_init(machine, mem, 0x17100000, 0, NULL,
654  DEV_ASC_DEC, NULL, NULL); /* irq? */
655 #endif
656 
657  framebuffer_console_name = "osconsole=0,0"; /* TODO (?) */
658  serial_console_name = "osconsole=0";
659  break;
660 
661  case MACHINE_DEC_MIPSMATE_5100: /* type 12 */
662  machine->machine_name = strdup("DEC MIPSMATE 5100 (KN230)");
663 
664  if (machine->emulated_hz == 0)
665  machine->emulated_hz = 20000000;
666 
667  if (machine->physical_ram_in_mb > 128)
668  fprintf(stderr, "WARNING! Real MIPSMATE 5100 machines "
669  "cannot have more than 128MB RAM. Continuing"
670  " anyway.\n");
671 
672  if (machine->x11_md.in_use)
673  fprintf(stderr, "WARNING! Real MIPSMATE 5100 machines "
674  "cannot have a graphical framebuffer. "
675  "Continuing anyway.\n");
676 
677  /* KN230 mainbus / interrupt controller: */
678  snprintf(tmpstr, sizeof(tmpstr),
679  "kn230 addr=0x%" PRIx64, (uint64_t) KN230_SYS_ICSR);
680  device_add(machine, tmpstr);
681 
682  /*
683  * According to NetBSD/pmax:
684  * dc0 at ibus0 addr 0x1c000000
685  * le0 at ibus0 addr 0x18000000: address 00:00:00:00:00:00
686  * sii0 at ibus0 addr 0x1a000000
687  */
688 
689  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].%i",
692  MC146818_DEC, 1);
693 
694  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].kn230.0x%x",
697  tmpstr, machine->x11_md.in_use);
698 
699  /* dev_dc7085_init(machine, mem, KN230_SYS_DZ1,
700  KN230_CSR_INTR_OPT0, machine->x11_md.in_use); */
701  /* dev_dc7085_init(machine, mem, KN230_SYS_DZ2,
702  KN230_CSR_INTR_OPT1, machine->x11_md.in_use); */
703 
704  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].kn230.0x%x",
709  tmpstr, 4*1048576);
710 
711  snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].kn230.0x%x",
715 
716  serial_console_name = "osconsole=0";
717  break;
718 
719  default:fatal("Unknown DEC machine type: %i\n",
721  exit(1);
722  }
723 
724  /*
725  * Most OSes on DECstation use physical addresses below
726  * 0x20000000, but both OSF/1 and Sprite use 0xbe...... as if
727  * it was 0x1e......, so we need this hack:
728  */
729  dev_ram_init(machine, 0xa0000000, 0x20000000,
731 
732  if (!machine->prom_emulation)
733  return;
734 
735 
736  /* DECstation PROM stuff: (TODO: endianness) */
737  for (i=0; i<150; i++)
739  DEC_PROM_EMULATION + i*8);
740 
741  /* Fill PROM with special "magic trap" instructions: */
742  for (i=0; i<150; i++) {
744  0x00c0de0c); /* trap instruction */
746  0x00000000); /* nop */
747  }
748 
749  /* Jumptable at beginning of PROM: also "magic trap" instructions: */
750  for (i=0; i<0x180; i+=8) {
751  store_32bit_word(cpu, 0xbfc00000 + i,
752  0x00c0de0c); /* trap instruction */
753  store_32bit_word(cpu, 0xbfc00000 + i + 4,
754  0x00000000); /* nop */
755  }
756 
757 
758  /*
759  * According to dec_prom.h from NetBSD:
760  *
761  * "Programs loaded by the new PROMs pass the following arguments:
762  * a0 argc
763  * a1 argv
764  * a2 DEC_PROM_MAGIC
765  * a3 The callback vector defined below"
766  *
767  * So we try to emulate a PROM, even though no such thing has been
768  * loaded.
769  */
770 
771  cpu->cd.mips.gpr[MIPS_GPR_A0] = 3;
775 
778 
780  (DEC_PROM_INITIAL_ARGV + 0x10));
782  (DEC_PROM_INITIAL_ARGV + 0x70));
784  (DEC_PROM_INITIAL_ARGV + 0xe0));
786 
787  /*
788  * NetBSD and Ultrix expect the boot args to be like this:
789  *
790  * "boot" "bootdev" [args?]
791  *
792  * where bootdev is supposed to be "rz(0,0,0)netbsd" for
793  * 3100/2100 (although that crashes Ultrix :-/), and
794  * "5/rz0a/netbsd" for all others. The number '5' is the
795  * slot number of the boot device.
796  *
797  * 'rz' for disks, 'tz' for tapes.
798  */
799  {
800 #if 0
802  strlcpy(bootpath, "rz(0,0,0)", sizeof(bootpath));
803  else
804 #endif
805  strlcpy(bootpath, "X/rzY/", sizeof(bootpath));
806 
807  if (machine->bootdev_id < 0 || machine->force_netboot) {
808  /* tftp boot: */
809  strlcpy(bootpath, "5/tftp/", sizeof(bootpath));
810  bootpath[0] = '0' + boot_net_boardnumber;
811  } else {
812  /* disk boot: */
813  bootpath[0] = '0' + boot_scsi_boardnumber;
816  bootpath[2] = 't';
817  bootpath[4] = '0' + machine->bootdev_id;
818  }
819 
820  init_bootpath = bootpath;
821  }
822 
823  CHECK_ALLOCATION(machine->bootarg = (char *) malloc(BOOTARG_BUFLEN));
824  strlcpy(machine->bootarg, init_bootpath, BOOTARG_BUFLEN);
827  fprintf(stderr, "bootarg truncated?\n");
828  exit(1);
829  }
830 
831  machine->bootstr = strdup("boot");
832 
837 
838  /* Decrease the nr of args, if there are no args :-) */
839  if (machine->boot_string_argument == NULL ||
840  machine->boot_string_argument[0] == '\0')
841  cpu->cd.mips.gpr[MIPS_GPR_A0] --;
842 
843  if (machine->boot_string_argument[0] != '\0') {
844  strlcat(machine->bootarg, " ", BOOTARG_BUFLEN);
847  fprintf(stderr, "bootstr truncated?\n");
848  exit(1);
849  }
850  }
851 
852  xx.a.common.next = (char *)&xx.b - (char *)&xx;
853  xx.a.common.type = BTINFO_MAGIC;
854  xx.a.magic = BOOTINFO_MAGIC;
855 
856  xx.b.common.next = (char *)&xx.c - (char *)&xx.b;
857  xx.b.common.type = BTINFO_BOOTPATH;
858  strlcpy(xx.b.bootpath, machine->bootstr, sizeof(xx.b.bootpath));
859 
860  xx.c.common.next = 0;
861  xx.c.common.type = BTINFO_SYMTAB;
862  xx.c.nsym = 0;
863  xx.c.ssym = 0;
864  xx.c.esym = machine->file_loaded_end_addr;
865 
866  store_buf(cpu, BOOTINFO_ADDR, (char *)&xx, sizeof(xx));
867 
869  malloc(sizeof(struct machine_pmax)));
870  memset(machine->md.pmax, 0, sizeof(struct machine_pmax));
871 
872  /* The system's memmap: */
874  malloc(sizeof(struct dec_memmap)));
876  (unsigned char *)&machine->md.pmax->memmap->pagesize, 4096);
877 
878  for (unsigned int j=0; j<sizeof(machine->md.pmax->memmap->bitmap); j++)
879  machine->md.pmax->memmap->bitmap[j] = (j * 4096*8 <
880  1048576*machine->physical_ram_in_mb)? 0xff : 0x00;
881 
883  (char *)machine->md.pmax->memmap, sizeof(struct dec_memmap));
884 
885  /* Environment variables: */
887 
888  if (machine->x11_md.in_use && machine->n_gfx_cards > 0)
889  /* (0,3) Keyboard and Framebuffer */
890  add_environment_string(cpu, framebuffer_console_name, &addr);
891  else
892  /* Serial console */
893  add_environment_string(cpu, serial_console_name, &addr);
894 
895  /*
896  * The KN5800 (SMP system) uses a CCA (console communications
897  * area): (See VAX 6000 documentation for details.)
898  */
899  {
900  char tmps[300];
901  snprintf(tmps, sizeof(tmps), "cca=%" PRIx32,
902  (uint32_t) (DEC_DECCCA_BASEADDR + 0xa0000000ULL));
904  }
905 
906  /* These are needed for Sprite to boot: */
907  {
908  char tmps[500];
909 
910  snprintf(tmps, sizeof(tmps), "boot=%s", machine->bootarg);
911  tmps[sizeof(tmps)-1] = '\0';
913 
914  snprintf(tmps, sizeof(tmps), "bitmap=0x%" PRIx32, (uint32_t)
915  ( (DEC_MEMMAP_ADDR + sizeof(uint32_t) /* skip the
916  page size and point to the memmap */
917  ) & 0xffffffffULL) );
918  tmps[sizeof(tmps)-1] = '\0';
920 
921  snprintf(tmps, sizeof(tmps), "bitmaplen=0x%" PRIx32, (uint32_t)
922  ( machine->physical_ram_in_mb * 1048576 / 4096 / 8) );
923  tmps[sizeof(tmps)-1] = '\0';
925  }
926 
927  add_environment_string(cpu, "scsiid0=7", &addr);
928  add_environment_string(cpu, "bootmode=a", &addr);
929  add_environment_string(cpu, "testaction=q", &addr);
930  add_environment_string(cpu, "haltaction=h", &addr);
931  add_environment_string(cpu, "more=24", &addr);
932 
933  /* Used in at least Ultrix on the 5100: */
934  add_environment_string(cpu, "scsiid=7", &addr);
935  add_environment_string(cpu, "baud0=9600", &addr);
936  add_environment_string(cpu, "baud1=9600", &addr);
937  add_environment_string(cpu, "baud2=9600", &addr);
938  add_environment_string(cpu, "baud3=9600", &addr);
939  add_environment_string(cpu, "iooption=0x1", &addr);
940 
941  /* The end: */
943 }
944 
945 
947 {
948  if (machine->machine_subtype > 2)
949  CHECK_ALLOCATION(machine->cpu_name = strdup("R3000A"));
950 
951  if (machine->machine_subtype > 1 && machine->cpu_name == NULL)
952  CHECK_ALLOCATION(machine->cpu_name = strdup("R3000"));
953 
954  if (machine->cpu_name == NULL)
955  CHECK_ALLOCATION(machine->cpu_name = strdup("R2000"));
956 }
957 
958 
960 {
961  switch (machine->machine_subtype) {
964  break;
967  break;
968  default:machine->physical_ram_in_mb = 32;
969  }
970 }
971 
972 
974 {
975  MR_DEFAULT(pmax, "DECstation/DECsystem", ARCH_MIPS, MACHINE_PMAX);
976 
977  machine_entry_add_alias(me, "decstation");
978  machine_entry_add_alias(me, "decsystem");
979  machine_entry_add_alias(me, "dec");
980 
981  machine_entry_add_subtype(me, "DECstation 3100 (PMAX)",
982  MACHINE_DEC_PMAX_3100, "pmax", "3100", "2100", NULL);
983 
984  machine_entry_add_subtype(me, "DECstation 5000/200 (3MAX)",
985  MACHINE_DEC_3MAX_5000, "3max", "5000/200", NULL);
986 
987  machine_entry_add_subtype(me, "DECstation 5000/1xx (3MIN)",
988  MACHINE_DEC_3MIN_5000, "3min", "5000/1xx", NULL);
989 
990  machine_entry_add_subtype(me, "DECstation 5000 (3MAXPLUS)",
991  MACHINE_DEC_3MAXPLUS_5000, "3maxplus", "3max+", NULL);
992 
993  machine_entry_add_subtype(me, "DECsystem 58x0",
994  MACHINE_DEC_5800, "5800", "58x0", NULL);
995 
996  machine_entry_add_subtype(me, "DECsystem 5400",
997  MACHINE_DEC_5400, "5400", NULL);
998 
999  machine_entry_add_subtype(me, "DECstation Maxine (5000)",
1000  MACHINE_DEC_MAXINE_5000, "maxine", NULL);
1001 
1002  machine_entry_add_subtype(me, "DECsystem 5500",
1003  MACHINE_DEC_5500, "5500", NULL);
1004 
1005  machine_entry_add_subtype(me, "DECstation MipsMate (5100)",
1006  MACHINE_DEC_MIPSMATE_5100, "5100", "mipsmate", NULL);
1007 
1008  me->set_default_ram = machine_default_ram_pmax;
1009 }
1010 
machine::bootdev_type
int bootdev_type
Definition: machine.h:153
XINE_INTR_TC_0
#define XINE_INTR_TC_0
Definition: dec_maxine.h:293
KN01_SYS_DZ
#define KN01_SYS_DZ
Definition: dec_kn01.h:142
machine::machine_subtype
int machine_subtype
Definition: machine.h:112
MIPS_GPR_A0
#define MIPS_GPR_A0
Definition: cpu_mips.h:138
mips_cpu::coproc
struct mips_coproc * coproc[N_MIPS_COPROCS]
Definition: cpu_mips.h:219
KN230_SYS_SII_B_END
#define KN230_SYS_SII_B_END
Definition: dec_5100.h:72
machine::bootstrap_cpu
int bootstrap_cpu
Definition: machine.h:136
BTINFO_MAGIC
#define BTINFO_MAGIC
Definition: dec_bootinfo.h:54
machine::file_loaded_end_addr
uint64_t file_loaded_end_addr
Definition: machine.h:169
KN01_SYS_SII
#define KN01_SYS_SII
Definition: dec_kn01.h:139
machine::bootarg
char * bootarg
Definition: machine.h:156
VFB_DEC_VFB01
#define VFB_DEC_VFB01
Definition: devices.h:192
KN03_PHYS_TC_2_END
#define KN03_PHYS_TC_2_END
Definition: dec_kn03.h:100
BOOTINFO_ADDR
#define BOOTINFO_ADDR
Definition: dec_bootinfo.h:46
BOOTINFO_MAGIC
#define BOOTINFO_MAGIC
Definition: dec_bootinfo.h:39
KN01_SYS_LANCE_B_END
#define KN01_SYS_LANCE_B_END
Definition: dec_kn01.h:138
dev_le_init
void dev_le_init(struct machine *machine, struct memory *mem, uint64_t baseaddr, uint64_t buf_start, uint64_t buf_end, const char *irq_path, int len)
Definition: dev_le.cc:759
KN01_SYS_CSR
#define KN01_SYS_CSR
Definition: dec_kn01.h:144
KN02_PHYS_TC_1_END
#define KN02_PHYS_TC_1_END
Definition: dec_kn02.h:123
KN230_SYS_LANCE_B_START
#define KN230_SYS_LANCE_B_START
Definition: dec_5100.h:67
KN03_PHYS_TC_0_START
#define KN03_PHYS_TC_0_START
Definition: dec_kn03.h:93
store_buf
void store_buf(struct cpu *cpu, uint64_t addr, const char *s, size_t len)
Definition: memory.cc:826
diskimage.h
vfb_data::rgb_palette
unsigned char rgb_palette[256 *3]
Definition: devices.h:223
KN02_PHYS_TC_1_START
#define KN02_PHYS_TC_1_START
Definition: dec_kn02.h:122
memory
Definition: memory.h:75
dec_prom.h
KN02_SYS_CLOCK
#define KN02_SYS_CLOCK
Definition: dec_kn02.h:159
KMIN_PHYS_TC_1_START
#define KMIN_PHYS_TC_1_START
Definition: dec_kmin.h:129
MACHINE_DEC_5400
#define MACHINE_DEC_5400
Definition: machine.h:269
KN230_SYS_ICSR
#define KN230_SYS_ICSR
Definition: dec_5100.h:78
KN230_CSR_INTR_DZ0
#define KN230_CSR_INTR_DZ0
Definition: dec_5100.h:92
vfb_data::color_plane_mask
unsigned char color_plane_mask
Definition: devices.h:210
DEV_RAM_MIRROR
#define DEV_RAM_MIRROR
Definition: devices.h:365
KN02_PHYS_TC_5_START
#define KN02_PHYS_TC_5_START
Definition: dec_kn02.h:134
add_environment_string
void add_environment_string(struct cpu *cpu, const char *s, uint64_t *addr)
Definition: memory.cc:710
dec_bootinfo.h
KN230_SYS_SII_B_START
#define KN230_SYS_SII_B_START
Definition: dec_5100.h:71
MIPS_GPR_A1
#define MIPS_GPR_A1
Definition: cpu_mips.h:139
mips_coproc_new
struct mips_coproc * mips_coproc_new(struct cpu *cpu, int coproc_nr)
Definition: cpu_mips_coproc.cc:356
KMIN_PHYS_TC_2_START
#define KMIN_PHYS_TC_2_START
Definition: dec_kmin.h:132
cpu::byte_order
uint8_t byte_order
Definition: cpu.h:347
BTINFO_SYMTAB
#define BTINFO_SYMTAB
Definition: dec_bootinfo.h:56
KN03_PHYS_TC_0_END
#define KN03_PHYS_TC_0_END
Definition: dec_kn03.h:94
addr
uint32_t addr
Definition: tmp_arm_multi.cc:52
dev_dec5500_ioboard_init
struct dec5500_ioboard_data * dev_dec5500_ioboard_init(struct cpu *cpu, struct memory *mem, uint64_t baseaddr)
Definition: dev_kn220.cc:168
KMIN_INT_TC1
#define KMIN_INT_TC1
Definition: dec_kmin.h:168
machine::prom_emulation
int prom_emulation
Definition: machine.h:149
cpu::mips
struct mips_cpu mips
Definition: cpu.h:446
KN03_INTR_TC_1
#define KN03_INTR_TC_1
Definition: dec_kn03.h:200
KN230_SYS_LANCE
#define KN230_SYS_LANCE
Definition: dec_5100.h:66
KMIN_INTR_SCC_0
#define KMIN_INTR_SCC_0
Definition: dec_kmin.h:280
device.h
MACHINE_REGISTER
MACHINE_REGISTER(pmax)
Definition: machine_pmax.cc:973
DEC_PROM_MAGIC
#define DEC_PROM_MAGIC
Definition: dec_prom.h:86
machine::boot_string_argument
char * boot_string_argument
Definition: machine.h:171
MACHINE_DEC_MIPSMATE_5100
#define MACHINE_DEC_MIPSMATE_5100
Definition: machine.h:272
KN02_PHYS_TC_2_START
#define KN02_PHYS_TC_2_START
Definition: dec_kn02.h:125
KMIN_PHYS_TC_1_END
#define KMIN_PHYS_TC_1_END
Definition: dec_kmin.h:130
KN03_PHYS_TC_1_END
#define KN03_PHYS_TC_1_END
Definition: dec_kn03.h:97
BTINFO_BOOTPATH
#define BTINFO_BOOTPATH
Definition: dec_bootinfo.h:55
KN01_SYS_SII_B_START
#define KN01_SYS_SII_B_START
Definition: dec_kn01.h:140
diskimage_is_a_tape
int diskimage_is_a_tape(struct machine *machine, int id, int type)
Definition: diskimage.cc:1081
ARCH_MIPS
#define ARCH_MIPS
Definition: machine.h:203
machine_pmax::memmap
struct dec_memmap * memmap
Definition: machine_pmax.h:38
fatal
void fatal(const char *fmt,...)
Definition: main.cc:152
MACHINE_SETUP
MACHINE_SETUP(pmax)
Definition: machine_pmax.cc:56
machine::cpu_name
char * cpu_name
Definition: machine.h:133
KN01_SYS_SII_B_END
#define KN01_SYS_SII_B_END
Definition: dec_kn01.h:141
machine_entry_add_subtype
void machine_entry_add_subtype(struct machine_entry *me, const char *name, int oldstyle_subtype,...)
Definition: machine.cc:717
x11_md::in_use
int in_use
Definition: machine.h:82
misc.h
btinfo_bootpath
Definition: dec_bootinfo.h:64
KN03_PHYS_TC_1_START
#define KN03_PHYS_TC_1_START
Definition: dec_kn03.h:96
MIPS_GPR_A3
#define MIPS_GPR_A3
Definition: cpu_mips.h:141
KN230_CSR_INTR_LANCE
#define KN230_CSR_INTR_LANCE
Definition: dec_5100.h:88
KN01_SYS_CLOCK
#define KN01_SYS_CLOCK
Definition: dec_kn01.h:143
KN02_PHYS_TC_2_END
#define KN02_PHYS_TC_2_END
Definition: dec_kn02.h:126
KN02_PHYS_TC_5_END
#define KN02_PHYS_TC_5_END
Definition: dec_kn02.h:135
cpu::cd
union cpu::@1 cd
device_add
void * device_add(struct machine *machine, const char *name_and_params)
Definition: device.cc:252
MACHINE_DEC_3MIN_5000
#define MACHINE_DEC_3MIN_5000
Definition: machine.h:266
machine.h
machine
Definition: machine.h:97
machine::main_console_handle
int main_console_handle
Definition: machine.h:128
KMIN_INT_TC2
#define KMIN_INT_TC2
Definition: dec_kmin.h:167
KN02_PHYS_TC_6_END
#define KN02_PHYS_TC_6_END
Definition: dec_kn02.h:138
KN03_INTR_TC_0
#define KN03_INTR_TC_0
Definition: dec_kn03.h:199
dev_deccca_init
void dev_deccca_init(struct memory *mem, uint64_t baseaddr)
Definition: dev_dec5800.cc:389
MR_DEFAULT
#define MR_DEFAULT(x, name, arch, type)
Definition: machine.h:373
machine::force_netboot
int force_netboot
Definition: machine.h:167
dev_ssc_init
void dev_ssc_init(struct machine *machine, struct memory *mem, uint64_t baseaddr, const char *irq_path, int use_fb)
Definition: dev_ssc.cc:225
KN02_INT_CLOCK
#define KN02_INT_CLOCK
Definition: dec_kn02.h:171
store_string
void store_string(struct cpu *cpu, uint64_t addr, const char *s)
Definition: memory.cc:695
KN01_PHYS_COLMASK_START
#define KN01_PHYS_COLMASK_START
Definition: dec_kn01.h:127
XINE_INTR_TC_1
#define XINE_INTR_TC_1
Definition: dec_maxine.h:300
KMIN_INTR_CLOCK
#define KMIN_INTR_CLOCK
Definition: dec_kmin.h:281
dec_kn01.h
dev_colorplanemask_init
void dev_colorplanemask_init(struct memory *mem, uint64_t baseaddr, unsigned char *color_plane_mask)
Definition: dev_colorplanemask.cc:83
machine::x11_md
struct x11_md x11_md
Definition: machine.h:179
btinfo_symtab
Definition: dec_bootinfo.h:69
DEC_DECCCA_BASEADDR
#define DEC_DECCCA_BASEADDR
Definition: devices.h:178
cpu.h
machine::pmax
struct machine_pmax * pmax
Definition: machine.h:184
machine::path
char * path
Definition: machine.h:108
dev_scc_init
void * dev_scc_init(struct machine *machine, struct memory *mem, uint64_t baseaddr, char *irq_path, int use_fb, int scc_nr, int addrmul)
Definition: dev_scc.cc:461
KN230_SYS_DZ0
#define KN230_SYS_DZ0
Definition: dec_5100.h:74
machine::bootdev_id
int bootdev_id
Definition: machine.h:154
DEC_PROM_INITIAL_ARGV
#define DEC_PROM_INITIAL_ARGV
Definition: machine.h:276
dec_memmap::pagesize
uint32_t pagesize
Definition: dec_prom.h:89
MACHINE_DEFAULT_RAM
MACHINE_DEFAULT_RAM(pmax)
Definition: machine_pmax.cc:959
machine::memory
struct memory * memory
Definition: machine.h:126
machine::physical_ram_in_mb
uint32_t physical_ram_in_mb
Definition: machine.h:147
dec_maxine.h
KMIN_PHYS_TC_0_END
#define KMIN_PHYS_TC_0_END
Definition: dec_kmin.h:127
dev_sgec_init
void dev_sgec_init(struct memory *mem, uint64_t baseaddr, int irq_nr)
Definition: dev_kn220.cc:151
EMUL_LITTLE_ENDIAN
#define EMUL_LITTLE_ENDIAN
Definition: misc.h:164
MACHINE_DEC_5500
#define MACHINE_DEC_5500
Definition: machine.h:271
machine::boot_kernel_filename
char * boot_kernel_filename
Definition: machine.h:170
KN01_SYS_LANCE
#define KN01_SYS_LANCE
Definition: dec_kn01.h:136
machine_pmax.h
dev_asc_init
void dev_asc_init(struct machine *machine, struct memory *mem, uint64_t baseaddr, const char *irq_path, void *turbochannel, int mode, size_t(*dma_controller)(void *dma_controller_data, unsigned char *data, size_t len, int writeflag), void *dma_controller_data)
Definition: dev_asc.cc:1226
DEV_RAM_MIGHT_POINT_TO_DEVICES
#define DEV_RAM_MIGHT_POINT_TO_DEVICES
Definition: devices.h:366
KN01_PHYS_FBUF_START
#define KN01_PHYS_FBUF_START
Definition: dec_kn01.h:123
DEC_PROM_EMULATION
#define DEC_PROM_EMULATION
Definition: machine.h:275
DEC_MEMMAP_ADDR
#define DEC_MEMMAP_ADDR
Definition: machine.h:279
MACHINE_DEC_5800
#define MACHINE_DEC_5800
Definition: machine.h:268
MACHINE_DEC_PMAX_3100
#define MACHINE_DEC_PMAX_3100
Definition: machine.h:264
KN03_PHYS_TC_2_START
#define KN03_PHYS_TC_2_START
Definition: dec_kn03.h:99
KMIN_INT_TC3
#define KMIN_INT_TC3
Definition: dec_kmin.h:166
KN01_SYS_VDAC
#define KN01_SYS_VDAC
Definition: dec_kn01.h:134
KMIN_INTR_SCSI
#define KMIN_INTR_SCSI
Definition: dec_kmin.h:277
store_32bit_word
int store_32bit_word(struct cpu *cpu, uint64_t addr, uint64_t data32)
Definition: memory.cc:783
machine_pmax
Definition: machine_pmax.h:37
KN02_PHYS_TC_0_START
#define KN02_PHYS_TC_0_START
Definition: dec_kn02.h:119
dec_memmap::bitmap
u_char bitmap[15360]
Definition: dec_prom.h:90
dev_kn01_init
void dev_kn01_init(struct memory *mem, uint64_t baseaddr, int color_fb)
Definition: dev_kn01.cc:252
INITIAL_STACK_POINTER
#define INITIAL_STACK_POINTER
Definition: cpu_mips.h:69
mips_cpu::gpr
uint64_t gpr[N_MIPS_GPRS]
Definition: cpu_mips.h:209
dec_memmap
Definition: dec_prom.h:88
MACHINE_PMAX
#define MACHINE_PMAX
Definition: machine.h:213
MACHINE_DEC_3MAXPLUS_5000
#define MACHINE_DEC_3MAXPLUS_5000
Definition: machine.h:267
store_32bit_word_in_host
void store_32bit_word_in_host(struct cpu *cpu, unsigned char *data, uint64_t data32)
Definition: memory.cc:973
MC146818_DEC
#define MC146818_DEC
Definition: devices.h:302
MIPS_GPR_A2
#define MIPS_GPR_A2
Definition: cpu_mips.h:140
dev_dc7085_init
int dev_dc7085_init(struct machine *machine, struct memory *mem, uint64_t baseaddr, char *irq_path, int use_fb)
Definition: dev_dc7085.cc:298
DEC_PROM_CALLBACK_STRUCT
#define DEC_PROM_CALLBACK_STRUCT
Definition: machine.h:274
KMIN_INTR_SCC_1
#define KMIN_INTR_SCC_1
Definition: dec_kmin.h:279
dev_vdac_init
void dev_vdac_init(struct memory *mem, uint64_t baseaddr, unsigned char *rgb_palette, int color_fb_flag)
Definition: dev_kn01.cc:233
KN230_SYS_CLOCK
#define KN230_SYS_CLOCK
Definition: dec_5100.h:76
dev_turbochannel_init
void dev_turbochannel_init(struct machine *machine, struct memory *mem, int slot_nr, uint64_t baseaddr, uint64_t endaddr, const char *device_name, const char *irq_path)
Definition: dev_turbochannel.cc:174
machine::emulated_hz
int emulated_hz
Definition: machine.h:165
btinfo_magic
Definition: dec_bootinfo.h:58
KN02_SYS_DZ
#define KN02_SYS_DZ
Definition: dec_kn02.h:158
VFB_DEC_VFB02
#define VFB_DEC_VFB02
Definition: devices.h:193
dec_kn02.h
machine::bootstr
char * bootstr
Definition: machine.h:155
dev_sii_init
void dev_sii_init(struct machine *machine, struct memory *mem, uint64_t baseaddr, uint64_t buf_start, uint64_t buf_end, char *irq_path)
Definition: dev_sii.cc:440
KN03_INTR_TC_2
#define KN03_INTR_TC_2
Definition: dec_kn03.h:201
MACHINE_DEC_3MAX_5000
#define MACHINE_DEC_3MAX_5000
Definition: machine.h:265
KN02_SYS_CSR
#define KN02_SYS_CSR
Definition: dec_kn02.h:160
KN02_PHYS_TC_0_END
#define KN02_PHYS_TC_0_END
Definition: dec_kn02.h:120
dec_kmin.h
DEV_ASC_DEC
#define DEV_ASC_DEC
Definition: devices.h:116
KN01_INT_DZ
#define KN01_INT_DZ
Definition: dec_kn01.h:154
devices.h
MACHINE_DEC_MAXINE_5000
#define MACHINE_DEC_MAXINE_5000
Definition: machine.h:270
machine::machine_name
const char * machine_name
Definition: machine.h:115
dev_mc146818_init
void dev_mc146818_init(struct machine *machine, struct memory *mem, uint64_t baseaddr, char *irq_path, int access_style, int addrdiv)
Definition: dev_mc146818.cc:587
cpu
Definition: cpu.h:326
KN01_SYS_LANCE_B_START
#define KN01_SYS_LANCE_B_START
Definition: dec_kn01.h:137
machine::md
union machine::@2 md
KN02_PHYS_TC_6_START
#define KN02_PHYS_TC_6_START
Definition: dec_kn02.h:137
KMIN_PHYS_TC_2_END
#define KMIN_PHYS_TC_2_END
Definition: dec_kmin.h:133
KMIN_INT_TC0
#define KMIN_INT_TC0
Definition: dec_kmin.h:169
MACHINE_DEFAULT_CPU
MACHINE_DEFAULT_CPU(pmax)
Definition: machine_pmax.cc:946
dev_decxmi_init
void dev_decxmi_init(struct memory *mem, uint64_t baseaddr)
Definition: dev_dec5800.cc:501
machine::n_gfx_cards
int n_gfx_cards
Definition: machine.h:173
KN230_SYS_LANCE_B_END
#define KN230_SYS_LANCE_B_END
Definition: dec_5100.h:68
DEC_PROM_STRINGS
#define DEC_PROM_STRINGS
Definition: machine.h:277
KN230_SYS_SII
#define KN230_SYS_SII
Definition: dec_5100.h:70
dec_kn03.h
machine_entry_add_alias
void machine_entry_add_alias(struct machine_entry *me, const char *name)
Definition: machine.cc:697
vfb_data
Definition: devices.h:198
KN01_INT_LANCE
#define KN01_INT_LANCE
Definition: dec_kn01.h:155
dev_ram_init
void dev_ram_init(struct machine *machine, uint64_t baseaddr, uint64_t length, int mode, uint64_t otheraddress, const char *name)
Definition: dev_ram.cc:146
KMIN_PHYS_TC_0_START
#define KMIN_PHYS_TC_0_START
Definition: dec_kmin.h:126
memory.h
dec_5100.h
KMIN_SYS_CLOCK
#define KMIN_SYS_CLOCK
Definition: dec_kmin.h:155
KN01_INT_SII
#define KN01_INT_SII
Definition: dec_kn01.h:156
BOOTARG_BUFLEN
#define BOOTARG_BUFLEN
Definition: machine_pmax.cc:53
dev_fb_init
struct vfb_data * dev_fb_init(struct machine *machine, struct memory *mem, uint64_t baseaddr, int vfb_type, int visible_xsize, int visible_ysize, int xsize, int ysize, int bit_depth, const char *name)
Definition: dev_fb.cc:834
KN01_INT_CLOCK
#define KN01_INT_CLOCK
Definition: dec_kn01.h:153
KN230_CSR_INTR_SII
#define KN230_CSR_INTR_SII
Definition: dec_5100.h:89
CHECK_ALLOCATION
#define CHECK_ALLOCATION(ptr)
Definition: misc.h:239

Generated on Tue Aug 25 2020 19:25:06 for GXemul by doxygen 1.8.18