2002-09-19 04:57:10 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
# Simple psim h/w description
|
|
|
|
#
|
2004-02-04 13:23:05 +00:00
|
|
|
# The .gdbinit should contain something like:
|
|
|
|
#
|
|
|
|
# target sim -e chirp -r 33554432 -f psim-tree
|
|
|
|
# load
|
|
|
|
#
|
|
|
|
# (The -r option is the amount of physical RAM the simulator has)
|
|
|
|
#
|
2002-09-19 04:57:10 +00:00
|
|
|
|
|
|
|
/#address-cells 1
|
|
|
|
/openprom/options/use-stdio? false
|
|
|
|
#/openprom/options/strict-alignment? true
|
|
|
|
|
2004-02-04 13:23:05 +00:00
|
|
|
/options
|
|
|
|
./output-device "psim-stdout
|
|
|
|
|
|
|
|
#
|
|
|
|
# Define the disk device alias so ofwd can identify it
|
|
|
|
#
|
|
|
|
/aliases
|
|
|
|
./ofwdisk "/phb@0x70000000/ide@1/disk@0
|
|
|
|
|
2002-09-19 04:57:10 +00:00
|
|
|
#
|
|
|
|
# CPU definition. The phandle property is to help nexus.c locate the
|
|
|
|
# interrupt controller.
|
|
|
|
#
|
|
|
|
/cpus/cpu@0
|
|
|
|
|
|
|
|
#
|
2004-02-04 13:23:05 +00:00
|
|
|
# disk file, done via phb. maybe there's a simpler way.
|
2002-09-19 04:57:10 +00:00
|
|
|
#
|
|
|
|
/phb@0x70000000
|
|
|
|
./device_type "pci
|
|
|
|
./name "pci
|
|
|
|
./#address-cells 3
|
|
|
|
./#size-cells 2
|
|
|
|
./ranges ni0,0,0,0 0xc0000000 0x10000
|
|
|
|
|
|
|
|
/phb@0x70000000/ide@1
|
|
|
|
./device_type "ide
|
|
|
|
./name "ide
|
|
|
|
./assigned-addresses \
|
|
|
|
ni0,0,10,1f0 8 \
|
|
|
|
ni0,0,14,3f8 8 \
|
|
|
|
ni0,0,18,170 8 \
|
|
|
|
ni0,0,1c,378 8 \
|
|
|
|
ni0,0,20,200 8
|
|
|
|
./reg \
|
|
|
|
1 0 \
|
|
|
|
i0,0,10,0 8 \
|
|
|
|
i0,0,18,0 8 \
|
|
|
|
i0,0,14,6 1 \
|
|
|
|
i0,0,1c,6 1 \
|
|
|
|
i0,0,20,0 8
|
|
|
|
./ready-delay 1000
|
|
|
|
|
2004-02-04 13:23:05 +00:00
|
|
|
/phb@0x70000000/ide@1/disk@0/file "../image.iso
|
2002-09-19 04:57:10 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# I/O Bus
|
|
|
|
#
|
2004-02-04 13:23:05 +00:00
|
|
|
/iobus@0x90000000
|
2002-09-19 04:57:10 +00:00
|
|
|
./name psim-iobus
|
2004-02-04 13:23:05 +00:00
|
|
|
./reg 0x90000000 0x20000000
|
2002-09-19 04:57:10 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# OpenPIC
|
|
|
|
#
|
2004-02-04 13:23:05 +00:00
|
|
|
/iobus@0x90000000/opic@0x90000000
|
2002-09-19 04:57:10 +00:00
|
|
|
./name interrupt-controller
|
|
|
|
./device_type open-pic
|
|
|
|
./compatible psim,open-pic
|
2004-02-04 13:23:05 +00:00
|
|
|
./reg 0x90000000 0x40000
|
2002-09-19 04:57:10 +00:00
|
|
|
./interrupt-ranges 0 256
|
|
|
|
|
|
|
|
/iobus/opic > intr0 int /cpus/cpu@0x0
|
|
|
|
|
|
|
|
#
|
|
|
|
# IDE1
|
|
|
|
#
|
2004-02-04 13:23:05 +00:00
|
|
|
#/iobus@0x90000000/ide@0x90052000
|
2002-09-19 04:57:10 +00:00
|
|
|
# ./name ata-4
|
|
|
|
# ./ioport 1
|
|
|
|
# ./device_type ata
|
|
|
|
# ./interrupt 12
|
2004-02-04 13:23:05 +00:00
|
|
|
# ./reg 0x90052000 8 0x90052010 8 0x90052020 8 0x90052030 1 0x90052040 1 0x90052050 8
|
|
|
|
#/iobus@0x90000000/ide@0x90052000 > a irq12 /iobus/opic
|