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_walnut.c,v 1.1 2006/01/06 13:03:57 debug Exp $ |
* $Id: machine_walnut.c,v 1.5 2007/02/24 04:38:18 debug Exp $ |
29 |
|
* |
30 |
|
* Emulation of a Walnut evaluation board, for experimenting with |
31 |
|
* NetBSD/evbppc (http://www.netbsd.org/Ports/evbppc/). |
32 |
|
* |
33 |
|
* NOTE/TODO: This is just a dummy skeleton, it doesn't emulate anything yet. |
34 |
|
* |
35 |
|
* TODO: How about other evbppc machines? |
36 |
*/ |
*/ |
37 |
|
|
38 |
#include <stdio.h> |
#include <stdio.h> |
44 |
#include "device.h" |
#include "device.h" |
45 |
#include "devices.h" |
#include "devices.h" |
46 |
#include "machine.h" |
#include "machine.h" |
|
#include "machine_interrupts.h" |
|
47 |
#include "memory.h" |
#include "memory.h" |
48 |
#include "misc.h" |
#include "misc.h" |
49 |
|
|
50 |
|
|
51 |
MACHINE_SETUP(walnut) |
MACHINE_SETUP(walnut) |
52 |
{ |
{ |
|
/* |
|
|
* NetBSD/evbppc (http://www.netbsd.org/Ports/evbppc/) |
|
|
*/ |
|
53 |
machine->machine_name = "Walnut evaluation board"; |
machine->machine_name = "Walnut evaluation board"; |
54 |
|
|
55 |
|
/* TODO: ns16550 irq */ |
56 |
machine->main_console_handle = (size_t)device_add(machine, |
machine->main_console_handle = (size_t)device_add(machine, |
57 |
"ns16550 irq=0 addr=0xef600300"); |
"ns16550 addr=0xef600300"); |
58 |
|
|
59 |
/* OpenBIOS board config data: */ |
/* OpenBIOS board config data: */ |
60 |
dev_ram_init(machine, 0xfffe0b50, 64, DEV_RAM_RAM, 0); |
dev_ram_init(machine, 0xfffe0b50, 64, DEV_RAM_RAM, 0); |
86 |
|
|
87 |
MACHINE_REGISTER(walnut) |
MACHINE_REGISTER(walnut) |
88 |
{ |
{ |
89 |
MR_DEFAULT(walnut, "Walnut evaluation board", ARCH_PPC, |
MR_DEFAULT(walnut, "Walnut evaluation board", ARCH_PPC, MACHINE_WALNUT); |
90 |
MACHINE_WALNUT, 2, 0); |
|
91 |
me->aliases[0] = "evbppc"; |
machine_entry_add_alias(me, "evbppc"); |
92 |
me->aliases[1] = "walnut"; |
machine_entry_add_alias(me, "walnut"); |
|
machine_entry_add(me, ARCH_PPC); |
|
93 |
} |
} |
94 |
|
|