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

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

revision 30 by dpavlin, Mon Oct 8 16:20:40 2007 UTC revision 34 by dpavlin, Mon Oct 8 16:21:17 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   *  Copyright (C) 2003-2006  Anders Gavare.  All rights reserved.   *  Copyright (C) 2003-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_cobalt.c,v 1.4 2006/08/12 19:31:36 debug Exp $   *  $Id: machine_cobalt.c,v 1.9 2007/01/21 21:02:57 debug Exp $
29   */   */
30    
31  #include <stdio.h>  #include <stdio.h>
32    #include <stdlib.h>
33  #include <string.h>  #include <string.h>
34    
35    #include "bus_isa.h"
36  #include "bus_pci.h"  #include "bus_pci.h"
37  #include "cpu.h"  #include "cpu.h"
38  #include "device.h"  #include "device.h"
39  #include "devices.h"  #include "devices.h"
40  #include "machine.h"  #include "machine.h"
 #include "machine_interrupts.h"  
41  #include "memory.h"  #include "memory.h"
42  #include "misc.h"  #include "misc.h"
43    
44    
45  MACHINE_SETUP(cobalt)  MACHINE_SETUP(cobalt)
46  {  {
47          char tmpstr[500];          char tmpstr[500], tmpstr2[500];
48          struct pci_data *pci_data;          struct pci_data *pci_data;
49          struct memory *mem = machine->memory;          struct memory *mem = machine->memory;
50    
# Line 65  MACHINE_SETUP(cobalt) Line 66  MACHINE_SETUP(cobalt)
66           *              interrupts at ISA interrupt 9.)           *              interrupts at ISA interrupt 9.)
67           */           */
68    
69          /*  ISA interrupt controllers:  */          /*  ISA bus at MIPS irq 6:  */
70          snprintf(tmpstr, sizeof(tmpstr), "8259 irq=24 addr=0x10000020");          snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].6",
71          machine->isa_pic_data.pic1 = device_add(machine, tmpstr);              machine->path, machine->bootstrap_cpu);
72          snprintf(tmpstr, sizeof(tmpstr), "8259 irq=24 addr=0x100000a0");          bus_isa_init(machine, tmpstr, 0, 0x10000000, 0x14000000 /* TODO */);
73          machine->isa_pic_data.pic2 = device_add(machine, tmpstr);  
74          machine->md_interrupt = isa8_interrupt;          snprintf(tmpstr, sizeof(tmpstr), "ns16550 irq=%s.cpu[%i].5"
75          machine->isa_pic_data.native_irq = 6;              " addr=0x1c800000 name2=tty0 in_use=1",
76                machine->path, machine->bootstrap_cpu);
77          dev_mc146818_init(machine, mem, 0x10000070, 0, MC146818_PC_CMOS, 4);          machine->main_console_handle = (size_t) device_add(machine, tmpstr);
78    
         machine->main_console_handle = (size_t) device_add(machine,  
             "ns16550 irq=5 addr=0x1c800000 name2=tty0 in_use=1");  
   
         /*  TODO: bus_isa_init() ?  */  
   
 #if 0  
         device_add(machine,  
             "ns16550 irq=0 addr=0x1f000010 name2=tty1 in_use=0");  
 #endif  
79    
80          /*          /*
81           *  According to NetBSD/cobalt:           *  According to NetBSD/cobalt:
# Line 99  MACHINE_SETUP(cobalt) Line 91  MACHINE_SETUP(cobalt)
91           *      VP) ATA33 cr           *      VP) ATA33 cr
92           *  tlp1 at pci0 dev 12 function 0: DECchip 21143 Ethernet, pass 4.1           *  tlp1 at pci0 dev 12 function 0: DECchip 21143 Ethernet, pass 4.1
93           *           *
94           *  The PCI controller interrupts at ISA interrupt 9.           *  The PCI controller interrupts at ISA interrupt 9. (TODO?)
95           */           */
96          pci_data = dev_gt_init(machine, mem, 0x14000000, 2, 8 + 9, 11);          snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].2",
97                machine->path, machine->bootstrap_cpu);
98            snprintf(tmpstr2, sizeof(tmpstr2), "%s.cpu[%i].6",
99                machine->path, machine->bootstrap_cpu);
100            pci_data = dev_gt_init(machine, mem, 0x14000000, tmpstr,
101                tmpstr2, 11);
102          bus_pci_add(machine, pci_data, mem, 0,  7, 0, "dec21143");          bus_pci_add(machine, pci_data, mem, 0,  7, 0, "dec21143");
103          /*  bus_pci_add(machine, pci_data, mem, 0,  8, 0, "symbios_860");          /*  bus_pci_add(machine, pci_data, mem, 0,  8, 0, "symbios_860");
104              PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_860  */              PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_860  */

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

  ViewVC Help
Powered by ViewVC 1.1.26