1 |
/* |
/* |
2 |
* Copyright (C) 2006 Anders Gavare. All rights reserved. |
* Copyright (C) 2006-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: |
25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: machine_mvmeppc.c,v 1.8 2006/02/02 19:30:14 debug Exp $ |
* $Id: machine_mvmeppc.c,v 1.18 2007/01/28 14:15:30 debug Exp $ |
29 |
* |
* |
30 |
* MVMEPPC machines (for experimenting with NetBSD/mvmeppc or RTEMS). |
* MVMEPPC machines (for experimenting with NetBSD/mvmeppc or RTEMS). |
31 |
* (ftp://ftp.netbsd.org/pub/NetBSD/arch/mvmeppc/snapshot/20020302/README) |
* (ftp://ftp.netbsd.org/pub/NetBSD/arch/mvmeppc/snapshot/20020302/README) |
48 |
#include "devices.h" |
#include "devices.h" |
49 |
#include "diskimage.h" |
#include "diskimage.h" |
50 |
#include "machine.h" |
#include "machine.h" |
|
#include "machine_interrupts.h" |
|
51 |
#include "memory.h" |
#include "memory.h" |
52 |
#include "misc.h" |
#include "misc.h" |
53 |
|
|
54 |
|
|
55 |
MACHINE_SETUP(mvmeppc) |
MACHINE_SETUP(mvmeppc) |
56 |
{ |
{ |
57 |
|
char tmpstr[300]; |
58 |
struct pci_data *pci_data = NULL; |
struct pci_data *pci_data = NULL; |
59 |
|
|
60 |
switch (machine->machine_subtype) { |
switch (machine->machine_subtype) { |
62 |
case MACHINE_MVMEPPC_1600: |
case MACHINE_MVMEPPC_1600: |
63 |
machine->machine_name = "MVME1600"; |
machine->machine_name = "MVME1600"; |
64 |
|
|
65 |
machine->md_int.prep_data = device_add(machine, "prep"); |
fatal("TODO: Legacy rewrite\n"); |
66 |
machine->isa_pic_data.native_irq = 1; /* Semi-bogus */ |
abort(); |
67 |
machine->md_interrupt = isa32_interrupt; |
// machine->md_interrupt = isa32_interrupt; |
68 |
|
// machine->md_int.prep_data = device_add(machine, "prep"); |
69 |
pci_data = dev_eagle_init(machine, machine->memory, |
// machine->isa_pic_data.native_irq = 1; /* Semi-bogus */ |
70 |
32 /* isa irq base */, 0 /* pci irq: TODO */); |
|
71 |
|
snprintf(tmpstr, sizeof(tmpstr), "eagle irq=%s.cpu[%i]", |
72 |
bus_isa_init(machine, BUS_ISA_LPTBASE_3BC, |
machine->path, machine->bootstrap_cpu); |
73 |
0x80000000, 0xc0000000, 32, 48); |
device_add(machine, tmpstr); |
74 |
|
|
75 |
bus_pci_add(machine, pci_data, machine->memory, |
bus_pci_add(machine, pci_data, machine->memory, |
76 |
0, 14, 0, "dec21143"); |
0, 14, 0, "dec21143"); |
106 |
|
|
107 |
/* GT64260 interrupt and PCI controller: */ |
/* GT64260 interrupt and PCI controller: */ |
108 |
pci_data = dev_gt_init(machine, machine->memory, |
pci_data = dev_gt_init(machine, machine->memory, |
109 |
0xf1000000, 0 /* TODO: irq */, 0 /* TODO: pciirq */, 260); |
0xf1000000, "TODO: timer irq", "TODO: isa irq", 260); |
110 |
|
|
111 |
/* TODO: irq */ |
/* TODO: irq */ |
112 |
device_add(machine, "ns16550 irq=0 addr=0xf1120000"); |
device_add(machine, "ns16550 irq=0 addr=0xf1120000"); |
186 |
|
|
187 |
MACHINE_REGISTER(mvmeppc) |
MACHINE_REGISTER(mvmeppc) |
188 |
{ |
{ |
189 |
MR_DEFAULT(mvmeppc, "MVME", ARCH_PPC, MACHINE_MVMEPPC, 1, 3); |
MR_DEFAULT(mvmeppc, "MVME", ARCH_PPC, MACHINE_MVMEPPC); |
190 |
|
|
191 |
me->aliases[0] = "mvmeppc"; |
machine_entry_add_alias(me, "mvmeppc"); |
192 |
|
|
193 |
me->subtype[0] = machine_entry_subtype_new( |
machine_entry_add_subtype(me, "MVME1600", MACHINE_MVMEPPC_1600, |
194 |
"MVME1600", MACHINE_MVMEPPC_1600, 1); |
"mvme1600", NULL); |
|
me->subtype[0]->aliases[0] = "mvme1600"; |
|
195 |
|
|
196 |
me->subtype[1] = machine_entry_subtype_new( |
machine_entry_add_subtype(me, "MVME2100", MACHINE_MVMEPPC_2100, |
197 |
"MVME2100", MACHINE_MVMEPPC_2100, 1); |
"mvme2100", NULL); |
|
me->subtype[1]->aliases[0] = "mvme2100"; |
|
198 |
|
|
199 |
me->subtype[2] = machine_entry_subtype_new( |
machine_entry_add_subtype(me, "MVME5500", MACHINE_MVMEPPC_5500, |
200 |
"MVME5500", MACHINE_MVMEPPC_5500, 1); |
"mvme5500", NULL); |
|
me->subtype[2]->aliases[0] = "mvme5500"; |
|
201 |
|
|
202 |
me->set_default_ram = machine_default_ram_mvmeppc; |
me->set_default_ram = machine_default_ram_mvmeppc; |
|
|
|
|
machine_entry_add(me, ARCH_PPC); |
|
203 |
} |
} |
204 |
|
|