Rev 3618 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3618 | Rev 3664 | ||
---|---|---|---|
1 | # Assembled from the Serengeti machine. Uses a serial console output, |
1 | # Assembled from the Serengeti machine. Uses a serial console output, |
2 | # graphical output is not supported. The firmware version requires |
2 | # graphical output is not supported. The firmware version requires |
3 | # HelenOS to be compiled with "Preserve A.OUT header in isofs.b" and |
3 | # HelenOS to be compiled with "Preserve A.OUT header in isofs.b" and |
4 | # "External ramdisk" options set to "No". |
4 | # "External ramdisk" options set to "No". |
5 | 5 | ||
6 | if not defined create_network {$create_network = "yes"} |
6 | if not defined create_network {$create_network = "yes"} |
7 | 7 | ||
8 | $disk_size = 8513945600 |
8 | $disk_size = 8513945600 |
9 | 9 | ||
10 | ### |
10 | ### |
11 | 11 | ||
12 | if not defined hostid {$hostid = 0x80804a6c} |
12 | if not defined hostid {$hostid = 0x80804a6c} |
13 | if not defined freq_mhz {$freq_mhz = 75} |
13 | if not defined freq_mhz {$freq_mhz = 75} |
14 | if not defined mac_address {$mac_address = "10:10:10:10:10:24"} |
14 | if not defined mac_address {$mac_address = "10:10:10:10:10:24"} |
15 | if not defined disk_size {$disk_size = 2128486400} |
15 | if not defined disk_size {$disk_size = 2128486400} |
16 | if not defined rtc_time {$rtc_time = "2002-06-02 17:00:00 UTC"} |
16 | if not defined rtc_time {$rtc_time = "2002-06-02 17:00:00 UTC"} |
17 | if not defined num_cpus {$num_cpus = 1} |
17 | if not defined num_cpus {$num_cpus = 1} |
18 | if not defined megs_per_cpu {$megs_per_cpu = 256} |
18 | if not defined megs_per_cpu {$megs_per_cpu = 128} |
19 | if not defined cpu_class {$cpu_class = "ultrasparc-iii"} |
19 | if not defined cpu_class {$cpu_class = "ultrasparc-iii"} |
20 | 20 | ||
21 | ### |
21 | ### |
22 | 22 | ||
23 | add-directory "%simics%/targets/serengeti/images/" |
23 | add-directory "%simics%/targets/serengeti/images/" |
24 | 24 | ||
25 | import-pci-components |
25 | import-pci-components |
26 | import-std-components |
26 | import-std-components |
27 | import-sun-components |
27 | import-sun-components |
28 | import-serengeti-components |
28 | import-serengeti-components |
29 | 29 | ||
30 | if $cpu_class == "ultrasparc-iii-plus" { |
30 | if $cpu_class == "ultrasparc-iii-plus" { |
31 | $create_function = "create-serengeti-us-iii-plus-cpu-board" |
31 | $create_function = "create-serengeti-us-iii-plus-cpu-board" |
32 | } else if $cpu_class == "ultrasparc-iii" { |
32 | } else if $cpu_class == "ultrasparc-iii" { |
33 | $create_function = "create-serengeti-us-iii-cpu-board" |
33 | $create_function = "create-serengeti-us-iii-cpu-board" |
34 | } else if $cpu_class == "ultrasparc-iv" { |
34 | } else if $cpu_class == "ultrasparc-iv" { |
35 | $create_function = "create-serengeti-us-iv-cpu-board" |
35 | $create_function = "create-serengeti-us-iv-cpu-board" |
36 | } else if $cpu_class == "ultrasparc-iv-plus" { |
36 | } else if $cpu_class == "ultrasparc-iv-plus" { |
37 | $create_function = "create-serengeti-us-iv-plus-cpu-board" |
37 | $create_function = "create-serengeti-us-iv-plus-cpu-board" |
38 | } else { |
38 | } else { |
39 | echo "Unknown cpu_class" + $cpu_class |
39 | echo "Unknown cpu_class" + $cpu_class |
40 | exit 1 |
40 | exit 1 |
41 | } |
41 | } |
42 | 42 | ||
43 | $system = (create-serengeti-6800-chassis hostid = $hostid |
43 | $system = (create-serengeti-6800-chassis hostid = $hostid |
44 | mac_address = $mac_address |
44 | mac_address = $mac_address |
45 | rtc_time = $rtc_time) |
45 | rtc_time = $rtc_time) |
46 | $board = 0 |
46 | $board = 0 |
47 | $cpus_left = $num_cpus |
47 | $cpus_left = $num_cpus |
48 | while $cpus_left > 0 { |
48 | while $cpus_left > 0 { |
49 | $cpus = (min 4 $cpus_left) |
49 | $cpus = (min 4 $cpus_left) |
50 | $cpubrd[$board] = ($create_function num_cpus = $cpus |
50 | $cpubrd[$board] = ($create_function num_cpus = $cpus |
51 | cpu_frequency = $freq_mhz |
51 | cpu_frequency = $freq_mhz |
52 | memory_megs = ($megs_per_cpu * $cpus)) |
52 | memory_megs = ($megs_per_cpu * $cpus)) |
53 | $system.connect ("cpu-slot" + $board) $cpubrd[$board] |
53 | $system.connect ("cpu-slot" + $board) $cpubrd[$board] |
54 | $board += 1 |
54 | $board += 1 |
55 | $cpus_left -= 4 |
55 | $cpus_left -= 4 |
56 | } |
56 | } |
57 | unset cpus |
57 | unset cpus |
58 | 58 | ||
59 | $pciboard = (create-serengeti-pci8-board) |
59 | $pciboard = (create-serengeti-pci8-board) |
60 | 60 | ||
61 | $pci_hme = (create-sun-pci-hme mac_address = $mac_address) |
61 | $pci_hme = (create-sun-pci-hme mac_address = $mac_address) |
62 | $pci_glm = (create-pci-sym53c875) |
62 | $pci_glm = (create-pci-sym53c875) |
63 | $scsi_bus = (create-std-scsi-bus) |
63 | $scsi_bus = (create-std-scsi-bus) |
64 | $scsi_disk = (create-std-scsi-disk scsi_id = 0 size = $disk_size) |
64 | $scsi_disk = (create-std-scsi-disk scsi_id = 0 size = $disk_size) |
65 | $scsi_cdrom = (create-std-scsi-cdrom scsi_id = 6) |
65 | $scsi_cdrom = (create-std-scsi-cdrom scsi_id = 6) |
66 | $console = (create-std-text-console) |
66 | $console = (create-std-text-console) |
67 | 67 | ||
68 | ### |
68 | ### |
69 | 69 | ||
70 | $system.connect io-slot6 $pciboard |
70 | $system.connect io-slot6 $pciboard |
71 | $pciboard.connect pci-slot0 $pci_hme |
71 | $pciboard.connect pci-slot0 $pci_hme |
72 | $pciboard.connect pci-slot5 $pci_glm |
72 | $pciboard.connect pci-slot5 $pci_glm |
73 | $scsi_bus.connect $pci_glm |
73 | $scsi_bus.connect $pci_glm |
74 | $scsi_bus.connect $scsi_disk |
74 | $scsi_bus.connect $scsi_disk |
75 | $scsi_bus.connect $scsi_cdrom |
75 | $scsi_bus.connect $scsi_cdrom |
76 | $system.connect $console |
76 | $system.connect $console |
77 | 77 | ||
78 | $machine_defined = 1 |
78 | $machine_defined = 1 |
79 | 79 | ||
80 | instantiate-components |
80 | instantiate-components |
81 | 81 | ||
82 | $eth_comp = $pci_hme |
82 | $eth_comp = $pci_hme |
83 | $eth_cnt = "" |
83 | $eth_cnt = "" |
84 | 84 | ||
85 | if $create_network == "yes" { |
85 | if $create_network == "yes" { |
86 | if not $eth_link { |
86 | if not $eth_link { |
87 | $eth_link = (new-std-ethernet-link) |
87 | $eth_link = (new-std-ethernet-link) |
88 | } |
88 | } |
89 | $eth_link.connect $eth_comp $eth_cnt |
89 | $eth_link.connect $eth_comp $eth_cnt |
90 | if not $service_node { |
90 | if not $service_node { |
91 | $service_node = (new-std-service-node) |
91 | $service_node = (new-std-service-node) |
92 | local $cnt = ($service_node.add-connector 10.10.0.1) |
92 | local $cnt = ($service_node.add-connector 10.10.0.1) |
93 | $service_node.connect $cnt $eth_link |
93 | $service_node.connect $cnt $eth_link |
94 | } |
94 | } |
95 | } |
95 | } |
96 | 96 | ||
97 | unset eth_comp eth_cnt |
97 | unset eth_comp eth_cnt |
98 | 98 | ||
99 | # this script is to be run from the root HelenOS directory |
99 | # this script is to be run from the root HelenOS directory |
100 | $cdrom_path = "image.iso" |
100 | $cdrom_path = "image.iso" |
101 | ($scsi_cdrom.get-component-object cd).insert (new-file-cdrom $cdrom_path) |
101 | ($scsi_cdrom.get-component-object cd).insert (new-file-cdrom $cdrom_path) |
102 | $system.set-prom-env boot-command "boot /ssm@0,0/pci@19,700000/scsi@2/disk@6,0:f" |
102 | $system.set-prom-env boot-command "boot /ssm@0,0/pci@19,700000/scsi@2/disk@6,0:f" |
103 | $system.set-prom-env auto-boot? true |
103 | $system.set-prom-env auto-boot? true |
104 | 104 |