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: |
25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: machine_hpcmips.c,v 1.3 2006/06/24 10:19:19 debug Exp $ |
* $Id: machine_hpcmips.c,v 1.6 2007/01/21 21:02:57 debug Exp $ |
29 |
*/ |
*/ |
30 |
|
|
31 |
#include <stdio.h> |
#include <stdio.h> |
36 |
#include "device.h" |
#include "device.h" |
37 |
#include "devices.h" |
#include "devices.h" |
38 |
#include "machine.h" |
#include "machine.h" |
|
#include "machine_interrupts.h" |
|
39 |
#include "memory.h" |
#include "memory.h" |
40 |
#include "misc.h" |
#include "misc.h" |
41 |
|
|
86 |
machine->main_console_handle = (size_t) |
machine->main_console_handle = (size_t) |
87 |
device_add(machine, tmpstr); |
device_add(machine, tmpstr); |
88 |
|
|
89 |
machine->md_int.vr41xx_data = dev_vr41xx_init(machine, |
dev_vr41xx_init(machine, machine->memory, 4131); |
|
machine->memory, 4131); |
|
|
machine->md_interrupt = vr41xx_interrupt; |
|
90 |
|
|
91 |
hpc_platid_cpu_arch = 1; /* MIPS */ |
hpc_platid_cpu_arch = 1; /* MIPS */ |
92 |
hpc_platid_cpu_series = 1; /* VR */ |
hpc_platid_cpu_series = 1; /* VR */ |
116 |
machine->main_console_handle = (size_t) |
machine->main_console_handle = (size_t) |
117 |
device_add(machine, tmpstr); |
device_add(machine, tmpstr); |
118 |
|
|
119 |
machine->md_int.vr41xx_data = dev_vr41xx_init(machine, |
dev_vr41xx_init(machine, machine->memory, 4121); |
|
machine->memory, 4121); |
|
|
machine->md_interrupt = vr41xx_interrupt; |
|
120 |
|
|
121 |
hpc_platid_cpu_arch = 1; /* MIPS */ |
hpc_platid_cpu_arch = 1; /* MIPS */ |
122 |
hpc_platid_cpu_series = 1; /* VR */ |
hpc_platid_cpu_series = 1; /* VR */ |
140 |
hpc_fb_bits = 16; |
hpc_fb_bits = 16; |
141 |
hpc_fb_encoding = BIFB_D16_0000; |
hpc_fb_encoding = BIFB_D16_0000; |
142 |
|
|
143 |
machine->md_int.vr41xx_data = dev_vr41xx_init(machine, |
dev_vr41xx_init(machine, machine->memory, 4121); |
|
machine->memory, 4121); |
|
|
machine->md_interrupt = vr41xx_interrupt; |
|
144 |
|
|
145 |
hpc_platid_cpu_arch = 1; /* MIPS */ |
hpc_platid_cpu_arch = 1; /* MIPS */ |
146 |
hpc_platid_cpu_series = 1; /* VR */ |
hpc_platid_cpu_series = 1; /* VR */ |
164 |
hpc_fb_bits = 16; |
hpc_fb_bits = 16; |
165 |
hpc_fb_encoding = BIFB_D16_0000; |
hpc_fb_encoding = BIFB_D16_0000; |
166 |
|
|
167 |
machine->md_int.vr41xx_data = dev_vr41xx_init(machine, |
dev_vr41xx_init(machine, machine->memory, 4121); |
|
machine->memory, 4121); |
|
|
machine->md_interrupt = vr41xx_interrupt; |
|
168 |
|
|
169 |
hpc_platid_cpu_arch = 1; /* MIPS */ |
hpc_platid_cpu_arch = 1; /* MIPS */ |
170 |
hpc_platid_cpu_series = 1; /* VR */ |
hpc_platid_cpu_series = 1; /* VR */ |
188 |
hpc_fb_bits = 16; |
hpc_fb_bits = 16; |
189 |
hpc_fb_encoding = BIFB_D16_0000; |
hpc_fb_encoding = BIFB_D16_0000; |
190 |
|
|
191 |
machine->md_int.vr41xx_data = dev_vr41xx_init(machine, |
dev_vr41xx_init(machine, machine->memory, 4121); |
|
machine->memory, 4121); |
|
|
machine->md_interrupt = vr41xx_interrupt; |
|
192 |
|
|
193 |
hpc_platid_cpu_arch = 1; /* MIPS */ |
hpc_platid_cpu_arch = 1; /* MIPS */ |
194 |
hpc_platid_cpu_series = 1; /* VR */ |
hpc_platid_cpu_series = 1; /* VR */ |
212 |
hpc_fb_bits = 16; |
hpc_fb_bits = 16; |
213 |
hpc_fb_encoding = BIFB_D16_0000; |
hpc_fb_encoding = BIFB_D16_0000; |
214 |
|
|
215 |
machine->md_int.vr41xx_data = dev_vr41xx_init(machine, |
dev_vr41xx_init(machine, machine->memory, 4121); |
|
machine->memory, 4121); |
|
|
machine->md_interrupt = vr41xx_interrupt; |
|
216 |
|
|
217 |
hpc_platid_cpu_arch = 1; /* MIPS */ |
hpc_platid_cpu_arch = 1; /* MIPS */ |
218 |
hpc_platid_cpu_series = 1; /* VR */ |
hpc_platid_cpu_series = 1; /* VR */ |
236 |
hpc_fb_bits = 4; |
hpc_fb_bits = 4; |
237 |
hpc_fb_encoding = BIFB_D4_M2L_F; |
hpc_fb_encoding = BIFB_D4_M2L_F; |
238 |
|
|
239 |
machine->md_int.vr41xx_data = dev_vr41xx_init(machine, |
dev_vr41xx_init(machine, machine->memory, 4181); |
|
machine->memory, 4181); |
|
|
machine->md_interrupt = vr41xx_interrupt; |
|
240 |
|
|
241 |
/* TODO: Hm... irq 17 according to linux, but |
/* TODO: Hm... irq 17 according to linux, but |
242 |
VRIP_INTR_SIU (=9) here? */ |
VRIP_INTR_SIU (=9) here? */ |
275 |
hpc_fb_bits = 16; |
hpc_fb_bits = 16; |
276 |
hpc_fb_encoding = BIFB_D16_0000; |
hpc_fb_encoding = BIFB_D16_0000; |
277 |
|
|
278 |
machine->md_int.vr41xx_data = dev_vr41xx_init(machine, |
dev_vr41xx_init(machine, machine->memory, 4121); |
|
machine->memory, 4121); |
|
|
machine->md_interrupt = vr41xx_interrupt; |
|
279 |
|
|
280 |
hpc_platid_cpu_arch = 1; /* MIPS */ |
hpc_platid_cpu_arch = 1; /* MIPS */ |
281 |
hpc_platid_cpu_series = 1; /* VR */ |
hpc_platid_cpu_series = 1; /* VR */ |
299 |
platid_machine, (hpc_platid_vendor << 22) + (hpc_platid_series<<16) |
platid_machine, (hpc_platid_vendor << 22) + (hpc_platid_series<<16) |
300 |
+ (hpc_platid_model << 8) + hpc_platid_submodel); |
+ (hpc_platid_model << 8) + hpc_platid_submodel); |
301 |
|
|
|
if (machine->use_x11) { |
|
|
machine->main_console_handle = |
|
|
machine->md_int.vr41xx_data->kiu_console_handle; |
|
|
} |
|
|
|
|
302 |
if (hpc_fb_addr != 0) { |
if (hpc_fb_addr != 0) { |
303 |
dev_fb_init(machine, machine->memory, hpc_fb_addr, VFB_HPC, |
dev_fb_init(machine, machine->memory, hpc_fb_addr, VFB_HPC, |
304 |
hpc_fb_xsize, hpc_fb_ysize, |
hpc_fb_xsize, hpc_fb_ysize, |