1 |
/* |
/* |
2 |
* Copyright (C) 2005-2006 Anders Gavare. All rights reserved. |
* Copyright (C) 2005-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_cats.c,v 1.5 2006/06/24 10:19:19 debug Exp $ |
* $Id: machine_cats.c,v 1.13 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" |
#include "bus_isa.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 |
|
|
47 |
MACHINE_SETUP(cats) |
MACHINE_SETUP(cats) |
48 |
{ |
{ |
49 |
struct ebsaboot ebsaboot; |
struct ebsaboot ebsaboot; |
50 |
char bs[300]; |
struct pci_data *pci_bus; |
51 |
|
char bs[300], tmpstr[400]; |
52 |
int boot_id = machine->bootdev_id >= 0? machine->bootdev_id : 0; |
int boot_id = machine->bootdev_id >= 0? machine->bootdev_id : 0; |
53 |
|
|
54 |
machine->machine_name = "CATS evaluation board"; |
machine->machine_name = "CATS evaluation board"; |
61 |
fprintf(stderr, "WARNING! Real CATS machines cannot" |
fprintf(stderr, "WARNING! Real CATS machines cannot" |
62 |
" have more than 256 MB RAM. Continuing anyway.\n"); |
" have more than 256 MB RAM. Continuing anyway.\n"); |
63 |
|
|
64 |
machine->md_int.footbridge_data = |
snprintf(tmpstr, sizeof(tmpstr), "footbridge irq=%s.cpu[%i].irq" |
65 |
device_add(machine, "footbridge addr=0x42000000"); |
" addr=0x42000000", machine->path, machine->bootstrap_cpu); |
66 |
machine->md_interrupt = isa32_interrupt; |
pci_bus = device_add(machine, tmpstr); |
|
machine->isa_pic_data.native_irq = 10; |
|
67 |
|
|
68 |
/* DC21285_ROM_BASE (256 KB at 0x41000000) */ |
/* DC21285_ROM_BASE (256 KB at 0x41000000) */ |
69 |
dev_ram_init(machine, 0x41000000, 256 * 1024, DEV_RAM_RAM, 0); |
dev_ram_init(machine, 0x41000000, 256 * 1024, DEV_RAM_RAM, 0); |
80 |
/* OpenBSD reboot needs 0xf??????? to be mapped to phys.: */ |
/* OpenBSD reboot needs 0xf??????? to be mapped to phys.: */ |
81 |
dev_ram_init(machine, 0xf0000000, 0x1000000, DEV_RAM_MIRROR, 0x0); |
dev_ram_init(machine, 0xf0000000, 0x1000000, DEV_RAM_MIRROR, 0x0); |
82 |
|
|
83 |
bus_isa_init(machine, BUS_ISA_PCKBC_FORCE_USE | |
bus_pci_add(machine, pci_bus, machine->memory, 0xc0, 8, 0, "s3_virge"); |
|
BUS_ISA_PCKBC_NONPCSTYLE, 0x7c000000, 0x80000000, 32, 48); |
|
|
|
|
|
bus_pci_add(machine, machine->md_int.footbridge_data->pcibus, |
|
|
machine->memory, 0xc0, 8, 0, "s3_virge"); |
|
84 |
|
|
85 |
if (!machine->prom_emulation) |
if (!machine->prom_emulation) |
86 |
return; |
return; |