|
|
1.1 root 1: \ *****************************************************************************
2: \ * Copyright (c) 2004, 2011 IBM Corporation
3: \ * All rights reserved.
4: \ * This program and the accompanying materials
5: \ * are made available under the terms of the BSD License
6: \ * which accompanies this distribution, and is available at
7: \ * http://www.opensource.org/licenses/bsd-license.php
8: \ *
9: \ * Contributors:
10: \ * IBM Corporation - initial implementation
11: \ ****************************************************************************/
12:
13: \ The master file. Everything else is included into here.
14:
15: hex
16:
17: ' ll-cr to cr
18:
19: #include "header.fs"
20:
21: #include "hvterm.fs"
22:
23: #include "base.fs"
24:
1.1.1.2 ! root 25: \ Adjust load-base to point to paflof-start / 2:
! 26: paflof-start 1 rshift fff not and to load-base
! 27:
1.1 root 28: \ Little-endian accesses. Also known as `wrong-endian'.
29: #include <little-endian.fs>
30:
31: : #join ( lo hi #bits -- x ) lshift or ;
32: : #split ( x #bits -- lo hi ) 2dup rshift dup >r swap lshift xor r> ;
33:
34: : blink ;
35: : reset-dual-emit ;
36: : console-clean-fifo ;
37: : bootmsg-nvupdate ;
38: : asm-cout 2drop drop ;
39:
40: #include "logging.fs"
41:
42: : log-string 2drop ;
43:
44: #include "bootmsg.fs"
45:
46: 000 cp
47:
48: #include "exception.fs"
49:
50: : mm-log-warning 2drop ;
51:
52: : write-mm-log ( data length type -- status )
53: 3drop 0
54: ;
55:
56: 080 cp
57:
58: 100 cp
59:
60: \ Input line editing.
61: #include "accept.fs"
62:
63: 120 cp
64:
65: #include "dump.fs"
66:
67: cistack ciregs >r1 ! \ kernel wants a stack :-)
68:
69: #include "romfs.fs"
70:
71: 140 cp
72:
73: 200 cp
74:
75: 201 cp
76: #include <slof-logo.fs>
77: #include <banner.fs>
78:
79: : .banner .slof-logo .banner ;
80:
81: 220 cp
82:
83: DEFER find-boot-sector ( -- )
84:
85: 240 cp
86: \ Timebase frequency, in Hz. Start with a good default
87: \ Use device-tree later to fix it up
88: d# 512000000 VALUE tb-frequency \ default value - needed for "ms" to work
89: -1 VALUE cpu-frequency
90:
91: #include "helper.fs"
92: 260 cp
93:
94: #include <timebase.fs>
95:
96: 280 cp
97:
98: 2c0 cp
99:
100: 2e0 cp
101:
102: #include <quiesce.fs>
103:
104: 300 cp
105:
106: #include <usb/usb-static.fs>
107:
108: 320 cp
109:
110: #include <scsi-loader.fs>
111:
112: 340 cp
113:
114: 360 cp
115:
116: #include "fdt.fs"
117:
118: 370 cp
119:
120: #include "tree.fs"
121:
122: 800 cp
123:
124: #include "nvram.fs"
125:
126: 880 cp
127:
128: #include "envvar.fs"
129: check-for-nvramrc
130:
131: 890 cp
132:
133: #include "qemu-bootlist.fs"
134:
135: 8a0 cp
136:
137: \ The client interface.
138: #include "client.fs"
139: \ ELF binary file format.
140: #include "elf.fs"
141: #include <loaders.fs>
142:
143: 8b0 cp
144:
1.1.1.2 ! root 145: \ Claim remaining memory that is used by firmware:
! 146: romfs-base 400000 0 ' claim CATCH IF ." claim failed!" cr 2drop THEN drop
1.1 root 147:
148: 8ff cp
149:
150: #include <start-up.fs>
151:
152: ." " \ Clear last checkpoint
153:
154: #include <boot.fs>
155:
156: cr .( Welcome to Open Firmware)
157: cr
158: #include "copyright-oss.fs"
159: cr cr
160:
161: \ this CATCH is to ensure the code bellow always executes: boot may ABORT!
162: ' start-it CATCH drop
163:
164: cr ." Ready!"
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.