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.9 2006/06/24 10:19:19 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"); |