xref: /freebsd/sys/powerpc/psim/psim-tree (revision 5f4c09dd85bff675e0ca63c55ea3c517e0fddfcc)
1#
2# Simple psim h/w description
3#
4# The .gdbinit should contain something like:
5#
6#   target sim -e chirp -r 33554432 -f psim-tree
7#   load
8#
9#  (The -r option is the amount of physical RAM the simulator has)
10#
11
12/#address-cells 1
13/openprom/options/use-stdio? false
14#/openprom/options/strict-alignment? true
15
16/options
17	./output-device "psim-stdout
18
19#
20# Define the disk device alias so ofwd can identify it
21#
22/aliases
23	./ofwdisk "/phb@0x70000000/ide@1/disk@0
24
25#
26# CPU definition. The phandle property is to help nexus.c locate the
27# interrupt controller.
28#
29/cpus/cpu@0
30
31#
32# disk file, done via phb. maybe there's a simpler way.
33#
34/phb@0x70000000
35        ./device_type "pci
36        ./name "pci
37        ./#address-cells 3
38        ./#size-cells 2
39        ./ranges ni0,0,0,0 0xc0000000 0x10000
40
41/phb@0x70000000/ide@1
42        ./device_type "ide
43        ./name "ide
44        ./assigned-addresses \
45                ni0,0,10,1f0 8 \
46                ni0,0,14,3f8 8 \
47                ni0,0,18,170 8 \
48                ni0,0,1c,378 8 \
49                ni0,0,20,200 8
50        ./reg \
51                1 0 \
52                i0,0,10,0 8 \
53                i0,0,18,0 8 \
54                i0,0,14,6 1 \
55                i0,0,1c,6 1 \
56                i0,0,20,0 8
57        ./ready-delay 1000
58
59/phb@0x70000000/ide@1/disk@0/file "../image.iso
60
61#
62# I/O Bus
63#
64/iobus@0x90000000
65	./name psim-iobus
66	./reg 0x90000000 0x20000000
67
68#
69# OpenPIC
70#
71/iobus@0x90000000/opic@0x90000000
72        ./name         interrupt-controller
73        ./device_type  open-pic
74        ./compatible   psim,open-pic
75        ./reg 0x90000000 0x40000
76        ./interrupt-ranges 0 256
77
78/iobus/opic > intr0 int /cpus/cpu@0x0
79
80#
81# IDE1
82#
83#/iobus@0x90000000/ide@0x90052000
84#        ./name ata-4
85#        ./ioport 1
86#        ./device_type ata
87#        ./interrupt  12
88#        ./reg 0x90052000 8 0x90052010 8 0x90052020 8 0x90052030 1 0x90052040 1 0x90052050 8
89#/iobus@0x90000000/ide@0x90052000 > a irq12 /iobus/opic
90